]> mj.ucw.cz Git - ucwmac.git/blob - test.tex
A better interface for setting colors
[ucwmac.git] / test.tex
1 \input ucwmac.tex
2 \ucwcompat\ucwmaxcompat
3 \input ucw-ofs.tex
4 \input ucw-verb.tex
5 \input ucw-algo.tex
6
7 \showfonts
8
9 \twelvepoint
10
11 \pageunderlay{\placeat{0pt}{0pt}{\crosshair{10pt}}}
12
13 \def\hd#1{\bigskip\leftline{\bf #1}\medskip}
14
15 \hd{Box placement: ordinary word, vbox, vtop, vhang, vhanglines}
16
17 \def\brum{\hbox{Brum}}
18 \def\brums{\brum\brum\brum}
19
20 \noindent
21 \placeat{0pt}{0pt}{\vlap{\hbox to 0.5\hsize{\hrulefill}}}%
22 \placeat{0pt}{0pt}{\crosshair{10pt}}%
23 \brum{}
24 \vbox{\brums}
25 \vtop{\brums}
26 \vhang{\brums}
27 \vhanglines{\brums}
28
29 \hd{Itemization}
30
31 \noindent An~itemized list:
32
33 \itemize\ibull
34 \:It is an {\I important and popular fact} that things are not always what
35 they seem.  For instance, on the planet Earth, man had always assumed
36 that he was more intelligent than dolphins because he had achieved so
37 much -- the wheel, {\colorlocal\rgb{1 0 0}New York}, wars and so on -- whilst all the dolphins
38 had ever done was muck about in the water having a good time.  But
39 conversely, the \colorpush\rgb{0 0 1}dolphins\colorpop{} had always believed that they were far more
40 intelligent than man -- for precisely the same reasons.
41 \:Curiously enough, the dolphins had long known of the impending
42 destruction of the of the planet Earth and had made many attempts to
43 alert mankind to the danger; but most of their communications were
44 misinterpreted\dots{} --- Douglas Addams: HHG
45 \:Third:
46         \itemize\istar
47         \:Primus
48         \: Secundus     %% are spaces eaten correctly?
49         \:Tertius
50         \:Graecus:
51                 \numlist\ngreek
52                 \:alpha
53                 \:beta
54                 \: gamma
55                 \endlist
56         \endlist
57 \:Fourth
58 \endlist
59
60 \hd{Inline verbatim}
61
62 \inlineverbon
63 Lo and behold: |a quick brown fox| {\showspacestrue |jumps over  the lazy dog|} |!@#$%^&*()\_|
64
65 \inlineverboff
66 When turned off, vertical lines work as usually: $|a-b| \ge 0$.
67
68 Delimited verbatim: \verb@abracadabra@ or \verb|brekeke|.
69
70 \hd{Block verbatim}
71
72 \noindent Pre-verbatim
73 \showspacestrue
74 \verbatim{
75 abracadabra {!@#$%^&*()\_}
76 1       tab
77 12      tab
78 123     tab
79 1234    tab
80 12345   tab
81 123456  tab
82 1234567 tab
83 12345678        tab     tab
84 123456789       tab45678        tab
85 123456789       tab45678         tab&space
86 123456789               tabtab
87
88 123456789               tabtab
89 }
90 \noindent Post-verbatim
91
92 %\verbinput{ucwmac.tex}
93
94 \hd{Font selection}
95
96 {\bo non-extended bold}
97
98 {\csc Caps And Small Caps}
99
100 ${\tt x}\in\fam\bbfam R$
101
102 The set{\settextsize{11}text}size macro does not strew spaces.
103
104 {\tt Typewriter {\it italic} {\sl slanted.}}
105
106 \hd{Algorithms}
107
108 \algo{Factorial}\algalias{calculate a~factorial}
109 \algin A~non-negative integer~$n$
110 \:If $n\ge 1$:  \cmt{Test if something}
111 \::Return $n$
112 \:Else:
113 \::Return $n \cdot \alg{Factorial}(n-1)$
114 \algout The factorial of~$n$
115 \endalgo
116
117 \bye