summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/D-11-3.ltx
blob: 690ebc1a5cfca943af16de7111f94c295157aac4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
%% 
%%  The LaTeX Graphics Companion, 2ed (first printing May 2007)
%% 
%%  Example D-11-3 on page .
%% 
%%  Copyright (C) 2007 Michel Goossens, Frank Mittelbach, Denis Roegel, Sebastian Rahtz, Herbert Vo\ss 
%% 
%%  It may be distributed and/or modified under the conditions
%%  of the LaTeX Project Public License, either version 1.3
%%  of this license or (at your option) any later version.
%% 
%%  See http://www.latex-project.org/lppl.txt for details.
%% 

\documentclass{ttctexaplate}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{413.44133pt}
\StartShownPreambleCommands
\usepackage[dvipsnames]{xcolor}
\StopShownPreambleCommands
\begin{document}
\begin{minipage}{5in}
\setlength\parindent{0pt}
\setlength\parskip{4pt}

{\color{green} Text starts off in green
\textcolor{red}{a little red}
{\color{blue}nested blue text}
returning to green.}

%\hrule

\smallskip
\begin{minipage}{0.4\linewidth}
\begin{enumerate}
\item \textcolor[cmyk]{0,1,0,0}{magenta cmyk} black
\item \color[gray]{0.5}
  \textcolor{blue}{predefined blue} gray text
\end{enumerate}
\end{minipage}\hfill
\begin{minipage}{0.55\linewidth}
\begin{enumerate}\renewcommand\theenumi{\color{red}\roman{enumi}}
\item The \color{.!70}current \color{.!70}color \color{.!70}changes.
\item The \color{.!50}current \color{.!50}color
    \color{.!50}changes.
\end{enumerate}
\end{minipage}

%\hrule

\fcolorbox{red}{green}{Black text,
      green background, red frame}\hfill
\fcolorbox{magenta}{lime}{\color{teal}Teal text,
      lime background, magenta frame}
\par\smallskip
\fcolorbox{red}{green}{\color{white}%
  White text, green background, red frame}\hfill
\fcolorbox{blue}{Orchid}{\color{yellow}%
  Yellow text, orchid background, blue frame}

%\hrule

\setlength{\fboxrule}{6pt}%
\setlength{\fboxsep}{10pt}%
\colorbox{yellow}{Fun with color}
\hfill
\fcolorbox{red}{yellow}{Fun with color}
\hfill
\setlength{\fboxrule}{2pt}%
\setlength{\fboxsep}{5pt}%
\colorbox{green}{Fun with color}
\hfill
\fcolorbox{red}{green}{Fun with color}

%\hrule

\newsavebox{\X}
\sbox{\X}{[black text] and
 \color[cmyk]{0,0.6,0.8,0}[orange text]}

Start with \usebox{\X}, and return to black

{\color{green}Start in green, see
\usebox{\X} and once again green}
\end{minipage}
\end{document}