GeneralPygments: displays errors in pdf

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
kabi
Posts: 3
Joined: Sat Jun 12, 2010 8:29 pm

Pygments: displays errors in pdf

Post by kabi »

Hi
I am using pygments for syntax highlighting c in latex. It works quite well.
One problem though which I hope someone here has a solution for:

The code is for avr atmega16, and in the c file I have put:
#asm=("sei")
which is assembly.

Pygments puts a red box around the #, and I have no idea how to prevent this.
Any ideas are very much appreciated.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

kabi
Posts: 3
Joined: Sat Jun 12, 2010 8:29 pm

Re: Pygments: displays errors in pdf

Post by kabi »

What I want is for it be legal to have a # in a c file. It works with #include but not #asm
kabi
Posts: 3
Joined: Sat Jun 12, 2010 8:29 pm

Re: Pygments: displays errors in pdf

Post by kabi »

Just in case someone else gets this problem I'm posting a workaround.

I copied the default.py in the styles directory to another file. For me it was codevision.py
Now I had a custom style where I could add:

Error: "#000000"

to make the error turn up white, which means invisible on white paper. This is not a solution just an ugly workaround.
Post Reply