Skip to content

74monkeys/heroku-buildpack-configuarable-tex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Heroku buildpack: TeX

This is a Heroku buildpack for working with TeX documents.

$ ls

$ heroku create --buildpack git://github.com/syphar/heroku-buildpack-tex.git

$ git push heroku master
...
-----> Heroku receiving push
-----> Fetching custom build pack... done
-----> TeX app detected
...

This can be useful if you simply want to play around with TeX Live without having to build or install it yourself. You can pull it up on your instance easily in bash:

$ heroku run bash

Multipacks

More likely, you'll want to use it as part of a larger project, which needs to build PDFs. The easiest way to do this is with a multipack, where this is just one of the buildpacks you'll be working with.

$ cat .buildpacks
git://github.com/heroku/heroku-buildpack-python.git
git://github.com/holiture/heroku-buildpack-tex.git

$ heroku config:add BUILDPACK_URL=git://github.com/ddollar/heroku-buildpack-multi.git

This will bundle TeX Live into your instance without impacting your existing system. You can then call out to executables like pdflatex as you would on any other machine.

How does it work?

  • In this form, it uses install-tl it installs a working TeX Live into your application into your Heroku app.

  • it installs scheme-small to have a working minimal setup

  • it uses tlmgr to install custom packages.

  • On subsequent pushes it uses tlmgr to update all installed packages.

  • to save space, we cleanup the installation a bit (removing documentation for example).

The downside of this method compared to a prepackaged TeX-Live is that the first push will take some minutes. But we get more flexibility and custom packages!

custom packages

You can add a file called texlive.packages in your repo:

collection-bibtexextra
collection-fontsextra
collection-langgerman
collection-xetex

It looks similar to the default texlive.profile, but without the 1 or 0 at the end. The buildpack runs tlmgr install on every line in this file. So you can use single packages or these collections.

When you add custom packages, keep in mind that Heroku has a maximum compressed slug-size of 300 MB (see here). And TeX-Live can get quite big.

About

A buildpack for building TeX documents on Heroku

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%