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