1

I'm just trying creating a pdf file with RMardown and after installing the tinytex package as follows:

tinytex::install_tinytex()

If I set at the very top of the .RMd doc the following wording:

output:
  pdf_document: default
  latex_engine: xelatex

I get back this error

! Package inputenc Error: Unicode character σ (U+03C3) (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
Errore: LaTeX failed to compile REPORT-CODES.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See REPORT-CODES.log for more info

While If I try reporting it as suggested in other post (or like this):

output:
  pdf_document: default
    latex_engine: xelatex

The error is:

Errore in yaml::yaml.load(..., eval.expr = TRUE) : 
  Scanner error: mapping values are not allowed in this context at line 6, column 17
Chiamate: <Anonymous> ... parse_yaml_front_matter -> yaml_load -> <Anonymous>

Where actually line 6 and 7 are the one for pdf_document and latex_engine respectively. Does anyone knows how to fix this?

12666727b9
  • 1,133
  • 1
  • 8
  • 22

1 Answers1

1

Remove the default keyword:

---
output:
  pdf_document: 
    latex_engine: xelatex
---

 Ï

enter image description here

  • Thanks for your kind reply. This .pdf doc should contain some object created by tab_model() function, that as far as I know they should be only supported by html format. Do you know whether it is possible to make them visible on this .pdf doc extension? – 12666727b9 Nov 05 '21 at 09:31
  • @mały_statystyczny If you have a new question, ask a new question. – samcarter_is_at_topanswers.xyz Nov 05 '21 at 09:33