Showing posts with label latex. Show all posts
Showing posts with label latex. Show all posts

February 9, 2017

Cannot get 'pygmentize' to work correctly on mac using TeXmaker


Recently using LaTeX with TeXmaker I got this annoying error:

! Package minted Error: You must have `pygmentize' installed to use this package.

There is no (good and exhaustive) documentation/post/tutorial on the internet that helped me to solve this issue... so here you can find how to get the TeXmaker compile correctly:

Install pygmentize -> sudo easy_install Pygments

Make sure to have the --shell-escape argument on the the pdflatex command line located in the preferences panel:

"pdflatex" -synctex=1 -shell-escape -interaction=nonstopmode %.tex 

!!! IMPORTANT: make sure that texmaker is using the same Terminal $PATH!!!. Often TeXworks has different PATH environment from your terminal. My solution was to create a symbolic link to pygmentize:

$ ln -s /Library/Frameworks/Python.framework/Versions/2.7/bin/pygmentize /usr/local/bin/pygmentize
  • compile it and make sure there is no ERROR message


Solved ;)