-#LyX 1.5.0beta3 created this file. For more info see http://www.lyx.org/
-\lyxformat 271
+#LyX 1.5.0svn created this file. For more info see http://www.lyx.org/
+\lyxformat 274
\begin_document
\begin_header
\textclass scrbook
\tracking_changes false
\output_changes false
\author "usti"
-\author "muso"
\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
-The default listing inset will appear in the output as own paragraph.
+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
-To reference non-inline listings, you can't insert the caption via LyX's
- Insert menu.
- The caption is inserted in the
+You can add captions to listings with the menu
\family sans
-Advanced
+Insert\SpecialChar \menuseparator
+Caption
\family default
- tab of the listings dialog using the option
-\end_layout
-
-\begin_layout Standard
-
-\series bold
-caption=YourCaptionText
-\end_layout
-
-\begin_layout Standard
-The label is inserted to the caption text using the LaTeX-command
-\series bold
-
-\backslash
-label
-\series default
.
- In Listing\InsetSpace ~
+ Listings can be referenced like floats: Listing\InsetSpace ~
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-ref{lst:Example-listing}
-\end_layout
+\begin_inset LatexCommand ref
+reference "lst:Example-Listing"
\end_inset
- the caption and label is inserted with the option
+
\end_layout
\begin_layout Standard
-
-\series bold
-caption=
-\backslash
-label{lst:Example-listing}Example listing float
-\end_layout
+\begin_inset listings
+lstparams "language=Python"
+inline false
+status open
\begin_layout Standard
-To reference the label, this ERT command was inserted to the position where
- the reference should appear:
-\end_layout
+
+\begin_inset Caption
\begin_layout Standard
+\begin_inset LatexCommand label
+name "lst:Example-Listing"
-\series bold
+\end_inset
-\backslash
-ref{lst:Example-listing}
+Example Listing float
\end_layout
-\begin_layout Standard
-\begin_inset listings
-lstparams "language=Python,float,floatplacement=h,caption=\label{lst:Example-listing}Example listing float"
-inline false
-status open
-
-\begin_layout Standard
+\end_inset
-\color foreground
# Example listing float
\end_layout
\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 ERT command
-\series bold
-
-\backslash
-ref
-\series default
- as described above.
+ The label can then be referenced using the menu
+\family sans
+Insert\SpecialChar \menuseparator
+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