Formatting Python code
Herbert Voss
Herbert.Voss at fu-berlin.de
Mon May 30 13:10:44 UTC 2022
Am 30.05.22 um 14:48 schrieb Rich Shepard:
>
> I learned the reason for the spacing issues is that the program listing
> environment does not support tabs for white space, only spaces. Kinda'
> hard
> on the keyboard's space bar. :-)
It _does_ support tab characters, e.g.
\documentclass{article}
\usepackage{listings}
\begin{document}
\lstset{tabsize=8}
\begin{lstlisting}
123456789
{ one tabulator }
{ two tabs }
123
{ 123+two tabs }
123
\end{lstlisting}
\end{document}
the output:
Herbert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto 2022-05-30 um 15.09.52.png
Type: image/png
Size: 15415 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20220530/fb977500/attachment-0001.png>
More information about the lyx-users
mailing list