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