【发布时间】:2020-01-09 19:05:19
【问题描述】:
使用 - RStudio 版本 1.2.1335 -R 版本
我能够将 R markdown 文件编入 HTML 和 Word,但使用 PDF 失败。我不断收到相同的错误消息,告诉我它无法找到“Palatino”字体。
文件已成功处理(所有块都运行)。
我尝试重新安装和重置 Miktex 和 Tinytex,以及 R 本身。我对此很陌生,所以我不确定如何进行。我应该安装 TexLive 吗?
这是我要运行的文件的标题:
--
title: "Assignment 1"
fontsize: 11pt
header-includes: \usepackage{fancyhdr}
geometry: "left=.5in,right=.5in,top=1in,bottom=1in"
output:
pdf_document:
latex_engine: xelatex
md_extensions: +inline_notes
number_sections: no
word_document: default
mathfont: Palatino
monofont: Courier
mainfont: Palatino
sansfont: Helvetica
subtitle: \textbf{Due Wednesday, 11 September 2019 (beginning of class)}
fontfamily: mathpazo
---
这是我继续收到的错误,没有呈现 PDF 文件:
输出文件:PBHLTH252-Assignment-1_post.knit.md
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS PBHLTH252-Assignment-1_post.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash+inline_notes - -输出 PBHLTH252-Assignment-1_post.tex --template "C:\Users\UYser\Documents\R\win-library\3.6\rmarkdown\rmd\latex\default-1.17.0.2.tex" --highlight 风格的探戈--pdf-engine xelatex --variable graphics=yes --lua-filter "C:/Users/UYser/Documents/R/win-library/3.6/rmarkdown/rmd/lua/pagebreak.lua" --variable "compact -标题:是的” tlmgr 搜索 --file --global "/Palatino." !包 fontspec 错误:找不到字体“Palatino”。
! kpathsea: 运行 mktextfm Palatino
!命令名称为 C:\Users\UYser\AppData\Roaming\TinyTeX\bin\win32\mktextfm
! kpathsea:将字体创建命令附加到missfont.log。
错误:无法编译 PBHLTH252-Assignment-1_post.tex。有关调试提示,请参阅https://yihui.name/tinytex/r/#debugging。有关更多信息,请参阅 PBHLTH252-Assignment-1_post.log。 另外:警告信息: 在 parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)) : 未能找到包含 Palatino 的包裹。 执行停止
我尝试关注这个帖子https://github.com/yihui/tinytex/issues/81,但没有成功:
- 运行这个建议的代码
tinytex::tlmgr_search("/Palatino[.](tfm|afm|mf|otf)")
结果:
包存储库http://ctan.math.illinois.edu/systems/texlive/tlnet(未验证:gpg 不可用)
- 运行这个
tinytex::tlmgr_install("multirow")
给我以下错误:
tlmgr 安装 Palatino。 'afm' 未被识别为内部或外部命令, 可运行的程序或批处理文件。 tlmgr 更新 --self tlmgr.pl:包存储库http://ctan.math.illinois.edu/systems/texlive/tlnet(未验证:gpg 不可用) tlmgr.pl:没有可用的 tlmgr 自我更新。 tlmgr 安装 Palatino。 'afm' 未被识别为内部或外部命令, 可运行的程序或批处理文件。
感谢任何帮助!
【问题讨论】:
标签: r r-markdown tinytex