I have an R shiny app that allows for the rendering and download of pdfs using Rmarkdown and tinytex. The .Rmd files use several LaTeX packages, one of which (digsig) is not available in the default tinytex repository. On my personal computer, I manually installed the digsig.sty file into my tinytex library. However, this shinyapp is being uploaded to RConnect via the RStudio publishing tool, and so this is not possible in “deployment”.
I believe the simplest solution is to include the digsig.sty file within the directory of my shinyapp (in the folder titled “latex”) and reference it directly, somehow. I have library(tinytex)
and library(rmarkdown)
and the packages load fine. I can see in the logs that pandoc is unable to find the digsig.sty file, but I am unsure how to make it available.
Here is what I have tried so far:
In .Rmd header:
- usepackage{digsig}
- usepackage{latex/digsig/}
- usepackage{latex/disgig}
- graphicspath{latex/}
- usepackage{latex/digsig/digsig}
I’ve also tried tinytex::tlmgr('install --file "latex/digsig/digsig.sty" digsig')
within the app.R
file to attempt to install the local package manually with tlmgr directly.
None of these options worked, and I am stumped! Am I misunderstanding how file paths work in rmarkdown or latex? Again,usepackage{digsig}
works fine on my machine, just not when deployed to RConnect.