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
|
%% BEGIN: pstricks.con (for xdvipdfmx driver)
%%
%% Configuration file for PSTricks 97
%%
%% Version 0.01 (2007/03/11)
%%
%% For use with xdvipdfmx
\def\pstdriver{xdvipdfmx}
\def\pstverb#1{\special{pst: #1}} % Check catcode of "
\def\pstunit{1bp}%
\def\pstVerb#1{\immediate\special{PST: #1}}
\def\pstverbscale{72.27 72 div dup scale }
% 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 xdvipdfmx *****************************
%%%%%%%%%%%%%%%%%%% !! 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.
\def\c@lor@to@ps#1 #2\@@{\csname c@lor@ps@#1\endcsname#2 \@@}
\def\c@lor@ps@#1 #2\@@{TeXDict begin #1 end}
\def\c@lor@ps@rgb#1\@@{#1 setrgbcolor}
\def\c@lor@ps@hsb#1\@@{#1 sethsbcolor}
\def\c@lor@ps@cmyk#1\@@{#1 setcmykcolor}
\def\c@lor@ps@gray#1\@@{#1 setgray}
\pstcustomize
\pstVerb{ /.setopacityalpha pop def }
\def\@@scalebox{%
\leavevmode
\hbox{%
\ifdim\pst@tempd\p@<\z@
\pst@dimg=\pst@tempd\ht\pst@hbox
\pst@dimh=\pst@tempd\dp\pst@hbox
\dp\pst@hbox=-\pst@dimg
\ht\pst@hbox=-\pst@dimh
\else
\ht\pst@hbox=\pst@tempd\ht\pst@hbox
\dp\pst@hbox=\pst@tempd\dp\pst@hbox
\fi
\pst@dima=\pst@tempc\wd\pst@hbox
\ifdim\pst@dima<\z@\kern-\pst@dima\fi
\special{x: bscale \pst@tempc \pst@tempd}%
\hbox to \z@{\box\pst@hbox\hss}%
\special{x: escale}%
\ifdim\pst@dima>\z@\kern\pst@dima\fi}}
\let\ps@@scalebox\@@scalebox
\def\begin@psclip{\special{x: gsave}}
\def\end@psclip{\special{x: grestore}}
\def\@newcolor#1#2#3{%
\expandafter\edef\csname #1\endcsname{\noexpand\pst@color{#2}}%
\expandafter\edef\csname\string\color@#1\endcsname{#2}% hv 1.14 2005-12-17
\expandafter\edef\csname\string\color@xetex@#1\endcsname{#3}%
\ignorespaces}
\def\newgray#1#2{%
\pst@checknum{#2}\pst@tempg
\@newcolor{#1}{\pst@tempg setgray}{gray \pst@tempg}%
}
\def\newrgbcolor#1#2{%
\pst@expandafter\pst@getnumiii{#2} {} {} {} {}\@nil
\@newcolor{#1}{\pst@tempg \pst@temph \pst@tempi setrgbcolor}{rgb \pst@tempg \pst@temph \pst@tempi}%
}
\def\newhsbcolor#1#2{%
\pst@expandafter\pst@getnumiii{#2} {} {} {} {}\@nil
\@newcolor{#1}{\pst@tempg \pst@temph \pst@tempi sethsbcolor}{hsb \pst@tempg \pst@temph \pst@tempi}%
}
\def\newcmykcolor#1#2{%
\pst@expandafter\pst@getnumiv{#2} {} {} {} {} {}\@nil
\@newcolor{#1}{\pst@tempg \pst@temph \pst@tempi \pst@tempj setcmykcolor}%
{cmyk \pst@tempg \pst@temph \pst@tempi \pst@tempj}%
}
\newgray{black}{0}
\newgray{darkgray}{.25}
\newgray{gray}{.5}
\newgray{lightgray}{.75}
\newgray{white}{1}
\newrgbcolor{red}{1 0 0}
\newrgbcolor{green}{0 1 0}
\newrgbcolor{blue}{0 0 1}
\newrgbcolor{yellow}{1 1 0}
\newrgbcolor{cyan}{0 1 1}
\newrgbcolor{magenta}{1 0 1}
\@ifundefined{LaTeXe}%
{\def\current@@@@color{\csname\string\color@xetex@\psfillcolor\endcsname}}{%
\AtBeginDocument{\@ifpackageloaded{xcolor}{\def\current@@@@color{\psfillcolor}}%
{\def\current@@@@color{\csname\string\color@\psfillcolor\endcsname}}}}
\def\pst@starbox{%
\setbox\pst@hbox\hbox{{%
\def\current@color{\current@@@@color}%
\dimen@\wd\pst@hbox\advance\dimen@2\psframesep\wd\pst@hbox\dimen@%
\dimen@\ht\pst@hbox\advance\dimen@\psframesep\ht\pst@hbox\dimen@%
\dimen@\dp\pst@hbox\advance\dimen@\psframesep\dp\pst@hbox\dimen@%
\@ifundefined{LaTeXe}{\special{color push \current@color}%
\rlap{\vrule width\wd\pst@hbox height\ht\pst@hbox depth\dp\pst@hbox}%
\special{color pop}}%
{\color@block{\wd\pst@hbox}{\ht\pst@hbox}{\dp\pst@hbox}}}%
\rlap{\hskip\psframesep\unhbox\pst@hbox}}}
\def\AltClipMode{}
\def\putoverlaybox#1{%
\hbox{\special{x: gsave}\special{x: initoverlay #1}\copy\theoverlaybox\special{x: grestore}}}
\def\pst@overlay#1{\edef\curr@overlay{#1}\special{x: clipoverlay #1}\aftergroup\pst@endoverlay}
\def\pst@endoverlay{\special{x: clipoverlay \curr@overlay}}
\def\AltOverlayMode{}
%The next line is not necessary, if pstricks.sty of [2007/02/18 v0.33] or newer is used.
\@ifundefined{LaTeXe}{}{\AtBeginDocument{\psset{fillcolor=white}}}
\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
%%
%% END: pstricks.con
|