summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/context/documents/general/manuals/luatex.pdfbin993218 -> 1019969 bytes
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4170 -> 4182 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/font-mis.lua2
-rw-r--r--tex/context/base/font-otc.lua11
-rw-r--r--tex/context/base/font-otf.lua5
-rw-r--r--tex/context/base/font-otl.lua2
-rw-r--r--tex/context/base/spac-ver.lua271
-rw-r--r--tex/context/base/status-files.pdfbin25699 -> 25691 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin267119 -> 267119 bytes
-rw-r--r--tex/context/base/tabl-tab.mkiv2
-rw-r--r--tex/context/base/tabl-tbl.mkiv2
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua6
14 files changed, 220 insertions, 85 deletions
diff --git a/doc/context/documents/general/manuals/luatex.pdf b/doc/context/documents/general/manuals/luatex.pdf
index 523cb3dbd..0471e9a9a 100644
--- a/doc/context/documents/general/manuals/luatex.pdf
+++ b/doc/context/documents/general/manuals/luatex.pdf
Binary files differ
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 16c5e7472..9cc00b4fd 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.12.20 00:29}
+\newcontextversion{2015.12.21 12:16}
%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 aea713477..c04d6d81e 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 4a2a79ead..22790129c 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.12.20 00:29}
+\edef\contextversion{2015.12.21 12:16}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/font-mis.lua b/tex/context/base/font-mis.lua
index 750e08ae8..d3d733723 100644
--- a/tex/context/base/font-mis.lua
+++ b/tex/context/base/font-mis.lua
@@ -22,7 +22,7 @@ local handlers = fonts.handlers
handlers.otf = handlers.otf or { }
local otf = handlers.otf
-otf.version = otf.version or 2.819
+otf.version = otf.version or 2.820
otf.cache = otf.cache or containers.define("fonts", "otf", otf.version, true)
local fontloader = fontloader
diff --git a/tex/context/base/font-otc.lua b/tex/context/base/font-otc.lua
index 60aa94e3b..21cf7fc7c 100644
--- a/tex/context/base/font-otc.lua
+++ b/tex/context/base/font-otc.lua
@@ -93,18 +93,17 @@ local function addfeature(data,feature,specifications)
end
local askedfeatures = specification.features or everywhere
local askedsteps = specifications.steps or specification.subtables or { specification.data } or { }
- local defaulttype = specification.type or "substitution"
+ local featuretype = normalized[specification.type or "substitution"] or "substitution"
local featureflags = specification.flags or noflags
local featureorder = specification.order or { feature }
local added = false
local nofsteps = 0
local steps = { }
for i=1,#askedsteps do
- local list = askedsteps[i]
- local coverage = { }
- local cover = coveractions[featuretype]
- local format = nil
- local featuretype = normalized[list.type or defaulttype] or "substitution"
+ local list = askedsteps[i]
+ local coverage = { }
+ local cover = coveractions[featuretype]
+ local format = nil
if not cover then
-- unknown
elseif featuretype == "substitution" then
diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua
index f709e7000..86b131300 100644
--- a/tex/context/base/font-otf.lua
+++ b/tex/context/base/font-otf.lua
@@ -58,7 +58,7 @@ local otf = fonts.handlers.otf
otf.glists = { "gsub", "gpos" }
-otf.version = 2.819 -- beware: also sync font-mis.lua and in mtx-fonts
+otf.version = 2.820 -- beware: also sync font-mis.lua and in mtx-fonts
otf.cache = containers.define("fonts", "otf", otf.version, true)
local hashes = fonts.hashes
@@ -2959,7 +2959,7 @@ otf.coverup = {
kern = justset,
},
register = function(coverage,lookuptype,format,feature,n,descriptions,resources)
- local name = formatters["ctx_%s_%s"](feature,n)
+ local name = formatters["ctx_%s_%s_%s"](feature,lookuptype,n) -- we can have a mix of types
if lookuptype == "kern" then
resources.lookuptypes[name] = "position"
else
@@ -2973,7 +2973,6 @@ otf.coverup = {
else
description.slookups = { [name] = c }
end
--- inspect(feature,description)
end
return name
end
diff --git a/tex/context/base/font-otl.lua b/tex/context/base/font-otl.lua
index 8a7717a19..5a03de844 100644
--- a/tex/context/base/font-otl.lua
+++ b/tex/context/base/font-otl.lua
@@ -53,7 +53,7 @@ local report_otf = logs.reporter("fonts","otf loading")
local fonts = fonts
local otf = fonts.handlers.otf
-otf.version = 3.009 -- beware: also sync font-mis.lua and in mtx-fonts
+otf.version = 3.010 -- beware: also sync font-mis.lua and in mtx-fonts
otf.cache = containers.define("fonts", "otl", otf.version, true)
local otfreaders = otf.readers
diff --git a/tex/context/base/spac-ver.lua b/tex/context/base/spac-ver.lua
index 522186985..3095bbbd7 100644
--- a/tex/context/base/spac-ver.lua
+++ b/tex/context/base/spac-ver.lua
@@ -39,7 +39,7 @@ local allocate = utilities.storage.allocate
local todimen = string.todimen
local formatters = string.formatters
-local P, C, R, S, Cc = lpeg.P, lpeg.C, lpeg.R, lpeg.S, lpeg.Cc
+local P, C, R, S, Cc, Carg = lpeg.P, lpeg.C, lpeg.R, lpeg.S, lpeg.Cc, lpeg.Carg
local nodes = nodes
local node = node
@@ -655,20 +655,27 @@ storage.register("builders/vspacing/data/skip", vspacingdata.skip, "builders.vsp
do -- todo: interface.variables
- vspacing.fixed = false
+ vspacing.fixed = false
- local map = vspacingdata.map
- local skip = vspacingdata.skip
+ local map = vspacingdata.map
+ local skip = vspacingdata.skip
local multiplier = C(S("+-")^0 * R("09")^1) * P("*")
- local category = P(":") * C(P(1)^1)
- local keyword = C((1-category)^1)
+ local separator = S(", ")
+ local category = P(":") * C((1-separator)^1)
+ local keyword = C((1-category-separator)^1)
local splitter = (multiplier + Cc(1)) * keyword * (category + Cc(false))
- local k_fixed, k_flexible, k_category, k_penalty, k_order = variables.fixed, variables.flexible, "category", "penalty", "order"
+ local k_fixed = variables.fixed
+ local k_flexible = variables.flexible
+ local k_category = "category"
+ local k_penalty = "penalty"
+ local k_order = "order"
-- This will change: just node.write and we can store the values in skips which
- -- then obeys grouping
+ -- then obeys grouping .. but .. we miss the amounts then as they live at the tex
+ -- end so we then also need to change that bit ... it would be interesting if we
+ -- could store in properties
local ctx_fixedblankskip = context.fixedblankskip
local ctx_flexibleblankskip = context.flexibleblankskip
@@ -680,67 +687,171 @@ do -- todo: interface.variables
local ctx_addpredefinedblankskip = context.addpredefinedblankskip
local ctx_addaskedblankskip = context.addaskedblankskip
- local function analyze(str,oldcategory) -- we could use shorter names
- for s in gmatch(str,"([^ ,]+)") do
- local amount, keyword, detail = lpegmatch(splitter,s) -- the comma splitter can be merged
- if not keyword then
- report_vspacing("unknown directive %a",s)
+ local ctx_pushlogger = context.pushlogger
+ local ctx_startblankhandling = context.startblankhandling
+ local ctx_stopblankhandling = context.stopblankhandling
+ local ctx_poplogger = context.poplogger
+
+ --
+
+ -- local function analyze(str,oldcategory) -- we could use shorter names
+ -- for s in gmatch(str,"([^ ,]+)") do
+ -- local amount, keyword, detail = lpegmatch(splitter,s) -- the comma splitter can be merged
+ -- if not keyword then
+ -- report_vspacing("unknown directive %a",s)
+ -- else
+ -- local mk = map[keyword]
+ -- if mk then
+ -- category = analyze(mk,category) -- category not used .. and we pass crap anyway
+ -- elseif keyword == k_fixed then
+ -- ctx_fixedblankskip()
+ -- elseif keyword == k_flexible then
+ -- ctx_flexibleblankskip()
+ -- elseif keyword == k_category then
+ -- local category = tonumber(detail)
+ -- if category then
+ -- ctx_setblankcategory(category)
+ -- if category ~= oldcategory then
+ -- ctx_flushblankhandling()
+ -- oldcategory = category
+ -- end
+ -- end
+ -- elseif keyword == k_order and detail then
+ -- local order = tonumber(detail)
+ -- if order then
+ -- ctx_setblankorder(order)
+ -- end
+ -- elseif keyword == k_penalty and detail then
+ -- local penalty = tonumber(detail)
+ -- if penalty then
+ -- ctx_setblankpenalty(penalty)
+ -- end
+ -- else
+ -- amount = tonumber(amount) or 1
+ -- local sk = skip[keyword]
+ -- if sk then
+ -- ctx_addpredefinedblankskip(amount,keyword)
+ -- else -- no check
+ -- ctx_addaskedblankskip(amount,keyword)
+ -- end
+ -- end
+ -- end
+ -- end
+ -- return category
+ -- end
+
+ -- local function analyze(str) -- we could use shorter names
+ -- for s in gmatch(str,"([^ ,]+)") do
+ -- local amount, keyword, detail = lpegmatch(splitter,s) -- the comma splitter can be merged
+ -- if not keyword then
+ -- report_vspacing("unknown directive %a",s)
+ -- else
+ -- local mk = map[keyword]
+ -- if mk then
+ -- analyze(mk) -- category not used .. and we pass crap anyway
+ -- elseif keyword == k_fixed then
+ -- ctx_fixedblankskip()
+ -- elseif keyword == k_flexible then
+ -- ctx_flexibleblankskip()
+ -- elseif keyword == k_category then
+ -- local category = tonumber(detail)
+ -- if category then
+ -- ctx_setblankcategory(category)
+ -- ctx_flushblankhandling()
+ -- end
+ -- elseif keyword == k_order and detail then
+ -- local order = tonumber(detail)
+ -- if order then
+ -- ctx_setblankorder(order)
+ -- end
+ -- elseif keyword == k_penalty and detail then
+ -- local penalty = tonumber(detail)
+ -- if penalty then
+ -- ctx_setblankpenalty(penalty)
+ -- end
+ -- else
+ -- amount = tonumber(amount) or 1
+ -- local sk = skip[keyword]
+ -- if sk then
+ -- ctx_addpredefinedblankskip(amount,keyword)
+ -- else -- no check
+ -- ctx_addaskedblankskip(amount,keyword)
+ -- end
+ -- end
+ -- end
+ -- end
+ -- end
+
+ -- function vspacing.analyze(str)
+ -- if trace_vspacing then
+ -- ctx_pushlogger(report_vspacing)
+ -- ctx_startblankhandling()
+ -- analyze(str,1)
+ -- ctx_stopblankhandling()
+ -- ctx_poplogger()
+ -- else
+ -- ctx_startblankhandling()
+ -- analyze(str,1)
+ -- ctx_stopblankhandling()
+ -- end
+ -- end
+
+ -- alternative
+
+ local pattern = nil
+
+ local function handler(amount, keyword, detail)
+ if not keyword then
+ report_vspacing("unknown directive %a",s)
+ else
+ local mk = map[keyword]
+ if mk then
+ lpegmatch(pattern,mk)
+ elseif keyword == k_fixed then
+ ctx_fixedblankskip()
+ elseif keyword == k_flexible then
+ ctx_flexibleblankskip()
+ elseif keyword == k_category then
+ local category = tonumber(detail)
+ if category then
+ ctx_setblankcategory(category)
+ ctx_flushblankhandling()
+ end
+ elseif keyword == k_order and detail then
+ local order = tonumber(detail)
+ if order then
+ ctx_setblankorder(order)
+ end
+ elseif keyword == k_penalty and detail then
+ local penalty = tonumber(detail)
+ if penalty then
+ ctx_setblankpenalty(penalty)
+ end
else
- local mk = map[keyword]
- if mk then
- category = analyze(mk,category)
- elseif keyword == k_fixed then
- ctx_fixedblankskip()
- elseif keyword == k_flexible then
- ctx_flexibleblankskip()
- elseif keyword == k_category then
- local category = tonumber(detail)
- if category then
- ctx_setblankcategory(category)
- if category ~= oldcategory then
- ctx_flushblankhandling()
- oldcategory = category
- end
- end
- elseif keyword == k_order and detail then
- local order = tonumber(detail)
- if order then
- ctx_setblankorder(order)
- end
- elseif keyword == k_penalty and detail then
- local penalty = tonumber(detail)
- if penalty then
- ctx_setblankpenalty(penalty)
- end
- else
- amount = tonumber(amount) or 1
- local sk = skip[keyword]
- if sk then
- ctx_addpredefinedblankskip(amount,keyword)
- else -- no check
- ctx_addaskedblankskip(amount,keyword)
- end
+ amount = tonumber(amount) or 1
+ local sk = skip[keyword]
+ if sk then
+ ctx_addpredefinedblankskip(amount,keyword)
+ else -- no check
+ ctx_addaskedblankskip(amount,keyword)
end
end
end
- return category
end
- local ctx_pushlogger = context.pushlogger
- local ctx_startblankhandling = context.startblankhandling
- local ctx_stopblankhandling = context.stopblankhandling
- local ctx_poplogger = context.poplogger
+ local splitter = ((multiplier + Cc(1)) * keyword * (category + Cc(false))) / handler
+ pattern = (splitter + separator^1)^0
function vspacing.analyze(str)
if trace_vspacing then
ctx_pushlogger(report_vspacing)
ctx_startblankhandling()
- analyze(str,1)
+ lpegmatch(pattern,str)
ctx_stopblankhandling()
ctx_poplogger()
else
ctx_startblankhandling()
- analyze(str,1)
+ lpegmatch(pattern,str)
ctx_stopblankhandling()
end
end
@@ -1132,6 +1243,17 @@ end
-- we now look back a lot, way too often
+-- userskip
+-- lineskip
+-- baselineskip
+-- parskip
+-- abovedisplayskip
+-- belowdisplayskip
+-- abovedisplayshortskip
+-- belowdisplayshortskip
+-- topskip
+-- splittopskip
+
local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also pass tail
if trace then
reset_tracing(head)
@@ -1171,16 +1293,16 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
else
head = insert_node_before(head,current,p)
end
--- if penalty_data > special_penalty_min and penalty_data < special_penalty_max then
- local props = properties[p]
- if props then
- props.special_penalty = special_penalty or penalty_data
- else
- properties[p] = {
- special_penalty = special_penalty or penalty_data
- }
- end
--- end
+ -- if penalty_data > special_penalty_min and penalty_data < special_penalty_max then
+ local props = properties[p]
+ if props then
+ props.special_penalty = special_penalty or penalty_data
+ else
+ properties[p] = {
+ special_penalty = special_penalty or penalty_data
+ }
+ end
+ -- end
end
if glue_data then
if force_glue then
@@ -1188,8 +1310,22 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
head = forced_skip(head,current,getfield(glue_data,"width") or 0,"before",trace)
free_node(glue_data)
else
- if trace then trace_done("flushed due to " .. why,glue_data) end
- head = insert_node_before(head,current,glue_data)
+ --
+ -- local spec = getfield(glue_data,"spec")
+ -- if getfield(spec,"writable") then
+ -- if trace then trace_done("flushed due to " .. why,glue_data) end
+ -- head = insert_node_before(head,current,glue_data)
+ -- else
+ -- free_node(glue_data)
+ -- end
+ local w = getfield(glue_data,"width")
+ if w ~= 0 then
+ if trace then trace_done("flushed due to " .. why,glue_data) end
+ head = insert_node_before(head,current,glue_data)
+ else -- i really need to clean this up
+ -- report_vspacing("needs checking (%s): %p",skipcodes[getsubtype(glue_data)],w)
+ free_node(glue_data)
+ end
end
end
@@ -1487,7 +1623,8 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
if trace then trace_natural("ignored parskip",current) end
head, current = remove_node(head, current, true)
elseif glue_data then
- if (getfield(current,"width") or 0) > (getfield(glue_data,"width") or 0) then
+ local wp = getfield(current,"width") or 0
+ if ((w ~= 0) and (w > (getfield(glue_data,"width") or 0))) then
glue_data = current
head, current = remove_node(head, current)
if trace then trace_natural("taking parskip",current) end
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 1a5ea6745..da6055405 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 9ef03dd14..ebbf024c8 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/tabl-tab.mkiv b/tex/context/base/tabl-tab.mkiv
index 56ebfe0bd..6f7a005f1 100644
--- a/tex/context/base/tabl-tab.mkiv
+++ b/tex/context/base/tabl-tab.mkiv
@@ -55,7 +55,7 @@
\dorestoretablelineskips
\normalbaselines
\let~\fixedspace
- \blank[\v!disable]% % added
+ \inhibitblank % \blank[\v!disable]% % added
\the\everytableparbox}
\unexpanded\def\dotableendparbox
diff --git a/tex/context/base/tabl-tbl.mkiv b/tex/context/base/tabl-tbl.mkiv
index 598d6d25f..abe32d593 100644
--- a/tex/context/base/tabl-tbl.mkiv
+++ b/tex/context/base/tabl-tbl.mkiv
@@ -329,7 +329,7 @@
\fi}
\unexpanded\def\tabl_tabulate_setups_check
- {\csname\??tabulatesetup\the\c_tabl_tabulate_column\endcsname}
+ {\begincsname\??tabulatesetup\the\c_tabl_tabulate_column\endcsname}
\unexpanded\def\tabl_tabulate_entry_before{\ignorespaces\tabl_tabulate_hook}
\unexpanded\def\tabl_tabulate_entry_after {\unskip\unskip\ifmmode\else\endgraf\fi}
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index f0ac3961f..ab54a24ff 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 12/20/15 00:29:13
+-- merge date : 12/21/15 12:16:50
do -- begin closure to overcome local limits and interference
@@ -7237,7 +7237,7 @@ local report_otf=logs.reporter("fonts","otf loading")
local fonts=fonts
local otf=fonts.handlers.otf
otf.glists={ "gsub","gpos" }
-otf.version=2.819
+otf.version=2.820
otf.cache=containers.define("fonts","otf",otf.version,true)
local hashes=fonts.hashes
local definers=fonts.definers
@@ -9573,7 +9573,7 @@ otf.coverup={
kern=justset,
},
register=function(coverage,lookuptype,format,feature,n,descriptions,resources)
- local name=formatters["ctx_%s_%s"](feature,n)
+ local name=formatters["ctx_%s_%s_%s"](feature,lookuptype,n)
if lookuptype=="kern" then
resources.lookuptypes[name]="position"
else