On Sun, 2025-04-20 at 19:42 +0300, matan wrote:
> I'm sure it has been asked already somewhere, but I'm looking to write some
> Python code (just for the look no need to run it) i want it to have the
> distinct color palette that most python 3 IDEs use.
> I understand it's probably related to the program listing but I've read that
> relevant part in the embedded objects manual and it wasn't clear at all.
> 
> I would greatly appreciate it if it could be explained to me step by step, I
> use LyX 2.4 and LiveTex.
> 
> Thanks in advance for any help.
> 
> Matan

To do what you want I use minted.

Document -> Settings -> Listings -> Syntax Highlight Package: minted

Minted allows you to choose different color styles.


You can found more about this in:

Help -> Embedded Objects -> 8.Program Code Listings

Read this before running the example that is attached.
Notice that I have used as an example the "emacs" color style. There are other
choices and this is not the default.


I hope that this helps,
-- 
José Abílio

Attachment: minted_example.lyx
Description: application/lyx

-- 
lyx-users mailing list
lyx-users@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-users

Reply via email to