summaryrefslogtreecommitdiff
path: root/dviware/psprint/unix/nasty.tex
blob: 784e60f4aacfe4bf6fcc67a95c4320263202eb50 (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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
% TeX source file for testing PSDVI and PSPRINT with a very nasty DVI file
% (using the same philosophy as Donald Knuth's torture test for TeX).
% First 11 pages are nasty but should all be printable.
% Remaining pages contain one or more deliberate errors!!!

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

% DVI page 1
\message{Empty page.}
\null
\vfil\eject

% DVI page 2
\message{Page with special file empty.ps.}
\null
\special{empty.ps}
\vfil\eject

% DVI page 3
\message{Page with special file box.ps.}
\null
\vskip 2in
\special{box.ps}
\vskip 2in
\special{box.ps 1.5 .5 scale}   % test optional PostScript text
\vskip 2in
\special{box.ps }               % should just add blank line
\vfil\eject

% DVI page 4
\message{Page with special file box.ps in horizontal mode.}
\null
\vskip 1in
\line{a\hfil \special{box.ps} \hfil b}
\vfil\eject

% DVI page 5
\message{Page with 1 black pixel at (0,0).}
\hrule height 1sp width 1sp depth 0sp
\vfil\eject

% DVI page 6
\message{A4 paper filled with 1mm grid.}
{% change page size and location temporarily
\hoffset=-1in
\voffset=-1in
\hsize=209.9mm
\vsize=296.9mm
\newcount\temp
\hbox to \hsize
{\temp=209
\loop\ifnum\temp>0
   \vrule height \vsize width 1sp
   \hfil
   \advance\temp by -1
\repeat
\vrule height \vsize width 1sp
}
\vskip -\vsize
\temp=296
\loop\ifnum\temp>0
   \hrule height 1sp width \hsize
   \vfil
   \advance\temp by -1
\repeat
\hrule height 1sp width \hsize
\eject
}% reset page size and location

% DVI page 7
\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 8
\message{Negative TeX page.}
\pageno=-99
This is \TeX\ page [-99].
\vfil\eject
\pageno=0          % restart TeX page numbers
\nopagenumbers     % turn off page numbers again

% DVI page 9
\message{Standard paragraphs in Computer Modern and PostScript fonts.}

\font\sf=cmss10
\font\timesr=ps-times-r at 10pt
\font\helv=ps-helv at 10pt

\rm
Our task is to create a paragraph illustrating what a typical piece of text
looks like in a particular \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!?

\bigskip
\timesr
Our task is to create a paragraph illustrating what a typical piece of text
looks like in a particular \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!?

\bigskip
\sf
Our task is to create a paragraph illustrating what a typical piece of text
looks like in a particular \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!?

\bigskip
\helv
Our task is to create a paragraph illustrating what a typical piece of text
looks like in a particular \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!?

\bigskip
\rm The cat sat on the mat. \timesr The cat sat on the mat.
\sf The cat sat on the mat. \helv The cat sat on the mat.

\rm
\vfil\eject

% DVI page 10
\message{Verbatim tt strings.}
\input ../dv/verbatim
\begintt
--------------------------------------------------------------------------------
-                                                                              -
--------------------------------------------------------------------------------
\endtt
\vfil\eject

% DVI page 11
\message{Page with all-white character.}
\font\cmtex=cmtex10
\leftline{\cmtex a\char32 b}
\vfil\eject

% REMAINING PAGES HAVE DELIBERATE ERRORS!!!

% DVI page 12
\pageno=100
\message{Page with non-existent fonts.}
\font\FA=cmr5 scaled 500
\font\FB=cmr5 scaled 3000
\font\FC=cmr10 scaled 200
\font\FD=cmr10 scaled 5000
\font\FE=cmsl10 scaled 1
\font\FF=cmsl10 scaled 10000
\leftline{\FA CMR5 at mag 500 does not exist.}
\leftline{\FB CMR5 at mag 3000 does not exist.}
\leftline{\FC CMR10 at mag 200 does not exist.}
\leftline{\FD CMR10 at mag 5000 does not exist.}
\leftline{\FE CMSL10 at mag 1 does not exist.}
\leftline{\FF CMSL10 at mag 10000 does not exist.}
\vfil\eject

% DVI page 13
\message{Page beyond top and left edges of A4 paper.}
{% change page size and location
\voffset -3in
\hoffset -9in
\leftline{Page off paper.}
\vfil\eject
}% restore page size and location

% DVI page 14
\message{Page beyond bottom and right edges of A4 paper.}
{% change page size and location
\voffset 3in
\hoffset 9in
\null\vfil
\rightline{Page off paper.}
\eject
}% restore page size and location

% DVI page 15
\message{Page beyond all edges of A4 paper.}
{% change page size and location
\voffset -3in
\hoffset -3in
\vsize 15in
\hsize 15in
\line{Page off paper.\hfil Page off paper.}
\vfil
\line{Page off paper.\hfil Page off paper.}
\eject
}% restore page size and location

% DVI page 16
\message{Page with illegal special files.}
\null
\special{}
\special{This is not a file name.}
\special{%
12345678901234567890123456789012345678901234567890%
1234567890123456789012345678901}
% one character too many (see string in globals.h)
\vfil\eject

% DVI page 17
\message{Page with bad special file.}
\null
\special{bad.ps}   % bad.ps has deliberate PostScript error
\vfil\eject

% DVI page 18
% PostScript printers can get 1 pixel rounding errors which show up in TeX
% math extension symbols made up of rules and cmex characters.
% tex.ps tries to minimize such problems by using setmatrix to
% define a device-specific coordinate system, and making slight adjustments
% to the height, width and positioning of rules.

\message{Page with possible rounding problems.}

\hrule width 2in height 1mm
\bigskip

\def\prob{$$\shift
\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+x}}}}}}}
\quad
\{\underbrace{\overbrace{\mathstrut a,\ldots,a}
     ^{k\;{\tenit a's}},
\overbrace{\mathstrut b,\ldots,b}
     ^{l\;{\tenit b's}}}_{k+l\rm\;elements}\}.
\quad
\left\{\vbox to 27pt{}\left\{\vbox to 24pt{}\left\{
\vbox to 21pt{}\Biggl\{\biggl\{\Bigl\{
\bigl\{{\bf t}\bigr\}\Bigr\}\biggr\}
\Biggr\}\right\}\right\}\right\}
$$}

\def\shift{}
\prob
\bigskip

\def\shift{\hskip 10pt}
\prob
\bigskip\bigskip

\def\shift{\hskip 20pt}
\prob
\bigskip\bigskip\bigskip

\def\shift{\hskip 30pt}
\prob

\vfil\eject

% DVI page 19
\message{Page will exceed VM in LaserWriter 2.0.}
\font\huge=cminch
\font\bigrm=cmr10 scaled\magstep5
\font\bigbf=cmbx10 scaled\magstep5
\font\bigit=cmti10 scaled\magstep5
\font\bigsl=cmsl10 scaled\magstep5
\font\bigtt=cmtt10 scaled\magstep5
\hrule
\vfil
\centerline{\huge ABCDE}
\vfil
\centerline{\bigrm This is the largest ROMAN}
\centerline{\bigbf This is the largest BOLD}
\centerline{\bigit This is the largest ITALIC}
\centerline{\bigsl This is the largest SLANTED}
\centerline{\bigtt This is the largest TYPEWRITER}
\vfil
\rm
abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789\hfil\break
Some ligatures: fluffy, difficult, deftly.  Some kerning: book, box, AVATAR.
Here is a paragraph using the PLAIN output format.
Let us hope we see some improvement. If not, think again.
The cat sat on the mat.
\bigskip
\bf
abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789\hfil\break
Some ligatures: fluffy, difficult, deftly.  Some kerning: book, box, AVATAR.
Here is a paragraph using the PLAIN output format.
Let us hope we see some improvement. If not, think again.
The cat sat on the mat.
\bigskip
\it
abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789\hfil\break
Some ligatures: fluffy, difficult, deftly.  Some kerning: book, box, AVATAR.
Here is a paragraph using the PLAIN output format.
Let us hope we see some improvement. If not, think again.
The cat sat on the mat.
\bigskip
\sl
abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789\hfil\break
Some ligatures: fluffy, difficult, deftly.  Some kerning: book, box, AVATAR.
Here is a paragraph using the PLAIN output format.
Let us hope we see some improvement. If not, think again.
The cat sat on the mat.
\bigskip
\tt
{\obeylines
abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789

}
\rm
\vfil
\hrule
\eject

\bye