Package inputenc Error: Unicode char \u8 in RStudio

后端 未结 5 1039
死守一世寂寞
死守一世寂寞 2020-12-28 16:34

In RStudio, when i go for convert my Markdown file to PDF then it gives me the error:

output file: report.knit.md

! Package inputenc Error

5条回答
  •  执念已碎
    2020-12-28 17:13

    Given the almost identical error message, I tried following @scoa's suggestion, but putting that line in the YAML header did not change the error, so for whatever reason, Knitr wasn't looking there to determine the LaTex engine. However, next to the "Knit PDF" button in the control bar is a settings menu that allows you to specify the LaTex ending in the "Advanced" pane. This solved the problem for me. It produces a slight variation on the suggestion above, modifying the YAML header thus:

      output:
         pdf_document:
             latex_engine: xelatex
    

    I can see that @scoa may have assumed the YAML output was already formatted this way, but what I was missing was the colon after 'pdf_document'. Using the settings dialogue created the proper syntax in the header.

    RStudio version 0.99.896, knitr version 1.12.3.

提交回复
热议问题