1 %% LyX trick_preamble_code_into_believing_that_this_was_created_by_lyx created this file. For more info, see http://www.lyx.org/.
2 %% Do not edit unless you really know what you are doing.
3 \documentclass[a4paper,12pt]{article}
4 \usepackage[T1]{fontenc}
5 \usepackage[latin9]{inputenc}
7 \setlength{\parindent}{3mm}
14 \usepackage[numbers]{natbib}
16 % the following is useful when we have the old nomencl.sty package
17 \providecommand{\printnomenclature}{\printglossary}
18 \providecommand{\makenomenclature}{\makeglossary}
20 \usepackage{prettyref}
25 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
26 \newcommand{\lyxline}[1][1pt]{%
28 \rule[.5ex]{\linewidth}{#1}\par}
30 \newcommand{\lyxarrow}{\leavevmode\,$\triangleright$\,\allowbreak}
32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
33 \usepackage{subscript} % user specified as long as tex2lyx
34 % produces a format less than 408
36 \def\mycommand{\textquestiondown}
42 \noindent This paragraph is not indented.
44 \section{References\index{References}}
46 Let's start with simple things: a label~\label{lab:test} and a
47 reference~\ref{lab:test}; note that I have tested ``unbreakable
48 space'' without warning (and worse than that, I just tested english
51 Of course there are other kind of references, like page
52 reference~\pageref{lab:test}, but also equation
53 reference~\eqref{lab:test} (from amsmath package), or varioref's
54 equivalents~\vref{lab:test} and~\vpageref{lab:test}, without
55 forgetting pretty references like~\prettyref{lab:test}.
57 \section{Cites\index{Cites}}
59 Let's start with simple things: a \textbackslash{}cite: \cite[after]{article-crossref}
60 and two \textbackslash{}cites: \cite[after]{whole-set,article-crossref}
62 Now the natbib things:
64 \textbackslash{}citet: \citet[before][after]{article-crossref} \textbackslash{}citet{*}:
65 \citet*[before][after]{article-crossref} \textbackslash{}Citet: \Citet[before][after]{article-crossref}
66 \textbackslash{}Citet{*}: \Citet*[before][after]{article-crossref}
68 \textbackslash{}citep: \citep[before][after]{article-crossref} \textbackslash{}citep{*}:
69 \citep*[before][after]{article-crossref} \textbackslash{}Citep: \Citep[before][after]{article-crossref}
70 \textbackslash{}Citep{*}: \Citep*[before][after]{article-crossref}
72 \textbackslash{}citealt: \citealt[before][after]{article-crossref}
73 \textbackslash{}citealt{*}: \citealt*[before][after]{article-crossref}
74 \textbackslash{}Citealt: \Citealt[before][after]{article-crossref}
75 \textbackslash{}Citealt{*}: \Citealt*[before][after]{article-crossref}
77 \textbackslash{}citealp: \citealp[before][after]{article-crossref}
78 \textbackslash{}citealp{*}: \citealp*[before][after]{article-crossref}
79 \textbackslash{}Citealp: \Citep[before][after]{article-crossref}
80 \textbackslash{}Citealp{*}: \Citealp*[before][after]{article-crossref}
82 \textbackslash{}citeauthor: \citeauthor[before][after]{article-crossref}
83 \textbackslash{}citeauthor{*}: \citeauthor*[before][after]{article-crossref}
84 \textbackslash{}Citeauthor: \Citeauthor[before][after]{article-crossref}
85 \textbackslash{}Citeauthor{*}: \Citeauthor*[before][after]{article-crossref}
87 \textbackslash{}citeyear: \citeyear[before][after]{article-crossref}
89 \textbackslash{}citeyearpar: \citeyearpar[before][after]{article-crossref}
91 \textbackslash{}nocite: \nocite{article-crossref}
93 \bibliographystyle{unsrt}
96 \section{Input files\index{Input files}}
98 We can input files too, like this \input{DummyDocument}, or with the include
99 variant \include{DummyDocument} % unfortunately, including the doc twice
100 % generates a multiply defined label
102 If you prefer verbatim input, you can choose
103 between~\verbatiminput{foo} or~\verbatiminput*{foo}.
105 \section{URL\index{URL}\nomenclature[www]{URL}{uniform resource locator}}
107 An URL: \url{http://www.lyx.org}
108 \nomenclature{URL2}{uniform resource locator}
110 \section{Lists\index{Lists}}
115 \section{Graphics\index{Graphics}}
117 There is also some basic support for graphics, in the form
118 \includegraphics{foo.eps}, or the slightly more elaborate
119 \includegraphics[bb=10bp 0bp 96bp 96bp,clip,height=1cm, width=1cm]{foo.eps}.
121 \section{Special formattings\index{Special formattings}}
123 \subsection{LyX line}
127 {\tiny \lyxline{\tiny}}{\tiny \par}
129 test {\Huge Test} {\tiny test} test
131 \lyxline{\normalsize}
135 {\Huge \lyxline{\Huge}}{\Huge \par}
139 \subsection{Line breaks}
141 They can also or be broken by a newline\\
142 or a newline command \newline
143 or by a line break \linebreak
144 or by a defined line break \linebreak[4]
146 There are even newlines with weird arguments, but these are not
147 handled by LyX\\*[1cm]
148 so we try to use ERT in this case.
150 \subsection{Page breaks}
152 They can also or be broken by a newpage \newpage
153 or by a page break \pagebreak
154 or by a defined page break \pagebreak[4]
156 \section{Special characters\index{Special characters}}
158 Then one has those macros with a long name for a short meaning, like
159 \textasciitilde, \textasciicircum{} or \textbackslash{}, \slash{},
160 \nobreakdash and the characters
161 that LaTeX wants to espace because they are active, like \_\&\#\$\{\}\%.
163 And what about special characters like hyphe\-nation mark,
164 ellipsis\ldots, and end-of-sentence\@. LyX also supports a menu
165 separator\lyxarrow{}and a spif\textcompwordmark{}fy ligature break.
167 Test for whitespace handling of commands: The following lines should
168 result in identical output:
170 builtin \textasciicircum{} unicodesymbols \j{} user \mycommand{} xx\par
171 builtin \textasciicircum {} unicodesymbols \j {} user \mycommand{} xx\par
172 builtin \textasciicircum % with a comment
173 {} unicodesymbols \j % and a second one
174 {} user \mycommand % and another
177 A sub\textsubscript{sc\emph{ript}} and super\textsuperscript{script
178 with $a^2+b^2=c^2$ math}.