You are not logged in.

#1 2011-06-22 14:47:20

cap_sensitive
Member
Registered: 2010-04-05
Posts: 35

[SOLVED]LaTeX minted and pygmentize issue

I encountered a issue when "compiling" a LaTeX file by xelatex:

The File:

\documentclass[12pt,a4paper]{article}

\usepackage{hyperref}
\usepackage{minted}

\begin{document}

\begin{minted}[ruby]
=begin
Usual operators:
+ addition
- subtraction
* multiplication
/ division
=end

a = 5 + 3
b = 5 / 3

\end{document}

The error message:

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

But I (seem) installed all required packages:

 texlive-core 2010.22154-1; texlive-latexextra 2010.22155-1; python-pygments 1.4-3; python2-pygments 1.4-3

[edit]I know this is OT here, but I don't know where it should be posted. So... tongue

Last edited by cap_sensitive (2011-06-23 04:06:16)

Offline

#2 2011-06-22 15:34:21

Mystal
Member
From: fancy glass enclosure
Registered: 2007-04-27
Posts: 13

Re: [SOLVED]LaTeX minted and pygmentize issue

You're close, but there are a few things missing in your file and your command:

\begin{minted}{ruby} <== The programming language is a required argument, so curly braces
=begin
Usual operators:
+ addition
- subtraction
* multiplication
/ division
=end

a = 5 + 3
b = 5 / 3
\end{minted} <== You need to end the minted block

Finally, minted requires that you compile with the --shell-escape flag:

xelatex --shell-escape <file>

This worked for me, hopefully it'll fix your issues.

Oh, and I would think this thread would probably be fine in the General Programming Forum.

Offline

#3 2011-06-22 23:10:45

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [SOLVED]LaTeX minted and pygmentize issue

Moving to General Programming. And yes, shell-escape is what you need (came across the same thing when I started using minted a month or so back).


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#4 2011-06-23 01:03:34

cap_sensitive
Member
Registered: 2010-04-05
Posts: 35

Re: [SOLVED]LaTeX minted and pygmentize issue

Problem solved. Thanks a lot!

Offline

Board footer

Powered by FluxBB