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