Text FormattingListings package and regular expressions

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
-Robin-
Posts: 31
Joined: Tue May 20, 2008 3:07 pm

Listings package and regular expressions

Post by -Robin- »

Does anybody knows a way of specifying keywords for the listings package using regular expressions ?

For example the standard XML tags which are coloured are rather limited, and it would be nice to just be able to let the listings package recognize everything between <> as an XML keyword instead of having to add every used tag as a keyword individually

Recommended reading 2024:

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

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

5gon12eder
Posts: 126
Joined: Sun Feb 13, 2011 8:36 pm

Listings package and regular expressions

Post by 5gon12eder »

Define a new "comment" type enclosed by < and > as described in section 3.3 (p. 22) in the listings documentation.
I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).
Post Reply