Debian Codegraph @

texmf-dist/doc/latex/lcd/example.tex

raw
1 %%
2 %% This is file `example.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% lcd.dtx (with options: `example')
8 %%
9 %% Copyright (c) 2004 Mike Kaufmann, all rights reserved
10 %%
11 %% This program is provided under the terms of the
12 %% LaTeX Project Public License distributed from CTAN
13 %% archives in directory macros/latex/base/lppl.txt.
14 %%
15 %% Author: Mike Kaufmann
16 %% [email protected]
17 %%
18 %% \CharacterTable
19 %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
20 %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
21 %% Digits \0\1\2\3\4\5\6\7\8\9
22 %% Exclamation \! Double quote \" Hash (number) \#
23 %% Dollar \$ Percent \% Ampersand \&
24 %% Acute accent \' Left paren \( Right paren \)
25 %% Asterisk \* Plus \+ Comma \,
26 %% Minus \- Point \. Solidus \/
27 %% Colon \: Semicolon \; Less than \<
28 %% Equals \= Greater than \> Question mark \?
29 %% Commercial at \@ Left bracket \[ Backslash \\
30 %% Right bracket \] Circumflex \^ Underscore \_
31 %% Grave accent \` Left brace \{ Vertical bar \|
32 %% Right brace \} Tilde \~}
33 %%
34 \documentclass[a4paper]{article}
35 \usepackage[latin1]{inputenc}
36 \usepackage{color}
37 \usepackage{lcd}
38
39 \parindent0pt
40 \parskip1ex plus.3ex minus.2ex
41 \pagestyle{empty}
42
43 \newcommand\lcd{\textLCD{3}|LCD|}
44 \newcommand\bs{\char '134 }
45 \definecolor{lightgreen}{rgb}{0.05,0.97,0.55}
46 \definecolor{darkgreen}{rgb}{0.22,0.26,0.19}
47 \definecolor{lightblue}{rgb}{0.9,0.91,0.99}
48 \definecolor{darkblue}{rgb}{0.14,0.2,0.66}
49 \definecolor{lightred}{rgb}{1.0,0.27,0.37}
50 \definecolor{darkred}{rgb}{0.37,0.14,0.18}
51
52 \DefineLCDchar{euro}{00111010001111101000111110100000111}
53
54 \begin{document}
55 \centerline{\textbf{\LARGE Some Examples for the \lcd\ package.\footnote{The
56 source of this example file is part of \texttt{lcd.dtx}.}}}
57
58 As seen in the headline and here, the \lcd\ package calculates the size for
59 LCD-text in normal text (\verb|\textLCD|) automaticly. It works for all
60 fontsizes:
61
62 \begin{center}
63 {\tiny MM M \lcd\ M MM tiny}\hfill{\Huge Huge MM M \lcd\ M MM}
64
65 {\scriptsize MM M \lcd\ M MM scriptsize}\hfill{\huge huge MM M \lcd\ M MM}
66
67 {\footnotesize MM M \lcd\ M MM footnotesize}\hfill{\LARGE LARGE MM M \lcd\ M MM}
68
69 {\small MM M \lcd\ M MM small}\hfill{\Large Large MM M \lcd\ M MM}
70
71 {\normalsize MM M \lcd\ M MM normalsize}\hfill{\large large MM M \lcd\ M MM}
72 \end{center}
73
74 Now let's have some colored
75 \LCDcolors{darkgreen}{lightgreen}\textLCD[0]{8}|LCD-text|.
76 Here first the colors where set with
77 \verb|\LCDcolors{darkgreen}{lightgreen}|\footnote{The color names where
78 defined with \texttt{\bs definecolor} from the \textsf{color} package in the
79 preamble.}
80 and then the LCD-text where done with \verb+\textLCD[0]{8}|LCD-text|+.
81 To invert the LCD, just exchange the
82 \LCDcolors{lightgreen}{darkgreen}\textLCD[0]{6}|colors|
83 (\verb|\LCDcolors{lightgreen}{darkgreen}|).
84
85 \begin{minipage}[t]{.5\textwidth}
86 Now some seperate LCD representations. But first let's change the colors
87 to some not as ugly. The LCD was generated with
88 \begin{verbatim}
89 \LCD{4}{18}|LCD representation|
90 |made with the LCD |
91 |package for LaTeX |
92 |04.01.2004 {clock} 18:23|
93 \end{verbatim}
94 \end{minipage}
95 \hspace{\fill}
96 \begin{minipage}[t]{.46\textwidth}
97 \mbox{}
98
99 \LCDcolors{darkblue}{lightblue}%
100 \LCD{4}{18}|LCD representation|
101 |made with the LCD |
102 |package for LaTeX |
103 |04.01.2004 {clock} 18:23|
104 \end{minipage}
105
106 The \verb|{clock}| is a so called multi-letter character. It generates the
107 clock symbol.
108
109 As you can see, there is a black colored frame around it. The frame color
110 can be changed with the optional first argument of \verb|\LCDcolors|
111 (\verb|\LCDcolors[red]|\ldots; left part of figure 1). And
112 with \verb|\LCDnoframe| you can disable frames (reenabled with
113 \verb|\LCDframe|; right part of figure 1).
114 Of course \verb|\LCD| works within a figure environment.
115
116 \begin{figure}[h]
117 \LCDcolors[red]{darkblue}{lightblue}%
118 \LCD{4}{18}|LCD representation|
119 |made with the LCD |
120 |package for LaTeX |
121 |04.01.2004 {clock} 18:45|
122 \hspace{\fill}\LCDnoframe
123 \LCD{4}{18}|LCD representation|
124 |made with the LCD |
125 |package for LaTeX |
126 |04.01.2004 {clock} 18:47|
127 \caption{Example with red colored frame and without frame}
128 \end{figure}
129
130 \LCDcolors[lightgreen]{lightred}{darkred}\LCDframe
131 \LCD{2}{36}|For more information please refer to|
132 |the documentation! |
133 \end{document}
134 \endinput
135 %%
136 %% End of file `example.tex'.