summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2012-05-05 10:42:00 +0200
committerHans Hagen <pragma@wxs.nl>2012-05-05 10:42:00 +0200
commit3e0a49fa480ce962beb49ca9f4741ee97bebc176 (patch)
tree75eb0bd1970bc4f7e5087ccadc48824f0617a451 /tex
parent31cd3d0f156a0a5f8981e18ac8a2f2e3d93341c4 (diff)
downloadcontext-3e0a49fa480ce962beb49ca9f4741ee97bebc176.tar.gz
beta 2012.05.05 10:42
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/back-pdf.mkiv5
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4076 -> 4067 bytes
-rw-r--r--tex/context/base/context-version.pngbin106067 -> 105270 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/lpdf-col.lua4
-rw-r--r--tex/context/base/lpdf-mis.lua18
-rw-r--r--tex/context/base/mlib-pdf.lua7
-rw-r--r--tex/context/base/mlib-pps.lua80
-rw-r--r--tex/context/base/mlib-pps.mkiv28
-rw-r--r--tex/context/base/s-abr-01.tex1
-rw-r--r--tex/context/base/status-files.pdfbin24320 -> 24314 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin173210 -> 173203 bytes
-rw-r--r--tex/context/base/type-imp-averia.mkiv52
-rw-r--r--tex/context/base/type-imp-texgyre.mkiv6
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
18 files changed, 154 insertions, 57 deletions
diff --git a/tex/context/base/back-pdf.mkiv b/tex/context/base/back-pdf.mkiv
index 184294120..9e441e224 100644
--- a/tex/context/base/back-pdf.mkiv
+++ b/tex/context/base/back-pdf.mkiv
@@ -210,7 +210,8 @@
%D Temporary hack, will be removed or improved or default.
-\def\TransparencyHack{\ctxlua{backends.codeinjections.addtransparencygroup()}}
+%def\TransparencyHack{\ctxlua{backends.codeinjections.addtransparencygroup()}}
+\def\TransparencyHack{\setupcolors[\c!pagecolormodel=\v!auto]}
%D \macros
%D {dostartobject,dostopobject,doinsertobject}
@@ -228,6 +229,8 @@
{\back_object_stop
\egroup}
+% attr {/Group << /S /Transparency /I false /K true >>}
+
\def\back_object_register#1#2%
{\the\pdfbackendeveryxform
\finalizeobjectbox\objectbox
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 650befb25..3d8d8afb8 100644
--- a/tex/context/base/cont-new.mkii
+++ b/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2012.04.26 22:27}
+\newcontextversion{2012.05.05 10:42}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 472a0d8f2..82330e215 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{2012.04.26 22:27}
+\newcontextversion{2012.05.05 10:42}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index df7ff1d8b..00c2e5f71 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-version.png b/tex/context/base/context-version.png
index 4ada51703..0e5e80ed8 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index ac11dd9f9..40f1e299a 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2012.04.26 22:27}
+\edef\contextversion{2012.05.05 10:42}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 168aca76c..64af2d758 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -23,7 +23,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2012.04.26 22:27}
+\edef\contextversion{2012.05.05 10:42}
%D For those who want to use this:
diff --git a/tex/context/base/lpdf-col.lua b/tex/context/base/lpdf-col.lua
index 227878b5b..b7d4b0eff 100644
--- a/tex/context/base/lpdf-col.lua
+++ b/tex/context/base/lpdf-col.lua
@@ -38,6 +38,8 @@ local colorsvalue = colors.value
local transparenciesvalue = transparencies.value
local forcedmodel = colors.forcedmodel
+local c_transparency = pdfconstant("Transparency")
+
-- page groups (might move to lpdf-ini.lua)
local colorspaceconstants = { -- v_none is ignored
@@ -56,7 +58,7 @@ table.setmetatableindex(transparencygroups, function(transparencygroups,colormod
local cs = colorspaceconstants[colormodel]
if cs then
local g = pdfreference(pdfflushobject(pdfdictionary {
- S = pdfconstant("Transparency"),
+ S = c_transparency,
CS = cs,
I = true,
}))
diff --git a/tex/context/base/lpdf-mis.lua b/tex/context/base/lpdf-mis.lua
index cf0a54f5e..f427fa3db 100644
--- a/tex/context/base/lpdf-mis.lua
+++ b/tex/context/base/lpdf-mis.lua
@@ -93,15 +93,15 @@ end
--
-function codeinjections.addtransparencygroup()
- -- png: /CS /DeviceRGB /I true
- local d = pdfdictionary {
- S = pdfconstant("Transparency"),
- I = true,
- K = true,
- }
- lpdf.registerpagefinalizer(function() lpdf.addtopageattributes("Group",d) end) -- hm
-end
+-- function codeinjections.addtransparencygroup()
+-- -- png: /CS /DeviceRGB /I true
+-- local d = pdfdictionary {
+-- S = pdfconstant("Transparency"),
+-- I = true,
+-- K = true,
+-- }
+-- lpdf.registerpagefinalizer(function() lpdf.addtopageattributes("Group",d) end) -- hm
+-- end
-- actions (todo: store and update when changed)
diff --git a/tex/context/base/mlib-pdf.lua b/tex/context/base/mlib-pdf.lua
index deac9d51a..7a23ba947 100644
--- a/tex/context/base/mlib-pdf.lua
+++ b/tex/context/base/mlib-pdf.lua
@@ -276,6 +276,7 @@ function metapost.flush(result,flusher,askedfig)
flusher = flusher or metapost.flushers.pdf
local resetplugins = metapost.resetplugins or ignore -- before figure
local processplugins = metapost.processplugins or ignore -- each object
+ local synchronizeplugins = metapost.synchronizeplugins or ignore
local pluginactions = metapost.pluginactions or ignore -- before / after
local startfigure = flusher.startfigure
local stopfigure = flusher.stopfigure
@@ -302,8 +303,7 @@ function metapost.flush(result,flusher,askedfig)
startfigure(fignum,llx,lly,urx,ury,"begin",figure)
t[#t+1] = "q"
if objects then
- resetplugins() -- we should move the colorinitializer here
- t[#t+1] = metapost.colorinitializer()
+ resetplugins(t) -- we should move the colorinitializer here
for o=1,#objects do
local object = objects[o]
local objecttype = object.type
@@ -327,6 +327,9 @@ function metapost.flush(result,flusher,askedfig)
else
-- we use an indirect table as we want to overload
-- entries but this is not possible in userdata
+ --
+ -- can be optimized if no path
+ --
local original = object
local object = { }
setmetatable(object, {
diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua
index e6459df05..7821b3dbf 100644
--- a/tex/context/base/mlib-pps.lua
+++ b/tex/context/base/mlib-pps.lua
@@ -620,17 +620,17 @@ local sequencers = utilities.sequencers
local appendgroup = sequencers.appendgroup
local appendaction = sequencers.appendaction
-local resetter = nil
-local analyzer = nil
-local processor = nil
+local resetter = nil
+local analyzer = nil
+local processor = nil
-local resetteractions = sequencers.new { arguments = "" }
-local analyzeractions = sequencers.new { arguments = "object,prescript" }
-local processoractions = sequencers.new { arguments = "object,prescript,before,after" }
+local resetteractions = sequencers.new { arguments = "t" }
+local analyzeractions = sequencers.new { arguments = "object,prescript" }
+local processoractions = sequencers.new { arguments = "object,prescript,before,after" }
-appendgroup(resetteractions, "system")
-appendgroup(analyzeractions, "system")
-appendgroup(processoractions,"system")
+appendgroup(resetteractions, "system")
+appendgroup(analyzeractions, "system")
+appendgroup(processoractions, "system")
-- later entries come first
@@ -669,13 +669,13 @@ function metapost.pluginactions(what,t,flushfigure) -- before/after object, depe
return t
end
-function metapost.resetplugins() -- intialize plugins, before figure
+function metapost.resetplugins(t) -- intialize plugins, before figure
-- plugins can have been added
- resetter = resetteractions .runner
- analyzer = analyzeractions .runner
- processor = processoractions.runner
+ resetter = resetteractions .runner
+ analyzer = analyzeractions .runner
+ processor = processoractions .runner
-- let's apply one runner
- resetter()
+ resetter(t)
end
function metapost.analyzeplugins(object) -- each object (first pass)
@@ -716,6 +716,12 @@ local function cm(object)
return sx,rx,ry,sy,tx,ty
end
+-- color
+
+local function cl_reset(t)
+ t[#t+1] = metapost.colorinitializer() -- only color
+end
+
-- text
local tx_done = { }
@@ -886,7 +892,10 @@ local function sh_process(object,prescript,before,after)
-- fatal error
end
before[#before+1], after[#after+1] = "q /Pattern cs", format("W n /%s sh Q",name)
- object.color, object.type, object.grouped = false, false, true -- not nil, otherwise mt
+ -- false, not nil, else mt triggered
+ object.colored = false
+ object.type = false
+ object.grouped = true
end
end
@@ -1036,12 +1045,47 @@ local function la_process(object,prescript,before,after)
end
end
+-- groups
+
+local types = {
+ isolated
+}
+
+local function gr_process(object,prescript,before,after)
+ local gr_state = prescript.gr_state
+ if gr_state then
+ if gr_state == "start" then
+ local gr_type = utilities.parsers.settings_to_hash(prescript.gr_type)
+ before[#before+1] = function()
+ context.MPLIBstartgroup(
+ gr_type.isolated and 1 or 0,
+ gr_type.knockout and 1 or 0,
+ prescript.gr_llx,
+ prescript.gr_lly,
+ prescript.gr_urx,
+ prescript.gr_ury
+ )
+ end
+ elseif gr_state == "stop" then
+ after[#after+1] = function()
+ context.MPLIBstopgroup()
+ end
+ end
+ object.path = false
+ object.color = false
+ object.grouped = true
+ end
+end
+
-- definitions
-appendaction(resetteractions,"system",tx_reset)
+appendaction(resetteractions, "system",cl_reset)
+appendaction(resetteractions, "system",tx_reset)
+
+appendaction(processoractions,"system",gr_process)
-appendaction(analyzeractions,"system",tx_analyze)
-appendaction(analyzeractions,"system",gt_analyze)
+appendaction(analyzeractions, "system",tx_analyze)
+appendaction(analyzeractions, "system",gt_analyze)
appendaction(processoractions,"system",sh_process)
-- (processoractions,"system",gt_process)
diff --git a/tex/context/base/mlib-pps.mkiv b/tex/context/base/mlib-pps.mkiv
index b233f7b08..950d1be57 100644
--- a/tex/context/base/mlib-pps.mkiv
+++ b/tex/context/base/mlib-pps.mkiv
@@ -106,4 +106,32 @@
\def\MPLIBresettexts
{\ctxlua{metapost.resettextexts()}}
+%D Experiment
+
+\let\MPLIBstartgroup\gobblefivearguments
+\let\MPLIBstopgroup \relax
+
+%D Also experimental:
+
+\def\doMPLIBstopgroup#1#2#3#4#5#6% some day this might happen elsewhere
+ {\egroup
+ \wd\scratchbox \dimexpr#5\onebasepoint-#3\onebasepoint\relax
+ \ht\scratchbox #6\onebasepoint
+ \dp\scratchbox-#4\onebasepoint
+ \pdfxform
+ attr {/Group << /S /Transparency /I \ifnum#1=1 true \else false \fi /K \ifnum#1=1 true \else false \fi >>}
+ resources {\pdfbackendcurrentresources}
+ \scratchbox
+ \setbox\scratchbox\hbox\bgroup\pdfrefxform\pdflastxform\egroup
+ \wd\scratchbox\zeropoint
+ \ht\scratchbox\zeropoint
+ \dp\scratchbox\zeropoint
+ \box\scratchbox
+ \endgroup}
+
+\def\MPLIBstartgroup#1#2#3#4#5#6% isolated 0/1, knockout 0/1 llx lly urx ury
+ {\begingroup
+ \setbox\scratchbox\hbox\bgroup
+ \def\MPLIBstopgroup{\doMPLIBstopgroup{#1}{#2}{#3}{#4}{#5}{#6}}}
+
\protect \endinput
diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex
index 7a0c33c54..d6685bd71 100644
--- a/tex/context/base/s-abr-01.tex
+++ b/tex/context/base/s-abr-01.tex
@@ -47,6 +47,7 @@
\logo [BMP] {bmp}
\logo [BSD] {bsd}
\logo [CCODE] {C}
+\logo [CPLUSPLUS] {C\high{++}}
\logo [CALCMATH] {CalcMath}
\logo [CD] {cd}
\logo [CPU] {cpu}
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 4c4671ed0..bd91c6c66 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 d35e114f5..6772415d6 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/type-imp-averia.mkiv b/tex/context/base/type-imp-averia.mkiv
index 310704378..fd0ee7100 100644
--- a/tex/context/base/type-imp-averia.mkiv
+++ b/tex/context/base/type-imp-averia.mkiv
@@ -23,20 +23,36 @@
\starttypescriptcollection[averia]
- \starttypescript [\s!serif] [averia,averiaserif] [\s!name]
+ \starttypescript [\s!serif] [averia] [\s!name]
\setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [\s!file:\typescripttwo-regular] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [\s!file:\typescripttwo-bold] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [\s!file:\typescripttwo-italic] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [\s!file:\typescripttwo-bolditalic] [\s!features=\s!default]
+ \definefontsynonym [\s!Serif] [\s!file:averia-regular] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifBold] [\s!file:averia-bold] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifItalic] [\s!file:averia-italic] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifBoldItalic] [\s!file:averia-bolditalic] [\s!features=\s!default]
\stoptypescript
- \starttypescript [\s!serif] [averia-light,averiaserif-light] [\s!name]
+ \starttypescript [\s!serif] [averiaserif] [\s!name]
\setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [\s!file:\typescripttwo-light] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [\s!file:\typescripttwo-regular] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [\s!file:\typescripttwo-lightitalic] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [\s!file:\typescripttwo-italic] [\s!features=\s!default]
+ \definefontsynonym [\s!Serif] [\s!file:averiaserif-regular] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifBold] [\s!file:averiaserif-bold] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifItalic] [\s!file:averiaserif-italic] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifBoldItalic] [\s!file:averiaserif-bolditalic] [\s!features=\s!default]
+ \stoptypescript
+
+ \starttypescript [\s!serif] [averialight] [\s!name]
+ \setups[\s!font:\s!fallback:\s!serif]
+ \definefontsynonym [\s!Serif] [\s!file:averia-light] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifBold] [\s!file:averia-regular] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifItalic] [\s!file:averia-lightitalic] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifBoldItalic] [\s!file:averia-italic] [\s!features=\s!default]
+ \stoptypescript
+
+ \starttypescript [\s!serif] [averiaseriflight] [\s!name]
+ \setups[\s!font:\s!fallback:\s!serif]
+ \definefontsynonym [\s!Serif] [\s!file:averiaserif-light] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifBold] [\s!file:averiaserif-regular] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifItalic] [\s!file:averiaserif-lightitalic] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifBoldItalic] [\s!file:averiaserif-italic] [\s!features=\s!default]
\stoptypescript
\starttypescript [\s!sans] [averiasans] [\s!name]
@@ -47,7 +63,7 @@
\definefontsynonym [\s!SansBoldItalic] [\s!file:averiasans-bolditalic] [\s!features=\s!default]
\stoptypescript
- \starttypescript [\s!sans] [averiasans-light] [\s!name]
+ \starttypescript [\s!sans] [averiasanslight] [\s!name]
\setups[\s!font:\s!fallback:\s!sans]
\definefontsynonym [\s!Sans] [\s!file:averiasans-light] [\s!features=\s!default]
\definefontsynonym [\s!SansBold] [\s!file:averiasans-regular] [\s!features=\s!default]
@@ -60,15 +76,15 @@
\starttypescript[averia]
\definetypeface [averia] [\s!rm] [\s!serif] [averiaserif] [\s!default]
\definetypeface [averia] [\s!ss] [\s!sans] [averiasans] [\s!default]
- \definetypeface [averia] [\s!tt] [\s!mono] [dejavu] [\s!default]
- \definetypeface [averia] [\s!mm] [\s!math] [times] [\s!default]
+ \definetypeface [averia] [\s!tt] [\s!mono] [dejavu] [\s!default] [\s!rscale=0.850]
+ \definetypeface [averia] [\s!mm] [\s!math] [times] [\s!default] [\s!rscale=1.025]
\stoptypescript
- \starttypescript[averia-light]
- \definetypeface [averia] [\s!rm] [\s!serif] [averiaserif-light] [\s!default]
- \definetypeface [averia] [\s!ss] [\s!sans] [averiasans-light] [\s!default]
- \definetypeface [averia] [\s!tt] [\s!mono] [dejavu] [\s!default]
- \definetypeface [averia] [\s!mm] [\s!math] [times] [\s!default]
+ \starttypescript[averialight]
+ \definetypeface [averialight] [\s!rm] [\s!serif] [averiaseriflight] [\s!default]
+ \definetypeface [averialight] [\s!ss] [\s!sans] [averiasanslight] [\s!default]
+ \definetypeface [averialight] [\s!tt] [\s!mono] [dejavu] [\s!default] [\s!rscale=0.850]
+ \definetypeface [averialight] [\s!mm] [\s!math] [times] [\s!default] [\s!rscale=1.025]
\stoptypescript
\stoptypescriptcollection
diff --git a/tex/context/base/type-imp-texgyre.mkiv b/tex/context/base/type-imp-texgyre.mkiv
index 19534f8fb..823f6b4a9 100644
--- a/tex/context/base/type-imp-texgyre.mkiv
+++ b/tex/context/base/type-imp-texgyre.mkiv
@@ -201,7 +201,7 @@
% Times Math (tx)
- \starttypescript [\s!math][times][\s!all]
+ \starttypescript [\s!math][times,termes][\s!all]
\loadfontgoodies[tx-math]
\definefontsynonym[\s!MathRoman][txmath@tx-math]
% \definefontsynonym[\s!MathRomanBold][MathRoman]
@@ -209,13 +209,13 @@
% Palatino Math (px)
- \starttypescript [\s!math][palatino][\s!all]
+ \starttypescript [\s!math][palatino,pagella][\s!all]
\loadfontgoodies[px-math]
\definefontsynonym[\s!MathRoman][pxmath@px-math]
% \definefontsynonym[\s!MathRomanBold][MathRoman]
\stoptypescript
-% \starttypescript [\s!math][palatino][\s!all]
+% \starttypescript [\s!math][palatino,pagella][\s!all]
% \definefontsynonym[\s!MathRoman][file:texgyrepagella-math.otf][\s!features=\s!math\mathsizesuffix]
% \stoptypescript
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index ce79a9e82..828b89dc3 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/26/12 22:27:59
+-- merge date : 05/05/12 10:42:56
do -- begin closure to overcome local limits and interference