LyX ⇒ Color formatted Python code.
Color formatted Python code.
I'm trying to get colored python code to work in Lyx.
So far I'm inserting file - child document - program listing and would prefer to continue to use this method as I may well need to edit some of my python files and it would be nice to have it update.
In the parameters box I have put in.
backgroundcolor={\color{parchment}}
breaklines=true
frame=tb
language=Python
Where parchment is a color I have defined in the preamble.
I currently get code which uses bold and italics in the correct places but would like them to also be color formatted. I presume I have to edit the language definition for python but have no idea where or how to do so.
Any help would be much appreciated, this has been driving me nuts.
Thanks.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p