Closed lfmcmillan closed 9 months ago
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
Hi,
I am suddenly getting an unexplained error whenever I try to knit an Rmd file to PDF. One example file I've tried to knit is shown below: it's just the RStudio Rmd file example but changed to output to pdf.
I have also attached the log, and the .tex file relabelled as a .txt file to allow Github to accept it.
The error I am getting is:
output file: temp_rmarkdown_doc.knit.md
! Undefined control sequence. l.128 \cs_new:Npe __color_backend_devicen_colorants:n #1
Error: LaTeX failed to compile temp_rmarkdown_doc.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See temp_rmarkdown_doc.log for more info. Execution halted
and I'm submitting this as an issue because I can't find any reference to this particular control sequence anywhere on the web, nor can I find it in the .knit.md file or in the .tex file.
I have tried updating to the latest version of tinytex, so I'm now on version 4.7, and updating to the latest version of knitr, so I'm now on 1.44, and I'm on R 4.3.1 and I've restarted RStudio and R.
The example below was saved as an .Rmd file named temp_rmarkdown_doc.Rmd.
R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
Including Plots
You can also embed plots, for example:
Note that the
echo = FALSE
parameter was added to the code chunk to prevent printing of the R code that generated the plot.