I have been using RMarkdown via R Studio to render PDF for a while but suddenly it failed to render PDF with the following error. Instead of PDF, it render a .tex file which I'm unsure why.
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS Question-10.2-and-3---RMD --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output Question-10.2-and-3---RMD.tex --lua-filter "C:\Users\hangt\OneDrive\Documents\R\win-library\4.1\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\hangt\OneDrive\Documents\R\win-library\4.1\rmarkdown\rmarkdown\lua\latex-div.lua" --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --variable "geometry:margin=1in"
! Package inputenc Error: Unicode character € (U+0080)
(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 Question-10.2-and-3---RMD.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Question-10.2-and-3---RMD.log for more info.
Execution halted
Sorry if the way I describe the issue is vague.
Thanks.
textcomp
package, or see tex.stackexchange.com/a/9868/24974