]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/test/box-color-size-space-align.tex
\color may have an optional argument (part of bug #6567).
[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(1,0){\line(1,0){6}}   
91 \end{picture}
92
93 \end{figure}
94
95 \raisebox {8.5mm}{test}\raisebox {-6.5mm}{tset}
96
97 \subsection{Framed Boxes}
98
99 blabla \begin{framed}framed\end{framed} blabla
100
101 blabla \begin{framed}\begin{framed}nested framed\end{framed}\end{framed} blabla
102
103 blabla \fbox{fbox} blabla
104
105 blabla \framebox{framebox 1} blabla
106
107 blabla \framebox[3cm]{framebox 2} blabla
108
109 blabla \framebox[3cm][l]{framebox 3} blabla
110
111 Dies ist ein Beispieltext. %
112 \framebox{%
113 \begin{minipage}[c][1\totalheight][s]{0.2\columnwidth}%
114  \begin{center}
115   Der Boxinhalt
116  \par\end{center}
117
118  \begin{center}
119   ist über die
120  \par\end{center}
121
122  \begin{center}
123   Boxhöhe
124  \par\end{center}
125
126  \begin{center}
127   gleichmäßig verteilt.
128  \par\end{center}%
129 \end{minipage}}
130 Dies ist ein Beispieltext.
131
132 blabla \ovalbox{ovalbox} blabla
133
134 blabla \Ovalbox{Ovalbox} blabla
135
136 blabla \shadowbox{shadowbox} blabla
137
138 blabla \doublebox{doublebox} blabla
139
140 $\boxed{\int A=B}$
141
142 \subsection{LyX Boxes}
143
144 \begin{lyxgreyedout}
145 \textbf{Note:} Not all DVI-viewers are able to display rotations.
146 \end{lyxgreyedout}
147
148 \begin{shaded}%
149 Shaded background box\end{shaded}
150
151 \begin{minipage}[c]{1\columnwidth}%
152 \begin{shaded}%
153 Shaded background box, with inner minipage\end{shaded}%
154 \end{minipage}
155
156 \section{Colors}
157
158 \subsection{Predefined Colors}
159
160 test \textcolor{blue}{blue} test \textcolor{red}{red red red} test \textcolor{green}{bla}\textcolor{magenta}{blub}
161 test
162 \textcolor{green}{c}%
163 \textcolor{red}{o}%
164 \textcolor{blue}{l}%
165 \textcolor{green}{o}%
166 \textcolor{red}{r}
167
168 \subsection{Custom Colors}
169
170 test \textcolor{darkgreen}{dark green} test
171
172 \definecolor{violet}{rgb}{0.5, 0, 1}
173
174 test \textcolor{violet}{violet} test
175
176 \section{Font sizes}
177
178 \Huge Huge text
179
180 \huge huge text
181
182 \LARGE LARGE text
183
184 \Large Large text
185
186 \large large text
187
188 \normalsize normalsize text
189
190 \small small text
191
192 \footnotesize footnotesize text
193
194 \scriptsize scriptsize text
195
196 \tiny tiny text
197
198 \Huge Huge text \huge huge text \LARGE LARGE text \Large Large text
199 \large large text \normalsize normalsize text \small small text
200 \footnotesize footnotesize text \scriptsize scriptsize text \tiny tiny text
201
202 \normalsize Font size switches don't affect section headings!
203
204 \scriptsize bla blub
205
206 \section{Font size dummy 1}
207
208 bla blub
209
210 bla blub
211
212 \section*{Font size dummy 2}
213
214 bla blub
215 \normalsize
216
217
218 \section{Strikeout, underlined etc.}
219
220 Emphasized: \emph{test}
221
222 Underbar: \uline{test}
223
224 Double underbar: \uuline{test}
225
226 Wavy underbar: \uwave{test}
227
228 Strike out: \sout{test}
229
230 Crossed out: \xout{test}
231
232 Noun: \noun{test}
233
234 Underbar, emphasized, strikeout: \emph{\uline{\sout{test}}}
235
236
237 \section{Paragraph spacing}
238
239 bla
240
241 \begin{singlespace}
242 singlespace single singlespace single singlespace single singlespace single
243 singlespace single singlespace single singlespace single singlespace single
244 \end{singlespace}
245
246 \begin{onehalfspace}
247 onehalfspace 1 onehalfspace 1 onehalfspace 1 onehalfspace 1 onehalfspace 1
248 onehalfspace 1 onehalfspace 1 onehalfspace 1 onehalfspace 1 onehalfspace 1
249
250 onehalfspace 2 onehalfspace 2 onehalfspace 2 onehalfspace 2 onehalfspace 2
251 onehalfspace 2 onehalfspace 2 onehalfspace 2 onehalfspace 2 onehalfspace 2
252 \end{onehalfspace}
253
254 blub
255
256 \begin{onehalfspace}
257 onehalfspace single onehalfspace single onehalfspace single onehalfspace single
258 onehalfspace single onehalfspace single onehalfspace single onehalfspace single
259 \end{onehalfspace}
260
261 blablub
262
263 \begin{doublespace}
264 doublespace single doublespace single doublespace single doublespace single
265 doublespace single doublespace single doublespace single doublespace single
266 \end{doublespace}
267
268 \begin{spacing}{1.2}
269 1.2 spacing single 1.2 spacing single 1.2 spacing single 1.2 spacing single
270 1.2 spacing single 1.2 spacing single 1.2 spacing single 1.2 spacing single
271 \end{spacing}
272
273 \section{Paragraph alignment}
274
275 bla
276
277 \begin{center}
278 center single center single center single center single center single
279 center single center single center single center single center single
280 \end{center}
281
282 blabla
283
284 \begin{flushleft}
285 flushleft 1 flushleft 1 flushleft 1 flushleft 1 flushleft 1 flushleft 1
286 flushleft 1 flushleft 1 flushleft 1 flushleft 1 flushleft 1 flushleft 1
287
288 flushleft 2 flushleft 2 flushleft 2 flushleft 2 flushleft 2 flushleft 2
289 flushleft 2 flushleft 2 flushleft 2 flushleft 2 flushleft 2 flushleft 2
290 \end{flushleft}
291
292 blub
293
294 \begin{flushleft}
295 flushleft single flushleft single flushleft single flushleft single
296 flushleft single flushleft single flushleft single flushleft single
297 \end{flushleft}
298
299 blablub
300
301 \begin{flushright}
302 flushright single flushright single flushright single flushright single
303 flushright single flushright single flushright single flushright single
304 \end{flushright}
305
306 bla
307
308 \centering
309 centering single centering single centering single centering single
310 centering single centering single centering single centering single
311
312 blabla
313
314 \raggedright
315 raggedright 1 raggedright 1 raggedright 1 raggedright 1 raggedright 1
316 raggedright 1 raggedright 1 raggedright 1 raggedright 1 raggedright 1
317
318 raggedright 2 raggedright 2 raggedright 2 raggedright 2 raggedright 2
319 raggedright 2 raggedright 2 raggedright 2 raggedright 2 raggedright 2
320
321 \raggedleft
322 raggedleft 1 raggedleft 1 raggedleft 1 raggedleft 1 raggedleft 1
323 raggedleft 1 raggedleft 1 raggedleft 1 raggedleft 1 raggedleft 1
324
325 raggedleft 2 raggedleft 2 raggedleft 2 raggedleft 2 raggedleft 2
326 raggedleft 2 raggedleft 2 raggedleft 2 raggedleft 2 raggedleft 2
327
328 %set back to justified
329 \raggedright{}
330
331
332 \subsection{Horizontal spaces}
333
334 Lines can have an hfill \hfill in the middle.
335 Lines can have an hfill \hspace{\fill} in the middle.
336 Lines can have a protected hfill \hspace*{\fill} in the middle.
337 Lines can have a dotted fill \dotfill in the middle.
338 Lines can have a rule fill \hrulefill in the middle.
339 Lines can have a left arrow fill \leftarrowfill in the middle.
340 Lines can have a right arrow fill \rightarrowfill in the middle.
341 Lines can have a upbrace fill \upbracefill in the middle.
342 Lines can have a downbrace fill \downbracefill in the middle.
343 Lines can have space \hspace{2cm} in the middle.
344 Lines can have protected space \hspace*{2cm} in the middle.
345
346 We also handle defined spaces:
347
348 Interword\ a
349
350 Visible\textvisiblespace{}a
351
352 Thin\,a
353
354 Medium\:a
355
356 Thick\;a
357
358 NegThin\negthinspace{}a
359
360 NegMed\negmedspace{}a
361
362 NegThick\negthickspace{}a
363
364 enspace\enspace{}a
365
366 enskip\enskip{}a
367
368 quad\quad{}a
369
370 qquad\qquad{}a
371
372 \subsubsection*{now some math examples:}
373
374 $a\hfill b$
375
376 $a\hspace*{2cm}b$
377
378 $a\hspace{1cm}b$
379
380 $a\hspace*{\fill} b$
381
382 $a\enskip b$
383
384 $a\enspace b$
385
386
387 \subsection{Vertical spaces}
388
389 Lines can have a vfill \vfill in the middle.
390 Lines can have a vfill \vspace{\fill} in the middle.
391 Lines can have a protected vfill \vspace*{\fill} in the middle.
392 Lines can have vertical space \vspace{2cm} in the middle.
393 Lines can have protected vertical space \vspace*{2cm} in the middle.
394
395 We also handle skips:
396
397 bigskip 1:\bigskip
398
399 bigskip 2:\vspace{\bigskipamount}
400
401 medskip 1:\medskip
402
403 medskip 2:\vspace{\medskipamount}
404
405 smallskip 1:\smallskip
406
407 smallskip 2:\vspace{\smallskipamount}
408
409
410 \end{document}