Text FormattingSyntax Highlighting for custom Keywords in Python Code

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
micdup
Posts: 1
Joined: Sun Jul 14, 2013 12:52 pm

Syntax Highlighting for custom Keywords in Python Code

Post by micdup »

Hello,

I'm trying to highlight Python scripts with listings. I would like to add my own keywords to the Python keyword set but have them printed in a different color. Is it possible to do that?

Thanks

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Syntax Highlighting for custom Keywords in Python Code

Post by localghost »

Can you give a short sample of the Python script as well as the additional keywords in form of a minimal example that also shows the general setup for your listings?


Best regards and welcome to the board
Thorsten
Post Reply