r - 如何将 R Markdown 文件编织成 pdf
问题描述
当我尝试将 R Markdown 文件呈现为 pdf 时,出现以下错误:
/Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS PC_final_proj.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output PC_final_proj.tex --template /Library /Frameworks/R.framework/Versions/3.6/Resources/library/rmarkdown/rmd/latex/default-1.17.0.2.tex --highlight-style tango --pdf-engine pdflatex --variable graphics=yes --variable ' geometry:margin=1in' --variable 'compact-title:yes' --include-in-header /var/folders/95/jvthp8r158q50jv8qjwy75j80000gn/T//RtmpIPFCYS/rmarkdown-str66203f066768.html 输出文件:PC_final_proj.knit.md
!包 inputenc 错误:Unicode 字符 (U+1F60E) (inputenc) 未设置为与 LaTeX 一起使用。
如果您使用的是 pdflatex,请尝试使用其他 LaTeX 引擎(例如 xelatex)。对于 R Markdown 用户,请参阅此
错误:无法编译 PLSC_final_proj.tex。调试技巧见https://yihui.name/tinytex/r/#debugging。有关更多信息,请参阅 PLSC_final_proj.log。执行停止
我已尝试以下方法来解决此问题,但无法解决;
{r message=FALSE}
在所有 r 块中,并将行 latex_engine: xelatex 更改为 YAML 标头
title: "Document 6"
output:
pdf_document:
latex_engine: xelatex
任何帮助表示赞赏。谢谢
解决方案
推荐阅读
- node.js - 使用 OAuth 时 Google 日历“请求缺少有效的 API 密钥”
- ios - 尝试使用委托来共享来自自定义 tableViewCell 的文本输入并且数据未共享
- php - 如何在 woocommerce 结帐页面中禁用字段
- android - BLE和Android:使用设备公共地址进行直接连接
- python - 如何将此 python 数据转换为 JSON
- java - 我们如何在 LinkedList 中获取元素索引正如所说的那样,它是随机存储的
- android - 如何为 otp 添加自动填充建议
- java - Reactor - 在处理错误的情况下延迟通量元素
- c - 仅与多个子进程之一共享内存?
- c# - Xamarin Forms UWP 在启动时崩溃