stockor 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/.rubocop.yml +15 -0
  4. data/Gemfile +3 -1
  5. data/Gemfile.lock +97 -193
  6. data/client/skr/Extension.coffee +8 -4
  7. data/client/skr/api.js +21 -0
  8. data/client/skr/api.scss +148 -0
  9. data/client/skr/api/Components/AddressForm.cjsx +47 -0
  10. data/client/skr/api/Components/Base.coffee +7 -0
  11. data/client/skr/api/Components/SaleHistory.cjsx +32 -0
  12. data/client/skr/api/Components/SingleItemCart.cjsx +30 -0
  13. data/client/skr/api/Models/Base.coffee +10 -0
  14. data/client/skr/api/Models/Cart.coffee +40 -0
  15. data/client/skr/api/Models/Sale.coffee +43 -0
  16. data/client/skr/api/Models/SalesHistory.coffee +17 -0
  17. data/client/skr/api/Models/Sku.coffee +16 -0
  18. data/client/skr/api/SingleItemCheckout.cjsx +99 -0
  19. data/client/skr/api/namespace.js +6 -0
  20. data/client/skr/api/onReady.coffee +23 -0
  21. data/client/skr/components/CreditCardForm.cjsx +35 -0
  22. data/client/skr/components/CustomerFinder.cjsx +0 -3
  23. data/client/skr/components/InvoiceFinder.cjsx +1 -0
  24. data/client/skr/components/LatexSnippets.cjsx +65 -0
  25. data/client/skr/components/LocationChooser.cjsx +5 -1
  26. data/client/skr/components/PrintButton.cjsx +33 -0
  27. data/client/skr/components/PrintFormChooser.cjsx +10 -10
  28. data/client/skr/components/SalesOrderFinder.cjsx +2 -1
  29. data/client/skr/components/SystemSettings.cjsx +69 -9
  30. data/client/skr/components/address/index.js +1 -0
  31. data/client/skr/models/Address.coffee +3 -0
  32. data/client/skr/models/CreditCard.coffee +49 -0
  33. data/client/skr/models/CreditCardGateway.coffee +27 -0
  34. data/client/skr/models/Invoice.coffee +13 -5
  35. data/client/skr/models/Location.coffee +6 -4
  36. data/client/skr/models/Payment.coffee +33 -13
  37. data/client/skr/models/SalesOrder.coffee +7 -3
  38. data/client/skr/models/SequentialId.coffee +17 -0
  39. data/client/skr/models/Sku.coffee +1 -1
  40. data/client/skr/models/TimeEntry.coffee +3 -4
  41. data/client/skr/models/mixins/PrintSupport.coffee +4 -1
  42. data/client/skr/models/mixins/SkuLine.coffee +1 -1
  43. data/client/skr/screens/customer-maint/CustomerMaint.cjsx +1 -2
  44. data/client/skr/screens/customer-projects/CustomerProjects.cjsx +7 -3
  45. data/client/skr/screens/customer-projects/index.scss +1 -0
  46. data/client/skr/screens/fresh-books-import/ApiInfo.cjsx +1 -1
  47. data/client/skr/screens/gl-accounts/GlAccounts.cjsx +1 -1
  48. data/client/skr/screens/gl-transactions/GlTransactions.cjsx +1 -1
  49. data/client/skr/screens/invoice/Invoice.cjsx +9 -17
  50. data/client/skr/screens/invoice/Payment.cjsx +94 -13
  51. data/client/skr/screens/invoice/index.scss +32 -0
  52. data/client/skr/screens/locations/Locations.cjsx +3 -2
  53. data/client/skr/screens/payment-category/PaymentCategory.cjsx +1 -1
  54. data/client/skr/screens/payments/Payments.cjsx +5 -4
  55. data/client/skr/screens/sale-report/SaleReport.cjsx +73 -0
  56. data/client/skr/screens/sale-report/index.js +5 -0
  57. data/client/skr/screens/sale-report/index.scss +9 -0
  58. data/client/skr/screens/sales-order/SalesOrder.cjsx +4 -4
  59. data/client/skr/screens/sku-maint/SkuMaint.cjsx +5 -0
  60. data/client/skr/screens/sku-maint/SkuUomList.cjsx +45 -56
  61. data/client/skr/screens/sku-maint/index.scss +33 -13
  62. data/client/skr/screens/time-invoicing/TimeInvoicing.cjsx +2 -2
  63. data/client/skr/screens/time-tracking/EditEntry.cjsx +2 -4
  64. data/client/skr/screens/time-tracking/TimeTracking.cjsx +1 -1
  65. data/client/skr/screens/vendor-maint/VendorMaint.cjsx +1 -1
  66. data/client/skr/vendor/index.js +2438 -0
  67. data/config/lanes.rb +10 -3
  68. data/config/routes.rb +9 -7
  69. data/config/screens.rb +39 -13
  70. data/db/migrate/20160517032350_create_remove_location_logos.rb +11 -0
  71. data/db/migrate/20160531014306_create_public_skus.rb +7 -0
  72. data/db/migrate/20160604195848_create_null_addresses.rb +9 -0
  73. data/db/migrate/20160605024432_create_sku_associations_views.rb +48 -0
  74. data/db/migrate/20160608023553_create_invoice_payments.rb +9 -0
  75. data/db/migrate/20160620010455_add_payments_to_inv_details.rb +54 -0
  76. data/db/schema.sql +206 -38
  77. data/db/seed.rb +6 -0
  78. data/lib/skr.rb +1 -1
  79. data/lib/skr/access_roles.rb +6 -1
  80. data/lib/skr/concerns/has_gl_transaction.rb +8 -0
  81. data/lib/skr/concerns/inv_extensions.rb +11 -0
  82. data/lib/skr/concerns/is_order_like.rb +3 -3
  83. data/lib/skr/concerns/visible_id_identifier.rb +3 -8
  84. data/lib/skr/configuration.rb +2 -0
  85. data/lib/skr/extension.rb +6 -0
  86. data/lib/skr/handlers/credit_card_gateway.rb +31 -0
  87. data/lib/skr/handlers/invoice_from_time_entries.rb +12 -26
  88. data/lib/skr/handlers/sales.rb +44 -0
  89. data/lib/skr/handlers/sequential_ids.rb +46 -0
  90. data/lib/skr/handlers/skus.rb +36 -0
  91. data/lib/skr/jobs/fresh_books/import.rb +3 -1
  92. data/lib/skr/merchant_gateway.rb +37 -0
  93. data/lib/skr/models/address.rb +7 -5
  94. data/lib/skr/models/bank_account.rb +12 -0
  95. data/lib/skr/models/business_entity.rb +1 -1
  96. data/lib/skr/models/gl_transaction.rb +3 -0
  97. data/lib/skr/models/inv_line.rb +7 -2
  98. data/lib/skr/models/inventory_adjustment.rb +0 -5
  99. data/lib/skr/models/invoice.rb +25 -36
  100. data/lib/skr/models/location.rb +1 -1
  101. data/lib/skr/models/payment.rb +56 -10
  102. data/lib/skr/models/po_receipt.rb +0 -8
  103. data/lib/skr/models/sales_order.rb +7 -2
  104. data/lib/skr/models/sequential_id.rb +6 -1
  105. data/lib/skr/models/sku.rb +3 -0
  106. data/lib/skr/print.rb +1 -0
  107. data/lib/skr/print/context.rb +19 -0
  108. data/lib/skr/print/form.rb +7 -1
  109. data/lib/skr/version.rb +1 -1
  110. data/npm-build/package.json +26 -0
  111. data/npm-build/vendor.js +10 -0
  112. data/npm-build/webpack.config.js +25 -0
  113. data/spec/fixtures/skr/bank_account.yml +9 -0
  114. data/spec/fixtures/skr/customer.yml +10 -0
  115. data/spec/fixtures/skr/inv_line.yml +12 -0
  116. data/spec/fixtures/skr/invoice.yml +17 -0
  117. data/spec/fixtures/skr/payment_category.yml +6 -0
  118. data/spec/fixtures/skr/sales_order.yml +1 -1
  119. data/spec/fixtures/skr/sku.yml +10 -0
  120. data/spec/fixtures/skr/sku_loc.yml +4 -0
  121. data/spec/fixtures/skr/uom.yml +6 -0
  122. data/spec/server/handlers/invoice_from_time_entries_spec.rb +13 -6
  123. data/spec/server/handlers/sequential_ids_spec.rb +22 -0
  124. data/spec/server/models/invoice_spec.rb +36 -0
  125. data/spec/server/models/payment_spec.rb +50 -22
  126. data/spec/server/models/sales_order_spec.rb +12 -0
  127. data/spec/server/print/form_spec.rb +20 -4
  128. data/spec/skr/api/SingleItemCheckoutSpec.cjsx +10 -0
  129. data/spec/skr/screens/sale-report/SaleReportSpec.coffee +5 -0
  130. data/stockor.gemspec +5 -4
  131. data/templates/print/layout.tex.erb +1 -1
  132. data/templates/print/packages/INSTALL +7 -0
  133. data/templates/print/packages/qrcode.sty +3051 -0
  134. data/templates/print/packages/svgnam.def +186 -0
  135. data/templates/print/packages/x11nam.def +352 -0
  136. data/templates/print/packages/xcolor.pro +58 -0
  137. data/templates/print/packages/xcolor.sty +1460 -0
  138. data/templates/print/types/invoice/default.tex.erb +2 -0
  139. data/templates/print/types/invoice/labor.tex.erb +2 -1
  140. data/templates/print/types/invoice/ticket.tex.erb +41 -0
  141. data/templates/print/types/payment/default.tex.erb +13 -12
  142. metadata +78 -12
@@ -0,0 +1,58 @@
1
+ %!
2
+ %%
3
+ %% This is file `xcolor.pro',
4
+ %% generated with the docstrip utility.
5
+ %%
6
+ %% The original source files were:
7
+ %%
8
+ %% xcolor.dtx (with options: `dvips')
9
+ %%
10
+ %% IMPORTANT NOTICE:
11
+ %%
12
+ %% For the copyright see the source file.
13
+ %%
14
+ %% Any modified versions of this file must be renamed
15
+ %% with new filenames distinct from xcolor.pro.
16
+ %%
17
+ %% For distribution of the original source see the terms
18
+ %% for copying and modification in the file xcolor.dtx.
19
+ %%
20
+ %% This generated file may be distributed as long as the
21
+ %% original source files, as listed above, are part of the
22
+ %% same distribution. (The sources need not necessarily be
23
+ %% in the same archive or directory.)
24
+ %%
25
+ %% xcolor.pro (PostScript/dvips header file)
26
+ %% [2016/05/11 v2.12 LaTeX color extensions (UK)]
27
+ %%
28
+ %% ----------------------------------------------------------------
29
+ %% Copyright (C) 2003-2016 by Dr. Uwe Kern <xcolor at ukern dot de>
30
+ %% ----------------------------------------------------------------
31
+ %%
32
+ userdict begin
33
+ /setcmycolor{0 setcmykcolor}def
34
+ /XCbd{bind def}bind def
35
+ /XCed{exch def}XCbd
36
+ /XCdef{exch dup TeXDict exch known{pop pop}{XCed}ifelse}XCbd
37
+ /XCsetcolor{cvx counttomark array astore cvx exch pop XCdef}XCbd
38
+ /XCcmy{mark exch exec/setcmycolor XCsetcolor}XCbd
39
+ /XCcmyk{mark exch exec/setcmykcolor XCsetcolor}XCbd
40
+ /XCgray{mark exch exec/setgray XCsetcolor}XCbd
41
+ /XChsb{mark exch exec/sethsbcolor XCsetcolor}XCbd
42
+ /XCrgb{mark exch exec/setrgbcolor XCsetcolor}XCbd
43
+ /XCfixnormalscale{/normalscale{Resolution 72 div VResolution 72 div neg
44
+ scale magscale{DVImag dup scale}if}def}def
45
+ /XC!b{save XCfixnormalscale}XCbd
46
+ /XC!e{restore}XCbd
47
+ /XCsp2bp{1 65781.76 div dup scale}XCbd
48
+ /XCsetline
49
+ {setlinewidth [] 0 setdash 2 setlinecap 0 setlinejoin 4 setmiterlimit}XCbd
50
+ /XCboxframe{/d XCed/h XCed/w XCed/l XCed w 0 gt{h d neg gt{l 0 gt
51
+ {XCsp2bp l XCsetline
52
+ l 2 div dup translate
53
+ 0 d neg w l sub h l sub d add rectstroke}if}if}if}XCbd
54
+ /XCcolorblock{/d XCed/h XCed/w XCed w 0 gt{h d neg gt
55
+ {XCsp2bp 0 XCsetline
56
+ 0 d neg w h d add rectfill}if}if}XCbd
57
+ end
58
+ %% End of file `xcolor.pro'.
@@ -0,0 +1,1460 @@
1
+ %%
2
+ %% This is file `xcolor.sty',
3
+ %% generated with the docstrip utility.
4
+ %%
5
+ %% The original source files were:
6
+ %%
7
+ %% xcolor.dtx (with options: `package')
8
+ %%
9
+ %% IMPORTANT NOTICE:
10
+ %%
11
+ %% For the copyright see the source file.
12
+ %%
13
+ %% Any modified versions of this file must be renamed
14
+ %% with new filenames distinct from xcolor.sty.
15
+ %%
16
+ %% For distribution of the original source see the terms
17
+ %% for copying and modification in the file xcolor.dtx.
18
+ %%
19
+ %% This generated file may be distributed as long as the
20
+ %% original source files, as listed above, are part of the
21
+ %% same distribution. (The sources need not necessarily be
22
+ %% in the same archive or directory.)
23
+ %%
24
+ \ProvidesPackage{xcolor}
25
+ [2016/05/11 v2.12 LaTeX color extensions (UK)]
26
+ %%
27
+ %% ----------------------------------------------------------------
28
+ %% Copyright (C) 2003-2016 by Dr. Uwe Kern <xcolor at ukern dot de>
29
+ %% ----------------------------------------------------------------
30
+ %%
31
+ %% Please send error reports and suggestions for
32
+ %% improvements to the above email address.
33
+ %%
34
+ %% This package contains code copied from
35
+ %%
36
+ %% color.dtx [1999/02/16 v1.0i Standard LaTeX Color (DPC)]
37
+ %% Copyright (C) 1994--1999 David Carlisle
38
+ %%
39
+ %% which is part of the Standard LaTeX `Graphics Bundle'.
40
+ %%
41
+ \NeedsTeXFormat{LaTeX2e}
42
+ \expandafter\edef\csname XC@catcodes\endcsname
43
+ {\catcode33 \the\catcode33 % !
44
+ \catcode34 \the\catcode34 % "
45
+ \catcode39 \the\catcode39 % '
46
+ \catcode42 \the\catcode42 % *
47
+ \catcode44 \the\catcode44 % ,
48
+ \catcode45 \the\catcode45 % -
49
+ \catcode46 \the\catcode46 % .
50
+ \catcode47 \the\catcode47 % /
51
+ \catcode58 \the\catcode58 % :
52
+ \catcode59 \the\catcode59 % ;
53
+ \catcode60 \the\catcode60 % <
54
+ \catcode61 \the\catcode61 % =
55
+ \catcode62 \the\catcode62 % >
56
+ \catcode63 \the\catcode63 % ?
57
+ \catcode64 \the\catcode64 % @
58
+ \catcode94 \the\catcode94 % ^
59
+ \catcode96 \the\catcode96 % `
60
+ \catcode`\noexpand\^^A\the\catcode`\^^A\relax}
61
+ \catcode64 11 %
62
+ \@makeother\! \@makeother\" \@makeother\' \@makeother\* \@makeother\,
63
+ \@makeother\- \@makeother\. \@makeother\/ \@makeother\: \@makeother\;
64
+ \@makeother\< \@makeother\= \@makeother\> \@makeother\? \@makeother\`
65
+ \catcode94 7 %
66
+ \catcode`\^^A=14 %
67
+ \edef\XC@@{\expandafter\noexpand\csname\string\XC@@\endcsname}
68
+ \newif\ifcolors@ \colors@true
69
+ \newif\ifcolorerrors@
70
+ \newif\ifglobalcolors \globalcolorsfalse
71
+ \newif\ifdefinecolors \definecolorstrue
72
+ \newif\ifconvertcolorsD
73
+ \newif\ifconvertcolorsU
74
+ \newif\ifblendcolors
75
+ \newif\ifmaskcolors
76
+ \newif\ifXC@@fbox \XC@@fboxtrue
77
+ \newif\ifXC@@tst
78
+ \def\c@lor@error#1%
79
+ {\ifcolorerrors@\PackageError{xcolor}{Undefined color #1}\@ehc
80
+ \else\PackageWarning{xcolor}{Undefined color #1}\fi}
81
+ \def\XC@append#1#2%
82
+ {\ifx#1\@undefined\def#1{#2}\else\ifx#1\relax\def#1{#2}\else
83
+ \toks@\expandafter{#1#2}\edef#1{\the\toks@}\fi\fi}
84
+ \def\XC@let@cc#1{\expandafter\XC@let@Nc\csname#1\endcsname}
85
+ \providecommand*\@namelet[1]{\expandafter\XC@let@Nc\csname#1\endcsname}
86
+ \def\XC@let@Nc#1#2{\expandafter\let\expandafter#1\csname#2\endcsname}
87
+ \def\XC@let@cN#1{\expandafter\let\csname#1\endcsname}
88
+ \def\@namexdef#1{\expandafter\xdef\csname #1\endcsname}
89
+ \def\aftergroupdef#1#2%
90
+ {\expandafter\endgroup\expandafter\def\expandafter#1\expandafter{#2}}
91
+ \def\aftergroupedef#1#2%
92
+ {\edef\@@tmp{\def\noexpand#1{#2}}\expandafter\endgroup\@@tmp}
93
+ \begingroup
94
+ \catcode`\!=13 \catcode`\:=13 \catcode`\-=13 \catcode`\+=13
95
+ \catcode`\;=13 \catcode`\/=13 \catcode`\"=13 \catcode`\>=13
96
+ \gdef\XC@edef#1#2%
97
+ {\begingroup
98
+ \ifnum\catcode`\!=13 \edef!{\string!}\fi
99
+ \ifnum\catcode`\:=13 \edef:{\string:}\fi
100
+ \ifnum\catcode`\-=13 \edef-{\string-}\fi
101
+ \ifnum\catcode`\+=13 \edef+{\string+}\fi
102
+ \ifnum\catcode`\;=13 \edef;{\string;}\fi
103
+ \ifnum\catcode`\"=13 \edef"{\string"}\fi
104
+ \ifnum\catcode`\>=13 \edef>{\string>}\fi
105
+ \edef#1{#2}\@onelevel@sanitize#1\aftergroupdef#1#1}
106
+ \gdef\XC@mdef#1#2%
107
+ {\begingroup
108
+ \ifnum\catcode`\/=13 \edef/{\string/}\fi
109
+ \ifnum\catcode`\:=13 \edef:{\string:}\fi
110
+ \edef#1{#2}\@onelevel@sanitize#1\aftergroupdef#1#1}
111
+ \endgroup
112
+ \def\XC@sdef#1#2{\edef#1{#2}\@onelevel@sanitize#1}
113
+ \def\@ifxempty#1{\@@ifxempty#1\@@ifxempty\XC@@}
114
+ \def\@@ifxempty#1#2\XC@@
115
+ {\ifx#1\@@ifxempty
116
+ \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
117
+ \long\def\XC@ifxcase#1#2#3%
118
+ {\long\def\XC@if@##1##2%
119
+ {\ifx#1##1%
120
+ \toks@{##2}\expandafter\remove@to@nnil\else\expandafter\XC@if@\fi}%
121
+ \XC@if@#2#1{#3}\@nnil\the\toks@}
122
+ \long\def\XC@ifcase#1#2#3%
123
+ {\long\def\XC@if@##1##2%
124
+ {\@expandtwoargs\in@{,#1,}{,##1,}\ifin@
125
+ \toks@{##2}\expandafter\remove@to@nnil\else\expandafter\XC@if@\fi}%
126
+ \XC@if@#2{#1}{#3}\@nnil\the\toks@}
127
+ \def\XC@@opt{,}
128
+ \def\@ifXCopt#1%
129
+ {\@expandtwoargs\in@{,#1,}{\XC@@opt}%
130
+ \ifin@\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
131
+ \let\XC@@pkg\relax
132
+ \let\XC@declareoption\@declareoption
133
+ \long\def\@declareoption#1#2%
134
+ {\XC@declareoption{#1}{\edef\XC@@opt{\XC@@opt#1,}#2}}
135
+ \def\selectcolormodel#1%
136
+ {\@ifundefined{XC@mod@#1}%
137
+ {\c@lor@error{target model `#1'}}%
138
+ {\expandafter\ifx\csname XC@mod@#1\endcsname\XC@mod@natural
139
+ \def\XC@tgt@mod##1{##1}\convertcolorsDfalse\convertcolorsUfalse
140
+ \else\expandafter\ifx\csname XC@mod@#1\endcsname\XC@mod@named
141
+ \c@lor@error{target model `#1'}
142
+ \else
143
+ \edef\XC@tgt@mod##1{#1}\convertcolorsDtrue\convertcolorsUtrue
144
+ \fi\fi}}
145
+ \@tfor\@@tmp:={Hsb}{tHsb}{ignore}{named}{ps}{wave}\do
146
+ {\expandafter\XC@sdef\csname XC@mod@\@@tmp\endcsname{\@@tmp}}
147
+ \@tfor\@@tmp:={natural}{rgb}{cmy}{cmyk}{hsb}{gray}{RGB}{HTML}{HSB}{Gray}\do
148
+ {\expandafter\XC@sdef\csname XC@mod@\@@tmp\endcsname{\@@tmp}%
149
+ \edef\@@tmp
150
+ {\noexpand\DeclareOption{\@@tmp}{\noexpand\selectcolormodel{\@@tmp}}}%
151
+ \@@tmp}
152
+ \DeclareOption{monochrome}
153
+ {\ExecuteOptions{hideerrors}%
154
+ \AtEndOfPackage
155
+ {\colors@false
156
+ \def\set@color{\c@lor@special\m@ne
157
+ {color push \current@color}\aftergroup\reset@color}%
158
+ \def\reset@color{\c@lor@special\m@ne{color pop}}%
159
+ \def\set@page@color{\c@lor@special\m@ne{background \current@color}}}}
160
+ \let\XC@@names\relax
161
+ \providecommand*\colornameprefix{XC@}
162
+ \let\XC@@nameprefix\colornameprefix
163
+ \def\XC@declarenames#1#2#3%
164
+ {\DeclareOption{#1}{\XC@append\XC@@names
165
+ {#3\definecolorstrue\input{#2.def}\definecolorstrue
166
+ \let\colornameprefix\XC@@nameprefix}}
167
+ \DeclareOption{#1*}{\XC@append\XC@@names
168
+ {#3\definecolorsfalse\input{#2.def}\definecolorstrue
169
+ \let\colornameprefix\XC@@nameprefix}}}
170
+ \XC@declarenames{dvipsnames}{dvipsnam}{\let\colornameprefix\@empty}
171
+ \XC@declarenames{svgnames}{svgnam}{}
172
+ \XC@declarenames{x11names}{x11nam}{}
173
+ \XC@declarenames{hksnames}%
174
+ {hks\ifcase\paperquality k\or n\or k\or z\else n\fi nam}{}
175
+ \XC@declarenames{pmsnames}{pmsnam}{}
176
+ \XC@declarenames{ralnames}{ralnam}{}
177
+ \DeclareOption{table}{\XC@append\XC@@pkg{\RequirePackage{colortbl}}}
178
+ \DeclareOption{fixpdftex}{\XC@append\XC@@pkg{\RequirePackage{pdfcolmk}}}
179
+ \DeclareOption{hyperref}
180
+ {\@tfor\@@tmp:={cite}{file}{link}{menu}{page}{run}{url}\do
181
+ {\expandafter\edef\csname KV@Hyp@x\@@tmp bordercolor\endcsname #1%
182
+ {\noexpand\XC@bordercolor{\@@tmp}{#1}}}%
183
+ \AtEndOfPackage
184
+ {\GetGinDriver\def\KV@Hyp@xpdfborder#1{\edef\@pdfborder{#1}}%
185
+ \@tfor\@@tmp:={dvips}\do
186
+ {\ifx\GinDriver\@@tmp
187
+ \def\KV@Hyp@xpdfborder#1%
188
+ {\edef\@pdfborder{#1}\expandafter\XC@pdfborder\@pdfborder\relax}%
189
+ \@break@tfor\fi}}}
190
+ \providecommand*\Gin@driver{}
191
+ \@tfor\@@tmp:={dvipdf}{dvipdfm}{dvipdfmx}{dvips}{dvipsone}{dviwin}%
192
+ {emtex}{luatex}{pctex32}{pctexhp}{pctexps}{pctexwin}{pdftex}%
193
+ {tcidvi}{textures}{truetex}{vtex}{xetex}\do
194
+ {\edef\@@tmp{\noexpand\DeclareOption{\@@tmp}%
195
+ {\def\noexpand\Gin@driver{\@@tmp.def}}}%
196
+ \@@tmp}
197
+ \DeclareOption{dviwindo}{\ExecuteOptions{dvipsone}}
198
+ \DeclareOption{oztex}{\ExecuteOptions{dvips}}
199
+ \DeclareOption{xdvi}{\ExecuteOptions{dvips,monochrome}}
200
+ \DeclareOption{xcdraw}{\def\XC@@xcd@{1}}
201
+ \DeclareOption{noxcdraw}{\def\XC@@xcd@{-1}}
202
+ \DeclareOption{fixinclude}{\def\XC@@xcf@{1}}
203
+ \DeclareOption{prologue}{\def\XC@@xcp@{1}}
204
+ \DeclareOption{kernelfbox}{\XC@@fboxfalse}
205
+ \DeclareOption{showerrors}{\colorerrors@true}
206
+ \DeclareOption{hideerrors}{\colorerrors@false}
207
+ \DeclareOption{debugshow}{\catcode`\^^A=9 \let\GDebug\typeout}
208
+ \DeclareOption*%
209
+ {\PackageInfo{xcolor}{Package option `\CurrentOption' ignored}}
210
+ \def\XC@@xcd@{-1}
211
+ \def\XC@@xcf@{-1}
212
+ \def\XC@@xcp@{-1}
213
+ \ExecuteOptions{natural,showerrors}
214
+ \InputIfFileExists{color.cfg}{}{}
215
+ \let\@declareoption\XC@declareoption
216
+ \ProcessOptions\relax
217
+ \edef\Gin@driver{\Gin@driver}
218
+ \if!\Gin@driver!
219
+ \PackageError{xcolor}
220
+ {No driver specified}
221
+ {You should make a default driver option in a file \MessageBreak
222
+ color.cfg\MessageBreak
223
+ eg: \protect\ExecuteOptions{dvips}}
224
+ \else
225
+ \PackageInfo{xcolor}{Driver file: \Gin@driver}
226
+ \@ifundefined{ver@\Gin@driver}{\input{\Gin@driver}}{}
227
+ \def\@@tmp#1.def{\def\XC@@drv{#1}}
228
+ \expandafter\@@tmp\Gin@driver
229
+ \fi
230
+ \count@\XC@@xcd@ \advance\count@\XC@@xcf@ \advance\count@\XC@@xcp@\relax
231
+ \ifnum\count@>-3
232
+ \XC@ifcase\XC@@drv
233
+ {{dvips,pctex32}%
234
+ {\def\@tempa{0}
235
+ \def\XC@special#1{\special{ps:XC!b}\special{"#1}\special{ps:XC!e}}}%
236
+ {pdftex}%
237
+ {\def\@tempa{1}
238
+ \def\XC@special#1{\pdfliteral{ q #1 Q }}}%
239
+ {luatex}%
240
+ {\def\@tempa{1}
241
+ \ifnum\luatexversion<87%
242
+ \def\XC@special#1{\pdfliteral{ q #1 Q }}%
243
+ \else%
244
+ \def\XC@special#1{\pdfextension literal{ q #1 Q }}%
245
+ \fi}%
246
+ {dvipdfm}%
247
+ {\def\@tempa{1}
248
+ \def\XC@special#1{\special{pdf: content #1}}}%
249
+ }{\def\@tempa{-1}}
250
+ \ifnum\XC@@xcd@>\m@ne\let\XC@@xcd@\@tempa\fi
251
+ \ifnum\XC@@xcf@>\m@ne\let\XC@@xcf@\@tempa\fi
252
+ \ifnum\XC@@xcp@>\m@ne\let\XC@@xcp@\@tempa\fi
253
+ \ifnum\@tempa=0 \AtBeginDvi{\special{header=xcolor.pro}}\fi
254
+ \ifcase\XC@@xcf@
255
+ \AtBeginDvi{\special{! XCfixnormalscale}}
256
+ \fi
257
+ \ifcase\XC@@xcp@
258
+ \AtBeginDvi{\special{header=\jobname.xcp}}
259
+ \newwrite\XC@@xcp\immediate\openout\XC@@xcp=\jobname.xcp
260
+ \immediate\write\XC@@xcp{\@percentchar!}
261
+ \immediate\write\XC@@xcp{TeXDict begin}
262
+ \AtEndDocument
263
+ {\immediate\write\XC@@xcp{end}\immediate\closeout\XC@@xcp}
264
+ \fi
265
+ \fi
266
+ \@namedef{ver@color.sty}{1999/02/16}
267
+ \XC@@pkg
268
+ \long\def\@secondoffive#1#2#3#4#5{#2}
269
+ \long\def\@thirdoffive#1#2#3#4#5{#3}
270
+ \def\xglobal{\xglobal@stop\begingroup\futurelet\@@tok\xglobal@test}
271
+ \def\xglobal@test
272
+ {\expandafter\@tfor\expandafter\@@tmp
273
+ \expandafter:\expandafter=\xglobal@list\do
274
+ {\expandafter\ifx\@@tmp\@@tok
275
+ \aftergroup\let\aftergroup\xglobal@\@break@tfor\fi}%
276
+ \endgroup\global}
277
+ \def\xglobal@stop{\let\xglobal@\@empty}
278
+ \xglobal@stop
279
+ \def\xglobal@list
280
+ {\definecolor\definecolors\definecolorset\colorlet\providecolor
281
+ \providecolors\providecolorset\blendcolors\maskcolors
282
+ \substitutecolormodel}
283
+ \def\xglobalize@#1{\ifx\xglobal@\global\global\let#1#1\fi}
284
+ \def\GetGinDriver
285
+ {\@tempswafalse
286
+ \@tfor\@@tmp:={dvips}{luatex}{pdftex}{dvipdf}{dvipdfm}{dvipsone}{vtex}{textures}%
287
+ \do{\ifx\XC@@drv\@@tmp\@tempswatrue\@break@tfor\fi}%
288
+ \edef\GinDriver{\if@tempswa\XC@@drv\else hypertex\fi}}
289
+ \def\@hex@Hex#1{\ifx#1\relax\else\expandafter\@hex@@Hex\expandafter#1\fi}
290
+ \def\@hex@@Hex#1%
291
+ {\if a#1A\else \if b#1B\else \if c#1C\else \if d#1D\else
292
+ \if e#1E\else \if f#1F\else #1\fi\fi\fi\fi\fi\fi \@hex@Hex}
293
+ \def\XC@strip@comma#1,#2%
294
+ {\ifx,#2%
295
+ #1\expandafter\remove@to@nnil\else#1 \expandafter\XC@strip@comma\fi
296
+ #2}
297
+ {\catcode`Q=3
298
+ \gdef\XC@replace#1#2#3%
299
+ {\begingroup
300
+ \def\XC@repl@ce##1#2##2Q##3%
301
+ {\@ifxempty{##2}{\XC@r@pl@ce##1Q}{\XC@repl@ce##1##3##2Q{##3}}}%
302
+ \def\XC@r@pl@ce##1\@empty Q%
303
+ {\expandafter\endgroup\expandafter\def\expandafter#1\expandafter{##1}}%
304
+ \expandafter\XC@repl@ce\expandafter\@empty #1\@empty#2Q{#3}}
305
+ }
306
+ \def\XC@clean#1%
307
+ {\edef#1{ #1 }%
308
+ \XC@cle@n#1,{ }\XC@cle@n#1{. }{ }\XC@cle@n#1{ },%
309
+ \edef#1{\expandafter\@gobbletwo#1}}
310
+ \def\XC@cle@n#1#2#3%
311
+ {\def\XC@cl@@n##1#2##2{#3##1\ifx##2\@empty\else\expandafter\XC@cl@@n\fi##2}%
312
+ \edef#1{\expandafter\XC@cl@@n#1#2\@empty}}%
313
+ \def\rdivide#1#2%
314
+ {\begingroup\toks@{#1}\edef\@@tmp{\noexpand\@tempdima\the#1}%
315
+ \@defaultunits\@tempdimb=#2pt\relax\@nnil \@@tmp\relax
316
+ \ifdim\@tempdima<\z@ \@tempdima-\@tempdima\def\@sign{-}\else
317
+ \def\@sign{}\fi
318
+ \ifdim\@tempdimb<\z@ \@tempdimb-\@tempdimb\edef\@sign{\@sign-}\fi
319
+ \ifdim\@tempdima<.1\maxdimen \ifdim\@tempdimb<.01\maxdimen
320
+ \lshift\@tempdima \lshift\@tempdimb \fi\fi
321
+ \@tempcnta=\@tempdima \@tempcntb=\@tempdimb
322
+ \count@=\@tempcnta \divide\count@\@tempcntb
323
+ \edef\@@tmp{\number\count@.}%
324
+ \@tempswatrue \@rdivide \@rdivide \@rdivide \@rdivide \@rdivide
325
+ \@tempswafalse \@rdivide
326
+ \dimen@\@@tmp\p@ \ifnum\count@>4\advance\dimen@1sp\fi
327
+ \dimen@\@sign\dimen@
328
+ \edef\@@tmp{\the\toks@\the\dimen@}%
329
+ \expandafter\endgroup\@@tmp}
330
+ \def\@rdivide
331
+ {\multiply\count@\@tempcntb \advance\@tempcnta-\count@
332
+ \multiply\@tempcnta10 \count@=\@tempcnta \divide\count@\@tempcntb
333
+ \if@tempswa\edef\@@tmp{\@@tmp\number\count@}\fi}
334
+ \def\rmultiply#1#2%
335
+ {\begingroup
336
+ \edef\@@mul{#2}\@tempdima\the#1\relax
337
+ \afterassignment\@tempdimb\@tempcntb=\@@mul\p@
338
+ \ifdim\@tempdima<\z@ \@tempdima-\@tempdima\def\@sign{-}\else
339
+ \def\@sign{}\fi
340
+ \ifnum\@tempcntb<\z@ \@tempcntb-\@tempcntb\edef\@sign{\@sign-}\fi
341
+ \lshift\@tempdima \dimen@\z@
342
+ \expandafter\@rmultiply\@@mul.0.\@nil
343
+ \advance\dimen@\@tempcntb\@tempdima \rshift\dimen@
344
+ \dimen@\@sign\dimen@
345
+ \edef\@@tmp{#1\the\dimen@}%
346
+ \expandafter\endgroup\@@tmp}
347
+ \def\@rmultiply#1.#2.#3\@nil
348
+ {\def\@@tmp{}%
349
+ \@tfor\@@mul:=#2\do
350
+ {\edef\@@tmp
351
+ {\advance\dimen@\@@mul\@tempdima \divide\dimen@10 \@@tmp}}%
352
+ \@@tmp}
353
+ \def\lshift#1{#1\expandafter\lshift@\the#1}
354
+ \def\llshift#1{\lshift#1\lshift#1}
355
+ \def\lshiftnum#1{\expandafter\lshiftnum@#1.00.:}
356
+ \def\lshiftnum@#1.#2#3.#4:{#1#2\ifnum0#3>\z@.#3\fi}
357
+ \def\llshiftnum#1{\expandafter\llshiftnum@#1\@empty.00.:}
358
+ \def\llshiftnum@#1.#2#3#4.#5:%
359
+ {#1#2\ifnum0#3>\z@#3\else0\fi\ifnum0#4>\z@.#4\fi}
360
+ \def\lshiftset#1#2{\edef\@@XC{\noexpand\lshiftnum{#2}}#1\@@XC\p@}
361
+ \def\llshiftset#1#2{\edef\@@XC{\noexpand\llshiftnum{#2}}#1\@@XC\p@}
362
+ \def\rshift#1{#1\expandafter\rshift@\the#1}
363
+ \def\rrshift#1{\rshift#1\rshift#1}
364
+ \begingroup
365
+ \catcode`P=12
366
+ \catcode`T=12
367
+ \lowercase
368
+ {\def\@@tmp{\def\lshift@##1.##2##3PT{##1##2\ifnum0##3>\z@.##3\fi\p@}
369
+ \def\rshift@##1.##2PT{\rshift@@##1\relax##2\p@}}}
370
+ \expandafter\endgroup\@@tmp
371
+ \def\rshift@@#1#2%
372
+ {\ifx#2\relax.#1\else#1\expandafter\rshift@@\expandafter#2\fi}
373
+ \def\XC@inflate#1#2#3#4%
374
+ {\edef#4{#2,\ifx#1\XC@mod@cmyk #3\else
375
+ \ifx#1\XC@mod@gray ,,,#3,,,\else ,#3,\fi\fi}}
376
+ \def\XC@vec#1,#2,#3,#4,#5,#6,#7,#8,#9%
377
+ {\def\@@tmp{}%
378
+ \XC@vec@{#1}{#5}%
379
+ \ifx,#2,\else
380
+ \XC@vec@{#2}{#6}\XC@vec@{#3}{#7}\ifx,#4,\else\XC@vec@{#4}{#8}\fi\fi
381
+ \aftergroupdef#9\@@tmp}
382
+ \def\XC@vec@@{\edef\@@tmp{\ifx\@@tmp\@empty\else\@@tmp,\fi\strip@pt\dimen@}}
383
+ \def\XC@add{\begingroup \let\XC@vec@\XC@add@ \XC@vec}
384
+ \def\XC@add@#1#2%
385
+ {\llshiftset\dimen@{#1}\llshiftset\@tempdima{#2}%
386
+ \advance\dimen@\@tempdima \rrshift\dimen@ \XC@vec@@}
387
+ \def\XC@sub{\begingroup \let\XC@vec@\XC@sub@ \XC@vec}
388
+ \def\XC@sub@#1#2{\XC@add@{#1}{-#2}}
389
+ \def\XC@mul{\begingroup \let\XC@vec@\XC@mul@ \XC@vec}
390
+ \def\XC@mul@#1#2%
391
+ {\llshiftset\dimen@{#1}\rmultiply\dimen@{#2}\rrshift\dimen@ \XC@vec@@}
392
+ \def\XC@mix%
393
+ {\begingroup
394
+ \@tempdima\dimen@ \@tempdimb100\p@ \advance\@tempdimb-\@tempdima
395
+ \let\XC@vec@\XC@mix@ \XC@vec}
396
+ \def\XC@mix@#1#2%
397
+ {\dimen@#1\@tempdima \advance\dimen@#2\@tempdimb \rrshift\dimen@ \XC@vec@@}
398
+ \def\XC@calc@#1,#2,#3,#4,#5:#6%
399
+ {\XC@let@Nc\@@cmd{XC@calc#6}\@@cmd{#1}\@@tmp
400
+ \ifx,#2,\else
401
+ \@@cmd{#2}\@tempa\@@cmd{#3}\@tempb
402
+ \ifx,#4,%
403
+ \edef\@@tmp{\@@tmp,\@tempa,\@tempb}\else
404
+ \@@cmd{#4}\@tempc\edef\@@tmp{\@@tmp,\@tempa,\@tempb,\@tempc}\fi\fi}
405
+ \def\XC@calcC#1#2%
406
+ {\llshiftset\dimen@{-#1}\advance\dimen@100\p@
407
+ \rrshift\dimen@ \XC@calcN{\strip@pt\dimen@}#2}
408
+ \def\XC@calcD{\XC@c@lcD\@@scl{}}
409
+ \def\XC@c@lcD#1#2#3#4%
410
+ {\dimen@#3\p@ \rdivide\dimen@{#1}\edef#4{\strip@pt\dimen@#2}}
411
+ \def\XC@calcF#1#2%
412
+ {\edef#2{#1}\expandafter\XC@c@lcF#2.0.:#2}
413
+ \def\XC@c@lcF#1.#2.#3:#4%
414
+ {\edef#4{\XC@c@@cR#200000:}%
415
+ \dimen@#1.5\p@ \afterassignment\dimen@\count@=\the\dimen@
416
+ \edef#4%
417
+ {\ifnum#4>0 \ifnum\count@=0 \ifdim#1.5\p@<\z@ -\fi\fi\fi
418
+ \number\count@.#4}}
419
+ \def\XC@calcH#1#2%
420
+ {\count@#1 \divide\count@\sixt@@n \edef\XC@@tmp{\hexnumber@\count@}%
421
+ \multiply\count@-\sixt@@n \advance\count@#1
422
+ \edef#2{\XC@@tmp\hexnumber@\count@}}
423
+ \def\XC@calcM#1#2%
424
+ {\dimen@#1\p@ \dimen@\@@scl\dimen@ \advance\dimen@.5\p@
425
+ \afterassignment\dimen@\count@=\the\dimen@ \edef#2{\number\count@}}
426
+ \def\XC@calcN#1#2%
427
+ {\XC@calcR{#1}#2\edef#2{\expandafter\XC@c@lcN#200000:}}
428
+ \def\XC@c@lcN#1.#200000#3:{#1\ifnum0#2=0 \else.#2\fi}
429
+ \def\XC@calcR#1#2{\edef#2{#1}\edef#2{\expandafter\XC@c@lcR#2.0.:}}
430
+ \def\XC@c@lcR#1.#2.#3:%
431
+ {\ifnum#10>0 1.00000\else 0.\ifnum#11<0 00000\else
432
+ \XC@c@@cR#200000:\fi\fi}
433
+ \def\XC@c@@cR#1#2#3#4#5#6:{#1#2#3#4#5}
434
+ \def\XC@calcS{\XC@c@lcS\@@scl{}}
435
+ \def\XC@c@lcS#1#2#3#4%
436
+ {\lshiftset\dimen@{#3}%
437
+ \ifdim#1\p@<100\p@
438
+ \dimen@\lshiftnum#1\dimen@ \rrshift\dimen@ \else
439
+ \dimen@#1\dimen@ \rshift\dimen@ \fi
440
+ \edef#4{\strip@pt\dimen@#2}}
441
+ \def\XC@calcT#1#2%
442
+ {\lshiftset\dimen@{#1}\advance\dimen@\lshiftnum\@@arg\p@ \rshift\dimen@
443
+ \edef#2%
444
+ {\ifdim\dimen@>\p@1\else\ifdim\dimen@<\z@0\else\strip@pt\dimen@\fi\fi}}
445
+ \def\XC@calcU#1#2%
446
+ {\dimen@#1\p@
447
+ \ifdim\dimen@=\p@\else
448
+ \afterassignment\dimen@\count@=\the\dimen@
449
+ \relax\ifdim\dimen@=\z@\else
450
+ \ifdim#1\p@<\z@ \dimen@-\dimen@ \advance\dimen@\p@ \fi
451
+ \fi
452
+ \fi
453
+ \edef#2{\strip@pt\dimen@}}
454
+ \providecommand*\rangeRGB{255}
455
+ \providecommand*\rangeHSB{240}
456
+ \providecommand*\rangeHsb{360}
457
+ \providecommand*\rangetHsb{60,30;120,60;180,120;210,180;240,240}
458
+ \providecommand*\rangeGray{15}
459
+ \providecommand*\adjustUCRBG{1,1,1,1}
460
+ \providecommand*\paperquality{1}
461
+ \providecommand*\colorseriescycle{16}
462
+ \def\XC@clr@rgb@white{1,1,1}
463
+ \def\XC@clr@cmy@white{0,0,0}
464
+ \def\XC@clr@cmyk@white{0,0,0,0}
465
+ \def\XC@clr@hsb@white{\@@hue,0,1}
466
+ \def\XC@clr@hsb@gray{\@@hue,0,0.5}
467
+ \def\XC@clr@hsb@black{\@@hue,0,0}
468
+ \def\XC@clr@gray@white{1}
469
+ \@tfor\@@tmp:={grad}{last}{step}\do
470
+ {\XC@let@cN{XC@met@\@@tmp}\@@tmp}
471
+ \def\definecolor{\@testopt{\XC@definecolor}{}}
472
+ \def\XC@definecolor[#1]#2%
473
+ {\@testopt{\XC@definec@lor[#1]{#2}}\colornameprefix}
474
+ \def\XC@definec@lor[#1]#2[#3]#4#5%
475
+ {\begingroup
476
+ \XC@sdef\@@cls{#1}\XC@edef\@@nam{#2}\edef\colornameprefix{#3}%
477
+ \XC@logdef\@@nam
478
+ \XC@getmodclr02{#4}{#5}{\let\@@tmp\relax}%
479
+ {\ifx\@@mod\XC@mod@named
480
+ \XC@c@l@rlet\@@nam\@@clr
481
+ \else
482
+ \ifx\@@cls\XC@mod@ps
483
+ \edef\@@drv{\@@mod\space\@@clr}\def\@@hue{0}%
484
+ \edef\@@clr{\@nameuse{XC@clr@\@@mod @white}}%
485
+ \else
486
+ \ifconvertcolorsD
487
+ \let\@@tmp\@@mod\XC@sdef\@@mod{\XC@tgt@mod\@@tmp}%
488
+ \convertcolorspec\@@tmp\@@clr\@@mod\@@clr
489
+ \fi
490
+ \XC@coremodel\@@mod\@@clr
491
+ \csname color@\@@mod\expandafter\endcsname
492
+ \expandafter\@@drv\expandafter{\@@clr}%
493
+ \ifcase\XC@@xcp@
494
+ \immediate\write\XC@@xcp{/\colornameprefix\@@nam{\expandafter
495
+ \XC@strip@comma\@@clr,,\@nnil}XC\@@mod}%
496
+ \let\@@cls\XC@mod@named
497
+ \fi
498
+ \ifx\@@cls\@empty\else
499
+ \let\@@tmp\@@cls
500
+ \@nameuse{define@color@\@@cls}\@@nam\@@drv
501
+ \csname color@\@@tmp\expandafter\endcsname
502
+ \expandafter\@@drv\expandafter{\@@nam}%
503
+ \fi
504
+ \fi
505
+ \toks@\expandafter{\@@drv}%
506
+ \edef\@@tmp
507
+ {\ifglobalcolors\global\else\xglobal@\fi
508
+ \noexpand\@namedef{\string\color@\@@nam}%
509
+ {\noexpand\xcolor@{\@@cls}{\the\toks@}{\@@mod}{\@@clr}}}%
510
+ \fi}%
511
+ \expandafter\endgroup\@@tmp\xglobal@stop}
512
+ \def\XC@getmodclr#1#2#3#4%
513
+ {\ifnum\ifcase#1 \ifXC@@getmod1\else0 \fi \or1 \fi>0
514
+ \XC@mdef\@@mod{#3}\expandafter\XC@getmod\@@mod////////\XC@@
515
+ \@ifundefinedmodel\@@Mod{\let\@@Mod\XC@mod@ignore}{}\fi
516
+ \@ifundefined{XC@mod@\@@mod}%
517
+ {\c@lor@error{model `\@@mod'}\@firstoftwo}%
518
+ {\ifcase#2\else
519
+ \XC@mdef\@@clr{#4}%
520
+ \edef\@@clr{\expandafter\XC@getclr\@@clr////////\XC@@}%
521
+ \ifx\@@cls\XC@mod@ps\else\XC@clean\@@clr\fi
522
+ \ifx\@@Mod\XC@mod@ignore\else
523
+ \convertcolorspec\@@mod\@@clr\@@Mod\@@clr
524
+ \ifnum#2>1 \let\@@mod\@@Mod\fi
525
+ \fi
526
+ \fi \@secondoftwo}}
527
+ \def\XC@getmod#1/#2/#3/#4/#5/#6/#7/#8/#9\XC@@
528
+ {\XC@g@tm@d0#1::\XC@@ \XC@getm@d1{#2}\XC@getm@d2{#3}%
529
+ \XC@getm@d3{#4}\XC@getm@d4{#5}\XC@getm@d5{#6}\XC@getm@d6{#7}%
530
+ \XC@getm@d7{#8}\def\XC@@pos{0}\def\@@mod{#1}\@gobble\@nnil}%
531
+ \def\XC@getm@d#1#2%
532
+ {\edef\XC@@pos{#2}\XC@sdef\@@mod{\XC@tgt@mod\XC@@pos}%
533
+ \ifx\XC@@pos\@@mod\def\XC@@pos{#1}\expandafter\remove@to@nnil\fi}%
534
+ \def\XC@g@tm@d#1#2:#3:#4\XC@@
535
+ {\@ifxempty{#3}{\let\@@Mod\XC@mod@ignore\XC@getm@d0{#2}}%
536
+ {\def\@@Mod{#2}\XC@getm@d0{#3}}}%
537
+ \def\XC@getclr#1/#2/#3/#4/#5/#6/#7/#8/#9\XC@@
538
+ {\ifcase\XC@@pos\space #1\or#2\or#3\or#4\or#5\or#6\or#7\or#8\fi}
539
+ \newif\ifXC@@getmod \XC@@getmodtrue
540
+ \let\xdefinecolor\definecolor
541
+ \def\providecolor{\@testopt{\XC@providecolor}{}}
542
+ \def\XC@providecolor[#1]#2%
543
+ {\@testopt{\XC@providec@lor[#1]{#2}}\colornameprefix}
544
+ \def\XC@providec@lor[#1]#2[#3]%
545
+ {\XC@edef\XC@@tmp{#2}%
546
+ \@ifundefinedcolor\XC@@tmp{\XC@definecolor[#1]{#2}[#3]}%
547
+ {\ifnum\XC@tracing>0
548
+ \PackageInfo{xcolor}{Ignoring color definition `\XC@@tmp'}\fi
549
+ \@gobbletwo}}
550
+ \def\xcolor@#1#2#3#4{#2}
551
+ \def\colorlet{\@testopt{\XC@colorlet}{}}
552
+ \def\XC@colorlet[#1]#2{\@testopt{\XC@col@rlet[#1]{#2}}{}}
553
+ \def\XC@col@rlet[#1]#2[#3]#4%
554
+ {\begingroup
555
+ \edef\@@cls{#1}\XC@edef\@@nam{#2}\XC@sdef\@@mod{#3}\XC@edef\@@clr{#4}%
556
+ \XC@info\@@clr\@@tmp\XC@@tstfalse
557
+ \ifnum\@@tmp=\@ne\ifx\@@mod\@empty
558
+ \ifx\@@cls\@empty
559
+ \XC@@tsttrue
560
+ \else
561
+ \edef\@@tmp
562
+ {\expandafter\expandafter\expandafter\@secondoffive
563
+ \csname\string\color@\@@clr\endcsname}%
564
+ \ifx\@@cls\@@tmp\XC@@tsttrue\fi
565
+ \fi
566
+ \fi\fi
567
+ \ifXC@@tst
568
+ \XC@logdef\@@nam\XC@c@l@rlet\@@nam\@@clr
569
+ \else
570
+ \extractcolorspec\@@clr\@@clr
571
+ \ifx\@@mod\@empty\else
572
+ \expandafter\convertcolorspec\@@clr\@@mod\@@clr
573
+ \edef\@@clr{{\@@mod}{\@@clr}}\fi
574
+ \edef\@@tmp{\noexpand\XC@definecolor[\@@cls]{\@@nam}\@@clr}%
575
+ \fi
576
+ \expandafter\endgroup\@@tmp\xglobal@stop}
577
+ \def\XC@c@l@rlet#1#2%
578
+ {\@ifundefinedcolor{#2}%
579
+ {\c@lor@error{`#2'}\let\@@tmp\@empty}%
580
+ {\edef\@@tmp
581
+ {\ifglobalcolors\global\else\xglobal@\fi
582
+ \noexpand\XC@let@cc{\string\color@#1}{\string\color@#2}}}}
583
+ \def\DefineNamedColor#1%
584
+ {\@nameuse{XC@\ifdefinecolors defin\else prepar\fi ecolor}[#1]}
585
+ \def\preparecolor{\@testopt{\XC@preparecolor}{}}
586
+ \def\XC@preparecolor[#1]#2%
587
+ {\@testopt{\XC@preparec@lor[#1]{#2}}\colornameprefix}
588
+ \def\XC@preparec@lor[#1]#2[#3]#4#5%
589
+ {\XC@sdef\@@cls{#1}\XC@edef\@@nam{#2}%
590
+ \XC@getmodclr01{#4}{#5}{}%
591
+ {\xdef\XC@@stack
592
+ {\ifx\XC@@stack\@empty\else\XC@@stack,\fi{#1}{\@@nam}{#3}%
593
+ {\ifx\@@Mod\XC@mod@ignore\@@mod\else\@@Mod\fi}{\@@clr}}}}
594
+ \let\XC@@stack\@empty
595
+ \def\definecolors#1%
596
+ {\let\XC@@cmd\definecolor\let\XC@@glb\xglobal@
597
+ \expandafter\XC@definecolors#1,,}
598
+ \def\XC@definecolors#1,%
599
+ {\@ifxempty{#1}{}{\expandafter\XC@definec@lors#1=#1=:\XC@definecolors}}
600
+ \def\XC@definec@lors#1=#2=#3:%
601
+ {\XC@edef\@@nam{#1}\XC@edef\@@arg{#2}%
602
+ \let\next\XC@definec@l@rs\expandafter\next\XC@@stack,,\@nnil}
603
+ \def\XC@definec@l@rs#1,%
604
+ {\ifx,#1,\let\next\remove@to@nnil\else\XC@defin@c@l@rs#1\fi\next}
605
+ \def\XC@defin@c@l@rs#1#2#3#4#5%
606
+ {\def\@@tmp{#2}%
607
+ \ifx\@@tmp\@@arg
608
+ \let\xglobal@\XC@@glb\XC@@cmd[#1]{\@@nam}[#3]{#4}{#5}%
609
+ \let\next\remove@to@nnil
610
+ \fi}
611
+ \def\providecolors#1%
612
+ {\let\XC@@cmd\providecolor\let\XC@@glb\xglobal@
613
+ \expandafter\XC@definecolors#1,,}
614
+ \def\definecolorset
615
+ {\let\XC@@cmd\definecolor\@testopt{\XC@definecolorset}{}}
616
+ \def\XC@definecolorset[#1]#2#3#4#5%
617
+ {\XC@getmodclr10{#2}{}{}%
618
+ {\XC@@getmodfalse\XC@edef\XC@@tmp{#5}\let\XC@@glb\xglobal@
619
+ \def\XC@definec@lorset##1,##2;%
620
+ {\@ifxempty{##1}{}%
621
+ {\let\xglobal@\XC@@glb
622
+ \XC@@cmd[#1]{#3##1#4}{\@@mod}{##2}\XC@definec@lorset}}%
623
+ \expandafter\XC@definec@lorset\XC@@tmp;,;\XC@@getmodtrue}}
624
+ \def\providecolorset
625
+ {\let\XC@@cmd\providecolor\@testopt{\XC@definecolorset}{}}
626
+ \def\preparecolorset
627
+ {\ifdefinecolors\let\XC@@cmd\definecolor\else\let\XC@@cmd\preparecolor\fi
628
+ \@testopt{\XC@definecolorset}{}}
629
+ \def\definecolorseries#1#2#3%
630
+ {\@testopt{\XC@definecolorseries{#1}{#2}{#3}}{}}
631
+ \def\XC@definecolorseries#1#2#3[#4]#5%
632
+ {\@testopt{\XC@definec@lorseries{#1}{#2}{#3}[#4]{#5}}{}}
633
+ \def\XC@definec@lorseries#1#2#3[#4]#5[#6]#7%
634
+ {\begingroup
635
+ \XC@sdef\@@mod{#2}%
636
+ \@ifxempty{#4}{\extractcolorspec{#5}\@@clr}{\edef\@@clr{{#4}{#5}}}%
637
+ \expandafter\convertcolorspec\@@clr\@@mod\@@clr
638
+ \@namexdef{\string\colorB@#1}{{\@@mod}{\@@clr}}%
639
+ \edef\@@met{#3}%
640
+ \ifx\@@met\XC@met@last
641
+ \@ifxempty{#6}{\extractcolorspec{#7}\@@tmp}{\edef\@@tmp{{#6}{#7}}}%
642
+ \expandafter\convertcolorspec\@@tmp\@@mod\@@tmp
643
+ \XC@inflate\@@mod\@@tmp\@@clr\@@tmp
644
+ \expandafter\XC@sub\@@tmp,\@@tmp
645
+ \else
646
+ \edef\@@tmp{#7}%
647
+ \fi
648
+ \@namexdef{\string\colorD@#1}{{\@@met}{\@@tmp}}%
649
+ \endgroup}
650
+ \def\resetcolorseries{\@testopt{\XC@resetcolorseries}{}}
651
+ \def\XC@resetcolorseries[#1]#2%
652
+ {\begingroup
653
+ \@namexdef
654
+ {\string\color@#2}{\noexpand\xcolor@{}{}\@nameuse{\string\colorB@#2}}%
655
+ \XC@let@Nc\@@tmp{\string\colorD@#2}%
656
+ \edef\@@met{\expandafter\@firstoftwo\@@tmp}%
657
+ \edef\@@tmp{\expandafter\@secondoftwo\@@tmp}%
658
+ \ifx\@@met\XC@met@step\else
659
+ \edef\@@scl{\@ifxempty{#1}\colorseriescycle{#1}}%
660
+ \expandafter\XC@calc@\@@tmp,,,,:D%
661
+ \fi
662
+ \@namexdef{\string\colorS@#2}{\@@tmp}%
663
+ \endgroup}
664
+ \def\XC@step#1%
665
+ {\let\xcolor@\@gobbletwo\edef\@@tmp{\@nameuse{\string\color@#1}}%
666
+ \expandafter\XC@st@p\@@tmp{#1}%
667
+ \@namexdef{\string\color@#1}{\noexpand\xcolor@{}{}{\@@mod}{\@@tmp}}}
668
+ \def\XC@st@p#1#2#3%
669
+ {\def\@@mod{#1}\def\@@tmp{#2}\edef\@@vec{\@nameuse{\string\colorS@#3}}%
670
+ \@whilenum\@tempcnta>\z@\do
671
+ {\XC@inflate\@@mod\@@tmp\@@vec\@@tmp
672
+ \expandafter\XC@add\@@tmp,\@@tmp \expandafter\XC@calc@\@@tmp,,,,:U%
673
+ \advance\@tempcnta\m@ne}}
674
+ \def\XC@stepabs#1%
675
+ {\edef\@@tmp{\@nameuse{\string\colorB@#1}}%
676
+ \expandafter\XC@st@p\@@tmp{#1}%
677
+ \edef\@@tmp
678
+ {\def\noexpand\@@mod{\@@mod}\def\noexpand\@@clr{\@@tmp}}}
679
+ \def\blendcolors{\@ifstar{\XC@blendcolors\colorblend}{\XC@blendcolors{}}}
680
+ \def\XC@blendcolors#1#2%
681
+ {\edef\colorblend{#1}\XC@edef\XC@@tmp{#2}%
682
+ \ifx\XC@@tmp\@empty
683
+ \xglobal@\blendcolorsfalse
684
+ \else
685
+ \xglobal@\blendcolorstrue
686
+ \expandafter\XC@blendc@lors\XC@@tmp!!\@nil
687
+ \fi
688
+ \xglobalize@\colorblend \xglobal@stop}
689
+ \def\XC@blendc@lors!#1!#2!#3\@nil
690
+ {\@ifxempty{#1}{}%
691
+ {\@ifxempty{#2}%
692
+ {\edef\colorblend{\colorblend!#1!white}}%
693
+ {\edef\colorblend{\colorblend!#1!#2}\XC@blendc@lors!#3!\@nil}}}
694
+ \blendcolors{}
695
+ \def\maskcolors{\@testopt{\XC@maskcolors}{}}
696
+ \def\XC@maskcolors[#1]#2%
697
+ {\XC@edef\colormask{#2}%
698
+ \ifx\colormask\@empty
699
+ \xglobal@\maskcolorsfalse \def\XC@mmod{}\def\XC@mclr{}%
700
+ \else
701
+ \xglobal@\maskcolorstrue \extractcolorspecs\colormask\XC@mmod\XC@mclr
702
+ \@ifxempty{#1}{}%
703
+ {\convertcolorspec\XC@mmod\XC@mclr{#1}\XC@mclr \XC@sdef\XC@mmod{#1}}%
704
+ \XC@coremodel\XC@mmod\XC@mclr
705
+ \fi
706
+ \xglobalize@\colormask \xglobalize@\XC@mmod \xglobalize@\XC@mclr
707
+ \xglobal@stop}
708
+ \maskcolors{}
709
+ \DeclareRobustCommand\color
710
+ {\@ifnextchar[\@undeclaredcolor\@declaredcolor}
711
+ \def\@undeclaredcolor[#1]#2%
712
+ {\begingroup
713
+ \let\@@cls\@empty
714
+ \XC@getmodclr12{#1}{#2}{}%
715
+ {\ifblendcolors
716
+ \ifx\colorblend\@empty\else
717
+ \edef\@@mix{\expandafter\@gobble\colorblend}\@tempswafalse
718
+ \XC@coremodel\@@mod\@@clr\@xcolor@{}{}\@@mod\@@clr
719
+ \fi
720
+ \fi
721
+ \ifconvertcolorsU
722
+ \edef\@@tmp{\XC@tgt@mod{\@@mod}}%
723
+ \convertcolorspec\@@mod\@@clr\@@tmp\@@clr \let\@@mod\@@tmp
724
+ \fi
725
+ \ifmaskcolors
726
+ \convertcolorspec\@@mod\@@clr\XC@mmod\@@clr
727
+ \let\@@mod\XC@mmod
728
+ \XC@inflate\@@mod\XC@mclr\@@clr\@@tmp
729
+ \expandafter\XC@mul\@@tmp,\@@clr
730
+ \fi
731
+ \edef\@@tmp{\noexpand\XC@undeclaredcolor{\@@mod}{\@@clr}}%
732
+ \expandafter\endgroup\@@tmp}}
733
+ \def\XC@undeclaredcolor#1#2%
734
+ {\@ifundefinedmodel{#1}%
735
+ {\c@lor@error{model `#1'}}%
736
+ {\@nameuse{color@#1}\current@color{#2}%
737
+ \edef\XC@current@color{\noexpand\xcolor@{}{\current@color}{#1}{#2}}%
738
+ \XC@display}}
739
+ \def\@declaredcolor#1%
740
+ {\XC@edef\XC@@tmp{#1}\XC@@tstfalse
741
+ \ifcase\XC@type\XC@@tmp\relax \XC@@tsttrue\or \relax\else
742
+ \ifblendcolors\XC@@tsttrue\fi \ifmaskcolors\XC@@tsttrue\fi
743
+ \ifconvertcolorsU\XC@@tsttrue\fi
744
+ \fi
745
+ \ifXC@@tst
746
+ \expandafter\XC@declaredcolor\else
747
+ \expandafter\XC@declaredc@lor\fi}
748
+ \def\XC@declaredcolor
749
+ {\XC@split\XC@@tmp
750
+ \edef\@@tmp{\noexpand\@undeclaredcolor[\@@mod]{\@@clr}}%
751
+ \expandafter\endgroup\@@tmp}
752
+ \def\XC@declaredc@lor
753
+ {\XC@let@Nc\XC@current@color{\string\color@\XC@@tmp}%
754
+ \edef\current@color{\XC@current@color}%
755
+ \XC@display}
756
+ \def\textcolor#1#{\@textcolor{#1}}
757
+ \def\@textcolor#1#2#3{\protect\leavevmode{\color#1{#2}#3}}
758
+ \def\pagecolor
759
+ {\begingroup
760
+ \let\ignorespaces\endgroup \let\set@color\set@page@color
761
+ \color}
762
+ \def\nopagecolor
763
+ {\@ifundefined{no@page@color}%
764
+ {\PackageInfo{xcolor}{\string\nopagecolor\space is not supported}}%
765
+ {\no@page@color}}
766
+ \def\colorbox#1#{\protect\color@box{#1}}
767
+ \def\color@box#1#2{\color@b@x\relax{\color#1{#2}}}
768
+ \def\fcolorbox#1#{\color@fbox{#1}}
769
+ \def\color@fbox#1#2#3#{\protect\color@fb@x{#1}{#2}{#3}}
770
+ \def\color@fb@x#1#2#3#4%
771
+ {\color@b@x{\fboxsep\z@\color#1{#2}\XC@fbox}%
772
+ {\@ifxempty{#3}{\color#1}{\color#3}{#4}}}
773
+ \long\def\color@b@x#1#2#3%
774
+ {\leavevmode
775
+ \setbox\z@\hbox{\kern\fboxsep{\set@color#3}\kern\fboxsep}%
776
+ \dimen@\ht\z@\advance\dimen@\fboxsep\ht\z@\dimen@
777
+ \dimen@\dp\z@\advance\dimen@\fboxsep\dp\z@\dimen@
778
+ {#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}}
779
+ \def\XC@frameb@x#1%
780
+ {\hbox
781
+ {\@tempdima\fboxrule \advance\@tempdima\fboxsep
782
+ \advance\@tempdima\dp\@tempboxa
783
+ \setbox\@tempboxa\hbox
784
+ {\lower\@tempdima\hbox
785
+ {\vbox
786
+ {\kern\fboxrule
787
+ \hbox{\kern\fboxrule#1%
788
+ \vbox{\kern\fboxsep\box\@tempboxa\kern\fboxsep}%
789
+ #1\kern\fboxrule}%
790
+ \kern\fboxrule}}}%
791
+ \@tempdima\wd\@tempboxa
792
+ \edef\@tempa{{\the\@tempdima}{\the\ht\@tempboxa}{\the\dp\@tempboxa}}%
793
+ \box\@tempboxa\kern-\@tempdima\expandafter\boxframe\@tempa}}
794
+ \ifXC@@fbox
795
+ \let\@frameb@x\XC@frameb@x \let\XC@fbox\fbox
796
+ \else
797
+ \def\XC@fbox{\let\@frameb@x\XC@frameb@x\fbox}
798
+ \fi
799
+
800
+ \ifnum\XC@@xcd@>\m@ne
801
+ \def\XC@boxframe#1#2#3#4%
802
+ {\hbox{\sbox\z@{\ifdim\fboxrule>\z@ #4\fi}%
803
+ \wd\z@#1\relax\ht\z@#2\relax\dp\z@#3\relax\box\z@}}
804
+ \fi
805
+ \ifcase\XC@@xcd@
806
+ \providecommand*\color@block[3]%
807
+ {{\set@color\hbox
808
+ {\dimen@#3\edef\@tempa{ \number\dimen@\space}%
809
+ \dimen@#2\edef\@tempa{ \number\dimen@\@tempa}%
810
+ \dimen@#1\relax
811
+ \XC@special{\number\dimen@\@tempa XCcolorblock}}}}
812
+ \providecommand*\boxframe[3]%
813
+ {\XC@boxframe{#1}{#2}{#3}%
814
+ {\dimen@#3\edef\@tempa{ \number\dimen@\space}%
815
+ \dimen@#2\edef\@tempa{ \number\dimen@\@tempa}%
816
+ \dimen@#1\relax
817
+ \XC@special{\number\fboxrule\space\number\dimen@\@tempa XCboxframe}}}
818
+ \or
819
+ \providecommand*\boxframe[3]%
820
+ {\XC@boxframe{#1}{#2}{#3}%
821
+ {\dimen@#3\edef\@tempa{ 0 -\strip@pt\dimen@\space}%
822
+ \edef\@tempb{\advance\dimen@\the\dimen@}%
823
+ \dimen@#2\advance\dimen@-\fboxrule\@tempb
824
+ \edef\@tempb{ \strip@pt\dimen@\space re s}%
825
+ \dimen@#1\advance\dimen@-\fboxrule
826
+ \edef\@tempb{ cm\@tempa\strip@pt\dimen@\@tempb}%
827
+ \dimen@.5\fboxrule\edef\@tempa{ \strip@pt\dimen@}%
828
+ \XC@special
829
+ {0.996264 0 0 0.996264 0 0 cm
830
+ \strip@pt\fboxrule\space w [] 0 d 2 J 0 j 4 M
831
+ 1 0 0 1\@tempa\@tempa\@tempb}}}
832
+ \fi
833
+ \providecommand*\color@block[3]%
834
+ {{\set@color\rlap{\ifcolors@\vrule\@width#1\@height#2\@depth#3\fi}}}
835
+ \providecommand*\boxframe[3]%
836
+ {\hbox
837
+ {\dimen@#2\advance\dimen@#3\relax
838
+ \lower#3\vbox
839
+ {\hrule\@height\fboxrule
840
+ \@tempdima-0.5\fboxrule \ifodd\fboxrule\advance\@tempdima\m@ne sp\fi
841
+ \kern\@tempdima
842
+ \hbox
843
+ {\advance\dimen@-\fboxrule
844
+ \vrule\@width\fboxrule\@height\dimen@\@depth\z@
845
+ \@tempdima#1\advance\@tempdima-\tw@\fboxrule \kern\@tempdima
846
+ \vrule\@width\fboxrule\@height\dimen@\@depth\z@}%
847
+ \kern-0.5\fboxrule
848
+ \hrule\@height\fboxrule}}}
849
+ \def\@xcolor@#1#2#3#4%
850
+ {\XC@sdef\@@mod{#3}\edef\@@clr{#4}%
851
+ \ifx\@@mix\@empty\else\expandafter\@xcolor@@\@@mix!!!!\@nil\fi
852
+ \if@tempswa
853
+ \XC@let@Nc\@@tmp{XC@cnv@\@@mod @compl}%
854
+ \ifx\@@tmp\relax \expandafter\XC@calc@\@@clr,,,,:C\else
855
+ \expandafter\@@tmp\@@clr,\fi
856
+ \let\@@clr\@@tmp
857
+ \fi}
858
+ \def\@xcolor@@#1!#2!#3!#4!#5\@nil
859
+ {\dimen@\@ifxempty{#1}{100}{#1}\p@
860
+ \edef\@@mix{\@ifxempty{#2}{white}{#2}}%
861
+ \ifdim\dimen@=100\p@
862
+ \expandafter\XC@postfix\@@mix]\relax
863
+ \else\ifdim\dimen@=\z@
864
+ \extractcolorspecs\@@mix\@@mod\@@clr
865
+ \else
866
+ \XC@let@Nc\@@tmp{XC@clr@\@@mod @\@@mix}%
867
+ \ifx\@@tmp\relax
868
+ \extractcolorspec\@@mix\@@tmp
869
+ \ifx\@@mod\XC@mod@gray
870
+ \edef\@@mod{\expandafter\@firstoftwo\@@tmp}%
871
+ \edef\@@tmp{\expandafter\@secondoftwo\@@tmp}%
872
+ \convertcolorspec\XC@mod@gray\@@clr\@@mod\@@clr
873
+ \else
874
+ \expandafter\convertcolorspec\@@tmp\@@mod\@@tmp
875
+ \fi
876
+ \else
877
+ \ifx\@@mod\XC@mod@hsb\expandafter\XC@extract@hue\@@clr:\@@hue\fi
878
+ \fi
879
+ \XC@inflate\@@mod\@@clr\@@tmp\@@tmp
880
+ \expandafter\XC@mix\@@tmp,\@@clr
881
+ \fi\fi
882
+ \@ifxempty{#3}%
883
+ {\@ifxempty{#4}{}{\@xcolor@@!#4!#5\@nil}}%
884
+ {\@xcolor@@#3!#4!#5\@nil}}
885
+ \def\XC@split#1%
886
+ {\begingroup\XC@edef\@@tmp{#1}\expandafter\XC@split@i\@@tmp>>\@nnil}
887
+ \def\XC@split@i#1>%
888
+ {\def\@@tmp{#1}\XC@split@ii#1:\@nil \XC@func}
889
+ \def\XC@split@ii#1:#2\@nil
890
+ {\@ifxempty{#2}{\XC@split@vi}{\XC@split@iii#1,,:#2}}
891
+ \def\XC@split@iii#1,#2,#3:#4:%
892
+ {\edef\XC@@mod{#1}\let\@tempa\@empty
893
+ \ifx,#2,\XC@@tsttrue\@tempdima\z@\else\XC@@tstfalse\@tempdima#2\p@\fi
894
+ \XC@split@iv#4;,;}
895
+ \def\XC@split@iv#1,#2;%
896
+ {\@ifxempty{#1}%
897
+ {\let\XC@@clr\@empty \@tempa \expandafter\XC@calc@\XC@@clr,,,,:U%
898
+ \let\@@mod\XC@@mod \let\@@clr\@@tmp}
899
+ {\XC@append\@tempa{\XC@split@v{#1}{#2}}%
900
+ \ifXC@@tst\advance\@tempdima#2\p@\fi
901
+ \XC@split@iv}}
902
+ \def\XC@split@v#1#2%
903
+ {\def\@@tmp{#1}\XC@split@vi
904
+ \ifx\@@mod\XC@@mod\else
905
+ \convertcolorspec\@@mod\@@clr\XC@@mod\@@clr
906
+ \fi
907
+ \dimen@#2\p@ \rdivide\dimen@\@tempdima
908
+ \edef\@@scl{\strip@pt\dimen@}%
909
+ \expandafter\XC@calc@\@@clr,,,,:S%
910
+ \ifx\XC@@clr\@empty\let\XC@@clr\@@tmp\else
911
+ \XC@inflate\XC@@mod\XC@@clr\@@tmp\@@tmp
912
+ \expandafter\XC@add\@@tmp,\XC@@clr
913
+ \fi}
914
+ \def\XC@split@vi{\count@\z@ \expandafter\XC@split@vii\@@tmp!\@nil}
915
+ \def\XC@split@vii#1%
916
+ {\ifx#1-\advance\count@\@ne\expandafter\XC@split@vii
917
+ \else\expandafter\XC@split@viii\expandafter#1\fi}
918
+ \def\XC@split@viii#1!#2\@nil
919
+ {\edef\@@nam{#1}\edef\@@mix{#2}%
920
+ \ifodd\count@\@tempswatrue\else\@tempswafalse\fi
921
+ \@ifundefinedcolor\@@nam
922
+ {\c@lor@error{`\@@nam'}\def\@@nam{black}}{}%
923
+ \let\xcolor@\@xcolor@\@nameuse{\string\color@\@@nam}}
924
+ \def\XC@postfix#1#2]#3\relax
925
+ {\begingroup
926
+ \if[#1\@tempcnta#2\relax\XC@stepabs\@@nam
927
+ \else\@tempcnta\z@
928
+ \@tfor\@@tok:=#1#2\do
929
+ {\if+\@@tok\advance\@tempcnta\@ne
930
+ \else\if-\@@tok\advance\@tempcnta\m@ne
931
+ \else\@tempcnta\z@\expandafter\@break@tfor\fi\fi}%
932
+ \ifnum\@tempcnta=\z@\relax\else\XC@step\@@nam\fi
933
+ \let\@@tmp\@empty
934
+ \fi\expandafter\endgroup\@@tmp}
935
+ \def\XC@func#1>{\@ifxempty{#1}{\remove@to@nnil}{\XC@fun@#1,>\XC@func}}
936
+ \def\XC@fun@#1,#2>{\@nameuse{XC@func@#1}#2,,>}
937
+ \def\XC@func@wheel#1,#2,#3>{\XC@func@wh@el{#1}{#2}0}
938
+ \def\XC@func@twheel#1,#2,#3>{\XC@func@wh@el{#1}{#2}1}
939
+ \def\XC@func@wh@el#1#2#3%
940
+ {\convertcolorspec\@@mod\@@clr
941
+ {\ifcase#3 \XC@mod@Hsb\or\XC@mod@tHsb\fi}\@@clr
942
+ \expandafter\XC@extract@hue\@@clr:\@@hue \dimen@#1\p@
943
+ \@ifxempty{#2}{}%
944
+ {\rdivide\dimen@{#2}\lshift\dimen@
945
+ \dimen@\rangeHsb\dimen@\rshift\dimen@}%
946
+ \advance\dimen@\@@hue\p@ \rdivide\dimen@\rangeHsb
947
+ \edef\@@hue{\strip@pt\dimen@}\XC@calcU\@@hue\@@hue
948
+ \ifcase#3
949
+ \expandafter\XC@replace@hue\@@clr:\@@hue,\@@clr
950
+ \or
951
+ \XC@c@lcS\rangeHsb{}\@@hue\@@hue
952
+ \expandafter\XC@replace@hue\@@clr:\@@hue,\@@clr
953
+ \convertcolorspec\XC@mod@tHsb\@@clr\XC@mod@hsb\@@clr
954
+ \fi
955
+ \let\@@mod\XC@mod@hsb}
956
+ \def\XC@display
957
+ {\XC@bcolor\XC@let@cN{\string\color@.}\XC@current@color
958
+ \ifnum\XC@type{.}=1
959
+ \PackageWarning{xcolor}{Incompatible color definition}\else
960
+ \ifnum\XC@tracing>2
961
+ \begingroup \let\xcolor@\@empty \def\@nil{\string\@nil}%
962
+ \PackageInfo{xcolor}{Setting color `\XC@current@color'}%
963
+ \endgroup
964
+ \fi\fi
965
+ \XC@mcolor\set@color\XC@ecolor\ignorespaces}
966
+ \let\XC@bcolor\relax
967
+ \let\XC@mcolor\relax
968
+ \let\XC@ecolor\relax
969
+ \def\XC@bordercolor#1#2%
970
+ {\extractcolorspec{#2}\XC@@tmp
971
+ \expandafter\convertcolorspec\XC@@tmp\XC@mod@rgb\XC@@tmp
972
+ \expandafter\edef\csname @#1bordercolor\endcsname
973
+ {\expandafter\XC@strip@comma\XC@@tmp,,\@nnil}}
974
+ \def\XC@pdfborder#1 #2 #3\relax
975
+ {\def\@@scl{80}\XC@calc@#1,#2,#3,,:S%
976
+ \edef\@pdfborder{\expandafter\XC@strip@comma\@@tmp,,\@nnil}}
977
+ \@ifXCopt{table}{%
978
+ \def\rowcolors
979
+ {\@ifstar{\@rowcmdfalse\rowc@lors}{\@rowcmdtrue\rowc@lors}}
980
+ \def\rowc@lors{\@testopt{\rowc@l@rs}{}}
981
+ \def\rowc@l@rs[#1]#2#3#4%
982
+ {\global\rownum=\z@
983
+ \global\@rowcolorstrue
984
+ \@ifxempty{#3}%
985
+ {\def\@oddrowcolor{\@norowcolor}}%
986
+ {\def\@oddrowcolor{\gdef\CT@row@color{\CT@color{#3}}}}%
987
+ \@ifxempty{#4}%
988
+ {\def\@evenrowcolor{\@norowcolor}}%
989
+ {\def\@evenrowcolor{\gdef\CT@row@color{\CT@color{#4}}}}%
990
+ \if@rowcmd
991
+ \def\@rowcolors
992
+ {#1\if@rowcolors
993
+ \noalign{\relax\ifnum\rownum<#2\@norowcolor\else
994
+ \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi\fi}%
995
+ \fi}%
996
+ \else
997
+ \def\@rowcolors
998
+ {\if@rowcolors
999
+ \ifnum\rownum<#2\noalign{\@norowcolor}\else
1000
+ #1\noalign{\ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi}\fi
1001
+ \fi}%
1002
+ \fi
1003
+ \CT@everycr{\@rowc@lors\the\everycr}%
1004
+ \ignorespaces}
1005
+ \def\@rowc@lors{\noalign{\global\advance\rownum\@ne}\@rowcolors}
1006
+ \let\@rowcolors\@empty
1007
+ \def\showrowcolors{\noalign{\global\@rowcolorstrue}\@rowcolors}
1008
+ \def\hiderowcolors{\noalign{\global\@rowcolorsfalse\@norowcolor}}
1009
+ \def\@norowcolor{\global\let\CT@row@color\relax}
1010
+ \@norowcolor
1011
+ \newif\if@rowcolors
1012
+ \newif\if@rowcmd
1013
+ \@ifundefined{rownum}{\newcount\rownum}{}
1014
+ \def\CT@extract#1\columncolor#2#3\@nil
1015
+ {\if!#2%
1016
+ \let\CT@column@color\@empty
1017
+ \else
1018
+ \if[#2%
1019
+ \expandafter\CT@extractb
1020
+ \else
1021
+ \XC@edef\XC@@tmp{#2}%
1022
+ \edef\CT@column@color{\noexpand\CT@color{\XC@@tmp}}%
1023
+ \expandafter\CT@extractd
1024
+ \fi
1025
+ {#1}#3\@nil
1026
+ \fi}
1027
+ }{}
1028
+ \def\extractcolorspec#1#2%
1029
+ {\XC@split{#1}\edef\@@tmp{{\@@mod}{\@@clr}}\aftergroupdef#2\@@tmp}
1030
+ \def\extractcolorspecs#1#2#3%
1031
+ {\extractcolorspec{#1}#3%
1032
+ \edef#2{\expandafter\@firstoftwo#3}%
1033
+ \edef#3{\expandafter\@secondoftwo#3}}
1034
+ \def\XC@extract@hue#1,#2:#3{\edef#3{#1}}
1035
+ \def\XC@replace@hue#1,#2:#3,#4{\edef#4{#3,#2}}
1036
+ \def\@ifundefinedcolor#1{\@ifundefined{\string\color@#1}}
1037
+ \def\@ifundefinedmodel#1{\@ifundefined{color@#1}}
1038
+ \def\XC@type#1%
1039
+ {\expandafter\expandafter\expandafter\XC@typ@
1040
+ \csname\string\color@#1\endcsname\@empty\@empty\@empty\XC@@}
1041
+ \def\XC@typ@#1#2#3#4\XC@@
1042
+ {\ifx#1\relax 0\else
1043
+ \ifx#1\xcolor@
1044
+ \ifx$#2$%
1045
+ \ifx$#3$4\else3\fi\@gobbletwo
1046
+ \else2\fi\@gobbletwo
1047
+ \else1\fi
1048
+ \fi}
1049
+ \def\XC@info#1#2%
1050
+ {\XC@edef#2{#1}%
1051
+ \if.#2\def#2{0}\else\expandafter\in@\expandafter>\expandafter{#2}%
1052
+ \ifin@\def#2{4}\else\expandafter\in@\expandafter:\expandafter{#2}%
1053
+ \ifin@\def#2{3}\else\expandafter\in@\expandafter!\expandafter{#2}%
1054
+ \ifin@\def#2{2}\else\edef#2{\noexpand\in@{/-}{/#2}}#2%
1055
+ \edef#2{\ifin@2\else1\fi}\fi\fi\fi\fi}
1056
+ \def\tracingcolors{\begingroup\afterassignment\XC@tracingcolors\count@}
1057
+ \def\XC@tracingcolors{\aftergroupdef\XC@tracing{\the\count@}}
1058
+ \tracingcolors=0
1059
+ \def\XC@logdef#1%
1060
+ {\ifnum\XC@tracing>1
1061
+ \@ifundefinedcolor{#1}%
1062
+ {\ifnum\XC@tracing>2
1063
+ \PackageInfo{xcolor}{Defining color `#1'}%
1064
+ \fi}%
1065
+ {\PackageInfo{xcolor}{Redefining color `#1'}}%
1066
+ \fi}
1067
+ \newenvironment*{testcolors}[1][rgb,cmyk,hsb,HTML]%
1068
+ {\let\@@nam\@empty\count@\z@
1069
+ \@for\@@tmp:=#1\do
1070
+ {\advance\count@\@ne
1071
+ \XC@sdef\@@tmp{\@@tmp}\edef\@@nam{\@@nam{\@@tmp}}}%
1072
+ \edef\@@num{\the\count@}%
1073
+ \def\XC@@gt{\textgreater}\def\@@tmp{OT1}%
1074
+ \ifx\f@encoding\@@tmp
1075
+ \@expandtwoargs\in@{,\f@family,}{,cmtt,pcr,}%
1076
+ \ifin@\def\XC@@gt{>}\fi
1077
+ \fi
1078
+ \def\XC@@xcp@{-1}\ifnum\XC@tracing>1 \def\XC@tracing{1}\fi
1079
+ \def\testcolor{\@testopt{\@testcolor}{}}%
1080
+ \def\@testcolor[##1]##2%
1081
+ {\XC@mdef\@@mod{##1}\XC@edef\@@clr{##2}%
1082
+ \ifx\@@mod\@empty
1083
+ \let\@@arg\@@clr\XC@replace\@@arg>\XC@@gt\else
1084
+ \edef\@@arg{[\@@mod]{\@@clr}}\XC@definecolor[]{*}\@@mod\@@clr
1085
+ \def\@@clr{*}\fi
1086
+ \XC@append\@@arg{&}\extractcolorspecs\@@clr\@@mod\@@clr
1087
+ \@testc@lor}%
1088
+ \def\@testc@lor
1089
+ {\count@\z@
1090
+ \expandafter\@tfor\expandafter\@@tmp\expandafter:\expandafter=\@@nam\do
1091
+ {\ifx\@@clr\@empty
1092
+ \edef\@@cmd{\noexpand\textbf{\@@tmp}}%
1093
+ \else
1094
+ \convertcolorspec\@@mod\@@clr\@@tmp\@@cmd
1095
+ \edef\@@cmd
1096
+ {\noexpand\@testc@l@r{\@@tmp}{\@@cmd}%
1097
+ \ifx\@@mod\@@tmp\noexpand\underline\fi
1098
+ {\expandafter\XC@strip@comma\@@cmd,,\@nnil}}%
1099
+ \fi
1100
+ \expandafter\XC@append\expandafter\@@arg\expandafter{\@@cmd}%
1101
+ \advance\count@\@ne
1102
+ \ifnum\count@=\@@num\XC@append\@@arg{\\}\else\XC@append\@@arg{&}\fi}%
1103
+ \@@arg}%
1104
+ \def\@testc@l@r##1##2%
1105
+ {\fboxsep\z@\fbox{\colorbox[##1]{##2}{\phantom{XX}}} }%
1106
+ \tabular{@{}l*{\@@num}{l}@{}}%
1107
+ \def\@@arg{\textbf{color}& }\let\@@clr\@empty\@testc@lor}%
1108
+ {\endtabular\ignorespacesafterend}
1109
+ \def\color@setgroup{\begingroup\set@color}
1110
+ \let\color@begingroup\begingroup
1111
+ \def\color@endgroup{\endgraf\endgroup}
1112
+ \def\color@hbox{\hbox\bgroup\color@begingroup}
1113
+ \def\color@vbox{\vbox\bgroup\color@begingroup}
1114
+ \def\color@endbox{\color@endgroup\egroup}
1115
+ \def\convertcolorspec#1#2#3#4%
1116
+ {\begingroup
1117
+ \XC@sdef\sm{#1}\XC@sdef\tm{#3}\edef\@@tmp{#2}%
1118
+ \ifx\sm\XC@mod@named\extractcolorspecs\@@tmp\sm\@@tmp\fi
1119
+ \ifx\sm\tm\else\csname XC@cnv@\sm\expandafter\endcsname\@@tmp,\fi
1120
+ \aftergroupdef#4\@@tmp}
1121
+ \def\XC@coremodel#1#2%
1122
+ {\XC@ifxcase#1%
1123
+ {\XC@mod@RGB {\convertcolorspec#1#2\XC@mod@rgb#2\let#1\XC@mod@rgb}%
1124
+ \XC@mod@HTML{\convertcolorspec#1#2\XC@mod@rgb#2\let#1\XC@mod@rgb}%
1125
+ \XC@mod@Hsb {\convertcolorspec#1#2\XC@mod@hsb#2\let#1\XC@mod@hsb}%
1126
+ \XC@mod@tHsb{\convertcolorspec#1#2\XC@mod@hsb#2\let#1\XC@mod@hsb}%
1127
+ \XC@mod@HSB {\convertcolorspec#1#2\XC@mod@hsb#2\let#1\XC@mod@hsb}%
1128
+ \XC@mod@Gray{\convertcolorspec#1#2\XC@mod@gray#2\let#1\XC@mod@gray}%
1129
+ \XC@mod@wave{\convertcolorspec#1#2\XC@mod@hsb#2\let#1\XC@mod@hsb}%
1130
+ \XC@mod@named{}%
1131
+ \XC@mod@ps{}}%
1132
+ {\expandafter\XC@calc@#2,,,,:N\let#2\@@tmp}}
1133
+ \def\XC@cnv@rgb#1,#2,#3,%
1134
+ {\XC@ifxcase\tm
1135
+ {\XC@mod@cmy {\XC@calc@#1,#2,#3,,:C}%
1136
+ \XC@mod@cmyk
1137
+ {\XC@calc@#1,#2,#3,,:C\expandafter\XC@cnv@cmy@cmyk\@@tmp,}%
1138
+ \XC@mod@RGB {\edef\@@scl{\rangeRGB}\XC@calc@#1,#2,#3,,:M}%
1139
+ \XC@mod@HTML{\edef\@@scl{\@cclv}\XC@calc@#1,#2,#3,,:M%
1140
+ \expandafter\XC@calc@\@@tmp,,:H%
1141
+ \expandafter\XC@cnv@rgb@HTML\@@tmp,}%
1142
+ \XC@mod@gray{\XC@cnv@rgb@gray#1,#2,#3,}%
1143
+ \XC@mod@Gray{\XC@cnv@rgb@gray#1,#2,#3,\XC@cnv@gray\@@tmp,}}%
1144
+ {\XC@cnv@rgb@hsb#1,#2,#3,\XC@cnv@hsb@}}
1145
+ \def\XC@cnv@rgb@
1146
+ {\ifx\tm\XC@mod@rgb\else\expandafter\XC@cnv@rgb\@@tmp,\fi}
1147
+ \def\XC@cnv@rgb@hsb#1,#2,#3,%
1148
+ {\count@\z@
1149
+ \ifdim#2\p@>#1\p@ \else\advance\count@4 \fi
1150
+ \ifdim#3\p@>#2\p@ \else\advance\count@2 \fi
1151
+ \ifdim#1\p@>#3\p@ \else\advance\count@1 \fi
1152
+ \ifcase\count@\or
1153
+ \XC@c@v@rgb@hsb{#3}{#2}{#1}3{}\or
1154
+ \XC@c@v@rgb@hsb{#2}{#1}{#3}1{}\or
1155
+ \XC@c@v@rgb@hsb{#2}{#3}{#1}3-\or
1156
+ \XC@c@v@rgb@hsb{#1}{#3}{#2}5{}\or
1157
+ \XC@c@v@rgb@hsb{#3}{#1}{#2}5-\or
1158
+ \XC@c@v@rgb@hsb{#1}{#2}{#3}1-\or
1159
+ \def\@tempa{0}\def\@tempb{0}\XC@calcN{#3}\@tempc
1160
+ \fi
1161
+ \edef\@@tmp{\@tempa,\@tempb,\@tempc}}
1162
+ \def\XC@c@v@rgb@hsb#1#2#3#4#5%
1163
+ {\XC@calcN{#1}\@tempc \llshiftset\dimen@{#1}%
1164
+ \llshiftset\@tempdimb{-#3}\advance\@tempdimb\dimen@
1165
+ \llshiftset\@tempdima{-#5#2}\advance\@tempdima#5\dimen@
1166
+ \advance\@tempdima#4\@tempdimb \rdivide\@tempdima{6\@tempdimb}%
1167
+ \edef\@tempa{\ifdim\@tempdima>\p@1\else\strip@pt\@tempdima\fi}%
1168
+ \rdivide\@tempdimb\dimen@
1169
+ \edef\@tempb{\strip@pt\@tempdimb}}
1170
+ \def\XC@cnv@rgb@gray#1,#2,#3,%
1171
+ {\llshiftset\dimen@{#1}\@tempdima30\dimen@
1172
+ \llshiftset\dimen@{#2}\advance\@tempdima59\dimen@
1173
+ \llshiftset\dimen@{#3}\advance\@tempdima11\dimen@
1174
+ \rrshift\@tempdima \rdivide\@tempdima{100}%
1175
+ \edef\@@tmp{\strip@pt\@tempdima}}
1176
+ \def\XC@cnv@rgb@HTML#1,#2,#3,%
1177
+ {\edef\@@tmp{#1#2#3}}
1178
+ \def\XC@cnv@cmy#1,#2,#3,%
1179
+ {\XC@ifxcase\tm
1180
+ {\XC@mod@cmyk{\XC@cnv@cmy@cmyk#1,#2,#3,}%
1181
+ \XC@mod@gray{\XC@cnv@rgb@gray#1,#2,#3,\XC@calcC\@@tmp\@@tmp}%
1182
+ \XC@mod@Gray{\XC@cnv@rgb@gray#1,#2,#3,\XC@calcC\@@tmp\@@tmp
1183
+ \XC@cnv@gray\@@tmp,}}%
1184
+ {\XC@calc@#1,#2,#3,,:C\XC@cnv@rgb@}}
1185
+ \def\XC@cnv@cmy@cmyk#1,#2,#3,%
1186
+ {\edef\@@scl
1187
+ {\ifdim#1\p@<#2\p@
1188
+ \ifdim#1\p@<#3\p@ #1\else #3\fi \else
1189
+ \ifdim#2\p@<#3\p@ #2\else #3\fi \fi}%
1190
+ \expandafter\XC@calc@\adjustUCRBG,:S%
1191
+ \expandafter\XC@c@v@cmy@cmyk\@@tmp,#1,#2,#3,}
1192
+ \def\XC@c@v@cmy@cmyk#1,#2,#3,#4,#5,#6,#7,%
1193
+ {\XC@add#5,#6,#7,,-#1,-#2,-#3,,\@@tmp \edef\@@tmp{\@@tmp,#4}%
1194
+ \expandafter\XC@calc@\@@tmp,:N}
1195
+ \def\XC@cnv@cmyk#1,#2,#3,#4,%
1196
+ {\XC@ifxcase\tm
1197
+ {\XC@mod@gray{\XC@cnv@rgb@gray#1,#2,#3,\edef\@@arg{#4}%
1198
+ \XC@calcT\@@tmp\@@tmp \XC@calcC\@@tmp\@@tmp}%
1199
+ \XC@mod@Gray{\XC@cnv@rgb@gray#1,#2,#3,\edef\@@arg{#4}%
1200
+ \XC@calcT\@@tmp\@@tmp \XC@calcC\@@tmp\@@tmp \XC@cnv@gray\@@tmp,}}%
1201
+ {\XC@cnv@cmyk@cmy#1,#2,#3,#4,%
1202
+ \ifx\tm\XC@mod@cmy\else\expandafter\XC@cnv@cmy\@@tmp,\fi}}
1203
+ \def\XC@cnv@cmyk@cmy#1,#2,#3,#4,%
1204
+ {\edef\@@arg{#4}\XC@calc@#1,#2,#3,,:T}
1205
+ \def\XC@cnv@hsb#1,#2,#3,%
1206
+ {\XC@ifxcase\tm
1207
+ {\XC@mod@Hsb {\XC@cnv@hsb@Hsb#1,#2,#3,}%
1208
+ \XC@mod@tHsb{\XC@cnv@hsb@Hsb#1,#2,#3,\expandafter\XC@cnv@Hsb\@@tmp,}%
1209
+ \XC@mod@HSB {\edef\@@scl{\rangeHSB}\XC@calc@#1,#2,#3,,:M}}%
1210
+ {\XC@cnv@hsb@rgb#1,#2,#3,\XC@cnv@rgb@}}
1211
+ \def\XC@cnv@hsb@
1212
+ {\ifx\tm\XC@mod@hsb\else\expandafter\XC@cnv@hsb\@@tmp,\fi}
1213
+ \def\XC@cnv@hsb@rgb#1,#2,#3,%
1214
+ {\llshiftset\dimen@{#1}\dimen@6\dimen@ \rrshift\dimen@
1215
+ \afterassignment\dimen@\count@=\the\dimen@
1216
+ \edef\@@tmp{\strip@pt\dimen@}%
1217
+ \ifodd\count@\else\XC@calcC\@@tmp\@@tmp\fi
1218
+ \edef\@@tmp
1219
+ {\ifcase\count@ 0,\@@tmp,1\or \@@tmp,0,1\or 1,0,\@@tmp\or
1220
+ 1,\@@tmp,0\or \@@tmp,1,0\or 0,1,\@@tmp\or 0,\@@tmp,1\fi}%
1221
+ \edef\@@scl{#2}\expandafter\XC@calc@\@@tmp,,:S%
1222
+ \expandafter\XC@calc@\@@tmp,,:C%
1223
+ \edef\@@scl{#3}\expandafter\XC@calc@\@@tmp,,:S%
1224
+ \expandafter\XC@calc@\@@tmp,,:N}
1225
+ \def\XC@cnv@hsb@Hsb#1,#2,#3,%
1226
+ {\XC@c@lcS\rangeHsb{,#2,#3}{#1}\@@tmp}
1227
+ \def\XC@cnv@gray#1,%
1228
+ {\XC@ifxcase\tm
1229
+ {\XC@mod@rgb {\XC@calcN{#1}\@@tmp \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}}%
1230
+ \XC@mod@cmy {\XC@calcC{#1}\@@tmp \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}}%
1231
+ \XC@mod@cmyk{\XC@calcC{#1}\@@tmp \edef\@@tmp{0,0,0,\@@tmp}}%
1232
+ \XC@mod@RGB {\edef\@@scl{\rangeRGB}\XC@calcM{#1}\@@tmp
1233
+ \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}}%
1234
+ \XC@mod@HTML{\edef\@@scl{\@cclv}\XC@calcM{#1}\@@tmp
1235
+ \XC@calcH\@@tmp\@@tmp \edef\@@tmp{\@@tmp\@@tmp\@@tmp}}%
1236
+ \XC@mod@HSB {\edef\@@scl{\rangeHSB}\XC@calcM{#1}\@@tmp
1237
+ \edef\@@tmp{0,0,\@@tmp}}%
1238
+ \XC@mod@Gray{\edef\@@scl{\rangeGray}\XC@calcM{#1}\@@tmp}}%
1239
+ {\XC@calcN{#1}\@@tmp \edef\@@tmp{0,0,\@@tmp}}}
1240
+ \def\XC@cnv@RGB#1,#2,#3,%
1241
+ {\edef\@@scl{\rangeRGB}\XC@calc@#1,#2,#3,,:D\XC@cnv@rgb@}
1242
+ \def\XC@cnv@HTML#1,%
1243
+ {\edef\@@tmp{\expandafter\@hex@Hex#1\relax}\expandafter\XC@cnv@HTML@\@@tmp
1244
+ \edef\@@scl{\@cclv}\expandafter\XC@calc@\@@tmp,,:D\XC@cnv@rgb@}
1245
+ \def\XC@cnv@HTML@#1#2#3#4#5#6%
1246
+ {\edef\@@tmp{\number"#1#2,\number"#3#4,\number"#5#6}}
1247
+ \def\XC@cnv@Hsb#1,#2,#3,%
1248
+ {\ifx\tm\XC@mod@tHsb\XC@cnv@@Hsb#1,#2,#3,\XC@cnv@Hsb@
1249
+ \else\XC@cnv@Hsb@hsb#1,#2,#3,\XC@cnv@hsb@\fi}
1250
+ \def\XC@cnv@Hsb@hsb#1,#2,#3,%
1251
+ {\XC@c@lcD\rangeHsb{,#2,#3}{#1}\@@tmp}
1252
+ \def\XC@cnv@@Hsb#1,#2,#3,#4%
1253
+ {\dimen@\rangeHsb\p@ \advance\dimen@\p@ \edef\@@tmp{\strip@pt\dimen@}%
1254
+ \edef\@@tmp{0,0;\rangetHsb;\rangeHsb,\rangeHsb;\@@tmp,\@@tmp;}%
1255
+ \dimen@#1\p@ \expandafter#4\@@tmp\@nnil
1256
+ \edef\@@tmp{\strip@pt\dimen@,#2,#3}}
1257
+ \def\XC@cnv@Hsb@#1,#2;#3,#4;%
1258
+ {\ifdim\dimen@<#4\p@
1259
+ \@tempdima#3\p@ \advance\@tempdima-#1\p@
1260
+ \@tempdimb#4\p@ \advance\@tempdimb-#2\p@
1261
+ \rdivide\@tempdima\@tempdimb
1262
+ \advance\dimen@-#2\p@ \rmultiply\dimen@{\strip@pt\@tempdima}%
1263
+ \advance\dimen@#1\p@ \expandafter\remove@to@nnil
1264
+ \else
1265
+ \def\@@tmp{\XC@cnv@Hsb@#3,#4;}\expandafter\@@tmp
1266
+ \fi}
1267
+ \def\XC@cnv@tHsb#1,#2,#3,%
1268
+ {\XC@cnv@@Hsb#1,#2,#3,\XC@cnv@tHsb@
1269
+ \ifx\tm\XC@mod@Hsb\else\expandafter\XC@cnv@Hsb\@@tmp,\fi}
1270
+ \def\XC@cnv@tHsb@#1,#2;#3,#4;%
1271
+ {\ifdim\dimen@<#3\p@
1272
+ \@tempdima#4\p@ \advance\@tempdima-#2\p@
1273
+ \@tempdimb#3\p@ \advance\@tempdimb-#1\p@
1274
+ \rdivide\@tempdima\@tempdimb
1275
+ \advance\dimen@-#1\p@ \rmultiply\dimen@{\strip@pt\@tempdima}%
1276
+ \advance\dimen@#2\p@ \expandafter\remove@to@nnil
1277
+ \else
1278
+ \def\@@tmp{\XC@cnv@tHsb@#3,#4;}\expandafter\@@tmp
1279
+ \fi}
1280
+ \def\XC@cnv@HSB#1,#2,#3,%
1281
+ {\edef\@@scl{\rangeHSB}\XC@calc@#1,#2,#3,,:D\XC@cnv@hsb@}
1282
+ \def\XC@cnv@Gray#1,%
1283
+ {\XC@c@lcD\rangeGray{}{#1}\@@tmp \XC@cnv@gray\@@tmp,}
1284
+ \def\XC@cnv@wave#1,%
1285
+ {\XC@cnv@wave@hsb#1,\XC@cnv@hsb@}
1286
+ \def\XC@cnv@wave@hsb#1,%
1287
+ {\@tempdima#1\p@
1288
+ \ifdim\@tempdima<440\p@
1289
+ \XC@c@v@wave@hsb{-.0166667}{7.33333}4{}\else
1290
+ \ifdim\@tempdima<490\p@
1291
+ \XC@c@v@wave@hsb{.02}{-8.8}4-\else
1292
+ \ifdim\@tempdima<510\p@
1293
+ \XC@c@v@wave@hsb{-.05}{25.5}2{}\else
1294
+ \ifdim\@tempdima<580\p@
1295
+ \XC@c@v@wave@hsb{.0142857}{-7.28571}2-\else
1296
+ \ifdim\@tempdima<645\p@
1297
+ \XC@c@v@wave@hsb{-.0153846}{9.92308}0{}\else
1298
+ \dimen@\z@ \fi\fi\fi\fi\fi
1299
+ \divide\dimen@6\relax
1300
+ \edef\@@tmp{\strip@pt\dimen@,1,}%
1301
+ \ifdim\@tempdima<420\p@
1302
+ \XC@c@v@wave@hsb{.0175}{-6.35}0{}\else
1303
+ \ifdim\@tempdima>700\p@
1304
+ \XC@c@v@wave@hsb{-.00875}{7.125}0{}\else
1305
+ \dimen@\p@ \fi\fi
1306
+ \edef\@@tmp{\@@tmp\strip@pt\dimen@}}
1307
+ \def\XC@c@v@wave@hsb#1#2#3#4%
1308
+ {\dimen@#1\@tempdima \advance\dimen@#2\p@
1309
+ \XC@calcR{\strip@pt\dimen@}\@tempa
1310
+ \dimen@#4\@tempa\p@ \advance\dimen@#3\p@}
1311
+ \def\XC@cnv@cmyk@compl#1,#2,#3,#4,%
1312
+ {\XC@cnv@cmyk@cmy#1,#2,#3,#4,%
1313
+ \expandafter\XC@calc@\@@tmp,,:C\expandafter\XC@cnv@cmy@cmyk\@@tmp,}
1314
+ \def\XC@cnv@hsb@compl#1,#2,#3,%
1315
+ {\lshiftset\dimen@{#1}\advance\dimen@\ifdim\dimen@<5\p@-\fi-5\p@
1316
+ \rshift\dimen@ \edef\@@tmp{\strip@pt\dimen@}%
1317
+ \lshiftset\dimen@{#3}\@tempdima#2\dimen@
1318
+ \@tempdimb\@tempdima \advance\@tempdimb10\p@ \advance\@tempdimb-\dimen@
1319
+ \ifdim\@tempdimb=\z@
1320
+ \edef\@@tmp{\@@tmp,0,0}%
1321
+ \else
1322
+ \rdivide\@tempdima\@tempdimb \rshift\@tempdimb
1323
+ \edef\@@tmp{\@@tmp,\strip@pt\@tempdima,\strip@pt\@tempdimb}%
1324
+ \fi}
1325
+ \def\substitutecolormodel#1#2%
1326
+ {\XC@sdef\XC@@tmp{\expandafter\XC@substitutecolormodel#2/ignore/\@nnil}%
1327
+ \ifx\XC@@tmp\XC@mod@ignore
1328
+ \XC@let@cN{color@#1}\color@ignore
1329
+ \else
1330
+ \expandafter\edef\csname color@#1\endcsname##1##2%
1331
+ {\noexpand\convertcolorspec
1332
+ \expandafter\noexpand\csname XC@mod@#1\endcsname{##2}%
1333
+ \expandafter\noexpand\csname XC@mod@\XC@@tmp\endcsname
1334
+ \noexpand\XC@@tmp\noexpand\expandafter
1335
+ \expandafter\noexpand\csname color@\XC@@tmp\endcsname
1336
+ \noexpand\expandafter##1\noexpand\expandafter{\noexpand\XC@@tmp}}%
1337
+ \fi
1338
+ \expandafter\xglobalize@\csname color@#1\endcsname \xglobal@stop
1339
+ \PackageInfo{xcolor}{Model `#1' substituted by `\XC@@tmp'}}
1340
+ \def\XC@substitutecolormodel#1/%
1341
+ {\@ifundefinedmodel{#1}{\XC@substitutecolormodel}{#1\remove@to@nnil}}
1342
+ \def\color@ignore#1#2{\def#1{}}
1343
+ \@ifundefinedmodel{rgb}%
1344
+ {\substitutecolormodel{rgb}{RGB/HTML/hsb/Hsb/HSB/cmy/cmyk/gray/Gray}}{}
1345
+ \@ifundefinedmodel{cmyk}{\substitutecolormodel{cmyk}{cmy/rgb}}{}
1346
+ \@ifundefinedmodel{cmy}%
1347
+ {\PackageInfo{xcolor}{Model `cmy' substituted by `cmy0'}
1348
+ \def\color@cmy#1#2{\color@cmyk#1{#2,0}}}{}
1349
+ \@ifundefinedmodel{hsb}{\@tempswatrue}%
1350
+ {\XC@ifcase\XC@@drv{{dvipdfm,textures}\@tempswatrue}\@tempswafalse}
1351
+ \if@tempswa
1352
+ \substitutecolormodel{hsb}{Hsb/HSB/rgb}
1353
+ \fi
1354
+ \@ifundefinedmodel{RGB}%
1355
+ {\substitutecolormodel{RGB}{HTML/rgb}}
1356
+ {\PackageInfo{xcolor}{Model `RGB' extended}
1357
+ \let\XC@color@RGB\color@RGB
1358
+ \def\color@RGB#1#2%
1359
+ {\relax\ifnum\rangeRGB=255
1360
+ \XC@color@RGB#1{#2}%
1361
+ \else
1362
+ \convertcolorspec\XC@mod@RGB{#2}\XC@mod@rgb\XC@@tmp
1363
+ \expandafter\color@rgb\expandafter#1\expandafter{\XC@@tmp}%
1364
+ \fi}}
1365
+ \@ifundefinedmodel{gray}{\substitutecolormodel{gray}{Gray/rgb}}{}
1366
+ \@ifundefinedmodel{HTML}{\substitutecolormodel{HTML}{rgb}}{}
1367
+ \@ifundefinedmodel{Hsb}{\substitutecolormodel{Hsb}{hsb}}{}
1368
+ \@ifundefinedmodel{tHsb}{\substitutecolormodel{tHsb}{hsb}}{}
1369
+ \@ifundefinedmodel{HSB}{\substitutecolormodel{HSB}{hsb}}{}
1370
+ \@ifundefinedmodel{Gray}{\substitutecolormodel{Gray}{gray}}{}
1371
+ \@ifundefinedmodel{wave}{\substitutecolormodel{wave}{hsb}}{}
1372
+ \def\XC@getcolor#1#2%
1373
+ {\begingroup\toks@{#1}\XC@getc@lor#1\XC@@\aftergroupdef#2{\@@tmp}}
1374
+ \def\XC@getc@lor#1#2\XC@@
1375
+ {\@ifxempty{#2}%
1376
+ {\expandafter\XC@getc@l@r#1\XC@@}%
1377
+ {\let\set@color\relax
1378
+ \ifx#1[%
1379
+ \expandafter\@undeclaredcolor\the\toks@\else
1380
+ \expandafter\@declaredcolor\expandafter{\the\toks@}\fi
1381
+ \let\@@tmp\XC@current@color}}
1382
+ \def\XC@getc@l@r#1#2\XC@@
1383
+ {\ifx#1\xcolor@
1384
+ \def\@@tmp{\xcolor@#2}%
1385
+ \else
1386
+ \let\set@color\relax
1387
+ \expandafter\@declaredcolor\expandafter{\the\toks@}%
1388
+ \let\@@tmp\XC@current@color
1389
+ \fi}
1390
+ \def\XC@usecolor#1{\expandafter\XC@usec@lor#1\XC@@}
1391
+ \def\XC@usec@lor#1#2\XC@@
1392
+ {\ifx#1\xcolor@
1393
+ \expandafter\expandafter\expandafter\c@lor@to@ps#1#2\@@
1394
+ \else
1395
+ \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter
1396
+ \expandafter\c@lor@to@ps\csname\string\color@#1#2\endcsname\@@
1397
+ \fi
1398
+ \space}
1399
+ \let\XC@c@lor@to@ps\XC@usecolor
1400
+ \let\pst@getcolor\XC@getcolor
1401
+ \let\pst@usecolor\XC@usecolor
1402
+ \def\c@lor@special#1#2{\edef\@tempa{\write#1{#2}}\@tempa}
1403
+ \def\normalcolor{\let\current@color\default@color\set@color}
1404
+ \AtBeginDocument{\let\default@color\current@color}
1405
+ \XC@ifcase\XC@@drv
1406
+ {{dvipdf,dvipdfm,dvipdfmx,dvips,pctex32}%
1407
+ {\def\c@lor@@named#1,#2,#3\@@#4%
1408
+ {\edef#4{\expandafter\expandafter\expandafter\@thirdoffive
1409
+ \csname\string\color@#1\endcsname}}
1410
+ \def\define@color@named#1#2%
1411
+ {\@namedef{\string\color@#1}{{}{}{ \colornameprefix#1}{}{}}}}%
1412
+ {dvipsone,luatex,pctexps,pdftex,tcidvi,truetex,vtex,xetex}%
1413
+ {\def\c@lor@@named#1,#2,#3\@@#4%
1414
+ {\edef#4{\expandafter\expandafter\expandafter\@thirdoffive
1415
+ \csname\string\color@#1\endcsname}}
1416
+ \def\define@color@named#1#2%
1417
+ {\let\@@cls\@empty\@namedef{\string\color@#1}{{}{}{#2}{}{}}}}%
1418
+ {textures}%
1419
+ {\def\c@lor@@named#1,#2,#3\@@#4%
1420
+ {\edef\@tempa{\color@P@custom{#1}{\if!#2!1\else#2\fi}}%
1421
+ \expandafter\def\expandafter#4\@tempa}
1422
+ \def\define@color@named#1#2%
1423
+ {\edef\@tempa{{#1}{#2}}\expandafter\AddCustomColor\@tempa}
1424
+ \def\c@lor@ps@#1 #2\@@
1425
+ {\expandafter\expandafter\expandafter\expandafter\expandafter
1426
+ \expandafter\expandafter\c@lor@to@ps@
1427
+ \csname\string\color@#1\expandafter\endcsname\space
1428
+ #2. \@@{#1}}}%
1429
+ }{}
1430
+ \definecolorset{rgb/hsb/cmyk/gray}{}{}%
1431
+ {red,1,0,0/0,1,1/0,1,1,0/.3;%
1432
+ green,0,1,0/.33333,1,1/1,0,1,0/.59;%
1433
+ blue,0,0,1/.66667,1,1/1,1,0,0/.11;%
1434
+ brown,.75,.5,.25/.083333,.66667,.75/0,.25,.5,.25/.5475;%
1435
+ lime,.75,1,0/.20833,1,1/.25,0,1,0/.815;%
1436
+ orange,1,.5,0/.083333,1,1/0,.5,1,0/.595;%
1437
+ pink,1,.75,.75/0,.25,1/0,.25,.25,0/.825;%
1438
+ purple,.75,0,.25/.94444,1,.75/0,.75,.5,.25/.2525;%
1439
+ teal,0,.5,.5/.5,1,.5/.5,0,0,.5/.35;%
1440
+ violet,.5,0,.5/.83333,1,.5/0,.5,0,.5/.205}%
1441
+ \definecolorset{cmyk/rgb/hsb/gray}{}{}%
1442
+ {cyan,1,0,0,0/0,1,1/.5,1,1/.7;%
1443
+ magenta,0,1,0,0/1,0,1/.83333,1,1/.41;%
1444
+ yellow,0,0,1,0/1,1,0/.16667,1,1/.89;%
1445
+ olive,0,0,1,.5/.5,.5,0/.16667,1,.5/.39}
1446
+ \definecolorset{gray/rgb/hsb/cmyk}{}{}%
1447
+ {black,0/0,0,0/0,0,0/0,0,0,1;%
1448
+ darkgray,.25/.25,.25,.25/0,0,.25/0,0,0,.75;%
1449
+ gray,.5/.5,.5,.5/0,0,.5/0,0,0,.5;%
1450
+ lightgray,.75/.75,.75,.75/0,0,.75/0,0,0,.25;%
1451
+ white,1/1,1,1/0,0,1/0,0,0,0}
1452
+ \XC@@names
1453
+ \AtBeginDocument{\let\XC@@stack\@empty}
1454
+ \let\colornameprefix\XC@@nameprefix
1455
+ \XC@catcodes
1456
+ \csname xcolorcmd\endcsname
1457
+ \color{black}
1458
+ \endinput
1459
+ %%
1460
+ %% End of file `xcolor.sty'.