shiblon / latex-makefile

A Makefile for LaTeX - drop it in, type make, and magic happens.
Other
185 stars 30 forks source link

Makefile should detect shell-escape option, needed by pgfplot/gnuplot #148

Closed shiblon closed 3 years ago

shiblon commented 8 years ago

Originally reported on Google Code with ID 135

If you use pgfplot with gnuplot in order to draw inlay graphics, pdflatex needs an additional
command line argument (-shell-escape). It would be nice if the Makefile appends it
automatically.

@see www.iro.umontreal.ca/~simardr/pgfplots.pdf page 34

Reported by patrick.hieber@gmx.net on 2011-07-11 07:21:44

shiblon commented 8 years ago
I'm reading about pgfplots now.  Looks really interesting.

So, the -shell-escape is there because pdflatex wants to shell out to gnuplot to do
its work, right?  Make makes this sort of thing really hard (global parameter settings
based on the way that dependencies are set up).  I think we have basically two options:

1) Always set --shell-escape.  This seems like it could be dangerous, but I don't have
my head wrapped around all of the implications.
2) Provide an externally-settable LATEX_OPTS variable, that you can set in e..g, Makefile.ini
or Variables.ini like so:  LATEX_OPTS := -shell-escape

Thoughts?

Reported by shiblon on 2011-07-12 13:18:22

shiblon commented 8 years ago
I'd prefer the second option - seems more generic :D
A notable alternative to pgfplots is TiKZ, which works with pdflatex without any issues.

Reported by patrick.hieber@gmx.net on 2011-07-19 21:07:26

shiblon commented 8 years ago
OK - try the attached.  It allows you to set "LATEX_OPTS" and add extra latex options
to the command line, like the --shell-escape option you need.

You can put it into Variables.ini or Makefile.ini like this:

LATEX_OPTS := -shell-escape

Reported by shiblon@google.com on 2011-07-20 20:00:15


k4rtik commented 3 years ago

This could probably be closed. LATEX_OPTS := -shell-escape seems like a great solution.

shiblon commented 3 years ago

Thanks for the feedback, glad it worked!