Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latex doesn't find pygmentize #20

Closed
carloslesmes opened this issue Jan 29, 2014 · 4 comments
Closed

Latex doesn't find pygmentize #20

carloslesmes opened this issue Jan 29, 2014 · 4 comments
Labels

Comments

@carloslesmes
Copy link

I'm on mac 10.7 and texmaker 4.1
When running the script:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{minted}

\begin{document}
Here is a simple example with Julia:

\begin{minted}{julia}
x=[1 2 3 ]
y=mean(x)
\end{minted}

\vspace{1em}
Another example.

\begin{minted}{julia}
using Stats
z=rand(100)
describe(z)
\end{minted}

\vspace{1em} % adds some space
\end{minted}
\end{document}

I've got several minted package errors:
You must invoke LaTeX with the -shell-escape flag
You must have pygmentize

I have Pygments inside canopy python release.

What I've got to do now?, please help.

@gpoore
Copy link
Owner

gpoore commented Jan 29, 2014

Are you compiling with -shell-escape? For example, pdflatex -interaction=nonstopmode -shell-escape doc.tex.

What do you get if you run pygmentize --version on the command line?

@carloslesmes
Copy link
Author

with

  1. pigmentize --version

I get
Usage: /Users/carloslesmes/Library/Enthought/Canopy_64bit/User/bin/pygmentize [-l | -g] [-F [:]] [-f ]
[-O ] [-P <option=value>] [-o ] []

   /Users/carloslesmes/Library/Enthought/Canopy_64bit/User/bin/pygmentize -S <style> -f <formatter> [-a <arg>] [-O <options>] [-P <option=value>]
   /Users/carloslesmes/Library/Enthought/Canopy_64bit/User/bin/pygmentize -L [<which> ...]
   /Users/carloslesmes/Library/Enthought/Canopy_64bit/User/bin/pygmentize -N <filename>
   /Users/carloslesmes/Library/Enthought/Canopy_64bit/User/bin/pygmentize -H <type> <name>
   /Users/carloslesmes/Library/Enthought/Canopy_64bit/User/bin/pygmentize -h | -V

Highlight the input file and write the result to .

If no input file is given, use stdin, if -o is not given, use stdout.

is a lexer name (query all lexer names with -L). If -l is not
given, the lexer is guessed from the extension of the input file name
(this obviously doesn't work if the input is stdin). If -g is passed,
attempt to guess the lexer from the file contents, or pass through as
plain text if this fails (this can work for stdin).

Likewise, is a formatter name, and will be guessed from
the extension of the output file name. If no output file is given,
the terminal formatter will be used by default.

With the -O option, you can give the lexer and formatter a comma-
separated list of options, e.g. -O bg=light,python=cool.

The -P option adds lexer and formatter options like the -O option, but
you can only give one option per -P. That way, the option value may
contain commas and equals signs, which it can't with -O, e.g.
``-P "heading=Pygments, the Python highlighter".

With the -F option, you can add filters to the token stream, you can
give options in the same way as for -O after a colon (note: there must
not be spaces around the colon).

The -O, -P and -F options can be given multiple times.

With the -S option, print out style definitions for style <style>
for formatter . The argument given by -a is formatter
dependent.

The -L option lists lexers, formatters, styles or filters -- set
which to the thing you want to list (e.g. "styles"), or omit it to
list everything.

The -N option guesses and prints out a lexer name based solely on
the given filename. It does not take input or highlight anything.
If no specific lexer can be determined "text" is returned.

The -H option prints detailed help for the object of type ,
where is one of "lexer", "formatter" or "filter".

The -h option prints this help.
The -V option prints the package version.

  1. When I compile with

latex -shell-escape doc.tex

it works!

  1. pdflatex -interaction=nonstopmode -shell-escape

yields fatal error

Thanks for help

@gpoore
Copy link
Owner

gpoore commented Jan 30, 2014

When you use -shell-escape, is everything working? Or are you still having issues? Your reply got jumbled a bit with a lot of HTML tags.

@gpoore gpoore added the question label Mar 1, 2014
@gpoore
Copy link
Owner

gpoore commented Jul 22, 2014

Closing for inactivity. Please reopen if you still have issues.

@gpoore gpoore closed this as completed Jul 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants