summaryrefslogtreecommitdiff
path: root/Build/source/texk/dtl/tripvdu.tex
blob: 0289d53633b656e9a1e4bb34ccec5dde08c82cac (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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
% This file is public domain.
% Originally written 1995, Geoffrey Tobin.
% The author has expressed the hope that any modification will retain enough content to remain useful. He would also appreciate being acknowledged as the original author in the documentation.
% This declaration added 2008/11/14 by Clea F. Rees with the permission of Geoffrey Tobin.

% TeX source file for creating TRIPVDU.DVI, a torture file for DVItoVDU
% (using the same philosophy as Donald Knuth's torture test for TeX).

\nopagenumbers
\topskip 0pt
\parindent 0pt
\parskip 0pt

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 1
% This page is completely empty but has some \special stuff.

\message{Empty page.}
\null
\special{DVItoVDU should warn user that it is ignoring this stuff.}
\special{And this.}
\vfil\eject

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 2
% This page has 1 black pixel at (0,0).

\message{1 black pixel at (0,0).}
\hrule height 1sp width 1sp depth 0sp
\vfil\eject

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 3
% This page will fill an A4 sheet with black pixels, assuming A4 paper is
% 8.3in by 11.7in and (0,0) is 1in from the top and left edges.

\message{A4 sheet full of black pixels.}
{% change page size and location temporarily
\hsize 10in
\vsize 12in
\hoffset -1in
\voffset -1in
% Because ref pts of rules are at BOTTOM left corner we first need to output
% a rule that will guarantee Minv = -1in, then output the large rule with
% slightly less than A4 height.
\hrule height 1sp      width 8.299in depth 0sp
\hrule height 11.695in width 8.299in depth 0sp
\vfil\eject

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 4
% This page is 1 pixel wider than page 3.
% DVItoVDU should detect that page is too wide for A4 paper.

\message{As above but 1 pixel too wide.}
\hrule height 1sp      width 8.301in depth 0sp
\hrule height 11.695in width 8.301in depth 0sp
\vfil\eject

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 5
% This page is 1 pixel longer than page 3.
% DVItoVDU should detect that page is too low for A4 paper.

\message{As above but 1 pixel too low.}
\hrule height 11.701in width 8.299in depth 0sp
\vfil\eject

}% reset page size and location

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 6
% This page has a rulelist with a full ruletable (= 300 rules).
% Note that DVItoVDU does not impose any limits
% on the number of rules or characters in a page.  Pages 6 to 9
% test the list manipulating code in DVIReader and DVItoVDU.

\message{Page with ruletablesize rules.}
\newcount\temp
\temp=300
\loop\ifnum\temp>0
   \hrule height 1sp width \hsize   % 1 pixel high
   \vfil
   \advance\temp by -1
\repeat
\vfil\eject

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 7
% This page has ruletablesize+1 rules (so rulelist has 2 nodes).

\message{Page with ruletablesize+1 rules.}
\temp=301
\loop\ifnum\temp>0
   \hrule height 1sp width \hsize   % 1 pixel high
   \vfil
   \advance\temp by -1
\repeat
\vfil\eject

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 8
% This page has a charlist with a full chartable (= 3000 characters).

\message{Page with chartablesize characters from one font.}
\font\small=cmr5
{\small \offinterlineskip
 \temp=30
 \loop\ifnum\temp>0
    \leftline{iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
              iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii} % 100 chars
    \advance\temp by -1
 \repeat
}
\vfil\eject

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 9
% This page has chartablesize+1 characters (so charlist has 2 nodes).

\message{Page with chartablesize+1 characters from one font.}
{\small \offinterlineskip
 \temp=30
 \loop\ifnum\temp>0
    \leftline{iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
              iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii} % 100 chars
    \advance\temp by -1
 \repeat
 \leftline{i}                      % the extra character
}
\vfil\eject

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 10

\message{Multiple TeX page counters.}
\footline={\hss\tenrm\folio\hss}   % turn on page numbers
\pageno=0
\count1=1 \count2=2 \count3=3 \count4=4  \count9=9
\noindent
This is \TeX\ page [0.1.2.3.4.....9].
\vfil\eject

\count1=0 \count2=0 \count3=0 \count4=0  \count9=0   % reset TeX counters

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 11

\message{Negative TeX page.}
\pageno=-11
\noindent
This is \TeX\ page [-11].
\vfil\eject

\pageno=12         % DVI page = TeX page again
\nopagenumbers     % turn off page numbers again

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 12
% This page has characters from many fonts.
% Note that the page is off the right edge of A4 paper.

\message{Page with characters from many fonts.}
% avoid redefining plain TeX's \i, \j etc.
\font\Fb=cmr5
\font\Fc=cmr5 scaled\magstep5
\font\Fe=cmr10 scaled\magstep5
\font\Fg=cmbx10
\font\Fh=cmbx10 scaled\magstep5
\font\Fj=cmsl10
\font\Fk=cmsl10 scaled\magstep5
\font\Fm=cmtt10
\font\Fn=cmtt10 scaled\magstep5
\font\Fo=cmss10
\font\Fp=cmcsc10
\font\Fq=cmdunh10

\leftline{\Fb These characters are from CMR5 at mag 1000.}
\leftline{\Fc These characters are from CMR5 at mag 2488.}
\leftline{\tenrm These characters are from CMR10 at mag 1000.}
\leftline{\Fe These characters are from CMR10 at mag 2488.}
\leftline{\Fg These characters are from CMBX10 at mag 1000.}
\leftline{\Fh These characters are from CMBX10 at mag 2488.}
\leftline{\Fj These characters are from CMSL10 at mag 1000.}
\leftline{\Fk These characters are from CMSL10 at mag 2488.}
\leftline{\Fm These characters are from CMTT10 at mag 1000.}
\leftline{\Fn These characters are from CMTT10 at mag 2488.}
\leftline{\Fo These characters are from CMSS10 at mag 1000.}
\leftline{\Fp These characters are from CMCSC10 at mag 1000.}
\leftline{\Fq These characters are from CMDUNH10 at mag 1000.}
\vfil\eject

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 13
% This page has characters from many fonts, some of which have no corresponding
% PXL file.  DVItoVDU should warn user about non-existent font files and
% continue as best it can by loading dummy font info.
% Note that the page is off the right edge of A4 paper.

\message{Page with characters from fonts at unknown magnifications.}
% PXL files do not exist at the requested magnifications:
\font\Fr=cmr5 scaled 500
\font\Fs=cmr5 scaled 3000
\font\Ft=cmr10 scaled 200
\font\Fu=cmr10 scaled 5000
\font\Fv=cmsl10 scaled 49
\font\Fw=cmsl10 scaled 10000

\leftline{\Fr CMR5 at mag 500 does not exist.}
\leftline{\Fb These characters are from CMR5 at mag 1000.}
\leftline{\Fs CMR5 at mag 3000 does not exist.}
\leftline{\Ft CMR10 at mag 200 does not exist.}
\leftline{\tenrm These characters are from CMR10 at mag 1000.}
\leftline{\Fu CMR10 at mag 5000 does not exist.}
\leftline{\Fv CMSL10 at mag 49 does not exist.}
\leftline{\Fj These characters are from CMSL10 at mag 1000.}
\leftline{\Fw CMSL10 at mag 10000 does not exist.}
\vfil\eject

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 14
% This page has a paragraph illustrating most of the characters from the
% standard roman TeX text font.

\message{Standard paragraph.}
\rm
Our task is to create a paragraph illustrating what a typical piece of text
looks like in the standard \TeX\ font.  It should be stressed that not all
\TeX\ fonts can be used for typesetting text.  We need to show most of the
characters in this font---for instance, something like ``the quick brown fox
jumps over a lazy dog'' would use all the lower-case letters.  Hmmm \dots\
how about ``THE QUICK BROWN FOX JUMPS OVER 9876543210 LAZY DOGS'' to make
sure we show all the upper-case letters and digits?  Such a paragraph would
hardly be typical!  Then there's ligatures (try and fit in words like
fluffy, waffle, firefly, difficult) and examples of kerning (boxer, cooked,
vowel).  Not to mention the various accents and other special letters:
prot\'eg\'e, r\^ole, na\"\i ve, \AE sop's \OE vres en fran\c cais.
But how do we put all this stuff into a paragraph that makes sense!?
\vfil\eject

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 15

\message{Page in bottom half of A4 paper.}
\null\vfil
\centerline{Page in bottom half of A4 paper.}
\eject

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 16

\message{Page completely above left of A4 paper.}
\voffset -3in
\hoffset -9in
\leftline{Page completely above left of A4 paper.}
\vfil\eject

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 17

\message{Page completely below right of A4 paper.}
\voffset 3in
\hoffset 9in
\null\vfil
\rightline{Page completely below right of A4 paper.}
\eject

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 18

\message{Page beyond all edges of A4 paper.}
\voffset -3in
\hoffset -3in
\vsize 15in
\hsize 15in
\line{Page beyond all edges of A4 paper.\hfil
      Page beyond all edges of A4 paper.}
\vfil
\line{Page beyond all edges of A4 paper.\hfil
      Page beyond all edges of A4 paper.}
\eject
\voffset 0in \hoffset 0in       % offsets back to normal

\bye