#LyX 1.5.0svn created this file. For more info see http://www.lyx.org/
-\lyxformat 271
+\lyxformat 274
\begin_document
\begin_header
\textclass scrbook
\bullet 3 2 7 -1
\tracking_changes false
\output_changes false
-\author "Bo Peng"
\author "usti"
+\author "Bo Peng"
\author "muso"
\author "Uwe Stöhr"
\end_header
\begin_inset Text
\begin_layout Standard
-def
-\lang ngerman
-
-\lang english
-ghi
+def ghi
\end_layout
\end_inset
\series default
\begin_inset ERT
-status open
+status collapsed
\begin_layout Standard
\begin_layout Description
Date This inserts the date in the form
\emph on
-Date-Month-Year
+Day-Month-Year
\emph default
.
This is a date inserted as external material:
Documents
\family default
.
- A dialog pops up where you can choose between three include methods:
+ A dialog pops up where you can choose between four include methods:
\end_layout
\begin_layout Description
\family default
:
\begin_inset Include \input{DummyDocument2.lyx}
-preview true
+preview false
\end_inset
\end_layout
\begin_layout Standard
-By default, a listings inset starts a new paragraph in the output.
+By default, a listing starts a new paragraph in the output.
The placement option
\family sans
Inline\InsetSpace ~
\family default
prints the listing inline like this:
\begin_inset listings
-lstparams "language=C++"
+lstparams "language={C++}"
inline true
status open
\begin_layout Standard
-\color foreground
int a=5;
\end_layout
\end_layout
\begin_layout Standard
-You can add caption and label to a listings inset by
-\family sans
-Insert\SpecialChar \menuseparator
-Caption
-\family default
-and
+You can add captions to listings with the menu
\family sans
Insert\SpecialChar \menuseparator
-Label
-\family default
- inside the caption.
- The label can be referred by
-\family sans
-Insert\SpecialChar \menuseparator
-Cross-Reference
+Caption
\family default
.
+ Listings can be referenced like floats: Listing\InsetSpace ~
+
+\begin_inset LatexCommand ref
+reference "lst:Example-Listing"
+
+\end_inset
+
+
\end_layout
\begin_layout Standard
\begin_inset listings
-lstparams "language=Python,float,floatplacement=h"
+lstparams "language=Python"
inline false
status open
\begin_layout Standard
-\color foreground
\begin_inset Caption
\begin_layout Standard
\begin_layout Standard
-\color foreground
def func(param):
\end_layout
\begin_layout Standard
+
'this is a python function'
\end_layout
\begin_layout Standard
+
pass
\end_layout
\begin_inset Quotes erd
\end_inset
-, option
+, options
\begin_inset Quotes eld
\end_inset
\begin_layout Standard
\begin_inset listings
-lstparams "language=Python,numbers=left,firstline=3,lastline=8,stepnumber=3,showspaces=true,extendedchars=true"
+lstparams "extendedchars=true,firstline=3,language=Python,lastline=8,numbers=left,showspaces=true,stepnumber=3"
inline false
status open
\begin_layout Standard
+
def func(param):
\end_layout
\begin_layout Standard
+
'this is a python function'
\end_layout
\begin_layout Standard
+
pass
\end_layout
\begin_layout Standard
+
def func(param):
\end_layout
\begin_layout Standard
+
'This is a German word: Tschüß'
\end_layout
\begin_layout Standard
+
pass
\end_layout
\begin_layout Standard
+
def func(param):
\end_layout
\begin_layout Standard
+
'this is a python function'
\end_layout
\begin_layout Standard
+
pass
\end_layout
\end_inset
in the text box.
-
\end_layout
\begin_layout Standard
To reference child document listings, write a label text into the corresponding
field of the child document dialog.
- To reference the label use
+ The label can then be referenced using the menu
\family sans
Insert\SpecialChar \menuseparator
-Cross-Reference.
+Cross-Reference
+\family default
+.
\end_layout
\begin_layout Standard
Listing\InsetSpace ~
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-ref{lst:file-listing}
-\end_layout
+\begin_inset LatexCommand ref
+reference "lst:file-listing"
\end_inset
- is an example for a listing of a file, there the lines 10\InsetSpace \thinspace{}
+ is an example for a listing of a file; there the lines 10\InsetSpace \thinspace{}
-\InsetSpace \thinspace{}
15 of this LyX
file are listed.
\end_layout
\begin_layout Standard
-\begin_inset Include \lstinputlisting{EmbeddedObjects.lyx}[firstline=10,lastline=15,language=TeX,breaklines=true,caption={Lines 10 - 15 of this LyX file},label={lst:file-listing}]
+\begin_inset Include \lstinputlisting{EmbeddedObjects.lyx}[breaklines=true,caption={Lines 10 - 15 of this LyX file},firstline=10,label={lst:file-listing},language={[LaTeX]TeX},lastline=15]
preview false
\end_inset