]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/test/test-insets.tex
test/test-structure.tex: add nomenclature
[lyx.git] / src / tex2lyx / test / test-insets.tex
1 \documentclass[a4paper,12pt]{article}
2 \usepackage[T1]{fontenc}
3 \usepackage[latin9]{inputenc}
4
5 \setlength{\parindent}{3mm}
6 \usepackage{setspace}
7 \onehalfspacing
8
9 \usepackage{amsmath}
10 \usepackage{url}
11 \usepackage{verbatim}
12 \usepackage[numbers]{natbib}
13 \usepackage{varioref}
14 \usepackage{prettyref}
15
16 \usepackage{graphicx}
17
18 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
19 \newcommand{\lyxline}[1][1pt]{%
20   \par\noindent%
21   \rule[.5ex]{\linewidth}{#1}\par}
22
23 \newcommand{\lyxarrow}{\leavevmode\,$\triangleright$\,\allowbreak}
24
25 \begin{document}
26
27 \tableofcontents
28
29 \noindent This paragraph is not indented.
30
31 \section{References\index{References}}
32
33 Let's start with simple things: a label~\label{lab:test} and a
34 reference~\ref{lab:test}; note that I have tested ``unbreakable
35 space'' without warning (and worse than that, I just tested english
36 quotes too...).
37
38 Of course there are other kind of references, like page
39 reference~\pageref{lab:test}, but also equation
40 reference~\eqref{lab:test} (from amsmath package), or varioref's
41 equivalents~\vref{lab:test} and~\vpageref{lab:test}, without
42 forgetting pretty references like~\prettyref{lab:test}.
43
44 \section{Cites\index{Cites}}
45
46 Let's start with simple things: a \textbackslash{}cite: \cite[after]{article-crossref}
47 and two \textbackslash{}cites: \cite[after]{whole-set,article-crossref}
48
49 Now the natbib things:
50
51 \textbackslash{}citet: \citet[before][after]{article-crossref} \textbackslash{}citet{*}:
52 \citet*[before][after]{article-crossref} \textbackslash{}Citet: \Citet[before][after]{article-crossref}
53 \textbackslash{}Citet{*}: \Citet*[before][after]{article-crossref}
54
55 \textbackslash{}citep: \citep[before][after]{article-crossref} \textbackslash{}citep{*}:
56 \citep*[before][after]{article-crossref} \textbackslash{}Citep: \Citep[before][after]{article-crossref}
57 \textbackslash{}Citep{*}: \Citep*[before][after]{article-crossref}
58
59 \textbackslash{}citealt: \citealt[before][after]{article-crossref}
60 \textbackslash{}citealt{*}: \citealt*[before][after]{article-crossref}
61 \textbackslash{}Citealt: \Citealt[before][after]{article-crossref}
62 \textbackslash{}Citealt{*}: \Citealt*[before][after]{article-crossref}
63
64 \textbackslash{}citealp: \citealp[before][after]{article-crossref}
65 \textbackslash{}citealp{*}: \citealp*[before][after]{article-crossref}
66 \textbackslash{}Citealp: \Citep[before][after]{article-crossref}
67 \textbackslash{}Citealp{*}: \Citealp*[before][after]{article-crossref}
68
69 \textbackslash{}citeauthor: \citeauthor[before][after]{article-crossref}
70 \textbackslash{}citeauthor{*}: \citeauthor*[before][after]{article-crossref}
71 \textbackslash{}Citeauthor: \Citeauthor[before][after]{article-crossref}
72 \textbackslash{}Citeauthor{*}: \Citeauthor*[before][after]{article-crossref}
73
74 \textbackslash{}citeyear: \citeyear[before][after]{article-crossref}
75
76 \textbackslash{}citeyearpar: \citeyearpar[before][after]{article-crossref} 
77
78 \textbackslash{}nocite: \nocite{article-crossref}
79
80 \bibliographystyle{unsrt}
81 \bibliography{xampl}
82
83 \section{Input files\index{Input files}}
84
85 We can input files too, like this \input{DummyDocument}, or with the include
86 variant \include{DummyDocument}
87
88 If you prefer verbatim input, you can choose
89 between~\verbatiminput{foo} or~\verbatiminput*{foo}.
90
91 \section{URL\index{URL}\nomenclature[www]{URL}{uniform resource locator}}
92
93 An URL: \url{http://www.lyx.org}
94 \nomenclature{URL2}{uniform resource locator}
95
96 \section{Lists\index{Lists}}
97
98 \listoffigures
99 \listoftables
100
101 \section{Graphics\index{Graphics}}
102
103 There is also some basic support for graphics, in the form
104 \includegraphics{foo.eps}, or the slightly more elaborate
105 \includegraphics[bb=10bp 0bp 96bp 96bp,clip,height=1cm, width=1cm]{foo.eps}.
106
107 \section{Special formattings\index{Special formattings}}
108
109 \subsection{LyX line}
110
111 test
112
113 {\tiny \lyxline{\tiny}}{\tiny \par}
114
115 test {\Huge Test} {\tiny test} test
116
117 \lyxline{\normalsize}
118
119 test
120
121 {\Huge \lyxline{\Huge}}{\Huge \par}
122
123 test
124
125 \subsection{Line breaks}
126
127 They can also or be broken by a newline\\
128 or a newline command \newline
129 or by a line break \linebreak
130 or by a defined line break \linebreak[4]
131
132 There are even newlines with weird arguments, but these are not
133 handled by LyX\\*[1cm]
134 so we try to use ERT in this case.
135
136 \subsection{Page breaks}
137
138 They can also or be broken by a newpage \newpage
139 or by a page break \pagebreak
140 or by a defined page break \pagebreak[4]
141
142 \section{Special characters\index{Special characters}}
143
144 Then one has those macros with a long name for a short meaning, like
145 \textasciitilde, \textasciicircum{} or \textbackslash{}, and the characters
146 that LaTeX wants to espace because they are active, like \_\&\#\$\{\}\%.
147
148 And what about special characters like hyphe\-nation mark,
149 ellipsis\ldots, and end-of-sentence\@. LyX also supports a menu
150 separator\lyxarrow{}and a spif\textcompwordmark{}fy ligature break.
151
152 \printindex{}
153
154 \printnomenclature{}
155
156 \end{document}