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