scenarios with rmarkdown rendering when using custom LaTeX templates in R 4.3
I'm prototyping a solution and I've been banging my head against this for hours. I'm working with an scenario when trying to render an R Markdown document that uses a custom LaTeX template. The document compiles fine in R Markdown's default format, but when I switch to my custom template, I get the following behavior: ``` ! LaTeX behavior: File `mytemplate.sty' not found. ``` I have verified that the `mytemplate.sty` file is indeed located in the same directory as my Rmd file. Hereβs the YAML header from my R Markdown document: ```yaml --- title: "My Document" author: "Author Name" date: "2023-10-22" output: pdf_document: template: mytemplate.tex --- ``` I have also tried specifying the path to the `mytemplate.sty` file within the template file itself, but the behavior continues. My R version is 4.3, and Iβm using RStudio version 2023.09.0. Iβve updated all packages, including `rmarkdown`, to their latest versions. Based on my research, it seems that R Markdown is not finding the LaTeX file when rendering with a custom template. Iβd appreciate any insights on how to resolve this scenario or any best practices to ensure that custom LaTeX templates are correctly referenced in R Markdown documents. For context: I'm using R on macOS. Any help would be greatly appreciated! I'm developing on Windows 11 with R. I'd really appreciate any guidance on this.