| 1 |
% This file is public domain. |
| 2 |
% Originally written 1995, Geoffrey Tobin. |
| 3 |
% 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. |
| 4 |
% This declaration added 2008/11/14 by Clea F. Rees with the permission of Geoffrey Tobin. |
| 5 |
|
| 6 |
% TeX source file for creating TRIPVDU.DVI, a torture file for DVItoVDU |
| 7 |
% (using the same philosophy as Donald Knuth's torture test for TeX). |
| 8 |
|
| 9 |
\nopagenumbers |
| 10 |
\topskip 0pt |
| 11 |
\parindent 0pt |
| 12 |
\parskip 0pt |
| 13 |
|
| 14 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 15 |
% DVI page 1 |
| 16 |
% This page is completely empty but has some \special stuff. |
| 17 |
|
| 18 |
\message{Empty page.} |
| 19 |
\null |
| 20 |
\special{DVItoVDU should warn user that it is ignoring this stuff.} |
| 21 |
\special{And this.} |
| 22 |
\vfil\eject |
| 23 |
|
| 24 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 25 |
% DVI page 2 |
| 26 |
% This page has 1 black pixel at (0,0). |
| 27 |
|
| 28 |
\message{1 black pixel at (0,0).} |
| 29 |
\hrule height 1sp width 1sp depth 0sp |
| 30 |
\vfil\eject |
| 31 |
|
| 32 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 33 |
% DVI page 3 |
| 34 |
% This page will fill an A4 sheet with black pixels, assuming A4 paper is |
| 35 |
% 8.3in by 11.7in and (0,0) is 1in from the top and left edges. |
| 36 |
|
| 37 |
\message{A4 sheet full of black pixels.} |
| 38 |
{% change page size and location temporarily |
| 39 |
\hsize 10in |
| 40 |
\vsize 12in |
| 41 |
\hoffset -1in |
| 42 |
\voffset -1in |
| 43 |
% Because ref pts of rules are at BOTTOM left corner we first need to output |
| 44 |
% a rule that will guarantee Minv = -1in, then output the large rule with |
| 45 |
% slightly less than A4 height. |
| 46 |
\hrule height 1sp width 8.299in depth 0sp |
| 47 |
\hrule height 11.695in width 8.299in depth 0sp |
| 48 |
\vfil\eject |
| 49 |
|
| 50 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 51 |
% DVI page 4 |
| 52 |
% This page is 1 pixel wider than page 3. |
| 53 |
% DVItoVDU should detect that page is too wide for A4 paper. |
| 54 |
|
| 55 |
\message{As above but 1 pixel too wide.} |
| 56 |
\hrule height 1sp width 8.301in depth 0sp |
| 57 |
\hrule height 11.695in width 8.301in depth 0sp |
| 58 |
\vfil\eject |
| 59 |
|
| 60 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 61 |
% DVI page 5 |
| 62 |
% This page is 1 pixel longer than page 3. |
| 63 |
% DVItoVDU should detect that page is too low for A4 paper. |
| 64 |
|
| 65 |
\message{As above but 1 pixel too low.} |
| 66 |
\hrule height 11.701in width 8.299in depth 0sp |
| 67 |
\vfil\eject |
| 68 |
|
| 69 |
}% reset page size and location |
| 70 |
|
| 71 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 72 |
% DVI page 6 |
| 73 |
% This page has a rulelist with a full ruletable (= 300 rules). |
| 74 |
% Note that DVItoVDU does not impose any limits |
| 75 |
% on the number of rules or characters in a page. Pages 6 to 9 |
| 76 |
% test the list manipulating code in DVIReader and DVItoVDU. |
| 77 |
|
| 78 |
\message{Page with ruletablesize rules.} |
| 79 |
\newcount\temp |
| 80 |
\temp=300 |
| 81 |
\loop\ifnum\temp>0 |
| 82 |
\hrule height 1sp width \hsize % 1 pixel high |
| 83 |
\vfil |
| 84 |
\advance\temp by -1 |
| 85 |
\repeat |
| 86 |
\vfil\eject |
| 87 |
|
| 88 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 89 |
% DVI page 7 |
| 90 |
% This page has ruletablesize+1 rules (so rulelist has 2 nodes). |
| 91 |
|
| 92 |
\message{Page with ruletablesize+1 rules.} |
| 93 |
\temp=301 |
| 94 |
\loop\ifnum\temp>0 |
| 95 |
\hrule height 1sp width \hsize % 1 pixel high |
| 96 |
\vfil |
| 97 |
\advance\temp by -1 |
| 98 |
\repeat |
| 99 |
\vfil\eject |
| 100 |
|
| 101 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 102 |
% DVI page 8 |
| 103 |
% This page has a charlist with a full chartable (= 3000 characters). |
| 104 |
|
| 105 |
\message{Page with chartablesize characters from one font.} |
| 106 |
\font\small=cmr5 |
| 107 |
{\small \offinterlineskip |
| 108 |
\temp=30 |
| 109 |
\loop\ifnum\temp>0 |
| 110 |
\leftline{iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii |
| 111 |
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii} % 100 chars |
| 112 |
\advance\temp by -1 |
| 113 |
\repeat |
| 114 |
} |
| 115 |
\vfil\eject |
| 116 |
|
| 117 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 118 |
% DVI page 9 |
| 119 |
% This page has chartablesize+1 characters (so charlist has 2 nodes). |
| 120 |
|
| 121 |
\message{Page with chartablesize+1 characters from one font.} |
| 122 |
{\small \offinterlineskip |
| 123 |
\temp=30 |
| 124 |
\loop\ifnum\temp>0 |
| 125 |
\leftline{iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii |
| 126 |
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii} % 100 chars |
| 127 |
\advance\temp by -1 |
| 128 |
\repeat |
| 129 |
\leftline{i} % the extra character |
| 130 |
} |
| 131 |
\vfil\eject |
| 132 |
|
| 133 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 134 |
% DVI page 10 |
| 135 |
|
| 136 |
\message{Multiple TeX page counters.} |
| 137 |
\footline={\hss\tenrm\folio\hss} % turn on page numbers |
| 138 |
\pageno=0 |
| 139 |
\count1=1 \count2=2 \count3=3 \count4=4 \count9=9 |
| 140 |
\noindent |
| 141 |
This is \TeX\ page [0.1.2.3.4.....9]. |
| 142 |
\vfil\eject |
| 143 |
|
| 144 |
\count1=0 \count2=0 \count3=0 \count4=0 \count9=0 % reset TeX counters |
| 145 |
|
| 146 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 147 |
% DVI page 11 |
| 148 |
|
| 149 |
\message{Negative TeX page.} |
| 150 |
\pageno=-11 |
| 151 |
\noindent |
| 152 |
This is \TeX\ page [-11]. |
| 153 |
\vfil\eject |
| 154 |
|
| 155 |
\pageno=12 % DVI page = TeX page again |
| 156 |
\nopagenumbers % turn off page numbers again |
| 157 |
|
| 158 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 159 |
% DVI page 12 |
| 160 |
% This page has characters from many fonts. |
| 161 |
% Note that the page is off the right edge of A4 paper. |
| 162 |
|
| 163 |
\message{Page with characters from many fonts.} |
| 164 |
% avoid redefining plain TeX's \i, \j etc. |
| 165 |
\font\Fb=cmr5 |
| 166 |
\font\Fc=cmr5 scaled\magstep5 |
| 167 |
\font\Fe=cmr10 scaled\magstep5 |
| 168 |
\font\Fg=cmbx10 |
| 169 |
\font\Fh=cmbx10 scaled\magstep5 |
| 170 |
\font\Fj=cmsl10 |
| 171 |
\font\Fk=cmsl10 scaled\magstep5 |
| 172 |
\font\Fm=cmtt10 |
| 173 |
\font\Fn=cmtt10 scaled\magstep5 |
| 174 |
\font\Fo=cmss10 |
| 175 |
\font\Fp=cmcsc10 |
| 176 |
\font\Fq=cmdunh10 |
| 177 |
|
| 178 |
\leftline{\Fb These characters are from CMR5 at mag 1000.} |
| 179 |
\leftline{\Fc These characters are from CMR5 at mag 2488.} |
| 180 |
\leftline{\tenrm These characters are from CMR10 at mag 1000.} |
| 181 |
\leftline{\Fe These characters are from CMR10 at mag 2488.} |
| 182 |
\leftline{\Fg These characters are from CMBX10 at mag 1000.} |
| 183 |
\leftline{\Fh These characters are from CMBX10 at mag 2488.} |
| 184 |
\leftline{\Fj These characters are from CMSL10 at mag 1000.} |
| 185 |
\leftline{\Fk These characters are from CMSL10 at mag 2488.} |
| 186 |
\leftline{\Fm These characters are from CMTT10 at mag 1000.} |
| 187 |
\leftline{\Fn These characters are from CMTT10 at mag 2488.} |
| 188 |
\leftline{\Fo These characters are from CMSS10 at mag 1000.} |
| 189 |
\leftline{\Fp These characters are from CMCSC10 at mag 1000.} |
| 190 |
\leftline{\Fq These characters are from CMDUNH10 at mag 1000.} |
| 191 |
\vfil\eject |
| 192 |
|
| 193 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 194 |
% DVI page 13 |
| 195 |
% This page has characters from many fonts, some of which have no corresponding |
| 196 |
% PXL file. DVItoVDU should warn user about non-existent font files and |
| 197 |
% continue as best it can by loading dummy font info. |
| 198 |
% Note that the page is off the right edge of A4 paper. |
| 199 |
|
| 200 |
\message{Page with characters from fonts at unknown magnifications.} |
| 201 |
% PXL files do not exist at the requested magnifications: |
| 202 |
\font\Fr=cmr5 scaled 500 |
| 203 |
\font\Fs=cmr5 scaled 3000 |
| 204 |
\font\Ft=cmr10 scaled 200 |
| 205 |
\font\Fu=cmr10 scaled 5000 |
| 206 |
\font\Fv=cmsl10 scaled 49 |
| 207 |
\font\Fw=cmsl10 scaled 10000 |
| 208 |
|
| 209 |
\leftline{\Fr CMR5 at mag 500 does not exist.} |
| 210 |
\leftline{\Fb These characters are from CMR5 at mag 1000.} |
| 211 |
\leftline{\Fs CMR5 at mag 3000 does not exist.} |
| 212 |
\leftline{\Ft CMR10 at mag 200 does not exist.} |
| 213 |
\leftline{\tenrm These characters are from CMR10 at mag 1000.} |
| 214 |
\leftline{\Fu CMR10 at mag 5000 does not exist.} |
| 215 |
\leftline{\Fv CMSL10 at mag 49 does not exist.} |
| 216 |
\leftline{\Fj These characters are from CMSL10 at mag 1000.} |
| 217 |
\leftline{\Fw CMSL10 at mag 10000 does not exist.} |
| 218 |
\vfil\eject |
| 219 |
|
| 220 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 221 |
% DVI page 14 |
| 222 |
% This page has a paragraph illustrating most of the characters from the |
| 223 |
% standard roman TeX text font. |
| 224 |
|
| 225 |
\message{Standard paragraph.} |
| 226 |
\rm |
| 227 |
Our task is to create a paragraph illustrating what a typical piece of text |
| 228 |
looks like in the standard \TeX\ font. It should be stressed that not all |
| 229 |
\TeX\ fonts can be used for typesetting text. We need to show most of the |
| 230 |
characters in this font---for instance, something like ``the quick brown fox |
| 231 |
jumps over a lazy dog'' would use all the lower-case letters. Hmmm \dots\ |
| 232 |
how about ``THE QUICK BROWN FOX JUMPS OVER 9876543210 LAZY DOGS'' to make |
| 233 |
sure we show all the upper-case letters and digits? Such a paragraph would |
| 234 |
hardly be typical! Then there's ligatures (try and fit in words like |
| 235 |
fluffy, waffle, firefly, difficult) and examples of kerning (boxer, cooked, |
| 236 |
vowel). Not to mention the various accents and other special letters: |
| 237 |
prot\'eg\'e, r\^ole, na\"\i ve, \AE sop's \OE vres en fran\c cais. |
| 238 |
But how do we put all this stuff into a paragraph that makes sense!? |
| 239 |
\vfil\eject |
| 240 |
|
| 241 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 242 |
% DVI page 15 |
| 243 |
|
| 244 |
\message{Page in bottom half of A4 paper.} |
| 245 |
\null\vfil |
| 246 |
\centerline{Page in bottom half of A4 paper.} |
| 247 |
\eject |
| 248 |
|
| 249 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 250 |
% DVI page 16 |
| 251 |
|
| 252 |
\message{Page completely above left of A4 paper.} |
| 253 |
\voffset -3in |
| 254 |
\hoffset -9in |
| 255 |
\leftline{Page completely above left of A4 paper.} |
| 256 |
\vfil\eject |
| 257 |
|
| 258 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 259 |
% DVI page 17 |
| 260 |
|
| 261 |
\message{Page completely below right of A4 paper.} |
| 262 |
\voffset 3in |
| 263 |
\hoffset 9in |
| 264 |
\null\vfil |
| 265 |
\rightline{Page completely below right of A4 paper.} |
| 266 |
\eject |
| 267 |
|
| 268 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 269 |
% DVI page 18 |
| 270 |
|
| 271 |
\message{Page beyond all edges of A4 paper.} |
| 272 |
\voffset -3in |
| 273 |
\hoffset -3in |
| 274 |
\vsize 15in |
| 275 |
\hsize 15in |
| 276 |
\line{Page beyond all edges of A4 paper.\hfil |
| 277 |
Page beyond all edges of A4 paper.} |
| 278 |
\vfil |
| 279 |
\line{Page beyond all edges of A4 paper.\hfil |
| 280 |
Page beyond all edges of A4 paper.} |
| 281 |
\eject |
| 282 |
\voffset 0in \hoffset 0in % offsets back to normal |
| 283 |
|
| 284 |
\bye |