summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tex/context/base/colo-ini.lua86
-rw-r--r--tex/context/base/colo-ini.mkiv6
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4185 -> 4181 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/status-files.pdfbin24488 -> 24497 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin249967 -> 249947 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
8 files changed, 54 insertions, 44 deletions
diff --git a/tex/context/base/colo-ini.lua b/tex/context/base/colo-ini.lua
index d9eeef3b7..0b3110d57 100644
--- a/tex/context/base/colo-ini.lua
+++ b/tex/context/base/colo-ini.lua
@@ -985,50 +985,58 @@ implement { name = "usecolors", actions = usecolors, arguments = "string" }
-- bonus
-function colors.pgfxcolorspec(ca) -- {}{}{colorspace}{list}
- -- local cv = attributes.colors.values[ca]
- local cv = colorvalues[ca]
- if cv then
- local model = cv[1]
- if model == 2 then
- return formatters["{gray}{%1.3f}"](cv[2])
- elseif model == 3 then
- return formatters["{rgb}{%1.3f,%1.3f,%1.3f}"](cv[3],cv[4],cv[5])
- elseif model == 4 then
- return formatters["{cmyk}{%1.3f,%1.3f,%1.3f,%1.3f}"](cv[6],cv[7],cv[8],cv[9])
+do
+
+ local function pgfxcolorspec(model,ca) -- {}{}{colorspace}{list}
+ -- local cv = attributes.colors.values[ca]
+ local cv = colorvalues[ca]
+ if cv then
+ if model and model ~= 0 then
+ model = model
+ else
+ model = forcedmodel(cv[1])
+ end
+ if model == 2 then
+ return formatters["{gray}{%1.3f}"](cv[2])
+ elseif model == 3 then
+ return formatters["{rgb}{%1.3f,%1.3f,%1.3f}"](cv[3],cv[4],cv[5])
+ elseif model == 4 then
+ return formatters["{cmyk}{%1.3f,%1.3f,%1.3f,%1.3f}"](cv[6],cv[7],cv[8],cv[9])
+ else
+ return formatters["{gray}{%1.3f}"](cv[2])
+ end
else
- return formatters["{gray}{%1.3f}"](cv[2])
+ return "{gray}{0}"
end
- else
- return "{gray}{0}"
end
-end
-implement {
- name = "pgfxcolorspec",
- actions = { colors.pgfxcolorspec, context },
- arguments = "integer"
-}
+ implement {
+ name = "pgfxcolorspec",
+ actions = { pgfxcolorspec, context },
+ arguments = { "integer", "integer" }
+ }
--- function commands.pgfregistercolor(name,attribute)
--- local cv = colorvalues[ca]
--- context.pushcatcodes('prt')
--- if cv then
--- local model = forcedmodel(cv[1])
--- if model == 2 then
--- context["pgfutil@definecolor"]("{%s}{gray}{%1.3f}",name,cv[2])
--- elseif model == 3 then
--- context["pgfutil@definecolor"]("{%s}{rgb}{%1.3f,%1.3f,%1.3f}",name,cv[3],cv[4],cv[5])
--- elseif model == 4 then
--- context["pgfutil@definecolor"]("{%s}{cmyk}{%1.3f,%1.3f,%1.3f,%1.3f}",name,cv[6],cv[7],cv[8],cv[9])
--- else
--- context["pgfutil@definecolor"]("{%s}{gray}{0}",name)
--- end
--- else
--- context["pgfutil@definecolor"]("{%s}{gray}{0}",name)
--- end
--- context.popcatcodes()
--- end
+ -- function commands.pgfregistercolor(name,attribute)
+ -- local cv = colorvalues[ca]
+ -- context.pushcatcodes('prt')
+ -- if cv then
+ -- local model = forcedmodel(cv[1])
+ -- if model == 2 then
+ -- context["pgfutil@definecolor"]("{%s}{gray}{%1.3f}",name,cv[2])
+ -- elseif model == 3 then
+ -- context["pgfutil@definecolor"]("{%s}{rgb}{%1.3f,%1.3f,%1.3f}",name,cv[3],cv[4],cv[5])
+ -- elseif model == 4 then
+ -- context["pgfutil@definecolor"]("{%s}{cmyk}{%1.3f,%1.3f,%1.3f,%1.3f}",name,cv[6],cv[7],cv[8],cv[9])
+ -- else
+ -- context["pgfutil@definecolor"]("{%s}{gray}{0}",name)
+ -- end
+ -- else
+ -- context["pgfutil@definecolor"]("{%s}{gray}{0}",name)
+ -- end
+ -- context.popcatcodes()
+ -- end
+
+end
-- handy
diff --git a/tex/context/base/colo-ini.mkiv b/tex/context/base/colo-ini.mkiv
index 0aca8ee1b..1eb3d8d7e 100644
--- a/tex/context/base/colo-ini.mkiv
+++ b/tex/context/base/colo-ini.mkiv
@@ -864,8 +864,10 @@
%D
%D \stopmode
-\def\pgf@context@registercolor#1% bonus macro
- {\setevalue{\string\color@#1}{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\thecolorattribute{#1}}}
+\def\pgf@context@registercolor#1{\setevalue{\string\color@#1}{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\zerocount\thecolorattribute{#1}}}
+\def\pgf@context@registergray #1{\setevalue{\string\color@#1}{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\plustwo \thecolorattribute{#1}}}
+\def\pgf@context@registerrgb #1{\setevalue{\string\color@#1}{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\plusthree\thecolorattribute{#1}}}
+\def\pgf@context@registercmyk #1{\setevalue{\string\color@#1}{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\plusfour \thecolorattribute{#1}}}
%D \starttyping
%D \ifdefined\pgf@context@registercolor
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 0990b3a1a..bfdf7e2f2 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2015.04.13 19:30}
+\newcontextversion{2015.04.13 22:45}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 8c31fb183..1b74b910a 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 11b25503e..7aed8a11d 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -39,7 +39,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2015.04.13 19:30}
+\edef\contextversion{2015.04.13 22:45}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index b2676f4dd..98ee6f6b8 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index 3832c19b2..c3cbee2cb 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 612fb34da..0727392ed 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 04/13/15 19:30:46
+-- merge date : 04/13/15 22:45:24
do -- begin closure to overcome local limits and interference