Reputation: 115
Hey I'm trying to use some latex in an R markdown file but I'm getting this error
:
Try other LaTeX engines instead (e.g., xelatex) if you are using pdflatex. For R Markdown users, see https://bookdown.org/yihui/rmarkdown/pdf-document.html
Error: Failed to compile M5_collab.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See M5_collab.log for more info. In addition: There were 33 warnings (use warnings() to see them) Execution halted
I've checked out the bookdown website and I've installed tinytex
install.packages("tinytex")
Can someone let me know what's going wrong? How can I solve this?
Thank you
Upvotes: 7
Views: 15602
Reputation: 161
I had the same problem as you.
In my case I wanted to generate a pdf file and received this message you received.
I solved the problem of defining latex_engine as follows:
---
title: "Report"
output:
pdf_document:
latex_engine: xelatex
---
Upvotes: 9