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