]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/test/test-structure.tex
72f606643f99c01fa979f177dc4302860308b5dd
[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,french,german,english]{article}
4 \usepackage[latin9]{inputenc}
5 \usepackage{color}
6 \usepackage{rotfloat}
7 \usepackage{wrapfig}
8
9 \makeatletter
10
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
12 \pdfpageheight\paperheight
13 \pdfpagewidth\paperwidth
14
15 \providecommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
16 \newcommand{\noun}[1]{\textsc{#1}}
17 %% Because html converters don't know tabularnewline
18 \providecommand{\tabularnewline}{\\}
19
20 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
21 \newenvironment{lyxlist}[1]
22 {\begin{list}{}
23 {\settowidth{\labelwidth}{#1}
24  \setlength{\leftmargin}{\labelwidth}
25  \addtolength{\leftmargin}{\labelsep}
26  \renewcommand{\makelabel}[1]{##1\hfil}}}
27 {\end{list}}
28
29 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
30 \newenvironment{foo}{==[}{]==}
31
32 % LyX will also recognize this command:
33 % \@ifundefined{date}{}{\date{}}
34 % and also this:
35 % \date{}
36
37 \@ifundefined{showcaptionsetup}{}{%
38  \PassOptionsToPackage{caption=false}{subfig}}
39 \usepackage{subfig}
40 \makeatother
41
42 \usepackage{babel}
43 \addto\extrasfrench{%
44    \providecommand{\og}{\leavevmode\flqq~}%
45    \providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
46 }
47
48 \begin{document}
49
50 \title{Title}
51
52 \date{}
53
54 \maketitle
55 This document contains all sorts of layouts we are supposed to
56 support, along with weird nestings.
57
58 At time you will see that I use subsubsections in weird places. The
59 intent is just to make sure that I can include a macro-type layout
60 everyzhere it makes sense.
61
62 A normal paragraph
63 \begin{equation}
64 x = \sin y
65 \end{equation}
66 with maths inside it.
67
68 \begin{quote}
69 An environment...
70
71 ... with two paragraphs
72 \end{quote}
73
74 \begin{foo}
75 an unknown environment
76 \end{foo}
77
78
79 \section{A section}
80
81 \section[Hello!]{A section with optional argument}
82
83 \begin{quote}
84 An environment
85 \end{quote}
86
87 \section*{A starred section for floats}
88
89 \begin{figure}
90 \caption{ \emph{\noun{is}} a caption}
91 \end{figure}
92
93 \begin{figure}
94 \caption[s\noun{ho}rt]{this \emph{is} a caption}
95 \end{figure}
96
97 \begin{sidewaystable*}
98 \caption{rotated table, spanning all columns}
99
100 \centering{}%
101 \begin{tabular}{|c|c|}
102 \hline 
103 a  & b\tabularnewline
104 \hline 
105 \hline 
106 d  & c\tabularnewline
107 \hline 
108 \end{tabular}
109 \end{sidewaystable*}
110
111 \begin{wrapfigure}[4]{L}[2ex]{0.5\columnwidth}%
112 \begin{centering}
113 fdgsdfdh
114 \par\end{centering}
115
116 \caption{test1}
117 \end{wrapfigure}%
118 \LyX{} is a document preparation system. It excels at letting you
119 create complex technical and scientific articles with mathematics,
120 cross-references, bibliographies, indices, etc. It is very good at
121 documents of any length in which the usual processing abilities are
122 required: automatic sectioning and pagination, spell checking, and
123 so forth. It can also be used to write a letter to your mom, though
124 granted, there are probably simpler programs available for that. It
125 is definitely not the best tool for creating banners, flyers, or advertisements
126 (we'll explain why later), though with some effort all these can be
127 done, too.
128
129 \begin{wrapfigure}{o}{0.5\columnwidth}%
130 \begin{centering}
131 fdgs
132 \par\end{centering}
133
134 \caption{test2}
135 \end{wrapfigure}%
136 \LyX{} is a document preparation system. It excels at letting you
137 create complex technical and scientific articles with mathematics,
138 cross-references, bibliographies, indices, etc. It is very good at
139 documents of any length in which the usual processing abilities are
140 required: automatic sectioning and pagination, spell checking, and
141 so forth. It can also be used to write a letter to your mom, though
142 granted, there are probably simpler programs available for that. It
143 is definitely not the best tool for creating banners, flyers, or advertisements
144 (we'll explain why later), though with some effort all these can be
145 done, too.
146
147 \begin{wraptable}{i}[0.05\textwidth]{5ex}%
148 \caption{fdg}
149
150
151 \centering{}dfgd\end{wraptable}%
152 \LyX{} is a document preparation system. It excels at letting you
153 create complex technical and scientific articles with mathematics,
154 cross-references, bibliographies, indices, etc. It is very good at
155 documents of any length in which the usual processing abilities are
156 required: automatic sectioning and pagination, spell checking, and
157 so forth. It can also be used to write a letter to your mom, though
158 granted, there are probably simpler programs available for that. It
159 is definitely not the best tool for creating banners, flyers, or advertisements
160 (we'll explain why later), though with some effort all these can be
161 done, too.
162
163 \begin{table}
164 \caption{lkälöä}
165
166
167 \subfloat[ölkälö]{
168
169 klöä}
170
171 \end{table}
172
173
174 \begin{figure}
175 \subfloat[te\%st]{sub\textcolor{red}{fig}u\%re 1
176
177 }
178
179 \hfill{} \subfloat[]{subfigure 2ö
180
181 }
182
183 \subfloat{subfigure 3}
184
185 \caption{figure caption}
186
187
188 strange usage, but valid 
189 \end{figure}
190
191
192 \subsection{Some paragraph stuff}
193
194 A paragraph\footnote{hello} with a footnote and another
195 one\footnote{hello
196
197 there} with several paragraphs \vspace{1cm} aa
198
199 and another paragraph
200
201 \begin{center}
202 Some centered stuff
203 \end{center}
204
205 \begin{quotation}
206 An environment
207
208 \subsubsection*{with a command inside it}
209 \end{quotation}
210
211 \begin{quotation}
212 Another environment
213
214 \begin{quotation}
215 With another one inside it (with same layout)
216
217 [this one even has several paragraphs!]
218 \end{quotation}
219
220 \end{quotation}
221
222 We can also nest enumerations
223
224 \begin{enumerate}
225 \item Item1
226 \begin{enumerate}
227 \item Item1.a
228
229 \item Item1.b (there is  a paragraph break in front of this)
230 \begin{itemize}
231 \item Item1.b.*
232 \item Item1.b.*
233 \end{itemize}
234 \end{enumerate}
235 \item Item2
236 \end{enumerate}
237 \begin{enumerate}
238 \item Item1 (appears as Item3 with bug 5716)
239
240 Normal paragraph in Item1
241
242 \begin{enumerate}
243 \item Item1.a
244 \end{enumerate}
245 \end{enumerate}
246
247 Let's see what happens when normal paragraphs are inserted in lists:
248
249 \begin{itemize}
250 \item the first item
251
252 with some explanatory text under it
253
254 and a second paragraph for good measure
255
256 \subsubsection*{we can even have one as a subsubsection}
257
258 \item the second item
259
260 \item the third item
261
262 \subsubsection*{and a sssection heading inside it (why not?)}
263 \end{itemize}
264
265 What else? Well, we have descriptions:
266 \begin{description}
267 \item[ABC] first item
268 \item[BCD] second one
269 \end{description}
270 labelings:
271 \begin{lyxlist}{00.00.0000}
272 \item [label~1] first item
273 \item [label~2] second item
274 \end{lyxlist}
275 and bibliography:
276 \begin{thebibliography}{9}
277 \bibitem{FOO} Edward Bar. \emph{The Foo Book}. (1999)
278 \bibitem{FO2} Walter Müller \emph{The Müller Book}. (2004) 
279 \end{thebibliography}
280
281 \appendix
282
283 \section{This is the Appendix}
284
285 \noindent blabla bla bla
286
287 switch to german:\selectlanguage{german}
288 Hallo!
289 \foreignlanguage{french}{some \emph{french}}
290 back to english:\selectlanguage{newzealand}
291 and some nested \foreignlanguage{francais}{french \foreignlanguage{german}{nested
292 \emph{german}} french} english stuff.
293 Note that we both used \texttt{french} and the \texttt{francais} alias for the
294 french text, but for some reason this does not work with the
295 \texttt{newzealand} alias and \texttt{english} for english text.
296
297 \section{Another Appendix section}
298
299 blub
300
301 Test for missing \textbackslash end\_deeper (file format 278).
302 This must stay at the very end of the document!
303 \begin{itemize}
304 \item par1
305
306 par2
307 \begin{enumerate}
308 \item par1
309
310 par2
311 \end{enumerate}
312
313 \end{itemize}
314
315 \end{document}