]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/test/test-structure.tex
tex2lyx: support for hyperlinks
[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 \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 A paragraph\footnote{hello} with a footnote and another
92 one\footnote{hello
93
94 there} with several paragraphs
95
96 some ERT \vspace{1cm} aa
97
98 and another paragraph
99
100 \begin{center}
101 Some centered stuff (does not work)
102 \end{center}
103
104 \begin{quotation}
105 An environment
106
107 \subsubsection*{with a command inside it}
108 \end{quotation}
109
110 \begin{quotation}
111 Another environment
112
113 \begin{quotation}
114 With another one inside it (with same layout)
115
116 [this one even has several paragraphs!]
117 \end{quotation}
118
119 \end{quotation}
120
121 We can also nest enumerations
122
123 \begin{enumerate}
124 \item Item1
125 \begin{enumerate}
126 \item Item1.a
127
128 \item Item1.b (there is  a paragraph break in front of this)
129 \begin{itemize}
130 \item Item1.b.*
131 \item Item1.b.*
132 \end{itemize}
133 \end{enumerate}
134 \item Item2
135 \end{enumerate}
136 \begin{enumerate}
137 \item Item1 (appears as Item3 with bug 5716)
138
139 Normal paragraph in Item1
140
141 \begin{enumerate}
142 \item Item1.a
143 \end{enumerate}
144 \end{enumerate}
145
146 Let's see what happens when normal paragraphs are inserted in lists:
147
148 \begin{itemize}
149 \item the first item
150
151 with some explanatory text under it
152
153 and a second paragraph for good measure
154
155 \subsubsection*{we can even have one as a subsubsection}
156
157 \item the second item
158
159 \item the third item
160
161 \subsubsection*{and a sssection heading inside it (why not?)}
162 \end{itemize}
163
164 What else? Well, we have descriptions:
165 \begin{description}
166 \item[ABC] first item
167 \item[BCD] second one
168 \end{description}
169 labelings:
170 \begin{lyxlist}{00.00.0000}
171 \item [label~1] first item
172 \item [label~2] second item
173 \end{lyxlist}
174 and bibliography:
175 \begin{thebibliography}{9}
176 \bibitem{FOO} Edward Bar. \emph{The Foo Book}. (1999)
177 \bibitem{FO2} Walter Müller \emph{The Müller Book}. (2004) 
178 \end{thebibliography}
179
180 \appendix
181
182 \section{This is the Appendix}
183
184 \noindent blabla bla bla
185
186 switch to german:\selectlanguage{german}
187 Hallo!
188 \foreignlanguage{french}{some \emph{french}}
189 back to english:\selectlanguage{newzealand}
190 and some nested \foreignlanguage{francais}{french \foreignlanguage{german}{nested
191 \emph{german}} french} english stuff.
192 Note that we both used \texttt{french} and the \texttt{francais} alias for the
193 french text, but for some reason this does not work with the
194 \texttt{newzealand} alias and \texttt{english} for english text.
195
196 \section{Another Appendix section}
197
198 blub
199
200 Test for missing \textbackslash end\_deeper (file format 278).
201 This must stay at the very end of the document!
202 \begin{itemize}
203 \item par1
204
205 par2
206 \begin{enumerate}
207 \item par1
208
209 par2
210 \end{enumerate}
211
212 \end{itemize}
213
214 \end{document}