]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/test/box-color-size-space-align.tex
tex2lyx: add strike-outs etc. to the TeX testfile
[lyx.git] / src / tex2lyx / test / box-color-size-space-align.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[b4paper,twoside, twocolumn,12pt]{article}
4
5 \usepackage[T1]{fontenc}
6 \usepackage[latin9]{inputenc}
7
8 \usepackage{geometry}
9 \geometry{verbose,landscape,b4paper,tmargin=1cm,bmargin=2cm,lmargin=3cm,rmargin=4cm,headheight=6cm,headsep=5cm,footskip=7cm,columnsep=8cm}
10
11 \usepackage{amsmath}
12 \usepackage{color}
13 \definecolor{page_backgroundcolor}{rgb}{1, 0.3359375, 0}
14 \pagecolor{page_backgroundcolor}
15 \definecolor{document_fontcolor}{rgb}{0.66796875, 1, 0}
16 \color{document_fontcolor}
17 \definecolor{note_fontcolor}{rgb}{0, 0, 1}
18 \definecolor{shadecolor}{rgb}{1, 1, 0}
19 \usepackage{framed}
20 \usepackage{calc}
21 \usepackage{fancybox}
22
23 \setlength{\parskip}{3mm}
24 \setlength{\parindent}{0sp}
25 \usepackage{setspace}
26 \setstretch{1.2}
27
28 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
29
30 %% The greyedout annotation environment
31 \newenvironment{lyxgreyedout}{\textcolor{note_fontcolor}\bgroup}{\egroup}
32
33 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
34
35 \setlength{\fboxsep}{3mm}
36
37 \definecolor{darkgreen}{cmyk}{0.5, 0, 1, 0.5}
38
39 \usepackage{ifpdf} % part of the hyperref bundle
40 \ifpdf % if pdflatex is used
41
42  % set fonts for nicer pdf view
43  \IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}
44
45  % link all cross references and URLs in pdf output
46  \usepackage[colorlinks=true, bookmarks, bookmarksnumbered,
47   bookmarksopen, bookmarksopenlevel=2,
48   linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,
49   pdfpagelayout=OneColumn, pdfnewwindow=true,
50   pdfstartview=XYZ, plainpages=false, pdfpagelabels,
51   pdfauthor={LyX Team}, pdftex,
52   pdftitle={tex2lyx testcase},pdfsubject={tex2lyx},
53   pdfkeywords={LyX, tex2lyx}]{hyperref}
54  
55 \else % if dvi or ps is produced
56
57  % link all cross references and URLs in dvi output
58  \usepackage[ps2pdf]{hyperref}
59
60 \fi % end if pdflatex is used
61
62
63 \begin{document}
64
65 \tableofcontents
66
67 \section{Boxes}
68
69 \subsection{Frameless Boxes}
70
71 blabla \mbox{mbox} blabla
72
73 blabla \makebox{makebox 1} blabla
74
75 blabla \makebox[3cm]{makebox 2} blabla
76
77 blabla \makebox[3cm][l]{makebox 3} blabla
78
79 \begin{figure}[ht]
80   \centering
81   \setlength{\unitlength}{.2in}
82
83 \begin{picture}(8,6)
84 \put(0,0){\makebox(0,0)[tr]{AAA}}
85 \put(8,0){\makebox(0,0){BBB}}
86 \put(1,0){\line(1,0){6}}   
87 \end{picture}
88
89 \end{figure}
90
91 \raisebox {8.5mm}{test}\raisebox {-6.5mm}{tset}
92
93 \subsection{Framed Boxes}
94
95 blabla \begin{framed}framed\end{framed} blabla
96
97 blabla \begin{framed}\begin{framed}nested framed\end{framed}\end{framed} blabla
98
99 blabla \fbox{fbox} blabla
100
101 blabla \framebox{framebox 1} blabla
102
103 blabla \framebox[3cm]{framebox 2} blabla
104
105 blabla \framebox[3cm][l]{framebox 3} blabla
106
107 Dies ist ein Beispieltext. %
108 \framebox{%
109 \begin{minipage}[c][1\totalheight][s]{0.2\columnwidth}%
110  \begin{center}
111   Der Boxinhalt
112  \par\end{center}
113
114  \begin{center}
115   ist über die
116  \par\end{center}
117
118  \begin{center}
119   Boxhöhe
120  \par\end{center}
121
122  \begin{center}
123   gleichmäßig verteilt.
124  \par\end{center}%
125 \end{minipage}}
126 Dies ist ein Beispieltext.
127
128 blabla \ovalbox{ovalbox} blabla
129
130 blabla \Ovalbox{Ovalbox} blabla
131
132 blabla \shadowbox{shadowbox} blabla
133
134 blabla \doublebox{doublebox} blabla
135
136 $\boxed{\int A=B}$
137
138 \subsection{LyX Boxes}
139
140 \begin{lyxgreyedout}
141 \textbf{Note:} Not all DVI-viewers are able to display rotations.
142 \end{lyxgreyedout}
143
144 \begin{shaded}%
145 Shaded background box\end{shaded}
146
147 \begin{minipage}[c]{1\columnwidth}%
148 \begin{shaded}%
149 Shaded background box, with inner minipage\end{shaded}%
150 \end{minipage}
151
152 \section{Colors}
153
154 \subsection{Predefined Colors}
155
156 test \textcolor{blue}{blue} test \textcolor{red}{red red red} test \textcolor{green}{bla}\textcolor{magenta}{blub}
157 test
158 \textcolor{green}{c}%
159 \textcolor{red}{o}%
160 \textcolor{blue}{l}%
161 \textcolor{green}{o}%
162 \textcolor{red}{r}
163
164 \subsection{Custom Colors}
165
166 test \textcolor{darkgreen}{dark green} test
167
168 \definecolor{violet}{rgb}{0.5, 0, 1}
169
170 test \textcolor{violet}{violet} test
171
172 \section{Font sizes}
173
174 \Huge Huge text
175
176 \huge huge text
177
178 \LARGE LARGE text
179
180 \Large Large text
181
182 \large large text
183
184 \normalsize normalsize text
185
186 \small small text
187
188 \footnotesize footnotesize text
189
190 \scriptsize scriptsize text
191
192 \tiny tiny text
193
194 \Huge Huge text \huge huge text \LARGE LARGE text \Large Large text
195 \large large text \normalsize normalsize text \small small text
196 \footnotesize footnotesize text \scriptsize scriptsize text \tiny tiny text
197
198 \normalsize Font size switches don't affect section headings!
199
200 \scriptsize bla blub
201
202 \section{Font size dummy 1}
203
204 bla blub
205
206 bla blub
207
208 \section*{Font size dummy 2}
209
210 bla blub
211 \normalsize
212
213
214 \section{Strikeout, underlined etc.}
215
216 Emphasized: \emph{test}
217
218 Underbar: \uline{test}
219
220 Double underbar: \uuline{test}
221
222 Wavy underbar: \uwave{test}
223
224 Strike out: \sout{test}
225
226 Noun: \noun{test}
227
228 Underbar, ephasized, stikreout: \emph{\uline{\sout{test}}}
229
230
231 \section{Paragraph spacing}
232
233 bla
234
235 \begin{singlespace}
236 singlespace single singlespace single singlespace single singlespace single
237 singlespace single singlespace single singlespace single singlespace single
238 \end{singlespace}
239
240 \begin{onehalfspace}
241 onehalfspace 1 onehalfspace 1 onehalfspace 1 onehalfspace 1 onehalfspace 1
242 onehalfspace 1 onehalfspace 1 onehalfspace 1 onehalfspace 1 onehalfspace 1
243
244 onehalfspace 2 onehalfspace 2 onehalfspace 2 onehalfspace 2 onehalfspace 2
245 onehalfspace 2 onehalfspace 2 onehalfspace 2 onehalfspace 2 onehalfspace 2
246 \end{onehalfspace}
247
248 blub
249
250 \begin{onehalfspace}
251 onehalfspace single onehalfspace single onehalfspace single onehalfspace single
252 onehalfspace single onehalfspace single onehalfspace single onehalfspace single
253 \end{onehalfspace}
254
255 blablub
256
257 \begin{doublespace}
258 doublespace single doublespace single doublespace single doublespace single
259 doublespace single doublespace single doublespace single doublespace single
260 \end{doublespace}
261
262 \begin{spacing}{1.2}
263 1.2 spacing single 1.2 spacing single 1.2 spacing single 1.2 spacing single
264 1.2 spacing single 1.2 spacing single 1.2 spacing single 1.2 spacing single
265 \end{spacing}
266
267 \section{Paragraph alignment}
268
269 bla
270
271 \begin{center}
272 center single center single center single center single center single
273 center single center single center single center single center single
274 \end{center}
275
276 blabla
277
278 \begin{flushleft}
279 flushleft 1 flushleft 1 flushleft 1 flushleft 1 flushleft 1 flushleft 1
280 flushleft 1 flushleft 1 flushleft 1 flushleft 1 flushleft 1 flushleft 1
281
282 flushleft 2 flushleft 2 flushleft 2 flushleft 2 flushleft 2 flushleft 2
283 flushleft 2 flushleft 2 flushleft 2 flushleft 2 flushleft 2 flushleft 2
284 \end{flushleft}
285
286 blub
287
288 \begin{flushleft}
289 flushleft single flushleft single flushleft single flushleft single
290 flushleft single flushleft single flushleft single flushleft single
291 \end{flushleft}
292
293 blablub
294
295 \begin{flushright}
296 flushright single flushright single flushright single flushright single
297 flushright single flushright single flushright single flushright single
298 \end{flushright}
299
300 bla
301
302 \centering
303 centering single centering single centering single centering single
304 centering single centering single centering single centering single
305
306 blabla
307
308 \raggedright
309 raggedright 1 raggedright 1 raggedright 1 raggedright 1 raggedright 1
310 raggedright 1 raggedright 1 raggedright 1 raggedright 1 raggedright 1
311
312 raggedright 2 raggedright 2 raggedright 2 raggedright 2 raggedright 2
313 raggedright 2 raggedright 2 raggedright 2 raggedright 2 raggedright 2
314
315 \raggedleft
316 raggedleft 1 raggedleft 1 raggedleft 1 raggedleft 1 raggedleft 1
317 raggedleft 1 raggedleft 1 raggedleft 1 raggedleft 1 raggedleft 1
318
319 raggedleft 2 raggedleft 2 raggedleft 2 raggedleft 2 raggedleft 2
320 raggedleft 2 raggedleft 2 raggedleft 2 raggedleft 2 raggedleft 2
321
322 %set back to justified
323 \raggedright{}
324
325
326 \subsection{Horizontal spaces}
327
328 Lines can have an hfill \hfill in the middle.
329 Lines can have an hfill \hspace{\fill} in the middle.
330 Lines can have a protected hfill \hspace*{\fill} in the middle.
331 Lines can have a dotted fill \dotfill in the middle.
332 Lines can have a rule fill \hrulefill in the middle.
333 Lines can have a left arrow fill \leftarrowfill in the middle.
334 Lines can have a right arrow fill \rightarrowfill in the middle.
335 Lines can have a upbrace fill \upbracefill in the middle.
336 Lines can have a downbrace fill \downbracefill in the middle.
337 Lines can have space \hspace{2cm} in the middle.
338 Lines can have protected space \hspace*{2cm} in the middle.
339
340 We also handle defined spaces:
341
342 Interword\ a
343
344 Visible\textvisiblespace{}a
345
346 Thin\,a
347
348 Medium\:a
349
350 Thick\;a
351
352 NegThin\negthinspace{}a
353
354 NegMed\negmedspace{}a
355
356 NegThick\negthickspace{}a
357
358 enspace\enspace{}a
359
360 enskip\enskip{}a
361
362 quad\quad{}a
363
364 qquad\qquad{}a
365
366 \subsubsection*{now some math examples:}
367
368 $a\hfill b$
369
370 $a\hspace*{2cm}b$
371
372 $a\hspace{1cm}b$
373
374 $a\hspace*{\fill} b$
375
376 $a\enskip b$
377
378 $a\enspace b$
379
380
381 \subsection{Vertical spaces}
382
383 Lines can have a vfill \vfill in the middle.
384 Lines can have a vfill \vspace{\fill} in the middle.
385 Lines can have a protected vfill \vspace*{\fill} in the middle.
386 Lines can have vertical space \vspace{2cm} in the middle.
387 Lines can have protected vertical space \vspace*{2cm} in the middle.
388
389 We also handle skips:
390
391 bigskip 1:\bigskip
392
393 bigskip 2:\vspace{\bigskipamount}
394
395 medskip 1:\medskip
396
397 medskip 2:\vspace{\medskipamount}
398
399 smallskip 1:\smallskip
400
401 smallskip 2:\vspace{\smallskipamount}
402
403
404 \end{document}