-
Notifications
You must be signed in to change notification settings - Fork 196
Conversation
@vermiculus Very cool! I would love to see this get added if we can manage the extra size of TeX in the image. |
Thanks! If size becomes a concern, we can alter the installation scheme in While the definitive list can only be determined interactively AFAIK, you can find some example schemes in figure 6 at the top of page 12 of this manual:
|
I'm going to change the base of this to trusty since we are going to remove the master branch in favor of the named branches. |
Also, I'll need to cherry pick this off of the xenial branch, since we are going to freeze trusty soon. |
Ah, branches per OS? Makes sense in this context. Resolved the merge conflict with the README. |
Just a ping – is there any information I can provide to help get this merged? 😄 |
Sorry this has taken so long. My main concern is size of this addition and I haven't had enough time to characterize it in order to make a decision one way or another. |
@bcomnes I don't know about the original author's requirements, but I would be happy with I need LaTeX only to typeset mathematical formulae, but, of course, I understand your desire to keep the build images as small as possible. Installing |
I'm also sure the TeX Live installation profile can be adjusted to whatever size requirements you may have – down to 76 MB. (Honestly, even just removing all As for my requirements, I'm providing a full-on document with text/images. Little/no math, in fact, but formatting requirements are beyond the capabilities of tools like nroff/groff. @cs, if you only need LaTeX to typeset maths but are otherwise happy with groff, you should look into eqn It's obviously not as powerful as TeX, but it may be sufficient for your needs. |
Turns out that I'd already removed all the |
@vermiculus Nice! As I said yesterday, LaTeX and In the end, I meed my formulas rendered to PNG. Right now, I think this is not possible, because the build image has literally no way to convert PDF => PNG. ImageMagick doesn't work because PS/PDF support is disabled for security reasons. Anyways, that's a problem for another day. |
oh, this hasn't been touched for a long time 🙈 |
Interesting idea. Would it cache the image after installing tooling? That's the build slowdown. |
yeah, homebrew keeps any previously installed stuff in the netlify cache, so install time on subsequent requests should be minimal. you can actually try it out here: https://build-image-beta.netlify.app/ |
#411 should work :-) Out of curiosity, does it work with custom taps? (Truly just a curiosity; I believe this package would be more than adequate.) Closing under the assumption that TeX Live can be installed simply and cached. |
Doesn't appear to for me. Adding texlive to Brewfile.netlify resulted in:
Confirmed that no bottle is available and building from source would seem like a bad idea. Could we reopen this issue? EDIT: just spotted that Tectonic was being suggested for Homebrew install instead of TeX Live. Looking into whether this can be used the same way with Sphinx, rendering both PDF and HTML output. |
@9600 Note that this wasn't an issue, it was a pull request -- if you're looking for support, it's probably best to open a new issue. Do mention this PR from there, though -- perhaps these changes may yet be valuable for you. |
These patches install the most recent TeX Live on the image. Having a TeX system allows building documents from source before making them available as PDFs on the site. (I've been doing this successfully for some time to build reference documentation by using a custom build script.) Folks who maintain academic sites would also appreciate the availability of TeX by default to build general papers.
I've split the change into two commits to allow for flexibility in how this is implemented. The most straight-forward way to do this is given by the sum of the two commits: create a TeX Live install profile file (AFAIK required to run non-interactively) and
ADD
and load that profile in the Dockerfile. Alternatively, we can just use the first commit: generate this file on-demand by usingprintf ... >file
.The only thing I'm wholly unsure about is the installation directory, but using
/tmp
has not caused problems in the few years I've been building documents on Netlify.Tested the build with
docker run <some-sort-of-unique-id> xelatex --version
and received the right version (currently TeX Live 2018).This is also my first exposure to Docker and the
Dockerfile
format, so let me know if there's something I should change! 😄I should add: you might ask 'Why not just use one of the existing apt packages for TeX Live?' Given the difficulty of packaging, these packages are usually several years behind recent development. It's incredibly frustrating to know that an issue was fixed two years ago but your installation is older and difficult to adjust :-)