![](/img/trans.png)
[英]! Package inputenc Error: Unicode character λ (U+03BB) (inputenc) not set up for use with LaTeX. while trying to knit in RMD
[英]Error when trying to knit R markdown: ! Package inputenc Error: Unicode character 錛?(U+FF0C) (inputenc) not set up for use with LaTeX
該錯誤顯然與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
我真誠地感謝任何指示或建議。 謝謝!
unicode-math is a LaTeX package and not an R package so it needs to be installed using a LateX package manager; tlmgr 如果使用 TeX Live 發行版,或者使用 MiKTeX 控制台和 MiKTeX(通常是 Windows 上的主要 TeX 發行版)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.