| 1 |
% |
| 2 |
% This file is a quick and simple, gross test of dvips. It only tests |
| 3 |
% the most basic things. |
| 4 |
% |
| 5 |
% To run: |
| 6 |
% remove the file mtest.ps if it exists |
| 7 |
% tex test |
| 8 |
% dvips test -o test.ps (ignore the error) |
| 9 |
% copy test.ps mtest.ps |
| 10 |
% dvips test |
| 11 |
% and print. |
| 12 |
% |
| 13 |
% First, paper size |
| 14 |
% |
| 15 |
\newif\ifafour |
| 16 |
\afourtrue |
| 17 |
% |
| 18 |
% Next, big rules. |
| 19 |
% |
| 20 |
\nopagenumbers\raggedbottom |
| 21 |
\ifafour |
| 22 |
\special{papersize=210mm,297mm} |
| 23 |
\hsize=7.7677truein\vsize=11.1929truein |
| 24 |
\else |
| 25 |
\special{papersize=8.5in,11in} % the default anyway, so not necessary |
| 26 |
\hsize=8truein\vsize=10.5truein |
| 27 |
\fi |
| 28 |
\hoffset=-0.75truein\voffset=-0.75truein |
| 29 |
\newdimen\ovsize \ovsize=\vsize |
| 30 |
\newdimen\ohsize \ohsize=\hsize |
| 31 |
\vbox to\vsize{\hrule height 6pt\advance\vsize by -12pt |
| 32 |
\hbox{\vrule width 6pt\vbox to\vsize{\advance\hsize by -12pt |
| 33 |
% |
| 34 |
% Now, PostScript fonts. |
| 35 |
% |
| 36 |
\bigskip |
| 37 |
\font\norm=ptmr at 20truept |
| 38 |
\centerline{\norm DVIPS: A \TeX\ Driver For PostScript} |
| 39 |
\font\foolish=ptmri at 100truept\ |
| 40 |
\bigskip |
| 41 |
\centerline{\foolish g} |
| 42 |
\bigskip |
| 43 |
% |
| 44 |
% Next, literal graphics. It's not supposed to look pretty. |
| 45 |
% |
| 46 |
\vskip1truein |
| 47 |
\centerline{\special{" 0 36 translate .05 .099 .95 { |
| 48 |
27.4 0 translate gsave |
| 49 |
0 0 moveto dup 90 mul rotate |
| 50 |
-10 -10 rmoveto 20 0 rlineto 0 20 rlineto -20 0 rlineto closepath |
| 51 |
gsave dup setgray fill grestore 1 exch sub setgray stroke |
| 52 |
grestore 27.4 0 translate } for }\hskip 7.77truein} |
| 53 |
% |
| 54 |
% Next, some alignment problems that are not done correctly by some |
| 55 |
% dvi2ps programs. |
| 56 |
% |
| 57 |
$$\sqrt{\sqrt{{a\Longrightarrow b\longrightarrow c}\over |
| 58 |
\vbox{\hsize=3in\noindent |
| 59 |
the phase of the moon multiplied by the number of angels that can |
| 60 |
dance on the head of a pin while the rich man threads the needle |
| 61 |
divided by $\pi$ or some other transcendental number}}}$$ |
| 62 |
\bigskip |
| 63 |
% |
| 64 |
% Now, included epsf graphics. We include this document |
| 65 |
% recursively. Of course, things will be ugly. |
| 66 |
% |
| 67 |
\input epsf |
| 68 |
\epsfxsize=0.5\ohsize |
| 69 |
% |
| 70 |
% If you go to a4 paper, change the following supplied bounding box |
| 71 |
% appropriately. |
| 72 |
% |
| 73 |
\ifafour |
| 74 |
\line{\hfil\epsffile[18 18 577 814]{mtest.ps}\hfil |
| 75 |
\else |
| 76 |
\line{\hfil\epsffile[18 18 594 774]{mtest.ps}\hfil |
| 77 |
\fi |
| 78 |
\vbox to 0.5\ovsize{\hsize=3.3truein\parindent=10pt\parskip=0pt plus 1fil |
| 79 |
To run this test, remove a file called mtest.ps if it exists. |
| 80 |
Then, run \TeX\ over |
| 81 |
test.tex, run dvips over test.dvi, saving the output in a file test.ps. |
| 82 |
Copy test.ps to mtest.ps. |
| 83 |
Run dvips over test.dvi again, this time printing or saving the output, |
| 84 |
as you choose. (Including the document too many times inside itself |
| 85 |
will overflow the virtual memory capacities of most printers.) |
| 86 |
|
| 87 |
Some things to check on this page. First, the large rules surrounding |
| 88 |
the page should be exactly one quarter inch from each border (assuming |
| 89 |
a 8.5 by 11 page; for an a4 page, change the {\tt\char92 afourfalse} |
| 90 |
to {\tt\char92 afourtrue} on line 16.) |
| 91 |
|
| 92 |
You should see a title at the top, and a large italic g under that. |
| 93 |
Then, there should be a centered row of ten boxes, going from dark to |
| 94 |
light gray, rotating slowly. |
| 95 |
|
| 96 |
In the `equation' that follows, check the upper left corner of the radical |
| 97 |
signs for alignment. Also check the right arrows. |
| 98 |
|
| 99 |
In the recursively included page to the left, |
| 100 |
note how bad the bitmapped fonts look |
| 101 |
(they are the ones under the radical, and indeed this text itself.) |
| 102 |
The thin |
| 103 |
rules may disappear altogether. This points out the resolution dependence |
| 104 |
of dvips output; this is an unfortunate necessity of using bitmapped fonts. |
| 105 |
The PostScript fonts, on the other hand, should scale fine. |
| 106 |
|
| 107 |
Finally, at the bottom of the page, you will see some tests of the accents in |
| 108 |
the PostScript fonts. Pay careful attention to the word na\"\i ve; there |
| 109 |
should be an umlaut over a dotless i. The text should read |
| 110 |
``Ich wei\ss\ tats\"achlich nicht mehr als das. |
| 111 |
D\ae monic souffl\'es have no r\^ole in na\"\i ve \oe uvres. |
| 112 |
---\AE sop's \OE uvres.'' |
| 113 |
}\hfil} |
| 114 |
% |
| 115 |
% Finally, PostScript fonts again; let's test some accents. |
| 116 |
% |
| 117 |
\bigskip |
| 118 |
\font\foo=ptmbi at 16truept |
| 119 |
\centerline{\vbox{\advance\hsize by -2in |
| 120 |
{\foo\noindent Ich wei\ss\ tats\"achlich nicht mehr als das. |
| 121 |
D\ae monic souffl\'es have no r\^ole in na\"\i ve \oe uvres. |
| 122 |
---\AE sop's \OE uvres.}}} |
| 123 |
\bigskip}\vrule width 6pt}\hrule height 6pt} |
| 124 |
% |
| 125 |
% We also want to test bop-hook stuff. |
| 126 |
% |
| 127 |
\special{! userdict begin /bop-hook{gsave 200 30 translate |
| 128 |
65 rotate /Times-Roman findfont 260 scalefont setfont |
| 129 |
0 0 moveto 0.8 setgray (DVIPS) show grestore}def end} |
| 130 |
% |
| 131 |
\bye |
| 132 |
|
| 133 |
%%% Local Variables: |
| 134 |
%%% mode: plain-tex |
| 135 |
%%% TeX-master: t |
| 136 |
%%% End: |