summaryrefslogtreecommitdiff
path: root/macros/generic/diagrams/xypic/texinputs/xyps-c.tex
blob: e471ede76d6c5e94ece2858cdfce6590483d3352 (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
%% xyps-c.tex from $Id: xyps-c.doc,v 3.11 2011/03/14 20:14:00 krisrose Exp $
%%
%% Xy-pic ``Colour extension'' PostScript backend support.
%% Copyright (c) 1993-1996 Ross Moore <ross.moore@mq.edu.au>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-2011 Kristoffer H. Rose <krisrose@tug.org>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, see http://www.gnu.org/licenses/.
%%
%% As a special exception, you may use this file and all files derived
%% from it without restrictions. This special exception was added with
%% version 3.7 of Xy-pic.
%%
\expandafter\ifx\csname xyps-cloaded\endcsname\empty
 \message{not reloaded}\endinput \fi
\expandafter\let\csname xyps-cloaded\endcsname=\empty \xycatcodes
\expandafter\ifx \csname xyps-sloaded\endcsname\empty\else
 \xyinputorelse@{xyps-s}{\xyerror@{Could not load xyps-s}{}}%
 \xycatcodes\fi
\xydef@\UsePScolor{\installPScolor@}
\xydef@\NoPScolor{\UnloadColor@}
\xydef@\installPScolor@{\installPSstyle@
 \let\xymath@=\xyPSmath@ \let\xynomath@=\xyPSnomath@
 \let\checkxyPScolor@=\checkxyPScolor@@
 \let\xycolor@@=\xyPScolor@@
 \xystandardcolors@ 
 \xyuncatcodes }
\xydef@\xyPSmath@{\hbox\bgroup\dimen@=.55ex \checkxyPScolor@ \xyinside@}
\xydef@\xyPSnomath@{\hbox\bgroup\dimen@=\z@ \checkxyPScolor@ \xyinside@}
\xydef@\checkxyPScolor@@{\xycolor@raw@@{}\let\checkxyPScolor@=\relax}
\xylet@\checkxyPScolor@=\relax
\xydef@\xyPSnewcolor@#1#2#3#4#5{%
 \expandafter\DN@\expandafter{\csname shape [#1]\endcsname}%
 \DNii@{\relax}\ifx\next@\nextii@\newxycolor{#1}{}\relax\fi
 \DNii@{#4}\ifx\nextii@\empty
 \expandafter\DNii@\expandafter{\csname xyPSshape@#1@\endcsname}%
 \expandafter\def\nextii@{\xyPScolor@{#2 #3}}\else
 \expandafter\DNii@\expandafter{\csname xyPSshape@#1@\endcsname}%
 \expandafter\def\nextii@{\xyPScolor@{#4}}\fi
 \ifx\nextii@\empty\expandafter\def\next@{\xyPSnotimplemented@@`#1'@@}%
 \else
 \edef\tmp@{\noexpand\let\expandafter\noexpand\next@
 \expandafter\noexpand\nextii@}\expandafter\tmp@\fi }
\xydef@\xyPScolor@{\ifPSspecials@\expandafter\xyPScolor@@
 \else\expandafter\eat@\fi}
\xydef@\xyPScolor@@#1{\bgroup \checkXyStyle@ 
 \def\preStyle@@{\expandafter\addtostyletoks@\expandafter{\xyPSpre@}}%
 \def\postStyle@@{\expandafter\addtostyletoks@\expandafter{\xyPSpost@}}%
 \let\modPSboxz@=\modXYstyle@ \xyPS@color@@{#1}%
 \toks@={\egroup\let\xy@style@=\relax \def\Drop@@}%
 \expandafter\addtotoks@\expandafter{\expandafter{\Drop@@}\def\Connect@@}%
 \expandafter\addtotoks@\expandafter{\expandafter{\Connect@@}}%
 \the\toks@ }
\xydef@\xyPS@color@@#1{\xyPSsplitPS@{{#1}cc}{}}
\xydef@\xycolor@raw@@#1{\PSraw@@{xyc}}
\endinput