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