我有一个 TeX 文件,仅包含一个大\special{...}
命令,据称包含 PostScript 代码。
\special{!userdict begin
% DSB: start-hook to etna-start-hook
/etna-start-hook{gsave
80 780 translate
/Times-Bold findfont 7 scalefont setfont
26 -20 moveto
(Electronic Transactions on Numerical Analysis.)
gsave show grestore
/Times-Bold findfont 7 scalefont setfont
26 -30 moveto
(Volume 40, pp. 249-267, 2013.)
gsave show grestore
/Times-Bold findfont 7 scalefont setfont
26 -40 moveto
(Copyright)
gsave show grestore
/Symbol findfont 7 scalefont setfont
59 -40 moveto
<D3>
gsave show grestore
/Times-Bold findfont 7 scalefont setfont
67 -40 moveto
(2013, Kent State University.)
gsave show grestore
/Times-Bold findfont 7 scalefont setfont
26 -50 moveto
(ISSN 1068-9613.)
gsave show grestore
grestore}def
/bop-hook{
% DSB: At start of page, check if we're on page 0; if so, run etna-start-hook
dup 0 eq {etna-start-hook} if
gsave
1 setlinecap 1 setlinejoin
%-13 13 translate
-13 33 translate
0.000000 477.000000 translate 0.900 -0.900 scale
1.000 setlinewidth
% Polyline
newpath 544 -251 moveto 544 -286 lineto 451 -286 lineto 451 -251 lineto closepath stroke
/Times-Bold findfont 12.000 scalefont setfont
%/Palatino-Bolditalic findfont 14.000 scalefont setfont
497 -275 moveto
1 -1 scale
(ETNA)dup stringwidth pop 2 div neg 0 rmoveto gsave 0.000 rotate show grestore 1 -1 scale
/Times-Bold findfont 8.000 scalefont setfont
%/Palatino-Bolditalic findfont 14.000 scalefont setfont
499 -265 moveto
1 -1 scale
(Kent State University )dup stringwidth pop 2 div neg 0 rmoveto gsave 0.000 rotate show grestore 1 -1 scale
%/Times-BoldItalic findfont 20.000 scalefont setfont
/Times-Bold findfont 8.000 scalefont setfont
498 -255 moveto
1 -1 scale
(http://etna.math.kent.edu)dup stringwidth pop 2 div neg 0 rmoveto gsave 0.000 rotate show grestore 1 -1 scale
grestore}def end}
我想将此文件转换为适当的 PostScript(然后是 PDF)文件。
我怎样才能做到这一点?
答案1
唯一缺少的是结尾
\bye
在代码的末尾。代码中的命令序列tex
、dvips
、 ŕun 生成有效的 Postscript 和 PDF。ps2pdf