summaryrefslogtreecommitdiff
path: root/graphics/pstricks/base/config/dvips.cfg
blob: f9c5da698e2dcda296de7b0ff22e5d996f48fd39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
% $Id: dvips.cfg 4 2020-06-09 08:32:19Z herbert $
%% BEGIN: pstricks.con (for dvips driver)
%%
%% Configuration file for PSTricks
%%
%% Version 1.00 (2010/01/16)
%%
%% For use with Rokicki's dvips (tested with v5.74 and older)

\def\pstdriver{Rokicki's dvips}
{\catcode`\"=12\gdef\pstverb#1{\special{" #1}}}  % Check catcode of "
\def\pstunit{1bp}%
\def\pstVerb#1{\special{ps:#1}}% hv write it without a preceding space
\def\pstverbscale{SDict begin normalscale end}%
\def\pstnodescale{}%  not needed for pdftex
% DG/SR modification begin  - Apr. 28, 1997 (D. Carlisle + S. Rahtz)
% \def\pstheader#1{\special{header=#1}}
% We used to check for |\AtBeginDvi|, but that was broken in early release
% so we now check for the existence of |\textsuperscript| (added 1995/05/16)
\ifx\textsuperscript\@undefined
   \def\pstheader#1{\special{header=#1}}
\else
  \ifx\Gin@PS@file@header\@undefined
    \def\pstheader#1{\AtBeginDvi{\special{header=#1}}}
  \else
    \let\pstheader\Gin@PS@file@header
  \fi
\fi
% DG/SR modification end
%%
%% In the following, CP is short for currentpoint.
%% The neg is necessary because dvips scales the coordinates by 1 -1.
%% \tx@NET means neg exch neg exch translate.
\def\pstrotate{CP CP translate 3 -1 roll neg rotate \tx@NET}
%%
%% ****************** END Rokicki's dvips *****************************

%%%%%%%%%%%%%%%%%%% !! CUSTOMIZATION STUFF GOES HERE: !! %%%%%%%%%%%%%%%%%%
%% If you want to include your own customizations to pstricks.tex, then
%% uncomment the \pstcustomize command, and include your modifications
%% after \pstcustomize. These will be read in after pstricks.tex.

%\pstcustomize

\endinput

%%
%%%%%%%%%%%%%%%%%%% !! GENERAL INSTRUCTIONS !! %%%%%%%%%%%%%%%%%%%%%%%%%%%%

Because there are no standards for dvi-to-PS driver \special's,
some driver-dependent commands must be defined in this file.

Possibly correct definitions for some dvi drivers are given below.
Copy the section for the driver you want to use to the indicated place
near the beginning of the file, replacing any other definitions you
might find there.

When changing drivers, you may need to remake the header file.

See the PSTricks read-me file for further installation instructions.

Please report good and bad experiences with dvi-to-PS drivers,
along with the definitions of these commands that worked
for you, to tvz@Princeton.EDU.  Thanks.


%%%%%%%%%%%%%%%% DESCRIPTION OF CONFIGURATION DEFINITIONS %%%%%%%%%%%%%%%

Here are the commands that must be defined in this file:

   \pstverb{}    -  The argument is included as verbatim PostScript,
                    grouped by save and restore. The coordinate system
	should be square, not rotated, and with the origin
	at TeX's currentpoint.

   \pstVerb{}    -  The argument is included as verbatim PostScript, not
                    grouped by (g)save and (g)restore. The currentpoint
	should be TeX's currentpoint.

   \pstunit      -  The units used by driver for graphics included with
                    \pstverb. Probably 1bp or 1sp.

   \pstverbscale - The PostScript code that scales the coordinate system
                   from that in effect with \pstVerb to that in effect
                   with \pstverb. Should not translate to the currentpoint.

   \pstrotate    - The PostScript code that takes a number off the stack
                   and rotates the axes properly. I.e.,
                   \pstVerb{angle \pstrotate} is used to begin rotations.

   \pstheader{}  - The argument is a header file (e.g., .pro file).
                   If your driver does not support such a special, then
                   the command might just remind you to include the header
                   when printing. You can use PSTricks without a header,
                   in which case it does not matter how you define
                   \pstheader. See read-me.pst for details.
                   If you cannot change the default directory where your
                   driver looks for header files, and you cannot write to
                   that directory, then you include the path for your
                   PSTricks header files.
                   E.g., \def\pstheader#1{\special{header=~/tex/#1}}.

   \pstdriver    - The name of the driver.


%%%%%%%%% !! HOW TO MAKE A TEX FORMAT WITH PSTRICKS PRELOADED !! %%%%%%%%

See your local TeX documentation for instructions on creating a TeX format.

Before making the format, be sure that this configuration file is correct.
It will be read only when creating the format, and not with every job.

If you are not using header files, there are no more special instructions.

Special instructions when using header files:

 - If you want to include supplementary PSTricks files (e.g., pst-node.tex),
   add \input commands in the customization section above.

 - If your definition of \pstheader is, e.g.

     \def\pstheader#1{\special{\header=#1}}

   then change it to

     \def\pstheader#1{%
       \expandafter\everyjob\expandafter{\the\everyjob
         \special{header=#1}}}

   and put your original definition in the customization section, AFTER
   any \input commands. E.g., the customization section might look like:

     \pstcustomize
     \input pst-node.tex
     \input pst-coil.tex
     \def\pstheader#1{\special{header=#1}}

 - Input pstricks.tex at the appropriate time when creating the format.
   E.g., when initex stops running:
     *\input pstricks
     *\dump


%%%%%%%%%% !! CONFIGURATIONS FOR SOME DRIVERS !! %%%%%%%%%%%%%%%%%%%%%%%%


%% **********************************************************************
%% ***** Rokicki's dvips ***** Rokicki's dvips ***** Rokicki's dvips ****
%% **********************************************************************
%% Life is bliss with Rokicki's dvips (tested with v5.396, v5.47, 5.491):
%%
\def\pstdriver{Rokicki's dvips}
{\catcode`\"=12\gdef\pstverb#1{\special{" #1}}}  % Check catcode of "
\def\pstunit{1bp}%
\def\pstVerb#1{\special{ps: #1}}
\def\pstverbscale{SDict begin normalscale end}
\def\pstheader#1{\special{header=#1}}
%%
%% In the following, CP is short for currentpoint.
%% The neg is necessary because dvips scales the coordinates by 1 -1.
%% \tx@NET means neg exch neg exch translate.
\def\pstrotate{%
  CP CP translate 3 -1 roll neg rotate \tx@NET}
%%
%% If using a version before 5.47, clipping may not work. You can
%% try the following definition of \pstverb:
%\def\pstverb#1{\special{ps: @beginspecial #1 @endspecial}}
%% or change "{initclip}ifelse" to "if" in the definition of @setspecial
%% in dvips' special.pro.
%%
%% ****************** END Rokicki's dvips *****************************


%% **********************************************************************
%% **** Arbortext's dvips *** Arbortext's dvips *** Arbortext's dvips ***
%% **********************************************************************
%% Thanks to Wolfgang Sienel:
%%
\def\pstdriver{Arbortext's dvips}
\def\pstverb#1{%
  \special{ps::[asis] 0 SPB /ChartCheckPoint save def
  Xpos Ypos translate #1 ChartCheckPoint restore 0 SPE}}
\def\pstunit{1bp}
\def\pstVerb#1{\special{ps:: #1}}
\def\pstverbscale{}
\def\pstrotate{CP CP translate 3 -1 roll rotate \tx@NET}
\def\pstheader#1{%
  \typeout{**********************************************************}%
  \typeout{** Don't forget to include #1 when printing:}%
  \typeout{** \space\space dvips -PRO #1 myfile}%
  \typeout{**********************************************************}}
%%
%% Comments by Wolfgang on header files:
%%  Normally the  standard prolog file is  downloaded once to the printer
%%  with psload.ps (the initializing  file for your  TeX-printer)  before
%%  printing  TeX-documents.  If you don't  make any changes to psload.ps
%%  you  have  to type  dvips -PRO PATH/pstricks.pro myfile   (-PRO  just
%%  works for  UNIX systems.  I don't have any idea about other systems).
%%  If psload.ps  was not  downloaded to the  printer  you have to append
%%  pstricks.pro  to  the standard  prolog  file dvips.pro.  In this case
%%  invoke  dvips as always.   Note that after hitting  the enter key you
%%  have to specify the option download all prolog in both cases.  If you
%%  are frequently using pstricks you might want to change psload.ps.  In
%%  this case contact your local TeX-guru and ask him politely to do this
%%  for you. Attention: If psload.ps is getting too big you may run  into
%%  trouble with printer memory!
%%
%% ****************** END Arbortext's dvips *****************************


%% **********************************************************************
%% **** Textures *** Textures *** Textures *** Textures *** Textures ****
%% **********************************************************************
%% These have been tested with v1.3. It is nice to have a PostScript
%% screen previewer, such as TScript (USA: 1-617-734-9700). (The
%% Textures preview window will not show the PSTricks graphics.)
%%
\def\pstdriver{Textures}
\def\pstunit{1bp}
\def\pstverb#1{\special{postscript /TX@Save save def #1 TX@save restore}}
\def\pstVerb#1{\special{postscript grestore #1 gsave}}
\def\pstverbscale{Mag 1000 div 72.27 72 div mul dup neg scale}
\def\pstrotate{%
  CP CP translate 3 -1 roll neg rotate \tx@NET}
%%
%% \pstVerb does not define the currentpoint properly. As a workaround,
%% insert the following lines in the customization section above.
%%
%%   \def\pst@Verb#1{%
%%     \special{postscript \pst@dict /sps { moveto /Mag ed } def
%%       userdict begin}%
%%     \special{postscript #1 end gsave}}
%%
%% Textures does not support header files.
%% However, it may still be worth using a header file for increased speed.
%% Also, some macros can overload Textures 1.3 when not used with a header
%% file. You can include the header file pstricks.pro by saving the
%% PostScript output to a file and inserting the pstricks.pro with an
%% editor. Probably a better solution is to append pstricks.pro to a
%% copy of the laserprep, and, by changing file names of the modified
%% laserprep and the original laserprep, use the laserprep with pstricks.pro
%% whenever you are printing pstricks documents.
\def\pstheader#1{%
  \typeout{******************************************}%
  \typeout{*** Include header file #1!! ***}%
  \typeout{******************************************}}
%%
%% ****************** END Textures **************************************


%% **********************************************************************
%% ***** dvi2ps ***** dvi2ps ***** dvi2ps ***** dvi2ps ***** dvi2ps *****
%% **********************************************************************
%% I.e., dvi2ps, v2.xx. There are lot's of such things around.
%% This probably doesn't work. Considering upgrading to Rokicki's dvips.
%%
\def\pstdriver{dvi2ps v2.xx}
\def\pstunit{1pt}
\def\pstverb#1{ pstext="save currentpoint translate
  Resolution 72.27 div neg scale #1 restore" \space}
\def\pstVerb#1{ pstext="#1" \space}
\def\pstverbscale{Resolution 72.27 div neg scale}
\def\pstrotate{%
  CP CP translate 3 -1 roll neg rotate \tx@NET}
\def\pstheader#1{%
  \typeout{******************************************************}
  \typeout{Don't forget to include the header file #1!!}
  \typeout{******************************************************}
%%
%% ***************************** END dvi2ps *****************************


%% **********************************************************************
%% ***** dvi3ps ***** dvi3ps ***** dvi3ps ***** dvi3ps ***** dvi3ps *****
%% **********************************************************************
%% I.e., dvi2ps, version 3.xx, by Kevin Coombes.
%% This has not been tested. Consider upgrading to Rokicki's dvips.
%%
\def\pstdriver{dvi2ps v3.xx}
\def\pstunit{1bp}
\def\pstverb#1{pstext="#1"}
% \def\pstVerb#1{%
%   \special{pstext="@endspecial #1 @beginspecial @setspecial"}}  % v3.0
\def\pstVerb#1{\special{psraw="#1"}}                            % v3.3
\def\pstverbscale{Resolution 72.27 div neg scale}
\def\pstrotate{%
  CP CP translate 3 -1 roll neg rotate \tx@NET}
\def\pstheader#1{%
  \typeout{******************************************************}
  \typeout{Don't forget to include the header file #1!!}
  \typeout{******************************************************}
%%
%% ******************* END dvi3ps ***************************************


%% **********************************************************************
%% **** OzTeX **** OzTeX **** OzTeX **** OzTeX **** OzTeX **** OzTeX ****
%% **********************************************************************
%% Only the pure graphics objects are supported for OzTeX.
%% No color, rotation, clipping, nodes and node connections, overlays, etc.
%% Also, \rput cannot be used with \SpecialCoor.
%%
%% The reason is given in the documentation for Version 1.3, September 1990:
%%
%%   OzTeX generates highly efficient PostScript code but it does so at
%%   the expense of some \special functionality. Many DVI-to-PostScript
%%   translators allow you to do things like use one \verb|\special| to start
%%   rotating TeX text and another to stop the rotation. The way OzTeX
%%   interprets a DVI page makes this impossible.
%%
%% If using the header file, you should copy pstricks.pro to global.ps, in
%% the same directory as your dvi file.
%%
\def\pstdriver{OzTeX}
\def\pstverb#1{\special{null.ps #1}}
\def\pstunit{1bp}
\def\pstVerb#1{%
  \typeout{PSTRICKS WARNING:}%
  \typeout{\space\space You are using features not supported by OzTeX.}%
  \typeout{\space\space These will be ignored.}%
  \gdef\pstVerb##1{}}
\def\pstverbscale{}
\def\pstrotate{}
\def\pstheader#1{%
  \typeout{******************************************************}
  \typeout{Don't forget to include the header file #1!!}
  \typeout{******************************************************}}
%%
%% ************************* END OzTeX **********************************


%% **********************************************************************
%% ***** DirectTeX ***** DirectTeX ***** DirectTeX ***** DirectTeX ******
%% **********************************************************************
%% DirectTeX is for the Macintosh. These has been tested unsuccessfully,
%% apparently due to a problem with DirectTeX.
%%
\def\pstdriver{DirectTeX}
%%
%% Check catcode of "
{\catcode`\"=12\gdef\pstverb#1{\special{" #1 /Foo{}def }}}
\def\pstunit{1bp}
\def\pstVerb#1{\special{ps: #1 }}
\def\pstverbscale{TeXDict begin normalscale end}
%%
%% In the following, CP is short for currentpoint. The neg is necessary
%% because dvips scales the coordinates by 1 -1:
\def\pstrotate{%
  CP CP translate 3 -1 roll neg rotate \tx@NET}
%%
\def\pstheader#1{%
  \typeout{**********************************************************}%
  \typeout{** Don't forget to include #1 when printing:}%
  \typeout{** \space\space DVIReader -header #1 myfile}%
  \typeout{**********************************************************}}
%%
%% ****************** END DirectTeX *****************************


%%
%% END: pstricks.con