[英]Error: pandoc document conversion failed with error 43 Windows 7 R studio
[英]Package inputenc Error & Error: pandoc document conversion failed with error 43
我試圖在 RStudio 中使用 knitr 生成 PDF 文件,但遇到了問題。 我已經閱讀了很多在堆棧溢出和谷歌上找到的解決方案,但它們並不是很有幫助。 任何人都可以幫我解決這個問題嗎? 多謝!
錯誤顯示如下:
output file: final_project.knit.md "C:/Users/JOHNL_~1/AppData/Local/Pandoc/pandoc" +RTS -K512m -RTS final_project.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output final_project.pdf --template "E:\R\R-3.2.3\library\rmarkdown\rmd\latex\default-1.15.2.tex" --highlight-style tango --latex-engine pdflatex --variable graphics=yes --variable "geometry:margin=1in" ! Package inputenc Error: Unicode char 騫?(U+5E74) (inputenc) not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H for immediate help. ... l.128 \maketitle Try running pandoc with --latex-engine=xelatex. pandoc.exe: Error producing PDF Error: pandoc document conversion failed with error 43 In addition: Warning message: running command '"C:/Users/JOHNL_~1/AppData/Local/Pandoc/pandoc" +RTS -K512m -RTS final_project.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output final_project.pdf --template "E:\R\R-3.2.3\library\rmarkdown\rmd\latex\default-1.15.2.tex" --highlight-style tango --latex-engine pdflatex --variable graphics=yes --variable "geometry:margin=1in"' had status 43 Execution halted
我已經嘗試了可以從堆棧溢出中找到的大多數解決方案,但沒有奏效。 所以我擔心像添加latex_engine: xelatex
這樣的解決方案也無法解決這個問題。
有人可以幫我嗎? 非常感謝!
最好的事物
我已經弄清楚問題是什么,您必須選擇 WINDOWS-1252 作為您的文本編碼。
如果默認設置了其他類型,在工具>全局選項>代碼>保存中更改,默認文本編碼中選擇[詢問]。
希望這對你有用。
我不認為通過切換某些內容或設置某些內容是可行的方法。 只需仔細檢查您的代碼,尤其是您從某處復制的部分,而不是自己輸入。
我最近有同樣的問題。
我告訴你我如何解決這個問題。
我從 R markdown 中逐個刪除代碼以查找導致此問題的部分。 最后,我發現以下部分導致我的代碼出錯。
### Platform:Affymetrix A-AFFY-2-Affymetrix GeneChip Arabidopsis Genome [ATH1-121501].
我記得我從網頁上復制了這些信息。 所以我刪除它們並自己輸入這部分。 它可以運行並生成pdf文件而不會出現任何錯誤。
為了清楚起見,我向您展示了復制版本和我打字版本之間的區別:
這只是我認為的一個例子。 我想指出的是,當您將某些內容從未知資源文件復制到您的代碼中時,總是會出現問題。
希望這可以幫助您和其他因這個問題而感到沮喪的人。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.