]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/test/box-color-size-space-align.tex
Update tex2lyx tests
[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 \renewcommand{\rmdefault}{cmr}
6 \usepackage{berasans}
7 \renewcommand{\familydefault}{\sfdefault}
8
9 \usepackage[T2A,LGR,T1]{fontenc}
10 \usepackage[latin9]{inputenc}
11
12 \usepackage{geometry}
13 \geometry{verbose,landscape,b4paper,tmargin=1cm,bmargin=2cm,lmargin=3cm,rmargin=4cm,headheight=6cm,headsep=5cm,footskip=7cm,columnsep=8cm}
14
15 \usepackage{amsmath}
16 \usepackage{color}
17 \definecolor{page_backgroundcolor}{rgb}{1, 0.3359375, 0}
18 \pagecolor{page_backgroundcolor}
19 \definecolor{document_fontcolor}{rgb}{0.66796875, 1, 0}
20 \color{document_fontcolor}
21 \definecolor{note_fontcolor}{rgb}{0, 0, 1}
22 \definecolor{shadecolor}{rgb}{1, 1, 0}
23 \usepackage{framed}
24 \usepackage{textcomp}
25 \usepackage{calc}
26 \usepackage{fancybox}
27 \PassOptionsToPackage{normalem}{ulem}
28 \usepackage{ulem}
29 \usepackage{ifsym}
30 \usepackage{ascii}
31 \usepackage{subscript}
32 \usepackage{tfrupee}
33 \usepackage{bbding}
34 %\usepackage{marvosym} % clash with pifont (! \Cross already defined)
35 \usepackage{wasysym}
36 \usepackage{pifont}
37 \usepackage{tipa}
38 \usepackage{tipx}
39 \usepackage{xcolor}
40
41 \setlength{\parskip}{3mm}
42 \setlength{\parindent}{0sp}
43 \usepackage{setspace}
44 \setstretch{1.2}
45
46 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
47 \newcommand{\noun}[1]{\textsc{#1}}
48 \DeclareRobustCommand{\greektext}{%
49   \fontencoding{LGR}\selectfont\def\encodingdefault{LGR}}
50 \DeclareRobustCommand{\textgreek}[1]{\leavevmode{\greektext #1}}
51 \ProvideTextCommand{\~}{LGR}[1]{\char126#1}
52 \DeclareRobustCommand{\cyrtext}{%
53   \fontencoding{T2A}\selectfont\def\encodingdefault{T2A}}
54 \DeclareRobustCommand{\textcyr}[1]{\leavevmode{\cyrtext #1}}
55 %% The greyedout annotation environment
56 \newenvironment{lyxgreyedout}{\textcolor{note_fontcolor}\bgroup}{\egroup}
57
58 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
59
60 \setlength{\fboxsep}{3mm}
61
62 \definecolor{darkgreen}{cmyk}{0.5, 0, 1, 0.5}
63
64 \color[rgb]{0,0,0}
65
66 \usepackage{ifpdf} % part of the hyperref bundle
67 \ifpdf % if pdflatex is used
68
69  % set fonts for nicer pdf view
70  \IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}
71
72  % link all cross references and URLs in pdf output
73  \usepackage[colorlinks=true, bookmarks, bookmarksnumbered,
74   bookmarksopen, bookmarksopenlevel=2,
75   linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,
76   pdfpagelayout=OneColumn, pdfnewwindow=true,
77   pdfstartview=XYZ, plainpages=false, pdfpagelabels,
78   pdfauthor={LyX Team}, pdftex,
79   pdftitle={tex2lyx testcase},pdfsubject={tex2lyx},
80   pdfkeywords={LyX, tex2lyx}]{hyperref}
81  
82 \else % if dvi or ps is produced
83
84  % link all cross references and URLs in dvi output
85  \usepackage[ps2pdf]{hyperref}
86
87 \fi % end if pdflatex is used
88
89
90 \begin{document}
91
92 \tableofcontents
93
94 \section{Boxes}
95
96 \subsection{Frameless Boxes}
97
98 blabla \mbox{mbox} blabla
99
100 blabla \makebox{makebox 1} blabla
101
102 blabla \makebox[3cm]{makebox 2} blabla
103
104 blabla \makebox[3cm][l]{makebox 3} blabla
105
106 \makebox[1\width]{www}
107
108 \parbox[t][1\depth]{2.3cm}{www}
109
110 \begin{figure}[ht]
111   \centering
112   \setlength{\unitlength}{.2in}
113
114 \begin{picture}(8,6)
115 \put(0,0){\makebox(0,0)[tr]{AAA}}
116 \put(8,0){\makebox(0,0){BBB}}
117 \put(0,8){\framebox(0,0){x}}
118 \put(1,0){\line(1,0){6}}   
119 \end{picture}
120
121 \end{figure}
122
123 \raisebox {8.5mm}{test}\raisebox {-6.5mm}{tset}
124
125 \subsection{Framed Boxes}
126
127 blabla \begin{framed}framed\end{framed} blabla
128
129 blabla \begin{framed}\begin{framed}nested framed\end{framed}\end{framed} blabla
130
131 blabla \fbox{fbox} blabla
132
133 blabla \framebox{framebox} blabla
134
135 \fbox{\begin{minipage}[t]{0.9\columnwidth}%
136 fbox around minipage%
137 \end{minipage}}
138
139 blabla \framebox{fr\textcolor{blue}{ame}box 1} blabla
140
141 blabla \framebox[3cm]{framebox 2} blabla
142
143 blabla \framebox[3cm][l]{framebox 3} blabla
144
145 \framebox[1.5\totalheight]{www}
146
147 This is an example text. %
148 \framebox{%
149 \begin{minipage}[c][1\totalheight][s]{0.2\columnwidth}%
150  \begin{center}
151   The box content
152  \par\end{center}
153
154  \begin{center}
155   is evenly distributed
156  \par\end{center}
157
158  \begin{center}
159   over the
160  \par\end{center}
161
162  \begin{center}
163   box height.
164  \par\end{center}%
165 \end{minipage}}
166 This is an example text.
167
168 blabla \ovalbox{ovalbox} blabla
169
170 blabla \Ovalbox{Ovalbox} blabla
171
172 blabla \shadowbox{shadowbox} blabla
173
174 blabla \doublebox{doublebox} blabla
175
176 $\boxed{\int A=B}$
177
178 \subsection{Boxes with custom settings}
179
180 \fboxsep 35pt
181
182 \framebox[1cm]{www}
183
184 \fboxsep 20pt \framebox[1cm]{www}
185
186 {\fboxsep 1pt \fboxrule 10pt \framebox[1cm]{www}}
187
188 {\fboxsep 35pt\shadowsize 15pt\shadowbox{\centering www}}
189
190 \parbox[t]{0.9\columnwidth}{%
191 \centering www%
192 }
193
194 {\raggedleft
195 \parbox[t]{0.9\columnwidth}{
196 \centering www%
197 }
198 }
199
200 \subsection{Color Boxes}
201
202 \colorbox{blue}{www}
203
204 \colorbox{blue}{\begin{minipage}[t]{0.9\columnwidth}
205 www
206 \end{minipage}}
207
208 \colorbox{blue}{\parbox[t]{0.9\columnwidth}{www}}
209
210 \colorbox{blue}{\makebox[0.9\columnwidth][l]{www}}
211
212 \fcolorbox{lime}{white}{\begin{minipage}[t]{0.9\columnwidth}%
213 www%
214 \end{minipage}}
215
216 \fcolorbox{lime}{white}{\parbox[t]{0.9\columnwidth}{%
217 www%
218 }}
219
220 \fcolorbox{lime}{white}{\makebox[0.9\columnwidth][l]{www}}
221
222 \fcolorbox{lime}{white}{www}
223
224 \subsection{LyX Boxes}
225
226 \begin{lyxgreyedout}
227 \textbf{Note:} Not all DVI-viewers are able to display rotations.
228 \end{lyxgreyedout}
229
230 \begin{shaded}%
231 Shaded background box\end{shaded}
232
233 \begin{minipage}[c]{1\columnwidth}%
234 \begin{shaded}%
235 Shaded background box, with inner minipage\end{shaded}%
236 \end{minipage}
237
238 \section{Colors}
239
240 \subsection{Predefined Colors}
241
242 test \textcolor{blue}{blue} test \textcolor{red}{red red red} test \textcolor{green}{bla}\textcolor{magenta}{blub}
243 test \textcolor{brown}{brown} test \textcolor{darkgray}{darkgray} test \textcolor{gray}{gray}\textcolor{lightgray}{lightgray}
244 test \textcolor{lime}{lime} test \textcolor{olive}{olive} test \textcolor{orange}{orange}\textcolor{pink}{pink}
245 test \textcolor{purple}{purple} test \textcolor{teal}{teal} test \textcolor{violet}{violet}
246 test
247 \textcolor{green}{c}%
248 \textcolor{red}{o}%
249 \textcolor{blue}{l}%
250 \textcolor{green}{o}%
251 \textcolor{red}{r}
252
253 \subsection{Custom Colors}
254
255 test \textcolor{darkgreen}{dark green} test
256
257 \definecolor{violet}{rgb}{0.5, 0, 1}
258
259 test \textcolor{violet}{violet} test
260
261 \section{Font sizes}
262
263 \Huge Huge text
264
265 \huge huge text
266
267 \LARGE LARGE text
268
269 \Large Large text
270
271 \large large text
272
273 \normalsize normalsize text
274
275 \small small text
276
277 \footnotesize footnotesize text
278
279 \scriptsize scriptsize text
280
281 \tiny tiny text
282
283 \Huge Huge text \huge huge text \LARGE LARGE text \Large Large text
284 \large large text \normalsize normalsize text \small small text
285 \footnotesize footnotesize text \scriptsize scriptsize text \tiny tiny text
286
287 \normalsize Font size switches don't affect section headings!
288
289 \scriptsize bla blub
290
291 \section{Font size dummy 1}
292
293 bla blub
294
295 bla blub
296
297 \section*{Font size dummy 2}
298
299 bla blub
300 \normalsize
301
302
303 \section{Strikeout, underlined etc.}
304
305 Emphasized: \emph{test}
306
307 Underbar: \uline{test}
308
309 Double underbar: \uuline{test}
310
311 Wavy underbar: \uwave{test}
312
313 Strike out: \sout{test}
314
315 Crossed out: \xout{test}
316
317 Noun: \noun{test}
318
319 Underbar, emphasized, strikeout: \emph{\uline{\sout{test}}}
320
321
322 \section{Paragraph spacing}
323
324 bla
325
326 \begin{singlespace}
327 singlespace single singlespace single singlespace single singlespace single
328 singlespace single singlespace single singlespace single singlespace single
329 \end{singlespace}
330
331 \begin{onehalfspace}
332 onehalfspace 1 onehalfspace 1 onehalfspace 1 onehalfspace 1 onehalfspace 1
333 onehalfspace 1 onehalfspace 1 onehalfspace 1 onehalfspace 1 onehalfspace 1
334
335 onehalfspace 2 onehalfspace 2 onehalfspace 2 onehalfspace 2 onehalfspace 2
336 onehalfspace 2 onehalfspace 2 onehalfspace 2 onehalfspace 2 onehalfspace 2
337 \end{onehalfspace}
338
339 blub
340
341 \begin{onehalfspace}
342 onehalfspace single onehalfspace single onehalfspace single onehalfspace single
343 onehalfspace single onehalfspace single onehalfspace single onehalfspace single
344 \end{onehalfspace}
345
346 blablub
347
348 \begin{doublespace}
349 doublespace single doublespace single doublespace single doublespace single
350 doublespace single doublespace single doublespace single doublespace single
351 \end{doublespace}
352
353 \begin{spacing}{1.2}
354 1.2 spacing single 1.2 spacing single 1.2 spacing single 1.2 spacing single
355 1.2 spacing single 1.2 spacing single 1.2 spacing single 1.2 spacing single
356 \end{spacing}
357
358 \section{Paragraph alignment}
359
360 bla
361
362 \begin{center}
363 center single center single center single center single center single
364 center single center single center single center single center single
365 \end{center}
366
367 blabla
368
369 \begin{flushleft}
370 flushleft 1 flushleft 1 flushleft 1 flushleft 1 flushleft 1 flushleft 1
371 flushleft 1 flushleft 1 flushleft 1 flushleft 1 flushleft 1 flushleft 1
372
373 flushleft 2 flushleft 2 flushleft 2 flushleft 2 flushleft 2 flushleft 2
374 flushleft 2 flushleft 2 flushleft 2 flushleft 2 flushleft 2 flushleft 2
375 \end{flushleft}
376
377 blub
378
379 \begin{flushleft}
380 flushleft single flushleft single flushleft single flushleft single
381 flushleft single flushleft single flushleft single flushleft single
382 \end{flushleft}
383
384 blablub
385
386 \begin{flushright}
387 flushright single flushright single flushright single flushright single
388 flushright single flushright single flushright single flushright single
389 \end{flushright}
390
391 bla
392
393 \centering
394 centering single centering single centering single centering single
395 centering single centering single centering single centering single
396
397 blabla
398
399 \raggedright
400 raggedright 1 raggedright 1 raggedright 1 raggedright 1 raggedright 1
401 raggedright 1 raggedright 1 raggedright 1 raggedright 1 raggedright 1
402
403 raggedright 2 raggedright 2 raggedright 2 raggedright 2 raggedright 2
404 raggedright 2 raggedright 2 raggedright 2 raggedright 2 raggedright 2
405
406 \raggedleft
407 raggedleft 1 raggedleft 1 raggedleft 1 raggedleft 1 raggedleft 1
408 raggedleft 1 raggedleft 1 raggedleft 1 raggedleft 1 raggedleft 1
409
410 raggedleft 2 raggedleft 2 raggedleft 2 raggedleft 2 raggedleft 2
411 raggedleft 2 raggedleft 2 raggedleft 2 raggedleft 2 raggedleft 2
412
413 %set back to justified
414 \raggedright{}
415
416
417 \subsection{Horizontal spaces}
418
419 Lines can have an hfill \hfill in the middle.
420 Lines can have an hfill \hspace{\fill} in the middle.
421 Lines can have a protected hfill \hspace*{\fill} in the middle.
422 Lines can have a dotted fill \dotfill in the middle.
423 Lines can have a rule fill \hrulefill in the middle.
424 Lines can have a left arrow fill \leftarrowfill in the middle.
425 Lines can have a right arrow fill \rightarrowfill in the middle.
426 Lines can have a upbrace fill \upbracefill in the middle.
427 Lines can have a downbrace fill \downbracefill in the middle.
428 Lines can have an absolute space \hspace{2cm} in the middle.
429 Lines can have a relative space \hspace{0.12\textwidth} in the middle.
430 Lines can have a glue-length space \hspace{2cm plus 2mm minus 1mm} in the middle.
431 Lines can have protected space \hspace*{2cm} in the middle.
432
433 We also handle defined spaces:
434
435 Interword\ a
436
437 Visible\textvisiblespace{}a
438
439 Thin\,a
440
441 NegThin\negthinspace{}a
442
443 NegMed\negmedspace{}a
444
445 NegThick\negthickspace{}a
446
447 enspace\enspace{}a
448
449 enskip\enskip{}a
450
451 quad\quad{}a
452
453 qquad\qquad{}a
454
455
456 \subsubsection*{now in math:}
457
458 fill: $a\hfill b$
459
460 protected fill: $a\hspace*{\fill} b$
461
462 2\,cm: $a\hspace*{2cm}b$
463
464 protected 2\,cm: $a\hspace{1cm}b$
465
466 enskip: $a\enskip b$
467
468 enspace: $a\enspace b$
469
470 thin: $a\, b$
471
472 medium: $a\: b$
473
474 thick: $a\; b$
475
476 negative thin: $a\negthinspace b$
477
478 negative medium: $a\negmedspace b$
479
480 negative thick: $a\negthickspace b$
481
482 quad: $a\quad b$
483
484 qquad: $a\qquad b$
485
486 interword: $a\ b$
487
488
489 \subsection{Vertical spaces}
490
491 Lines can have a vfill \vfill in the middle.
492 Lines can have a vfill \vspace{\fill} in the middle.
493 Lines can have a protected vfill \vspace*{\fill} in the middle.
494 Lines can have a vertical absolute space \vspace{2cm} in the middle.
495 Lines can have a baselineskip \vspace{1.2\baselineskip} in the middle.
496 Lines can have a vertical relative space \vspace{0.09\columnwidth} in the middle.
497 Lines can have a vertical glue-length space \vspace{2cm minus 2bp plus 1cc} in the middle.
498 Lines can have protected vertical space \vspace*{2cm} in the middle.
499
500 We also handle skips:
501
502 bigskip 1:\bigskip
503
504 bigskip 2:\vspace{\bigskipamount}
505
506 medskip 1:\medskip
507
508 medskip 2:\vspace{\medskipamount}
509
510 smallskip 1:\smallskip
511
512 smallskip 2:\vspace{\smallskipamount}
513
514
515 \section{Characters}
516
517 from package "ascii" and "ifsym": 
518 \textregistered\ETB\textifsymbol[ifgeo]{48}\textifsymbol[ifgeo]{96}\LF{}
519
520 from textcomp: 
521 \textnumero\texttrademark
522
523 from textgreek and textcyr:
524 \textgreek{>a}\textcyr{\cyrv}
525
526 from subscript:
527 \textsubscript{4}
528
529 from tfrupee
530 \rupee
531
532 from marvosym and wasysym:
533 \CheckedBox \HandCuffLeft
534
535 from bbding and pifont:
536 \FiveStarOpen \ding{190}
537
538 from tipa and tipx:
539 \textctt \textdblig
540
541
542 \end{document}