Debian Codegraph @

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

raw
1 % $Id: xdvipdfmx.cfg 191 2021-09-05 20:07:31Z herbert $
2 %
3 %% BEGIN: pstricks.con (for dvipdfmx driver)
4 %%
5 %% Configuration file for PSTricks
6 %%
7 %% Version 0.07 (2021/09/05)
8 %%
9 %% For use with dvipdfmx
10 %% Created by SMiyata based on standard pstricks.con from TeXLive distribution.
11 %% This file may be distributed, used and modified freely.
12 %% Modified by Denis Girou, Herbert Voss
13 %%
14 \def\pstdriver{dvipdfmx}%
15 \def\pstverb#1{\special{pst: #1}}% Check catcode of "
16 \def\pstunit{1bp}%
17 \def\pstVerb#1{\immediate\special{PST: #1}}%
18 \def\pstverbscale{72.27 72 div dup scale }%
19 \def\pstnodescale{72 72.27 div dup scale }%
20 % DG/SR modification begin - Apr. 28, 1997 (D. Carlisle + S. Rahtz)
21 % \def\pstheader#1{\special{header=#1}}
22 % We used to check for |\AtBeginDvi|, but that was broken in early release
23 % so we now check for the existence of |\textsuperscript| (added 1995/05/16)
24 \ifx\textsuperscript\@undefined
25 \def\pstheader#1{\special{header=#1}}%
26 \else
27 \ifx\Gin@PS@file@header\@undefined
28 \def\pstheader#1{\AtBeginDvi{\special{header=#1}}}%
29 \else
30 \let\pstheader\Gin@PS@file@header%
31 \fi
32 \fi
33 % DG/SR modification end
34 %
35 %%
36 %%
37 %% In the following, CP is short for currentpoint.
38 %% The neg is necessary because dvips scales the coordinates by 1 -1.
39 %% \tx@NET means neg exch neg exch translate.
40 \def\pstrotate{CP CP translate 3 -1 roll neg rotate \tx@NET}%
41 %%
42 %% ****************** END dvipdfmx *****************************
43
44
45 %%%%%%%%%%%%%%%%%%% !! CUSTOMIZATION STUFF GOES HERE: !! %%%%%%%%%%%%%%%%%%
46 %% If you want to include your own customizations to pstricks.tex, then
47 %% uncomment the \pstcustomize command, and include your modifications
48 %% after \pstcustomize. These will be read in after pstricks.tex.
49 \def\c@lor@to@ps#1 #2\@@{\csname c@lor@ps@#1\endcsname#2 \@@}%
50 \def\c@lor@ps@#1 #2\@@{TeXDict begin #1 end}%
51 \def\c@lor@ps@rgb#1\@@{#1 setrgbcolor}%
52 \def\c@lor@ps@hsb#1\@@{#1 sethsbcolor}%
53 \def\c@lor@ps@cmyk#1\@@{#1 setcmykcolor}%
54 \def\c@lor@ps@gray#1\@@{#1 setgray}%
55 \pstcustomize
56 \typeout{Using PSTricks configuration for LaTeX+dvipdfmx}%
57 \def\@@scalebox{%
58 \leavevmode
59 \hbox{%
60 \ifdim\pst@tempd\p@<\z@
61 \pst@dimg=\pst@tempd\ht\pst@hbox
62 \pst@dimh=\pst@tempd\dp\pst@hbox
63 \dp\pst@hbox=-\pst@dimg
64 \ht\pst@hbox=-\pst@dimh
65 \else
66 \ht\pst@hbox=\pst@tempd\ht\pst@hbox
67 \dp\pst@hbox=\pst@tempd\dp\pst@hbox
68 \fi
69 \pst@dima=\pst@tempc\wd\pst@hbox
70 \ifdim\pst@dima<\z@\kern-\pst@dima\fi
71 \special{x: bscale \pst@tempc \pst@tempd}%
72 \hbox to \z@{\box\pst@hbox\hss}%
73 \special{x: escale}%
74 \ifdim\pst@dima>\z@\kern\pst@dima\fi}}%
75 %
76 \let\ps@@scalebox\@@scalebox
77 \def\ps@rotateleft#1{%
78 \leavevmode\hbox{\hskip\ht#1\hskip\dp#1\vbox{\vskip\wd#1%
79 \pst@Verb{90 \tx@RotBegin}%
80 \vbox to \z@{\vss\hbox to \z@{\box#1\hss}\vskip\z@}%
81 \pst@Verb{\tx@RotEnd}}}}%
82 %
83 \def\ps@rotateright#1{%
84 \leavevmode\hbox{%
85 \hskip\ht#1\hskip\dp#1\vbox{\vskip\wd#1%
86 \pst@Verb{-90 \tx@RotBegin}%
87 \vbox to \z@{\hbox to \z@{\hss\box#1}\vss}%
88 \pst@Verb{\tx@RotEnd}}}}%
89 %
90 \def\ps@rotatedown#1{%
91 \hbox{\hskip\wd#1\vbox{\vskip\ht#1\vskip\dp#1%
92 \pst@Verb{180 \tx@RotBegin}%
93 \vbox to \z@{\hbox to \z@{\box#1\hss}\vss}%
94 \pst@Verb{\tx@RotEnd}}}}%
95 %
96 \def\begin@psclip{\special{x: gsave}}%
97 \def\end@psclip{\special{x: grestore}}%
98 \def\@newcolor#1#2#3{%
99 \expandafter\edef\csname #1\endcsname{\noexpand\pst@color{#2}}%
100 \expandafter\edef\csname\string\color@#1\endcsname{#2}% hv 1.14 2005-12-17
101 \expandafter\edef\csname\string\color@xetex@#1\endcsname{#3}%
102 \ignorespaces}%
103 %
104 \def\newgray#1#2{%
105 \pst@checknum{#2}\pst@tempg
106 \@newcolor{#1}{\pst@tempg setgray}{gray \pst@tempg}%
107 }
108 \def\newrgbcolor#1#2{%
109 \pst@expandafter\pst@getnumiii{#2} {} {} {} {}\@nil
110 \@newcolor{#1}{\pst@tempg \pst@temph \pst@tempi setrgbcolor}{rgb \pst@tempg \pst@temph \pst@tempi}%
111 }%
112 \def\newhsbcolor#1#2{%
113 \pst@expandafter\pst@getnumiii{#2} {} {} {} {}\@nil
114 \@newcolor{#1}{\pst@tempg \pst@temph \pst@tempi sethsbcolor}{hsb \pst@tempg \pst@temph \pst@tempi}%
115 }%
116 \def\newcmykcolor#1#2{%
117 \pst@expandafter\pst@getnumiv{#2} {} {} {} {} {}\@nil
118 \@newcolor{#1}{\pst@tempg \pst@temph \pst@tempi \pst@tempj setcmykcolor}%
119 {cmyk \pst@tempg \pst@temph \pst@tempi \pst@tempj}%
120 }%
121 \newgray{black}{0}%
122 \newgray{darkgray}{.25}%
123 \newgray{gray}{.5}%
124 \newgray{lightgray}{.75}%
125 \newgray{white}{1}%
126 \newrgbcolor{red}{1 0 0}%
127 \newrgbcolor{green}{0 1 0}%
128 \newrgbcolor{blue}{0 0 1}%
129 \newrgbcolor{yellow}{1 1 0}%
130 \newrgbcolor{cyan}{0 1 1}%
131 \newrgbcolor{magenta}{1 0 1}%
132
133 \@ifundefined{LaTeXe}%
134 {\def\current@@@@color{\csname\string\color@xetex@\psfillcolor\endcsname}}{%
135 \AtBeginDocument{\@ifpackageloaded{xcolor}{\def\current@@@@color{\psfillcolor}}%
136 {\def\current@@@@color{\csname\string\color@\psfillcolor\endcsname}}}}%
137 %
138 \iffalse
139 \def\pst@starbox{%
140 \setbox\pst@hbox\hbox{{%
141 \def\current@color{\current@@@@color}%
142 \dimen@\wd\pst@hbox\advance\dimen@2\psframesep\wd\pst@hbox\dimen@%
143 \dimen@\ht\pst@hbox\advance\dimen@\psframesep\ht\pst@hbox\dimen@%
144 \dimen@\dp\pst@hbox\advance\dimen@\psframesep\dp\pst@hbox\dimen@%
145 \@ifundefined{LaTeXe}{\special{color push \current@color}%
146 \rlap{\vrule width\wd\pst@hbox height\ht\pst@hbox depth\dp\pst@hbox}%
147 \special{color pop}}%
148 {\color@block{\wd\pst@hbox}{\ht\pst@hbox}{\dp\pst@hbox}}}%
149 \rlap{\hskip\psframesep\unhbox\pst@hbox}}}
150 \fi
151 %
152 \def\AltClipMode{}%
153 %
154 \def\putoverlaybox#1{%
155 \hbox{\special{x: gsave}\special{x: initoverlay #1}\copy\theoverlaybox\special{x: grestore}}}%
156 %
157 \def\pst@overlay#1{\edef\curr@overlay{#1}\special{x: clipoverlay #1}\aftergroup\pst@endoverlay}%
158 \def\pst@endoverlay{\special{x: clipoverlay \curr@overlay}}%
159 \def\AltOverlayMode{}%
160 %The next line is not necessary, if pstricks.sty of [2007/02/18 v0.33] or newer is used.
161 \@ifundefined{LaTeXe}{}{\AtBeginDocument{\psset{fillcolor=white}}}%
162 %
163 \endinput
164 %
165 %
166 %%%%%%%%%%%%%%%% DESCRIPTION OF CONFIGURATION DEFINITIONS %%%%%%%%%%%%%%%
167
168 Here are the commands that must be defined in this file:
169
170 \pstverb{} - The argument is included as verbatim PostScript,
171 grouped by save and restore. The coordinate system
172 should be square, not rotated, and with the origin
173 at TeX's currentpoint.
174
175 \pstVerb{} - The argument is included as verbatim PostScript, not
176 grouped by (g)save and (g)restore. The currentpoint
177 should be TeX's currentpoint.
178
179 \pstunit - The units used by driver for graphics included with
180 \pstverb. Probably 1bp or 1sp.
181
182 \pstverbscale - The PostScript code that scales the coordinate system
183 from that in effect with \pstVerb to that in effect
184 with \pstverb. Should not translate to the currentpoint.
185
186 \pstrotate - The PostScript code that takes a number off the stack
187 and rotates the axes properly. I.e.,
188 \pstVerb{angle \pstrotate} is used to begin rotations.
189
190 \pstheader{} - The argument is a header file (e.g., .pro file).
191 If your driver does not support such a special, then
192 the command might just remind you to include the header
193 when printing. You can use PSTricks without a header,
194 in which case it does not matter how you define
195 \pstheader. See read-me.pst for details.
196 If you cannot change the default directory where your
197 driver looks for header files, and you cannot write to
198 that directory, then you include the path for your
199 PSTricks header files.
200 E.g., \def\pstheader#1{\special{header=~/tex/#1}}.
201
202 \pstdriver - The name of the driver.
203
204
205 %%%%%%%%% !! HOW TO MAKE A TEX FORMAT WITH PSTRICKS PRELOADED !! %%%%%%%%
206
207 See your local TeX documentation for instructions on creating a TeX format.
208
209 Before making the format, be sure that this configuration file is correct.
210 It will be read only when creating the format, and not with every job.
211
212 If you are not using header files, there are no more special instructions.
213
214 Special instructions when using header files:
215
216 - If you want to include supplementary PSTricks files (e.g., pst-node.tex),
217 add \input commands in the customization section above.
218
219 - If your definition of \pstheader is, e.g.
220
221 \def\pstheader#1{\special{\header=#1}}
222
223 then change it to
224
225 \def\pstheader#1{%
226 \expandafter\everyjob\expandafter{\the\everyjob
227 \special{header=#1}}}
228
229 and put your original definition in the customization section, AFTER
230 any \input commands. E.g., the customization section might look like:
231
232 \pstcustomize
233 \input pst-node.tex
234 \input pst-coil.tex
235 \def\pstheader#1{\special{header=#1}}
236
237 - Input pstricks.tex at the appropriate time when creating the format.
238 E.g., when initex stops running:
239 *\input pstricks
240 *\dump
241
242
243 %%
244 %% END: pstricks.con