Debian Codegraph @

texmf-dist/tex/generic/pstricks/pstricks.con

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