lcreteig/amsterdown

Unicode error

BenGoudsmit opened this issue · 1 comments

Dear,

I'm including characters that pdflatex does not like, for example ≤ (U+2264).
This gives the error below.
I changed Rstudio's global options from pdflatex to xelatex, still the error persists.
Should I change something in template.tex?

Thank you for your efforts and answer.

output file: thesis.knit.md
[WARNING] Citeproc: citation cite:17 not found
[WARNING] Citeproc: citation cite:18 not found
[WARNING] Citeproc: citation cite:30 not found
[WARNING] Citeproc: citation cite:31 not found
! Package inputenc Error: Unicode character ≤ (U+2264)
(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
Error: LaTeX failed to compile thesis.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See thesis.log for more info.
Execution halted

Exited with status 1.

This seems to be a known issue with pdflatex. I was indeed able to fix it by switching to xelatex, following the instructions from the first link in the error message.

To be precise, you'll need to add something inbetween the following two lines in index.Rmd:

bookdown::pdf_book:
template: template.tex

So that in the end, it looks like this:

  bookdown::pdf_book:
    latex_engine: xelatex 
    template: template.tex