You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I very strongly feel that a base pandoc + minimal latex docker image should be officially maintained (and am happy to help maintain it!). I just don't know how to build out the layering scheme...
I've spent a lot more time on this than I originally intended, and have come to the conclusion that maintenance of a pandoc + latex image is neither worth the pain nor the effort. The real meal ticket here is that these docker files have an easy way of getting pandoc. Here's why
Adventures With Manual Install
The install-tl approach is much slower with minimal gain in my opinion. The basic scheme for latex is missing a lot that I'm pretty sure will affect pandoc output. I didn't test on simple documents, but for a local repo here with -t beamer I ended up needing to install about 20 additional packages before I could compile the slides. I did bring in some fancy stuff (like minted), but by and large this will be every user's experience.
Worst, I think I found a bug that I couldn't actually solve on alpine. When you tlmgr install biber there is no biber executable installed. It installed biblatex, bibtex, all of the other ones. But reliably no biber, which will be a big hurdle for people using latexmk + pandoc-citeproc I think. At least it was for me.
Reference point: image took 6 minutes 38 seconds to build on top of tarleb/alpine-pandoc:2.5, producing an uncompressed image size of 622MB.
Just use apk add
When trying to solve biber problem I noticed that it was available from apk, and I tested two things since mixing the install-tl and apk add biber didn't work (install-tl produced biblatex too new for packaged biber):
FROM tarleb/alpine-pandoc:2.5
# Version 1:
RUN apk add --no-cache texlive
# Version 2: basically texlive-full minus texlive-doc minus texlive-dev
# see: https://pkgs.alpinelinux.org/package/edge/community/x86_64/texlive-full
RUN apk add --no-cache texlive texlive-dvi texlive-luatex texlive-xetex xdvik
With docker system prune -a in between all of these tests:
Version 1 takes 2 minutes 38 seconds to build x 814MB uncompressed
Version 2 takes 3 minutes 9 seconds to build x 861 MB
Analysis
Alpine packaged latex very well, you still get tlmgr. Similarly, the basic install for install-tl is so stripped down that people will be forced to encounter the world of dependency satisfaction with LaTeX. Noting that tlmgr install XXX may only be part of it, things like images typically need other libraries.
Either way (622MB or 814MB), these images are getting big enough that they will be cumbersome to download.
Solution: provide suggestions in the README for what people need to do to get texlive. The path of least resistance is to use system package managers. Sometimes system package managers add too much stuff, but it's going to be stable, and downloads will actually be faster than install-tl.
To be honest I'm pretty dissatisfied with these results, but the upshot is that the layering scheme becomes transparent again: only provide pandoc/distro images. pandoc/alpine is just alpine plus pandoc, nice and simple.
This issue can be closed or discussed. If people agree with abandoning pandoc + latex images, I can add a pull request with documentation on the README with suggested approach for installing latex in their own container.
The text was updated successfully, but these errors were encountered:
With Markdown→LaTeX being a popular work-flow, support for this seems imporant. Ideally, the image would contain all packages mentions in pandoc -D latex, plus some bib helpers. If the easiest way is to use apk, then let's do that. Convenience beats minimalism, and ~⅗GB to ⅘GB is not too bad. We can still try to improve on this later on.
Continuation of discussion here
I've spent a lot more time on this than I originally intended, and have come to the conclusion that maintenance of a pandoc + latex image is neither worth the pain nor the effort. The real meal ticket here is that these docker files have an easy way of getting
pandoc
. Here's whyAdventures With Manual Install
The
install-tl
approach is much slower with minimal gain in my opinion. Thebasic
scheme for latex is missing a lot that I'm pretty sure will affectpandoc
output. I didn't test on simple documents, but for a local repo here with-t beamer
I ended up needing to install about 20 additional packages before I could compile the slides. I did bring in some fancy stuff (likeminted
), but by and large this will be every user's experience.Worst, I think I found a bug that I couldn't actually solve on alpine. When you
tlmgr install biber
there is nobiber
executable installed. It installedbiblatex
,bibtex
, all of the other ones. But reliably nobiber
, which will be a big hurdle for people usinglatexmk + pandoc-citeproc
I think. At least it was for me.Reference point: image took 6 minutes 38 seconds to build on top of
tarleb/alpine-pandoc:2.5
, producing an uncompressed image size of 622MB.Just use
apk add
When trying to solve
biber
problem I noticed that it was available fromapk
, and I tested two things since mixing theinstall-tl
andapk add biber
didn't work (install-tl
producedbiblatex
too new for packagedbiber
):With
docker system prune -a
in between all of these tests:Analysis
Alpine packaged latex very well, you still get
tlmgr
. Similarly, thebasic
install forinstall-tl
is so stripped down that people will be forced to encounter the world of dependency satisfaction with LaTeX. Noting thattlmgr install XXX
may only be part of it, things like images typically need other libraries.Either way (622MB or 814MB), these images are getting big enough that they will be cumbersome to download.
Solution: provide suggestions in the README for what people need to do to get texlive. The path of least resistance is to use system package managers. Sometimes system package managers add too much stuff, but it's going to be stable, and downloads will actually be faster than
install-tl
.To be honest I'm pretty dissatisfied with these results, but the upshot is that the layering scheme becomes transparent again: only provide
pandoc/distro
images.pandoc/alpine
is justalpine
pluspandoc
, nice and simple.This issue can be closed or discussed. If people agree with abandoning pandoc + latex images, I can add a pull request with documentation on the README with suggested approach for installing latex in their own container.
The text was updated successfully, but these errors were encountered: