Closed cavo789 closed 1 year ago
I was expecting that everything was up-to-date. I mean, I just build the Docker image and one of the instruction is quarto tool install tinytex so that one is up-to-date
When you install quarto tool install tinytex
, you are installing one of the bundle from https://github.com/rstudio/tinytex-releases/
This bundles is built at a certain date, and include a certain set of package but not all CTAN. For now, Quarto install a Monthly build using the TinyTeX bundle.
So if your document requires some specific packages from CTAN that are missing from the install, quarto will try to install them as part of the auto-install feature (https://quarto.org/docs/output-formats/pdf-engine.html#quarto-pdf-engine). And updating is part of the process, also because TeXLive
is updated almost daily !
When using docker with LaTeX, you need to deal with installing everything you need once, or allowing updates indeed.
Several option for you:
Install TinyTeX and deactivate auto install from Quarto (https://quarto.org/docs/output-formats/pdf-engine.html#package-installation)
This is usual process for a docker image: You need to install all the requirement you have once at build time. This includes CTAN packages for your LaTeX rendering.
Install a newer version of TinyTeX in you docker container. Quarto install function does not allow that yet, but you can install TinyTeX with other ways. However, if you don't build your container often you will have the same issue, and solution above is still needed.
Install the TinyTeX-2
bundle which includes full CTAN
TinyTeX-2 contains the scheme-full scheme of TeX Live, which means all LaTeX packages that you could possibly install from CTAN. This is the largest bundle, and only available in the daily release.
This way you docker image will be pinned to a specific version, with no missing package, meaning no update should be triggered.
However, your image will be heavy !
Hope it helps understand how that works, and what you can do.
Hi Christophe and thanks for having taken time to give me a sooo complete answer.
I should admit; I'm new to Quarto and Latex (until now, I was using pandoc as a Docker image and it was easier; nothing to configure) but I would take a look to Quarto.
Ok, I've understood that I can disable auto-update by putting latex-auto-install: false
in my yaml header (in my .md file). But, as you have said, now conversion fails for each of my missing packages like, the first one, fvextra.sty
.
Can you explain me how I can install them so I will foresee these commands in my Dockerfile and rebuild the image.
I'm trying, right now, to convert simple markdown files so, I hope that after installing missing packages below it'll work.
finding package for fvextra.sty finding package for footnotebackref.sty finding package for pagecolor.sty finding package for sourcesanspro.sty finding package for sourcecodepro.sty finding package for titling.sty
Thanks!
See https://tug.org/texlive/doc/tlmgr.html#install-option...-pkg , tlmgr install <pkgname>
is the command to run when a CTAN package is missing.
Though the error message won't give you the package name but the filename missing, which you need to look for it using tlmgr search --file --global <filename>
> tlmgr search --file --global /fvextra.sty
tlmgr.pl: package repository https://mirror.las.iastate.edu/tex-archive/systems/texlive/tlnet/ (verified)
fvextra:
texmf-dist/tex/latex/fvextra/fvextra.sty
This tells you that fvextra
is the package to install, which you can do with tlmgr install fvextra
.
Once you have the list of all the package you need, you can have one call in your dockerfile tlmgr install fvextra footnotebackref
This is only TeX Live knownledge - nothing Quarto specific.
Though, Quarto do that for you through the auto install - if you want to have those install when building, you need to add them in your install.
I'm trying, right now, to convert simple markdown files so, I hope that after installing missing packages below it'll work.
What is your markdown file exactly ? Is there anything specific ? Or standard quarto document ?
If you are using quarto tool install tinytex
I would think you would have all the default required package for Quarto to render in the installed bundled. But maybe we are missing some...
For reference, this has been asked already in Quarto discussion: https://github.com/quarto-dev/quarto-cli/discussions/7380
Merci infiniment Christophe ! Dockerfile updated with the next command:
# Install tinyTeX packages needed to convert to PDF.
# See https://github.com/rstudio/tinytex/issues/426 for explanation
RUN set -e -x && \
~/.TinyTeX/bin/x86_64-linux/tlmgr install fvextra footnotebackref pagecolor sourcesanspro sourcecodepro titling
Docker image rebuild and now, yes, the container isn't reinstalling these packages again and again and thus, execution is faster.
Your help was really perfect. Thanks !
What is your markdown file exactly ? Is there anything specific ? Or standard quarto document ?
In fact a very idiot readme.md (github one) so nothing really special except I'm using the eisvogel template (https://github.com/Wandmalfarbe/pandoc-latex-template) and, there, most probably, there are specific coding.
except I'm using the eisvogel template
Yes this is indeed why this happens. It seems to use some packages that are not included by default in the bundle.
Hello
I'm (trying) to run Quarto (using TinyTex) from a Docker container. The Docker image has been built right now and the container is up and running.
I was expecting that everything was up-to-date. I mean, I just build the Docker image and one of the instruction is
quarto tool install tinytex
so that one is up-to-dateBut, when running Quarto using my Docker container, using
quarto render /project/input/readme.md --log /tmp/quarto.log --to pdf
, I see the output below.Of course, since it's a container, it has no sense to update packages in my container since once the conversion has been made, the container is removed so, on the next call, boum, update packages again and again ...
Did you know how can avoid this ? I mean : can I "force" TinyTex to update every dependencies during the creation of my Docker image or, if not possible, how can I disable packages update? Idea is thus to no more run updates when using my Docker image (but well when I'll rebuild it)
Many, many thanks!!