From 1b62b21fcc95f3a08f08827e33006672e9342907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20St=C3=B6hr?= Date: Thu, 15 Mar 2012 02:16:16 +0100 Subject: [PATCH] port from master: - test/test-insets.tex --- src/tex2lyx/test/test-insets.tex | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/tex2lyx/test/test-insets.tex b/src/tex2lyx/test/test-insets.tex index ce9477ce22..9d9be0dbfb 100644 --- a/src/tex2lyx/test/test-insets.tex +++ b/src/tex2lyx/test/test-insets.tex @@ -156,6 +156,42 @@ ftp2:\href{ftp://www.test.test}{www.test.test} \listoftables +\section{Listings} + +Inline: \lstinline[language={C++}]!int a=5;!\\ +Float: + +\begin{lstlisting}[caption={Example Listing float},label={lst:Example-Listing},language=Python] +# Example listing float +def func(param): + 'this is a python function' + pass +\end{lstlisting} + +Here is an example listing with left line numbering, step ``3'', +language ``Python'', options ``Extended character table'' and +``Space~as~symbol'', range lines 3\,-\,8: + +\begin{lstlisting}[extendedchars=true,firstline=3,language=Python,lastline=8,numbers=left,showspaces=true,stepnumber=3] +def func(param): + 'this is a python function' + pass +def func(param): +'This is a German word: Tschüß' +pass +def func(param): +'this is a python function' +pass +\end{lstlisting} + +Special cases: +\begin{lstlisting}[abovecaptionskip=2em,basicstyle={\large\ttfamily},breaklines=true,extendedchars=true,firstline=2,float=h,language={[R/3 3.1]ABAP},lastline=5,numbers=left,numberstyle={\scriptsize},showspaces=true,showstringspaces=false,stepnumber=3,tabsize=4] +hello +\end{lstlisting} + +\lstinline[language=TeX]!\begin{centering} hello! + + \section{Graphics\index{Graphics}} There is also some basic support for graphics, in the form