Debian Codegraph @

texmf-dist/tex/generic/pstricks/config/dvips.cfg

raw
1 % $Id: dvips.cfg 4 2020-06-09 08:32:19Z herbert $
2 %% BEGIN: pstricks.con (for dvips driver)
3 %%
4 %% Configuration file for PSTricks
5 %%
6 %% Version 1.00 (2010/01/16)
7 %%
8 %% For use with Rokicki's dvips (tested with v5.74 and older)
9
10 \def\pstdriver{Rokicki's dvips}
11 {\catcode`\"=12\gdef\pstverb#1{\special{" #1}}} % Check catcode of "
12 \def\pstunit{1bp}%
13 \def\pstVerb#1{\special{ps:#1}}% hv write it without a preceding space
14 \def\pstverbscale{SDict begin normalscale end}%
15 \def\pstnodescale{}% not needed for pdftex
16 % DG/SR modification begin - Apr. 28, 1997 (D. Carlisle + S. Rahtz)
17 % \def\pstheader#1{\special{header=#1}}
18 % We used to check for |\AtBeginDvi|, but that was broken in early release
19 % so we now check for the existence of |\textsuperscript| (added 1995/05/16)
20 \ifx\textsuperscript\@undefined
21 \def\pstheader#1{\special{header=#1}}
22 \else
23 \ifx\Gin@PS@file@header\@undefined
24 \def\pstheader#1{\AtBeginDvi{\special{header=#1}}}
25 \else
26 \let\pstheader\Gin@PS@file@header
27 \fi
28 \fi
29 % DG/SR modification end
30 %%
31 %% In the following, CP is short for currentpoint.
32 %% The neg is necessary because dvips scales the coordinates by 1 -1.
33 %% \tx@NET means neg exch neg exch translate.
34 \def\pstrotate{CP CP translate 3 -1 roll neg rotate \tx@NET}
35 %%
36 %% ****************** END Rokicki's dvips *****************************
37
38 %%%%%%%%%%%%%%%%%%% !! CUSTOMIZATION STUFF GOES HERE: !! %%%%%%%%%%%%%%%%%%
39 %% If you want to include your own customizations to pstricks.tex, then
40 %% uncomment the \pstcustomize command, and include your modifications
41 %% after \pstcustomize. These will be read in after pstricks.tex.
42
43 %\pstcustomize
44
45 \endinput
46
47 %%
48 %%%%%%%%%%%%%%%%%%% !! GENERAL INSTRUCTIONS !! %%%%%%%%%%%%%%%%%%%%%%%%%%%%
49
50 Because there are no standards for dvi-to-PS driver \special's,
51 some driver-dependent commands must be defined in this file.
52
53 Possibly correct definitions for some dvi drivers are given below.
54 Copy the section for the driver you want to use to the indicated place
55 near the beginning of the file, replacing any other definitions you
56 might find there.
57
58 When changing drivers, you may need to remake the header file.
59
60 See the PSTricks read-me file for further installation instructions.
61
62 Please report good and bad experiences with dvi-to-PS drivers,
63 along with the definitions of these commands that worked
64 for you, to [email protected]. Thanks.
65
66
67 %%%%%%%%%%%%%%%% DESCRIPTION OF CONFIGURATION DEFINITIONS %%%%%%%%%%%%%%%
68
69 Here are the commands that must be defined in this file:
70
71 \pstverb{} - The argument is included as verbatim PostScript,
72 grouped by save and restore. The coordinate system
73 should be square, not rotated, and with the origin
74 at TeX's currentpoint.
75
76 \pstVerb{} - The argument is included as verbatim PostScript, not
77 grouped by (g)save and (g)restore. The currentpoint
78 should be TeX's currentpoint.
79
80 \pstunit - The units used by driver for graphics included with
81 \pstverb. Probably 1bp or 1sp.
82
83 \pstverbscale - The PostScript code that scales the coordinate system
84 from that in effect with \pstVerb to that in effect
85 with \pstverb. Should not translate to the currentpoint.
86
87 \pstrotate - The PostScript code that takes a number off the stack
88 and rotates the axes properly. I.e.,
89 \pstVerb{angle \pstrotate} is used to begin rotations.
90
91 \pstheader{} - The argument is a header file (e.g., .pro file).
92 If your driver does not support such a special, then
93 the command might just remind you to include the header
94 when printing. You can use PSTricks without a header,
95 in which case it does not matter how you define
96 \pstheader. See read-me.pst for details.
97 If you cannot change the default directory where your
98 driver looks for header files, and you cannot write to
99 that directory, then you include the path for your
100 PSTricks header files.
101 E.g., \def\pstheader#1{\special{header=~/tex/#1}}.
102
103 \pstdriver - The name of the driver.
104
105
106 %%%%%%%%% !! HOW TO MAKE A TEX FORMAT WITH PSTRICKS PRELOADED !! %%%%%%%%
107
108 See your local TeX documentation for instructions on creating a TeX format.
109
110 Before making the format, be sure that this configuration file is correct.
111 It will be read only when creating the format, and not with every job.
112
113 If you are not using header files, there are no more special instructions.
114
115 Special instructions when using header files:
116
117 - If you want to include supplementary PSTricks files (e.g., pst-node.tex),
118 add \input commands in the customization section above.
119
120 - If your definition of \pstheader is, e.g.
121
122 \def\pstheader#1{\special{\header=#1}}
123
124 then change it to
125
126 \def\pstheader#1{%
127 \expandafter\everyjob\expandafter{\the\everyjob
128 \special{header=#1}}}
129
130 and put your original definition in the customization section, AFTER
131 any \input commands. E.g., the customization section might look like:
132
133 \pstcustomize
134 \input pst-node.tex
135 \input pst-coil.tex
136 \def\pstheader#1{\special{header=#1}}
137
138 - Input pstricks.tex at the appropriate time when creating the format.
139 E.g., when initex stops running:
140 *\input pstricks
141 *\dump
142
143
144 %%%%%%%%%% !! CONFIGURATIONS FOR SOME DRIVERS !! %%%%%%%%%%%%%%%%%%%%%%%%
145
146
147 %% **********************************************************************
148 %% ***** Rokicki's dvips ***** Rokicki's dvips ***** Rokicki's dvips ****
149 %% **********************************************************************
150 %% Life is bliss with Rokicki's dvips (tested with v5.396, v5.47, 5.491):
151 %%
152 \def\pstdriver{Rokicki's dvips}
153 {\catcode`\"=12\gdef\pstverb#1{\special{" #1}}} % Check catcode of "
154 \def\pstunit{1bp}%
155 \def\pstVerb#1{\special{ps: #1}}
156 \def\pstverbscale{SDict begin normalscale end}
157 \def\pstheader#1{\special{header=#1}}
158 %%
159 %% In the following, CP is short for currentpoint.
160 %% The neg is necessary because dvips scales the coordinates by 1 -1.
161 %% \tx@NET means neg exch neg exch translate.
162 \def\pstrotate{%
163 CP CP translate 3 -1 roll neg rotate \tx@NET}
164 %%
165 %% If using a version before 5.47, clipping may not work. You can
166 %% try the following definition of \pstverb:
167 %\def\pstverb#1{\special{ps: @beginspecial #1 @endspecial}}
168 %% or change "{initclip}ifelse" to "if" in the definition of @setspecial
169 %% in dvips' special.pro.
170 %%
171 %% ****************** END Rokicki's dvips *****************************
172
173
174 %% **********************************************************************
175 %% **** Arbortext's dvips *** Arbortext's dvips *** Arbortext's dvips ***
176 %% **********************************************************************
177 %% Thanks to Wolfgang Sienel:
178 %%
179 \def\pstdriver{Arbortext's dvips}
180 \def\pstverb#1{%
181 \special{ps::[asis] 0 SPB /ChartCheckPoint save def
182 Xpos Ypos translate #1 ChartCheckPoint restore 0 SPE}}
183 \def\pstunit{1bp}
184 \def\pstVerb#1{\special{ps:: #1}}
185 \def\pstverbscale{}
186 \def\pstrotate{CP CP translate 3 -1 roll rotate \tx@NET}
187 \def\pstheader#1{%
188 \typeout{**********************************************************}%
189 \typeout{** Don't forget to include #1 when printing:}%
190 \typeout{** \space\space dvips -PRO #1 myfile}%
191 \typeout{**********************************************************}}
192 %%
193 %% Comments by Wolfgang on header files:
194 %% Normally the standard prolog file is downloaded once to the printer
195 %% with psload.ps (the initializing file for your TeX-printer) before
196 %% printing TeX-documents. If you don't make any changes to psload.ps
197 %% you have to type dvips -PRO PATH/pstricks.pro myfile (-PRO just
198 %% works for UNIX systems. I don't have any idea about other systems).
199 %% If psload.ps was not downloaded to the printer you have to append
200 %% pstricks.pro to the standard prolog file dvips.pro. In this case
201 %% invoke dvips as always. Note that after hitting the enter key you
202 %% have to specify the option download all prolog in both cases. If you
203 %% are frequently using pstricks you might want to change psload.ps. In
204 %% this case contact your local TeX-guru and ask him politely to do this
205 %% for you. Attention: If psload.ps is getting too big you may run into
206 %% trouble with printer memory!
207 %%
208 %% ****************** END Arbortext's dvips *****************************
209
210
211 %% **********************************************************************
212 %% **** Textures *** Textures *** Textures *** Textures *** Textures ****
213 %% **********************************************************************
214 %% These have been tested with v1.3. It is nice to have a PostScript
215 %% screen previewer, such as TScript (USA: 1-617-734-9700). (The
216 %% Textures preview window will not show the PSTricks graphics.)
217 %%
218 \def\pstdriver{Textures}
219 \def\pstunit{1bp}
220 \def\pstverb#1{\special{postscript /TX@Save save def #1 TX@save restore}}
221 \def\pstVerb#1{\special{postscript grestore #1 gsave}}
222 \def\pstverbscale{Mag 1000 div 72.27 72 div mul dup neg scale}
223 \def\pstrotate{%
224 CP CP translate 3 -1 roll neg rotate \tx@NET}
225 %%
226 %% \pstVerb does not define the currentpoint properly. As a workaround,
227 %% insert the following lines in the customization section above.
228 %%
229 %% \def\pst@Verb#1{%
230 %% \special{postscript \pst@dict /sps { moveto /Mag ed } def
231 %% userdict begin}%
232 %% \special{postscript #1 end gsave}}
233 %%
234 %% Textures does not support header files.
235 %% However, it may still be worth using a header file for increased speed.
236 %% Also, some macros can overload Textures 1.3 when not used with a header
237 %% file. You can include the header file pstricks.pro by saving the
238 %% PostScript output to a file and inserting the pstricks.pro with an
239 %% editor. Probably a better solution is to append pstricks.pro to a
240 %% copy of the laserprep, and, by changing file names of the modified
241 %% laserprep and the original laserprep, use the laserprep with pstricks.pro
242 %% whenever you are printing pstricks documents.
243 \def\pstheader#1{%
244 \typeout{******************************************}%
245 \typeout{*** Include header file #1!! ***}%
246 \typeout{******************************************}}
247 %%
248 %% ****************** END Textures **************************************
249
250
251 %% **********************************************************************
252 %% ***** dvi2ps ***** dvi2ps ***** dvi2ps ***** dvi2ps ***** dvi2ps *****
253 %% **********************************************************************
254 %% I.e., dvi2ps, v2.xx. There are lot's of such things around.
255 %% This probably doesn't work. Considering upgrading to Rokicki's dvips.
256 %%
257 \def\pstdriver{dvi2ps v2.xx}
258 \def\pstunit{1pt}
259 \def\pstverb#1{ pstext="save currentpoint translate
260 Resolution 72.27 div neg scale #1 restore" \space}
261 \def\pstVerb#1{ pstext="#1" \space}
262 \def\pstverbscale{Resolution 72.27 div neg scale}
263 \def\pstrotate{%
264 CP CP translate 3 -1 roll neg rotate \tx@NET}
265 \def\pstheader#1{%
266 \typeout{******************************************************}
267 \typeout{Don't forget to include the header file #1!!}
268 \typeout{******************************************************}
269 %%
270 %% ***************************** END dvi2ps *****************************
271
272
273 %% **********************************************************************
274 %% ***** dvi3ps ***** dvi3ps ***** dvi3ps ***** dvi3ps ***** dvi3ps *****
275 %% **********************************************************************
276 %% I.e., dvi2ps, version 3.xx, by Kevin Coombes.
277 %% This has not been tested. Consider upgrading to Rokicki's dvips.
278 %%
279 \def\pstdriver{dvi2ps v3.xx}
280 \def\pstunit{1bp}
281 \def\pstverb#1{pstext="#1"}
282 % \def\pstVerb#1{%
283 % \special{pstext="@endspecial #1 @beginspecial @setspecial"}} % v3.0
284 \def\pstVerb#1{\special{psraw="#1"}} % v3.3
285 \def\pstverbscale{Resolution 72.27 div neg scale}
286 \def\pstrotate{%
287 CP CP translate 3 -1 roll neg rotate \tx@NET}
288 \def\pstheader#1{%
289 \typeout{******************************************************}
290 \typeout{Don't forget to include the header file #1!!}
291 \typeout{******************************************************}
292 %%
293 %% ******************* END dvi3ps ***************************************
294
295
296 %% **********************************************************************
297 %% **** OzTeX **** OzTeX **** OzTeX **** OzTeX **** OzTeX **** OzTeX ****
298 %% **********************************************************************
299 %% Only the pure graphics objects are supported for OzTeX.
300 %% No color, rotation, clipping, nodes and node connections, overlays, etc.
301 %% Also, \rput cannot be used with \SpecialCoor.
302 %%
303 %% The reason is given in the documentation for Version 1.3, September 1990:
304 %%
305 %% OzTeX generates highly efficient PostScript code but it does so at
306 %% the expense of some \special functionality. Many DVI-to-PostScript
307 %% translators allow you to do things like use one \verb|\special| to start
308 %% rotating TeX text and another to stop the rotation. The way OzTeX
309 %% interprets a DVI page makes this impossible.
310 %%
311 %% If using the header file, you should copy pstricks.pro to global.ps, in
312 %% the same directory as your dvi file.
313 %%
314 \def\pstdriver{OzTeX}
315 \def\pstverb#1{\special{null.ps #1}}
316 \def\pstunit{1bp}
317 \def\pstVerb#1{%
318 \typeout{PSTRICKS WARNING:}%
319 \typeout{\space\space You are using features not supported by OzTeX.}%
320 \typeout{\space\space These will be ignored.}%
321 \gdef\pstVerb##1{}}
322 \def\pstverbscale{}
323 \def\pstrotate{}
324 \def\pstheader#1{%
325 \typeout{******************************************************}
326 \typeout{Don't forget to include the header file #1!!}
327 \typeout{******************************************************}}
328 %%
329 %% ************************* END OzTeX **********************************
330
331
332 %% **********************************************************************
333 %% ***** DirectTeX ***** DirectTeX ***** DirectTeX ***** DirectTeX ******
334 %% **********************************************************************
335 %% DirectTeX is for the Macintosh. These has been tested unsuccessfully,
336 %% apparently due to a problem with DirectTeX.
337 %%
338 \def\pstdriver{DirectTeX}
339 %%
340 %% Check catcode of "
341 {\catcode`\"=12\gdef\pstverb#1{\special{" #1 /Foo{}def }}}
342 \def\pstunit{1bp}
343 \def\pstVerb#1{\special{ps: #1 }}
344 \def\pstverbscale{TeXDict begin normalscale end}
345 %%
346 %% In the following, CP is short for currentpoint. The neg is necessary
347 %% because dvips scales the coordinates by 1 -1:
348 \def\pstrotate{%
349 CP CP translate 3 -1 roll neg rotate \tx@NET}
350 %%
351 \def\pstheader#1{%
352 \typeout{**********************************************************}%
353 \typeout{** Don't forget to include #1 when printing:}%
354 \typeout{** \space\space DVIReader -header #1 myfile}%
355 \typeout{**********************************************************}}
356 %%
357 %% ****************** END DirectTeX *****************************
358
359
360 %%
361 %% END: pstricks.con