amagical-net / rails-latex

rails-latex is a renderer for rails which allows tex files with erb to be turned into an inline pdf
MIT License
141 stars 48 forks source link

allow specifying the work dir #53

Closed mkamensky closed 6 years ago

mkamensky commented 6 years ago

Hi There,

This is a patch that allows specifying the work dir where the latex command is run. It also allows specifying that the workdir should not be removed, and the base where the work dir is created

Why? I use latexmk for generating pdf, which does not run again if the tex source is unchanged. I specify a fixed workdir for each resource (the url path for the corresponding resource), and this way the pdf is cached. This can save a lot of cpu.

The new options are: