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