0

When I try to render an R Markdown file to pdf, I get the following error:

/Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS PC_final_proj.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output PC_final_proj.tex --template /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rmarkdown/rmd/latex/default-1.17.0.2.tex --highlight-style tango --pdf-engine pdflatex --variable graphics=yes --variable 'geometry:margin=1in' --variable 'compact-title:yes' --include-in-header /var/folders/95/jvthp8r158q50jv8qjwy75j80000gn/T//RtmpIPFCYS/rmarkdown-str66203f066768.html output file: PC_final_proj.knit.md

! Package inputenc Error: Unicode character (U+1F60E) (inputenc) not set up for use with LaTeX.

Try other LaTeX engines instead (e.g., xelatex) if you are using pdflatex. For R Markdown users, see this

Error: Failed to compile PLSC_final_proj.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See PLSC_final_proj.log for more info. Execution halted

I have tried the following to resolve the issue but I cannot work around it;

{r message=FALSE}

in all the r chunks, and, changed the line latex_engine: xelatex to the YAML header

title: "Document 6"
output:
   pdf_document:
        latex_engine: xelatex

Any help is appreciated. Thanks

Camille Goudeseune
  • 2,934
  • 2
  • 35
  • 56
  • Did you enable installing missing packages on the fly? Or manually configuring `inputenc`? See [this](https://tex.stackexchange.com/questions/83440/inputenc-error-unicode-char-u8-not-set-up-for-use-with-latex) – NelsonGon Dec 09 '19 at 03:24
  • Try running `tinytex::install_tinytex()`, then close RStudio, re-open it and knit again. – Phil Dec 09 '19 at 03:36
  • I tried running tinytex::install_tinytex() but I'm still getting the same error – user12388757 Dec 09 '19 at 04:44
  • 1
    Please post a [mre] so that we can test possible solutions with your actual code. – Ralf Stubner Dec 09 '19 at 09:14

0 Answers0