\renewcommand{\tableofcontents}{%
\pdfbookmark[1]{Contents}{}
\myTOC
- \clearpage
+ \cleardoublepage
\pagenumbering{arabic}}
% provides caption formatting
-\usepackage[labelfont={bf,sf}, tableposition=top]{caption}
+\usepackage[labelfont={bf,sf}, tableposition=top]{caption}[2004/07/16]
% provides commands to set caption
% beside tables/images
\let\figure\MyFigure
\let\endfigure\MyEndfigure}
-% use the marginnote package for margin notes
-\usepackage{marginnote}
-\let\marginpar\marginnote
-
% enables calculation of values,
\usepackage{calc}
\definecolor{darkgreen}{cmyk}{0.5, 0, 1, 0.5}
\definecolor{lightgrey}{gray}{0.8}
-% used for tables with dashed lines
-\usepackage{arydshln}
-
% used for multirows
\usepackage{multirow}
%\renewcommand{\multirowsetup}{\centering}
% redefine the greyed out note
\renewenvironment{lyxgreyedout}
{\textcolor{blue}\bgroup}{\egroup}
+
+% ------------------------------------
+% used to check for needed LaTeX packages
+\usepackage{ifthen}
+
+% check for package arydshln
+% used for tables with dashed lines
+\newboolean{arydshln}
+\IfFileExists{arydshln.sty}
+ {\usepackage{arydshln}
+ \setboolean{arydshln}{true}}
+ {\setboolean{arydshln}{false}}
+
+% check for package marginnote
+% used for margin notes
+\newboolean{marginnote}
+\IfFileExists{marginnote.sty}
+ {\usepackage{marginnote}
+ \let\marginpar\marginnote
+ \setboolean{marginnote}{true}}
+ {\setboolean{marginnote}{false}}
\end_preamble
\options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage
\language english
\bullet 3 2 7 -1
\tracking_changes false
\output_changes true
-\author "usti"
+\author ""
\end_header
\begin_body
status collapsed
\begin_layout Standard
-original author: Uwe Stöhr <uwestoehr@web.de>
+original author: Uwe Stöhr
\end_layout
\end_inset
status open
\begin_layout Standard
-To export this document to PDF, PS, or DVI the LaTeX-packages
+To export all parts of this document to PDF, PS, or DVI the LaTeX-packages
+
\series bold
arydshln
\series default
-,
+ and
\series bold
marginnote
-\series default
-, and
-\series bold
-prettyref
\series default
must be installed.
+ If they are not installed you can export the document anyway but the sections
+ where the packages are required won't appear in the output.
\end_layout
\begin_layout Standard
\end_inset
- are an example of cross-referenced figures.
+ are examples of cross-referenced figures.
Figures can be cross-referenced in the text by referencing their label.
To do this insert a label in the caption using the menu
\family sans
\begin_layout Standard
A longtable cannot be put into a table float because floats can only be
- on one page.
- Therefore the caption layout cannot be used for longtables.
+ on one page but the caption environment of floats can also be used for
+ longtables.
\end_layout
\begin_layout Standard
-To add a caption, a dirty hack is needed:
+As LyX does not yet fully support captions in longtables, a hack is needed
+ to create them:
\end_layout
\begin_layout Enumerate
Create a longtable
+\family sans
+.
\end_layout
\begin_layout Enumerate
-Mark the first row an disable its upper line
+Mark the first row an disable its upper line.
\end_layout
\begin_layout Enumerate
-Insert the following command as ERT into the first table cell:
-\newline
-
+Insert a caption via the menu
+\family sans
+Insert\SpecialChar \menuseparator
+Caption
+\family default
\series bold
-
-\backslash
-caption[short title]{full title}
-\backslash
-
-\backslash
-%
+
+\series default
+into the first table cell.
+\newline
+You can also add a short title for the caption.
\end_layout
\begin_layout Enumerate
\series bold
+
+\backslash
+
+\backslash
%
\series default
\begin_inset Quotes erd
\end_inset
- as ERT into every cell of the first row
+ as ERT behind the caption.
\end_layout
\begin_layout Standard
-The
+A short title that will appear in the LOT instead of the full title.
+ The
\series bold
\backslash
-caption
-\series default
- command is used like for normal captions, the short title that will appear
- in the LOT instead of the full title is optional.
- The
-\series bold
+
+\backslash
%
\series default
- in the table cells omits the vertical line between the the cells.
+ behind the caption omits the vertical lines between the following cells
+ in the row.
The first table row is now only a dummy row for the caption, the actual
table starts with the second row.
\end_layout
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
+\begin_inset Caption
\begin_layout Standard
+Longtable with caption
+\begin_inset OptArg
+status open
-
-\backslash
-caption[Longtable]{Longtable with caption}
-\backslash
-
-\backslash
-%
+\begin_layout Standard
+Longtable
\end_layout
\end_inset
\end_layout
\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-\begin_layout Standard
+
\begin_inset ERT
status collapsed
\begin_layout Standard
+
+\backslash
+
+\backslash
%
\end_layout
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-%
-\end_layout
-
-\end_inset
-
\end_layout
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
-\begin_layout Standard
-
-%
\end_layout
\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+\begin_layout Standard
\end_layout
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
\begin_layout Standard
-%
-\end_layout
-
-\end_inset
-
-
\end_layout
\end_inset
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
+\begin_inset Caption
\begin_layout Standard
-
-
-\backslash
-caption{Referenced longtable
-\end_layout
+Referenced longtable
+\begin_inset LatexCommand label
+name "tab:RefExample"
\end_inset
-\begin_inset LatexCommand label
-name "tab:RefExample"
+\end_layout
\end_inset
\begin_layout Standard
-}
+
\backslash
\backslash
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-%
-\end_layout
-
-\end_inset
-
\end_layout
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-%
-\end_layout
-
-\end_inset
-
\end_layout
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
\begin_layout Standard
-%
-\end_layout
-
-\end_inset
-
-
\end_layout
\end_inset
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
\begin_layout Standard
-%
-\end_layout
-
-\end_inset
-
-
\end_layout
\end_inset
\end_layout
\begin_layout Standard
-To reference a longtable, insert a label into the
-\series bold
-
-\backslash
-caption
-\series default
- command.
- This is done by splitting the ERT of the caption command.
- The part of the caption command before the last closing brace
-\end_layout
-
-\begin_layout Standard
-
-\series bold
-
-\backslash
-caption[short title]{full title
-\end_layout
-
-\begin_layout Standard
-is in the first ERT box, the label is inserted behind it.
+To reference a longtable, insert a label into the caption.
Note that you have to add the label prefix
\begin_inset Quotes eld
\end_inset
\end_inset
manually in the label field.
- The second ERT box contains the rest of the
-\backslash
-caption command
-\end_layout
-
-\begin_layout Standard
-
-\series bold
-}
-\backslash
-
-\backslash
-%
\end_layout
\begin_layout Standard
-and is inserted behind the label box, see Table\InsetSpace ~
+This is a reference to Table\InsetSpace ~
\begin_inset LatexCommand ref
reference "tab:RefExample"
LTcapwidth
\series default
.
- It default value is 4\InsetSpace \thinspace{}
+ Its default value is 4\InsetSpace \thinspace{}
in.
To change it add the following command to your document preamble or as
ERT into your document before the longtable that should be affected
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
+\begin_inset Caption
\begin_layout Standard
-
-
-\backslash
-caption[caption with default width]{long full title with default width
-\end_layout
+long full title with default width long full title with default width long
+ full title with default width
+\begin_inset OptArg
+status collapsed
\begin_layout Standard
-
-long full title with default width long full title with default width}
-\backslash
-
-\backslash
-%
+caption with default width
\end_layout
\end_inset
\end_layout
\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-\begin_layout Standard
+
\begin_inset ERT
status collapsed
\begin_layout Standard
+
+\backslash
+
+\backslash
%
\end_layout
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-%
-\end_layout
-
-\end_inset
-
\end_layout
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
-\begin_layout Standard
-
-%
\end_layout
\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+\begin_layout Standard
\end_layout
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
\begin_layout Standard
-%
-\end_layout
-
-\end_inset
-
-
\end_layout
\end_inset
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
+\begin_inset Caption
\begin_layout Standard
-
-
-\backslash
-caption[caption with width
-\backslash
-,=
-\backslash
-,5
-\backslash
-,cm]{long full title with width set to 5
-\backslash
-,cm
-\end_layout
+long full title with width set to 5\InsetSpace \thinspace{}
+cm long full title with width set to
+ 5\InsetSpace \thinspace{}
+cm long full title with width set to 5\InsetSpace \thinspace{}
+cm
+\begin_inset OptArg
+status collapsed
\begin_layout Standard
-
-long full title with width set to 5
-\backslash
-,cm long full title with width set to 5
-\backslash
-,cm}
-\backslash
-
-\backslash
-%
+caption with width\InsetSpace \thinspace{}
+=\InsetSpace \thinspace{}
+5\InsetSpace \thinspace{}
+cm
\end_layout
\end_inset
\end_layout
\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-\begin_layout Standard
+
\begin_inset ERT
status collapsed
\begin_layout Standard
+
+\backslash
+
+\backslash
%
\end_layout
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-%
-\end_layout
-
-\end_inset
-
\end_layout
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
-\begin_layout Standard
-
-%
\end_layout
\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+\begin_layout Standard
\end_layout
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
\begin_layout Standard
-%
-\end_layout
-
-\end_inset
-
-
\end_layout
\end_inset
\begin_layout Standard
When the other captions should differ from the one of the first table page,
- insert the
-\series bold
+ insert a caption with a non-empty short title in a dummy caption row marked
+ as first header.
+ The caption used for the other table pages is inserted as caption without
+ a short title in a dummy caption row that is marked as main header.
+ When this caption shouldn't include the table number, use the command
+\end_layout
-\backslash
-caption
-\series default
- command with a non-empty short title in a dummy caption row marked as first
- header.
- The caption used for the other table pages is inserted as
-\series bold
+\begin_layout Standard
-\backslash
-caption
-\series default
- command without a short title in a dummy caption row that is marked as
- main header.
- When this caption shouldn't include the table number, use the command
\series bold
\backslash
-caption*
-\series default
- instead of
-\series bold
+caption*{caption text}
+\end_layout
-\backslash
-caption
-\series default
-.
+\begin_layout Standard
+instead of LyX's caption box.
The label to reference the table is inserted into the caption of the first
header.
Table\InsetSpace ~
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
+\begin_inset Caption
\begin_layout Standard
-
-
-\backslash
-caption[Example Phone List]{Example Phone List
-\end_layout
-
-\end_inset
-
-
+Example Phone List
\begin_inset LatexCommand label
name "tab:DiffCaptions"
\end_inset
-\begin_inset ERT
+\begin_inset OptArg
status collapsed
\begin_layout Standard
-
-}
-\backslash
-
-\backslash
-%
+Example Phone List
\end_layout
\end_inset
\end_layout
\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
-\begin_inset Text
-\begin_layout Standard
+
\begin_inset ERT
status collapsed
\begin_layout Standard
+
+\backslash
+
+\backslash
%
\end_layout
\end_inset
</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
\begin_inset Text
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
\begin_layout Standard
-%
\end_layout
\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+\begin_layout Standard
\end_layout
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-%
-\end_layout
-
-\end_inset
-
\end_layout
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-%
-\end_layout
-
-\end_inset
-
\end_layout
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
+\begin_inset Caption
\begin_layout Standard
+Table with forced page break in table cell
+\begin_inset LatexCommand label
+name "tab:ForcedPagebreak"
+
+\end_inset
-\backslash
-caption[Table with forced page break in table cell]{Table with forced page
- break in table cell
+\begin_inset OptArg
+status collapsed
+
+\begin_layout Standard
+Table with forced page break in table cell
\end_layout
\end_inset
-\begin_inset LatexCommand label
-name "tab:ForcedPagebreak"
+\end_layout
\end_inset
\begin_layout Standard
-}
+
\backslash
\backslash
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-%
-\end_layout
-
-\end_inset
-
\end_layout
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-%
-\end_layout
-
-\end_inset
-
\end_layout
\backslash
-caption{Continued table with forced page break in table cell}
+caption*{Continued table with forced page break in table cell}
\backslash
\backslash
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-%
-\end_layout
-
-\end_inset
-
\end_layout
\begin_inset Text
\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-%
-\end_layout
-
-\end_inset
-
\end_layout
\end_inset
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+ifarydshln
+\end_layout
+
+\end_inset
+
+
+\begin_inset Note Note
+status open
+
+\begin_layout Standard
+The following section will only be displayed when you have the LaTeX-package
+
+\series bold
+arydshln
+\series default
+ is installed.
+\end_layout
+
+\end_inset
+
+
\end_layout
\begin_layout Standard
\end_inset
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+else
+\end_layout
+
+\end_inset
+
+
+\begin_inset Note Note
+status open
+
+\begin_layout Standard
+The following will be displayed when the LaTeX-package
+\series bold
+arydshln
+\series default
+ is not installed:
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+You need to install the package
+\series bold
+arydshln
+\series default
+ to see the contents of this section in the output.
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+fi
+\end_layout
+
+\end_inset
+
+
\end_layout
\begin_layout Chapter
\end_inset
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace bigskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+ifmarginnote
+\end_layout
+
+\end_inset
+
+
+\begin_inset Note Note
+status open
+
+\begin_layout Standard
+The following section will only be displayed when you have the LaTeX-package
+
+\series bold
+marginnote
+\series default
+ is installed.
+\end_layout
+
+\end_inset
+
+
\end_layout
\begin_layout Standard
\series default
\begin_inset Note Note
-status open
+status collapsed
\begin_layout Standard
The margin note format is changed only for this example.
\end_inset
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+else
+\end_layout
+
+\end_inset
+
+
+\begin_inset Note Note
+status open
+
+\begin_layout Standard
+The following will be displayed when the LaTeX-package
+\series bold
+marginnote
+\series default
+ is not installed:
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+You need to install the LaTeX-package
+\series bold
+marginnote
+\series default
+ to see the following part of this section in the output.
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+fi
+\end_layout
+
+\end_inset
+
+
\end_layout
\begin_layout Chapter