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
Text Formatting ⇒ Syntax Highlighting for custom Keywords in Python Code
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
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
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10