]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/test/test-structure.tex
b79e7ab53f0288b044c5e69a44cfb8cadc30c43c
[lyx.git] / src / tex2lyx / test / test-structure.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[legalpaper,francais,german,newzealand]{article}
4
5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
6
7 \usepackage{babel}
8 \newcommand{\noun}[1]{\textsc{#1}}
9
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
11
12 \newenvironment{lyxlist}[1]
13         {\begin{list}{}
14                 {\settowidth{\labelwidth}{#1}
15                 \setlength{\leftmargin}{\labelwidth}
16                 \addtolength{\leftmargin}{\labelsep}
17                 \renewcommand{\makelabel}[1]{##1\hfil}}}
18         {\end{list}}
19
20 % LyX will also recognize this command:
21 % \@ifundefined{date}{}{\date{}}
22 % and also this:
23 % \date{}
24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
25
26 \newenvironment{foo}{==[}{]==}
27
28 \begin{document}
29
30 \title{Title}
31
32 \date{}
33
34 \maketitle
35 This document contains all sorts of layouts we are supposed to
36 support, along with weird nestings.
37
38 At time you will see that I use subsubsections in weird places. The
39 intent is just to make sure that I can include a macro-type layout
40 everyzhere it makes sense.
41
42 A normal paragraph
43 \begin{equation}
44 x = \sin y
45 \end{equation}
46 with maths inside it.
47
48 \begin{quote}
49 An environment...
50
51 ... with two paragraphs
52 \end{quote}
53
54 \begin{foo}
55 an unknown environment
56 \end{foo}
57
58
59 \section{A section}
60
61 \section[Hello!]{A section with optional argument}
62
63 \begin{quote}
64 An environment
65 \end{quote}
66
67 \section*{A starred section}
68
69 \begin{figure}
70 \caption{ \emph{\noun{is}} a caption}
71 \end{figure}
72
73 \begin{figure}
74 \caption[s\noun{ho}rt]{this \emph{is} a caption}
75 \end{figure}
76
77 A paragraph\footnote{hello} with a footnote and another
78 one\footnote{hello
79
80 there} with several paragraphs
81
82 some ERT \vspace{1cm} aa
83
84 and another paragraph
85
86 \begin{center}
87 Some centered stuff (does not work)
88 \end{center}
89
90 \begin{quotation}
91 An environment
92
93 \subsubsection*{with a command inside it}
94 \end{quotation}
95
96 \begin{quotation}
97 Another environment
98
99 \begin{quotation}
100 With another one inside it (with same layout)
101
102 [this one even has several paragraphs!]
103 \end{quotation}
104
105 \end{quotation}
106
107 We can also nest enumerations
108
109 \begin{enumerate}
110 \item Item1
111 \begin{enumerate}
112 \item Item1.a
113
114 \item Item1.b (there is  a paragraph break in front of this)
115 \begin{itemize}
116 \item Item1.b.*
117 \item Item1.b.*
118 \end{itemize}
119 \end{enumerate}
120 \item Item2
121 \end{enumerate}
122 \begin{enumerate}
123 \item Item1 (appears as Item3 with bug 5716)
124
125 Normal paragraph in Item1
126
127 \begin{enumerate}
128 \item Item1.a
129 \end{enumerate}
130 \end{enumerate}
131
132 Let's see what happens when normal paragraphs are inserted in lists:
133
134 \begin{itemize}
135 \item the first item
136
137 with some explanatory text under it
138
139 and a second paragraph for good measure
140
141 \subsubsection*{we can even have one as a subsubsection}
142
143 \item the second item
144
145 \item the third item
146
147 \subsubsection*{and a sssection heading inside it (why not?)}
148 \end{itemize}
149
150 What else? Well, we have descriptions:
151 \begin{description}
152 \item[ABC] first item
153 \item[BCD] second one
154 \end{description}
155 labelings:
156 \begin{lyxlist}{00.00.0000}
157 \item [label~1] first item
158 \item [label~2] second item
159 \end{lyxlist}
160 and bibliography:
161 \begin{thebibliography}{9}
162 \bibitem{FOO} Edward Bar. \emph{The Foo Book}. (1999)
163 \bibitem{FO2} Walter Müller \emph{The Müller Book}. (2004) 
164 \end{thebibliography}
165
166 \appendix
167
168 \section{This is the Appendix}
169
170 \noindent blabla bla bla
171
172 switch to german:\selectlanguage{german}
173 Hallo!
174 \foreignlanguage{french}{some \emph{french}}
175 back to english:\selectlanguage{newzealand}
176 and some nested \foreignlanguage{francais}{french \foreignlanguage{german}{nested
177 \emph{german}} french} english stuff.
178 Note that we both used \texttt{french} and the \texttt{francais} alias for the
179 french text, but for some reason this does not work with the
180 \texttt{newzealand} alias and \texttt{english} for english text.
181
182 \section{Another Appendix section}
183
184 blub
185
186 Test for missing \textbackslash end\_deeper (file format 278).
187 This must stay at the very end of the document!
188 \begin{itemize}
189 \item par1
190
191 par2
192 \begin{enumerate}
193 \item par1
194
195 par2
196 \end{enumerate}
197
198 \end{itemize}
199
200 \end{document}