summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-02-08 16:15:08 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-02-08 16:15:08 +0100
commitd73f5987ca04dbdf0a134236c3314dadd7a73565 (patch)
tree8471e66baf2a1ca638f9339fe360ca1da7b0bcc5
parent47878599fddea4d4e259e3371def1afadc62e03b (diff)
downloadcontext-d73f5987ca04dbdf0a134236c3314dadd7a73565.tar.gz
2016-02-08 15:37:00
-rw-r--r--tex/context/base/context-version.pdfbin4168 -> 4176 bytes
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/grph-inc.lua10
-rw-r--r--tex/context/base/mkiv/math-ini.mkiv4
-rw-r--r--tex/context/base/mkiv/node-res.lua25
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin8957 -> 9092 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin265373 -> 265380 bytes
-rw-r--r--tex/context/base/mkiv/typo-brk.lua138
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
10 files changed, 72 insertions, 111 deletions
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 48565f03e..45f21e293 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index a44827b34..fde4d04e7 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2016.02.06 14:06}
+\newcontextversion{2016.02.08 15:35}
%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/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 98756bd0a..f9a085ebf 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -39,7 +39,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2016.02.06 14:06}
+\edef\contextversion{2016.02.08 15:35}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/grph-inc.lua b/tex/context/base/mkiv/grph-inc.lua
index af74efbfa..cf4a70269 100644
--- a/tex/context/base/mkiv/grph-inc.lua
+++ b/tex/context/base/mkiv/grph-inc.lua
@@ -1482,11 +1482,11 @@ includers.buffers = includers.nongeneric
function existers.auto(askedname)
local name = gsub(askedname, ".auto$", "")
local format = figures.guess(name)
- if format then
- report_inclusion("format guess %a for %a",format,name)
- else
- report_inclusion("format guess for %a is not possible",name)
- end
+ -- if format then
+ -- report_inclusion("format guess %a for %a",format,name)
+ -- else
+ -- report_inclusion("format guess for %a is not possible",name)
+ -- end
return format and name, true, format
end
diff --git a/tex/context/base/mkiv/math-ini.mkiv b/tex/context/base/mkiv/math-ini.mkiv
index 0cbfd6fc4..a927b7776 100644
--- a/tex/context/base/mkiv/math-ini.mkiv
+++ b/tex/context/base/mkiv/math-ini.mkiv
@@ -359,8 +359,8 @@
\unexpanded\def\mathaltcal {\math_set_font_alternate{cal}\cal} % set via goody file
%unexpanded\def\mathslashedzero {\math_set_font_alternate{zero}0} % set via goody file or automatic
\unexpanded\def\mathdotless {\math_set_font_alternate{dotless}} % set via goody file or automatic
-\unexpanded\def\mathdotlessi {\mathdotless i}
-\unexpanded\def\mathdotlessj {\mathdotless j}
+\unexpanded\def\mathdotlessi {{\mathdotless i}}
+\unexpanded\def\mathdotlessj {{\mathdotless j}}
%let\textslashedzero\slashedzero \unexpanded\def\autoslashedzero{\mathortext\mathslashedzero\textslashedzero}
\let\textdotlessi \dotlessi \unexpanded\def\autodotlessi {\mathortext\mathdotlessi \textdotlessi}
diff --git a/tex/context/base/mkiv/node-res.lua b/tex/context/base/mkiv/node-res.lua
index 7aac2a166..91de6171d 100644
--- a/tex/context/base/mkiv/node-res.lua
+++ b/tex/context/base/mkiv/node-res.lua
@@ -24,6 +24,7 @@ local nodepool = nodes.pool
local whatsitcodes = nodes.whatsitcodes
local skipcodes = nodes.skipcodes
local kerncodes = nodes.kerncodes
+local rulecodes = nodes.rulecodes
local nodecodes = nodes.nodecodes
local glyph_code = nodecodes.glyph
@@ -164,9 +165,10 @@ local noad = register_nut(new_nut("noad"))
-- the dir field needs to be set otherwise crash:
-local rule = register_nut(new_nut("rule")) setfield(rule, "dir","TLT")
-local hlist = register_nut(new_nut("hlist")) setfield(hlist,"dir","TLT")
-local vlist = register_nut(new_nut("vlist")) setfield(vlist,"dir","TLT")
+local rule = register_nut(new_nut("rule")) setfield(rule, "dir","TLT")
+local emptyrule = register_nut(new_nut("rule",rulecodes.empty)) setfield(rule, "dir","TLT")
+local hlist = register_nut(new_nut("hlist")) setfield(hlist,"dir","TLT")
+local vlist = register_nut(new_nut("vlist")) setfield(vlist,"dir","TLT")
function nutpool.zeroglue(n)
if n then
@@ -355,6 +357,23 @@ function nutpool.rule(width,height,depth,dir) -- w/h/d == nil will let them adap
return n
end
+function nutpool.emptyrule(width,height,depth,dir) -- w/h/d == nil will let them adapt
+ local n = copy_nut(emptyrule)
+ if width then -- also 0 else adapt
+ setfield(n,"width",width)
+ end
+ if height then -- also 0 else adapt
+ setfield(n,"height",height)
+ end
+ if depth then -- also 0 else adapt
+ setfield(n,"depth",depth)
+ end
+ if dir then
+ setfield(n,"dir",dir)
+ end
+ return n
+end
+
function nutpool.latelua(code)
local n = copy_nut(latelua)
setfield(n,"string",code)
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index b213b43d2..4fae21343 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 3473f5915..42f9a5e70 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/typo-brk.lua b/tex/context/base/mkiv/typo-brk.lua
index cf9d40312..2e6ac7ab1 100644
--- a/tex/context/base/mkiv/typo-brk.lua
+++ b/tex/context/base/mkiv/typo-brk.lua
@@ -48,7 +48,7 @@ local free_node = nuts.free
local insert_node_before = nuts.insert_before
local insert_node_after = nuts.insert_after
local remove_node = nuts.remove
-local traverse_id = nuts.traverse_id
+local end_of_math = nuts.end_of_math
local tonodes = nuts.tonodes
@@ -197,112 +197,54 @@ methods[5] = function(head,start,settings) -- x => p q r
return head, start
end
--- function breakpoints.handler(head)
--- head = tonut(head)
--- local done, numbers = false, languages.numbers
--- local start, n = head, 0
--- while start do
--- local id = getid(start)
--- if id == glyph_code then
--- local attr = getattr(start,a_breakpoints)
--- if attr and attr > 0 then
--- setattr(start,a_breakpoints,unsetvalue) -- maybe test for subtype > 256 (faster)
--- -- look ahead and back n chars
--- local data = mapping[attr]
--- if data then
--- local map = data.characters
--- local cmap = map[getchar(start)]
--- if cmap then
--- local lang = getfield(start,"lang")
--- -- we do a sanity check for language
--- local smap = lang and lang >= 0 and lang < 0x7FFF and (cmap[numbers[lang]] or cmap[""])
--- if smap then
--- if n >= smap.nleft then
--- local m = smap.nright
--- local next = getnext(start)
--- while next do -- gamble on same attribute (not that important actually)
--- local id = getid(next)
--- if id == glyph_code then -- gamble on same attribute (not that important actually)
--- if map[getchar(next)] then
--- break
--- elseif m == 1 then
--- local method = methods[smap.type]
--- if method then
--- head, start = method(head,start,smap)
--- done = true
--- end
--- break
--- else
--- m = m - 1
--- next = getnext(next)
--- end
--- elseif id == kern_code and getsubtype(next) == fontkern_code then
--- next = getnext(next)
--- -- ignore intercharacter kerning, will go way
--- else
--- -- we can do clever and set n and jump ahead but ... not now
--- break
--- end
--- end
--- end
--- n = 0
--- else
--- n = n + 1
--- end
--- else
--- n = n + 1
--- end
--- else
--- n = 0
--- end
--- else
--- -- n = n + 1 -- if we want single char handling (|-|) then we will use grouping and then we need this
--- end
--- elseif id == kern_code and getsubtype(start) == fontkern_code then
--- -- ignore intercharacter kerning, will go way
--- else
--- n = 0
--- end
--- start = getnext(start)
--- end
--- return tonode(head), done
--- end
-
-- we know we have a limited set
-- what if characters are replaced by the font handler
-- do we need to go into disc nodes (or do it as first step but then we need a pre/post font handler)
function breakpoints.handler(head)
- local done = false
- local nead = tonut(head)
- local attr = nil
- local map = nil
- for n in traverse_id(glyph_code,nead) do -- could be a traverse_chars at some point
- local a = getattr(n,a_breakpoints)
- if a and a > 0 then
- if a ~= attr then
- local data = mapping[a]
- if data then
- map = data.characters
- else
- map = nil
- end
- attr = a
- end
- if map then
- local cmap = map[getchar(n)]
- if cmap then
- -- for now we collect but when found ok we can move the handler here
- -- although it saves nothing in terms of performance
- local d = { n, cmap }
- if done then
- done[#done+1] = d
+ local done = false
+ local nead = tonut(head)
+ local attr = nil
+ local map = nil
+ local current = nead
+ while current do
+ local id = getid(current)
+ if id == glyph_code then
+ local a = getattr(current,a_breakpoints)
+ if a and a > 0 then
+ if a ~= attr then
+ local data = mapping[a]
+ if data then
+ map = data.characters
else
- done = { d }
+ map = nil
+ end
+ attr = a
+ end
+ if map then
+ local cmap = map[getchar(current)]
+ if cmap then
+ -- for now we collect but when found ok we can move the handler here
+ -- although it saves nothing in terms of performance
+ local d = { current, cmap }
+ if done then
+ done[#done+1] = d
+ else
+ done = { d }
+ end
+ setattr(current,a_breakpoints,unsetvalue) -- should not be needed
end
- setattr(n,a_breakpoints,unsetvalue)
end
end
+ current = getnext(current)
+ elseif id == math_code then
+ attr = nil
+ current = end_of_math(current)
+ if current then
+ current = getnext(current)
+ end
+ else
+ current = getnext(current)
end
end
if not done then
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 6d3ae6cc6..52a68c867 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 : 02/06/16 14:06:23
+-- merge date : 02/08/16 15:35:20
do -- begin closure to overcome local limits and interference