shiblon / latex-makefile

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

Package minted requires running latex with -shell-escape #106

Closed shiblon closed 8 years ago

shiblon commented 8 years ago

Originally reported on Google Code with ID 93

If external programs are to be run from within a tex file, then latex must be run with
command option -shell-escape. For example, the minted package uses pygments to syntax-highlight
code using an external filter.

In the makefile, I have specified the latex binary as follows:

LATEX ?= latex -shell-escape

This works, but produces a warning:

which: invalid option -- 's'

What is the best way to add a command-line option to latex?

Reported by eorlinga on 2010-08-12 18:12:14

shiblon commented 8 years ago
That's strange.  Does latex give you that warning when invoking it with that flag outside
of the makefile?

Reported by shiblon@google.com on 2010-08-12 20:12:33

shiblon commented 8 years ago
Good question; it seems I didn't do my homework properly. I see the same warning when
invoking latex directly; indeed, in minted.sty I see the line

    \immediate\write18{which -s #1 && touch \jobname.aex}

which leads me to think the problem is that package, and not the makefile.

My apologies!

Reported by eorlinga on 2010-08-13 00:40:18

shiblon commented 8 years ago
This is a bug in minted that has been fixed in the trunk, but not yet in a release version.
Simply remove the `-s` flag from the call, or upgrade your installation to the latest
developer version (directly from source control).

Sorry for the inconvenience.

Reported by konrad.rudolph on 2010-09-05 21:20:49

shiblon commented 8 years ago
Yes, that is correct. I upgraded minted to trunk and the problem went away.

Thanks for your help. I believe this issue may be closed.

Reported by eorlinga on 2010-09-06 13:24:28

shiblon commented 8 years ago
Great!  Closing this bug.  Glad you all got it worked out :)

Reported by shiblon on 2010-09-07 15:53:19