Formatting Python code

Dr Eberhard Lisse nospam at lisse.NA
Mon May 30 18:39:09 UTC 2022


STOP. USING. ERT! :-)-O

In Settings -> Document -> Listings you can set things into the window
which wind up in the generated tex file as \lstset{}

greetings, el


On 2022-05-27 23:20 , Rich Shepard wrote:
> On Fri, 27 May 2022, Rich Shepard wrote:
> 
>> Thanks for the pointer.
> 
> Paul,
> 
> Since all the code in the document is the same language I searched the
> web for setting defaults.  Found a list archive thread from 10 years
> ago and your response was to add the language and other attributes to
> the preamble; here
> I entered
> \lset{language=Python, Tabulator size=4}
> 
> This makes no difference.  I closed and re-opened lyx; this had no
> effect.
> 
> Each block of program code still defaults to Language=None and
> Tabulator size=8.
> 
> Has anything changed in the past decade?
> 
> Regards,
> 
> Rich
> 



More information about the lyx-users mailing list