这个错误显然与Latex有关,我已经尽了最大的努力谷歌并解决了它,但我得到的只是更多的错误。
初始错误:
! Package inputenc Error: Unicode character 锛?(U+FF0C)
(inputenc) not set up for use with LaTeX.
Try other LaTeX engines instead (e.g., xelatex) if you are using pdflatex. See https://bookdown.org/yihui/rmarkdown-cookbook/latex-unicode.html
错误: LaTeX failed to compile Jan-26-in-class-code.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Jan-26-in-class-code.log for more info.
此外: Warning message:
In grepl("==> Fatal error occurred", x[i], fixed = TRUE) :
输入的字符串1不适用于此语言环境
停止执行
所以我尝试了xelatex。然后我得到了
! LaTeX Error: File `unicode-math.sty' not found.
! Emergency stop.
<read *>
! Unfortunately, the package unicode-math could not be installed.
! Please check the log file:
! C:\Users\86188\AppData\Local\MiKTeX\2.9\miktex\log\xelatex.log
错误: LaTeX failed to compile Jan-26-in-class-code.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Jan-26-in-class-code.log for more info.
停止执行
我猜问题是我的计算机上没有安装"unicode-math“,所以我尝试了install.packages("unicode-math"),然后我得到了
Warning in install.packages :
package ‘unicode-math’ is not available for this version of R
我真诚地感谢您的任何指示或建议。谢谢!
发布于 2021-01-27 16:57:39
unicode-math是一个LaTeX包,而不是R包,因此需要使用LateX包管理器进行安装;如果使用TeX实时分发版,则使用tlmgr,或者将MiKTeX控制台与MiKTeX (通常是TeX主分发版)一起使用。
https://stackoverflow.com/questions/65913390
复制相似问题