I'm trying to add some syntax highlighting to my code and found two packages: texments and minted. I tried to use them, but I'm getting errors while trying to build. I used following code to test both packages:
\pygment{python}{ print "Hello World!"}
All what I get is errors:
**! Undefined control sequence.**
<argument> \PY
{k}{print} \PY {l+s}{"}\PY {l+s}{Hello World!}\PY {l+s}{"}
l.2 ...PY{l+s}{"}\PY{l+s}{Hello World!}\PY{l+s}{"}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
**! Undefined control sequence.**
<argument> \PY {k}{print} \PY
{l+s}{"}\PY {l+s}{Hello World!}\PY {l+s}{"}
l.2 ...PY{l+s}{"}\PY{l+s}{Hello World!}\PY{l+s}{"}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
**! Undefined control sequence.**
<argument> \PY {k}{print} \PY {l+s}{"}\PY
{l+s}{Hello World!}\PY {l+s}{"}
l.2 ...PY{l+s}{"}\PY{l+s}{Hello World!}\PY{l+s}{"}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
**! Undefined control sequence.**
<argument> ... {l+s}{"}\PY {l+s}{Hello World!}\PY
{l+s}{"}
l.2 ...PY{l+s}{"}\PY{l+s}{Hello World!}\PY{l+s}{"}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
) [6]) [7] (./mk_mall.aux) )
I have pygments installed, version 1.4.
How can I get everything to work?