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