]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/test/test-insets.tex
Increase tex2lyx output format to 297.
[lyx.git] / src / tex2lyx / test / test-insets.tex
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}
6
7 \setlength{\parindent}{3mm}
8 \usepackage{setspace}
9 \onehalfspacing
10
11 \usepackage{amsmath}
12 \usepackage{url}
13 \usepackage{verbatim}
14 \usepackage[numbers]{natbib}
15 \usepackage{nomencl}
16 % the following is useful when we have the old nomencl.sty package
17 \providecommand{\printnomenclature}{\printglossary}
18 \providecommand{\makenomenclature}{\makeglossary}
19 \usepackage{varioref}
20 \usepackage{prettyref}
21 \usepackage{makeidx}
22
23 \usepackage{graphicx}
24
25 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
26 \newcommand{\lyxline}[1][1pt]{%
27   \par\noindent%
28   \rule[.5ex]{\linewidth}{#1}\par}
29
30 \newcommand{\lyxarrow}{\leavevmode\,$\triangleright$\,\allowbreak}
31
32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
33 \usepackage{subscript} % user specified as long as tex2lyx
34 % produces a format less than 408
35
36 \def\mycommand{\textquestiondown}
37
38 \begin{document}
39
40 \tableofcontents
41
42 \noindent This paragraph is not indented.
43
44 \section{References\index{References}}
45
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
49 quotes too...).
50
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}.
56
57 \section{Cites\index{Cites}}
58
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}
61
62 Now the natbib things:
63
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}
67
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}
71
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}
76
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}
81
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}
86
87 \textbackslash{}citeyear: \citeyear[before][after]{article-crossref}
88
89 \textbackslash{}citeyearpar: \citeyearpar[before][after]{article-crossref} 
90
91 \textbackslash{}nocite: \nocite{article-crossref}
92
93 \bibliographystyle{unsrt}
94 \bibliography{xampl}
95
96 \section{Input files\index{Input files}}
97
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
101
102 If you prefer verbatim input, you can choose
103 between~\verbatiminput{foo} or~\verbatiminput*{foo}.
104
105 \section{URL\index{URL}\nomenclature[www]{URL}{uniform resource locator}}
106
107 An URL: \url{http://www.lyx.org}
108 \nomenclature{URL2}{uniform resource locator}
109
110 \section{Lists\index{Lists}}
111
112 \listoffigures
113 \listoftables
114
115 \section{Graphics\index{Graphics}}
116
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}.
120
121 \section{Special formattings\index{Special formattings}}
122
123 \subsection{LyX line}
124
125 test
126
127 {\tiny \lyxline{\tiny}}{\tiny \par}
128
129 test {\Huge Test} {\tiny test} test
130
131 \lyxline{\normalsize}
132
133 test
134
135 {\Huge \lyxline{\Huge}}{\Huge \par}
136
137 test
138
139 \subsection{Line breaks}
140
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]
145
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.
149
150 \subsection{Page breaks}
151
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]
155
156 \section{Special characters\index{Special characters}}
157
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 \_\&\#\$\{\}\%.
162
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.
166
167 Test for whitespace handling of commands: The following lines should
168 result in identical output:
169
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
175 {} xx
176
177 A sub\textsubscript{sc\emph{ript}} and super\textsuperscript{script
178 with $a^2+b^2=c^2$ math}.
179
180 \printindex{}
181
182 \printnomenclature{}
183
184 \end{document}