Insert listing -- from file?

Jürgen Spitzmüller jspitzm at gmail.com
Wed Feb 4 07:26:45 UTC 2026


Am Dienstag, dem 03.02.2026 um 14:57 +0000 schrieb Bernt Lie via lyx-
users:
>    1. Where on earth does LyX with the minted package read the color
> specifications? Where/how can I changed them? (I have also tried to
> specify them in Preamble, but no success).

Minted uses styles which you can set with the style option, in preamble

\AtBeginDocument{\setminted{style=name}}

Available styles are here:
https://pygments.org/styles/

> I have a second problem, and that is how to insert caption and labels
> for the minted package.

If you insert the listing from a file: In the settings dialog of the
file/programlisting insert inset.

-- 
Jürgen


More information about the lyx-users mailing list