]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/test/test-structure.tex
1f6402dd751d0495cd5ced03f5fcd7c9d50caf1d
[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 for floats}
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 \begin{sidewaystable*}
78 \caption{rotated table, spanning all columns}
79
80 \centering{}%
81 \begin{tabular}{|c|c|}
82 \hline 
83 a  & b\tabularnewline
84 \hline 
85 \hline 
86 d  & c\tabularnewline
87 \hline 
88 \end{tabular}
89 \end{sidewaystable*}
90
91 \begin{wrapfigure}[4]{L}[2ex]{0.5\columnwidth}%
92 \begin{centering}
93 fdgsdfdh
94 \par\end{centering}
95
96 \caption{test1}
97 \end{wrapfigure}%
98 \LyX{} is a document preparation system. It excels at letting you
99 create complex technical and scientific articles with mathematics,
100 cross-references, bibliographies, indices, etc. It is very good at
101 documents of any length in which the usual processing abilities are
102 required: automatic sectioning and pagination, spell checking, and
103 so forth. It can also be used to write a letter to your mom, though
104 granted, there are probably simpler programs available for that. It
105 is definitely not the best tool for creating banners, flyers, or advertisements
106 (we'll explain why later), though with some effort all these can be
107 done, too.
108
109 \begin{wrapfigure}{o}{0.5\columnwidth}%
110 \begin{centering}
111 fdgs
112 \par\end{centering}
113
114 \caption{test2}
115 \end{wrapfigure}%
116 \LyX{} is a document preparation system. It excels at letting you
117 create complex technical and scientific articles with mathematics,
118 cross-references, bibliographies, indices, etc. It is very good at
119 documents of any length in which the usual processing abilities are
120 required: automatic sectioning and pagination, spell checking, and
121 so forth. It can also be used to write a letter to your mom, though
122 granted, there are probably simpler programs available for that. It
123 is definitely not the best tool for creating banners, flyers, or advertisements
124 (we'll explain why later), though with some effort all these can be
125 done, too.
126
127 \begin{wraptable}{i}[0.05\textwidth]{5ex}%
128 \caption{fdg}
129
130
131 \centering{}dfgd\end{wraptable}%
132 \LyX{} is a document preparation system. It excels at letting you
133 create complex technical and scientific articles with mathematics,
134 cross-references, bibliographies, indices, etc. It is very good at
135 documents of any length in which the usual processing abilities are
136 required: automatic sectioning and pagination, spell checking, and
137 so forth. It can also be used to write a letter to your mom, though
138 granted, there are probably simpler programs available for that. It
139 is definitely not the best tool for creating banners, flyers, or advertisements
140 (we'll explain why later), though with some effort all these can be
141 done, too.
142
143 \subsection{Some paragraph stuff}
144
145 A paragraph\footnote{hello} with a footnote and another
146 one\footnote{hello
147
148 there} with several paragraphs \vspace{1cm} aa
149
150 and another paragraph
151
152 \begin{center}
153 Some centered stuff
154 \end{center}
155
156 \begin{quotation}
157 An environment
158
159 \subsubsection*{with a command inside it}
160 \end{quotation}
161
162 \begin{quotation}
163 Another environment
164
165 \begin{quotation}
166 With another one inside it (with same layout)
167
168 [this one even has several paragraphs!]
169 \end{quotation}
170
171 \end{quotation}
172
173 We can also nest enumerations
174
175 \begin{enumerate}
176 \item Item1
177 \begin{enumerate}
178 \item Item1.a
179
180 \item Item1.b (there is  a paragraph break in front of this)
181 \begin{itemize}
182 \item Item1.b.*
183 \item Item1.b.*
184 \end{itemize}
185 \end{enumerate}
186 \item Item2
187 \end{enumerate}
188 \begin{enumerate}
189 \item Item1 (appears as Item3 with bug 5716)
190
191 Normal paragraph in Item1
192
193 \begin{enumerate}
194 \item Item1.a
195 \end{enumerate}
196 \end{enumerate}
197
198 Let's see what happens when normal paragraphs are inserted in lists:
199
200 \begin{itemize}
201 \item the first item
202
203 with some explanatory text under it
204
205 and a second paragraph for good measure
206
207 \subsubsection*{we can even have one as a subsubsection}
208
209 \item the second item
210
211 \item the third item
212
213 \subsubsection*{and a sssection heading inside it (why not?)}
214 \end{itemize}
215
216 What else? Well, we have descriptions:
217 \begin{description}
218 \item[ABC] first item
219 \item[BCD] second one
220 \end{description}
221 labelings:
222 \begin{lyxlist}{00.00.0000}
223 \item [label~1] first item
224 \item [label~2] second item
225 \end{lyxlist}
226 and bibliography:
227 \begin{thebibliography}{9}
228 \bibitem{FOO} Edward Bar. \emph{The Foo Book}. (1999)
229 \bibitem{FO2} Walter Müller \emph{The Müller Book}. (2004) 
230 \end{thebibliography}
231
232 \appendix
233
234 \section{This is the Appendix}
235
236 \noindent blabla bla bla
237
238 switch to german:\selectlanguage{german}
239 Hallo!
240 \foreignlanguage{french}{some \emph{french}}
241 back to english:\selectlanguage{newzealand}
242 and some nested \foreignlanguage{francais}{french \foreignlanguage{german}{nested
243 \emph{german}} french} english stuff.
244 Note that we both used \texttt{french} and the \texttt{francais} alias for the
245 french text, but for some reason this does not work with the
246 \texttt{newzealand} alias and \texttt{english} for english text.
247
248 \section{Another Appendix section}
249
250 blub
251
252 Test for missing \textbackslash end\_deeper (file format 278).
253 This must stay at the very end of the document!
254 \begin{itemize}
255 \item par1
256
257 par2
258 \begin{enumerate}
259 \item par1
260
261 par2
262 \end{enumerate}
263
264 \end{itemize}
265
266 \end{document}