-
I would like to extend my rocker image to include with all the necessary latex packages preinstalled in order to complile a quarto document to quarto-elsevier. Is there a way to do this automatically? My naïve approach would be to extract everything in between packages for quarto-elsevier
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
That seems like a reasonable approach to me. Quarto's implementation of TinyTeX would automatically install the packages when a journal article is rendered, but since the packages are discovered at runtime, it would only install the packages required to compile the current document in the current configuration and could theoretically miss packages that are used conditionally. So it isn't much help in this case. In the end, since Quarto allows authors to inject packages via |
Beta Was this translation helpful? Give feedback.
-
My manual approach did not work very well, apparently some of the results of # create a directory with an arbitrary name and `cd` into this directory
mkdir elsevier; cd elsevier
# run the command following command to install the desired template
quarto use template quarto-journals/elsevier --no-prompt
# render the template qmd file, which has the same name as the parent folder
quarto render elsevier.qmd
# cd out of the directory and remove the created folder (we don't need it anymore)
cd ..; rm -r elsevier I mashed all these commands up into one line, prepended it with
PS: Using |
Beta Was this translation helpful? Give feedback.
My manual approach did not work very well, apparently some of the results of
perl -0777 -ne 'while(m/usepackage{(.+?)}/g){print "$1\n";}' *.tex | tr "," "\n"
weren't really latex packages and other necessary packages were missing. I'm now using the following approach instead: