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