summaryrefslogtreecommitdiff
path: root/dviware/dvidjc/example/colordjc.tex
blob: f4eed8efb3d0b7a8a77d2bb0304b7bcd00f017a3 (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
% This is COLORDJC.STY(TEX) in text format, as of January 12, 1994,
% by Friedhelm Sowa, sowa@convex.rz.uni-duesseldorf.de
% The macros guarantee compatibility between the dvips driver
% and the dvidjc driver.
%
% Base is colordvi.sty, written by Jim Hafner, modified by Tom Rokicki.
%
\def\newColor #1 #2{\expandafter\def\csname #1\endcsname##1{\special
   {color push cmyk #2}##1\special{color pop}}
   \expandafter\def\csname text#1\endcsname{\subdef{#1}
    \special{color #1}}}%
%
% Here are the color names and their PANTONE match (approximately)
%
\newColor GreenYellow {0.15 0 0.69 0 }    % GreenYellow  Approximate PANTONE 388
\newColor Yellow {0 0 1 0 }               % Yellow  Approximate PANTONE YELLOW
\newColor Goldenrod {0 0.10 0.84 0 }      % Goldenrod  Approximate PANTONE 109
\newColor Dandelion {0 0.29 0.84 0 }      % Dandelion  Approximate PANTONE 123
\newColor Apricot {0 0.32 0.52 0 }        % Apricot  Approximate PANTONE 1565
\newColor Peach {0 0.50 0.70 0 }          % Peach  Approximate PANTONE 164
\newColor Melon {0 0.46 0.50 0 }          % Melon  Approximate PANTONE 177
\newColor YellowOrange {0 0.42 1 0 }      % YellowOrange  Approximate PANTONE 130
\newColor Orange {0 0.61 0.87 0 }         % Orange  Approximate PANTONE ORANGE-021
\newColor BurntOrange {0 0.51 1 0 }       % BurntOrange  Approximate PANTONE 388
\newColor Bittersweet {0 0.75 1 0.24 }    % Bittersweet  Approximate PANTONE 167
\newColor RedOrange {0 0.77 0.87 0 }      % RedOrange  Approximate PANTONE 179
\newColor Mahogany {0 0.85 0.87 0.35 }    % Mahogany  Approximate PANTONE 484
\newColor Maroon {0 0.87 0.68 0.32 }      % Maroon  Approximate PANTONE 201
\newColor BrickRed {0 0.89 0.94 0.28 }    % BrickRed  Approximate PANTONE 1805
\newColor Red {0 1 1 0 }                  % Red  VERY-Approx PANTONE RED
\newColor OrangeRed {0 1 0.50 0 }         % OrangeRed  No PANTONE match
\newColor RubineRed {0 1 0.13 0 }         % RubineRed  Approximate PANTONE RUBINE-RED
\newColor WildStrawberry {0 0.96 0.39 0 } % WildStrawberry  Approximate PANTONE 206
\newColor Salmon {0 0.53 0.38 0 }         % Salmon  Approximate PANTONE 183
\newColor CarnationPink {0 0.63 0 0 }     % CarnationPink  Approximate PANTONE 218
\newColor Magenta {0 1 0 0 }              % Magenta  Approximate PANTONE PROCESS-MAGENTA
\newColor VioletRed {0 0.81 0 0 }         % VioletRed  Approximate PANTONE 219
\newColor Rhodamine {0 0.82 0 0 }         % Rhodamine  Approximate PANTONE RHODAMINE-RED
\newColor Mulberry {0.34 0.90 0 0.02 }    % Mulberry  Approximate PANTONE 241
\newColor RedViolet {0.07 0.90 0 0.34 }   % RedViolet  Approximate PANTONE 234
\newColor Fuchsia {0.47 0.91 0 0.08 }     % Fuchsia  Approximate PANTONE 248
\newColor Lavender {0 0.48 0 0 }          % Lavender  Approximate PANTONE 223
\newColor Thistle {0.12 0.59 0 0 }        % Thistle  Approximate PANTONE 245
\newColor Orchid { 0.32 0.64 0 0 }        % Orchid  Approximate PANTONE 252
\newColor DarkOrchid {0.40 0.80 0.20 0 }  % DarkOrchid  No PANTONE match
\newColor Purple {0.45 0.86 0 0 }         % Purple  Approximate PANTONE PURPLE
\newColor Plum {0.50 1 0 0 }              % Plum  VERY-Approx PANTONE 518
\newColor Violet {0.79 0.88 0 0 }         % Violet  Approximate PANTONE VIOLET
\newColor RoyalPurple {0.75 0.90 0 0 }    % RoyalPurple  Approximate PANTONE 267
\newColor BlueViolet {0.86 0.91 0 0.04 }  % BlueViolet  Approximate PANTONE 2755
\newColor Periwinkle {0.57 0.55 0 0 }     % Periwinkle  Approximate PANTONE 2715
\newColor CadetBlue {0.62 0.57 0.23 0 }   % CadetBlue  Approximate PANTONE (534+535)/2
\newColor CornflowerBlue {0.65 0.13 0 0 } % CornflowerBlue  Approximate PANTONE 292
\newColor MidnightBlue {0.98 0.13 0 0.43 }% MidnightBlue  Approximate PANTONE 302
\newColor NavyBlue {0.94 0.54 0 0 }       % NavyBlue  Approximate PANTONE 293
\newColor RoyalBlue {1 0.50 0 0 }         % RoyalBlue  No PANTONE match
\newColor Blue {1 1 0 0 }                 % Blue  Approximate PANTONE BLUE-072
\newColor Cerulean {0.94 0.11 0 0 }       % Cerulean  Approximate PANTONE 3005
\newColor Cyan {1 0 0 0 }                 % Cyan  Approximate PANTONE PROCESS-CYAN
\newColor ProcessBlue {0.96 0 0 0 }       % ProcessBlue  Approximate PANTONE PROCESS-BLUE
\newColor SkyBlue {0.62 0 0.12 0 }        % SkyBlue  Approximate PANTONE 2985
\newColor Turquoise {0.85 0 0.20 0 }      % Turquoise  Approximate PANTONE (312+313)/2
\newColor TealBlue {0.86 0 0.34 0.02 }    % TealBlue  Approximate PANTONE 3145
\newColor Aquamarine {0.82 0 0.30 0 }     % Aquamarine  Approximate PANTONE 3135
\newColor BlueGreen {0.85 0 0.33 0 }      % BlueGreen  Approximate PANTONE 320
\newColor Emerald {1 0 0.50 0 }           % Emerald  No PANTONE match
\newColor JungleGreen {0.99 0 0.52 0 }    % JungleGreen  Approximate PANTONE 328
\newColor SeaGreen {0.69 0 0.50 0 }       % SeaGreen  Approximate PANTONE 3268
\newColor Green {1 0 1 0 }                % Green  VERY-Approx PANTONE GREEN
\newColor ForestGreen {0.91 0 0.88 0.12 } % ForestGreen  Approximate PANTONE 349
\newColor PineGreen {0.92 0 0.59 0.25 }   % PineGreen  Approximate PANTONE 323
\newColor LimeGreen {0.50 0 1 0 }         % LimeGreen  No PANTONE match
\newColor YellowGreen {0.44 0 0.74 0 }    % YellowGreen  Approximate PANTONE 375
\newColor SpringGreen {0.26 0 0.76 0 }    % SpringGreen  Approximate PANTONE 381
\newColor OliveGreen {0.64 0 0.95 0.40 }  % OliveGreen  Approximate PANTONE 582
\newColor RawSienna {0 0.72 1 0.45 }      % RawSienna  Approximate PANTONE 154
\newColor Sepia {0 0.83 1 0.70 }          % Sepia  Approximate PANTONE 161
\newColor Brown {0 0.81 1 0.60 }           % Brown  Approximate PANTONE 1615
\newColor Tan {0.14 0.42 0.56 0 }         % Tan  No PANTONE match
\newColor Gray {0 0 0 0.50 }              % Gray  Approximate PANTONE COOL-GRAY-8
\newColor Black {0 0 0 1 }                % Black  Approximate PANTONE PROCESS-BLACK
\newColor White {0 0 0 0 }                % White  No PANTONE match

% Now we make sure that we initialize the global color to Black
\subdef{Black}

% Here we have a macro for typesetting a coloured graphic. Colour
% separation is assumed to be done by bm2font version 3.0.
% When using bitmap files instead of TeXfonts it should work in a
% similar way.
\def\loadcmykpic[#1,#2,#3,#4]{
\input{#1}
\input{#2}
\input{#3}
\input{#4}
}

\def\cmykpic[#1,#2,#3,#4]{%
\ifvmode\leavevmode\fi
\dimen0\expandafter\ht\csname #4box\endcsname%
\vbox to\dimen0{\hsize=\wd0\offinterlineskip\parindent0pt%
\Cyan{\expandafter\copy\csname #1box\endcsname}\vskip-\dimen0
\Magenta{\expandafter\copy\csname #2box\endcsname}\vskip-\dimen0
\Yellow{\expandafter\copy\csname #3box\endcsname}\vskip-\dimen0
\Black{\expandafter\copy\csname #4box\endcsname}\vss}
}

\def\fcmykpic[#1,#2,#3,#4]{%
\ifvmode\leavevmode\fi
\dimen0\expandafter\ht\csname #4box\endcsname
\ifx\frame\undefined
\vbox{%
\hsize\expandafter\wd\csname #4box\endcsname
\advance\hsize .8pt \hrule%
\hbox to\hsize%
{\vrule\hfill\vbox to\dimen0{\offinterlineskip%
\Cyan{\expandafter\copy\csname #1box\endcsname}\vskip-\dimen0
\Magenta{\expandafter\copy\csname #2box\endcsname}\vskip-\dimen0
\Yellow{\expandafter\copy\csname #3box\endcsname}\vskip-\dimen0
\Black{\expandafter\copy\csname #4box\endcsname}
}\hfill\vrule}\hrule\vss}
\else
\frame{\vbox to\dimen0{\hsize=\wd0\offinterlineskip%
\Cyan{\expandafter\copy\csname #1box\endcsname}\vskip-\dimen0
\Magenta{\expandafter\copy\csname #2box\endcsname}\vskip-\dimen0
\Yellow{\expandafter\copy\csname #3box\endcsname}\vskip-\dimen0
\Black{\expandafter\copy\csname #4box\endcsname}\vss}}
\fi
}