heroku-buildpack-tex | A buildpack for building TeX documents on Heroku | Platform As A Service library
kandi X-RAY | heroku-buildpack-tex Summary
kandi X-RAY | heroku-buildpack-tex Summary
This is a [Heroku buildpack] for working with TeX documents. In its raw form, it simply bundles a working TeX Live environment into your Heroku app and doesn’t do anything else with it.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of heroku-buildpack-tex
heroku-buildpack-tex Key Features
heroku-buildpack-tex Examples and Code Snippets
Community Discussions
Trending Discussions on heroku-buildpack-tex
QUESTION
I have a ruby on rails app that uses pandoc-ruby to convert markdown files into pdf.
The pandoc-ruby requires pandoc installation. To successfully convert to pdf, pdflatex needs to be present as well. Locally (tested on Mac and Ubuntu 18.04) everything is working if pandoc
, texlive-latex-recommended
and texlive-fonts-recommended
packages are installed. Things get a little bit tricky when deploying to heroku.
To install all the packages on heroku I've used the Aptfile approach and I have not been able to solve this.
Approach 1: Aptfile
I've specified this Aptfile:
...ANSWER
Answered 2021-Jan-25 at 19:29After quite a bit of trial and error, I have found a solution that works.
As @mb21 mentioned, Docker image would probably be the best option long term. Docker images are supported on Heroku. However, I wanted to avoid dockerizing the whole application to solve this issue.
After finding a TeX Live buildpack for Heroku that supports adding custom TeX Live packages (one example of such buildpack), the error on conversion was ! LaTeX Error: File 'xcolor.sty' not found.
I used tlmgr
to get some info on the missing file. Running tlmgr search --global --file xcolor.sty
does the trick and reveals that there is a package called xcolor
. After installing that we come to the next error, and the next, and the next. In the end I ended up installing 2 collections that are small enough for Heroku (mind the 500MB slug size limit) and contain everything pandoc needs for a successful conversion. Those 2 are collection-fontsrecommended
and collection-latexrecommended
.
Adding a texlive.packages
file to the root of the application does the trick. It is recognized by the buildpack and it installs all the specified packages for you using tlmgr
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install heroku-buildpack-tex
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page