I have been getting these errors in my Rmd file generation
Error: LaTeX failed to compile C:/Users/abc/def/Trial.tex See https://yihui.org/tinytex/r/#debugging for debugging tips. Execution halted
I tried all the recommended steps below on the https://yihui.org/tinytex/r/#debugging website but the problem persists. How to fix this?
-
Update all your R and LaTeX packages:
update.packages(ask = FALSE, checkBuilt = TRUE)
tinytex::tlmgr_update() -
If you see an error message like “tlmgr: Remote repository is newer than local (2018 < 2019)” when updating LaTeX packages, it means your TinyTeX is too old now, and you need to reinstall it for a newer version:
tinytex::reinstall_tinytex() -
If neither updating nor reinstalling solves the problem, set the option in R:
options(tinytex.verbose = TRUE)
before you compile the document. This may show additional messages to help you debug the problem. If you are using R Markdown and the Knit button in RStudio, you should set the option in a code chunk in the R Markdown document.
options(tinytex.verbose = TRUE)
You can, and perhaps should, remove this option after you finish debugging (to silence LaTeX, because you no longer need to read the full log).
3