I'm trying to compile a R Markdown file that uses exam::tex2image to generate an image from a Latex equation.
Unfortunately the compilation fails, the error message talks about a log file which doesn't exist.
Source code:
---
output:
pdf_document:
keep_tex: true
---
```{r 2sls, echo=FALSE, results="hide"}
exams::tex2image("2+2=4")
```
stdout:
❯ R -e "options(tinytex.verbose = TRUE);rmarkdown::render('README.Rmd', clean=F)"
> options(tinytex.verbose = TRUE);rmarkdown::render('README.Rmd', clean=F)
processing file: README.Rmd
|.......................................... | 67% (2sls)This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Arch Linux) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
Quitting from lines 8-9 (README.Rmd)
Error: LaTeX failed to compile tex2image.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See tex2image.log for more info.
Execution halted