summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-03-19 16:34:00 +0100
committerHans Hagen <pragma@wxs.nl>2013-03-19 16:34:00 +0100
commitde0507377f78f5c05fcece1ec7dc53bacdc0247c (patch)
treeb84c9c6483f28c5fa80c00ccbfd59db6ecdb1a63 /tex
parent2d5f18782ca5e9193200a19e10d33827163ef0b0 (diff)
downloadcontext-de0507377f78f5c05fcece1ec7dc53bacdc0247c.tar.gz
beta 2013.03.19 16:34
Diffstat (limited to 'tex')
-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.pdfbin4137 -> 4132 bytes
-rw-r--r--tex/context/base/context-version.pngbin40464 -> 40500 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/font-ota.lua12
-rw-r--r--tex/context/base/font-otn.lua9
-rw-r--r--tex/context/base/node-aux.lua9
-rw-r--r--tex/context/base/node-fnt.lua1
-rw-r--r--tex/context/base/node-ini.lua19
-rw-r--r--tex/context/base/node-rul.lua12
-rw-r--r--tex/context/base/spac-chr.lua8
-rw-r--r--tex/context/base/status-files.pdfbin24761 -> 24788 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin211332 -> 211443 bytes
-rw-r--r--tex/context/base/typo-cap.lua6
-rw-r--r--tex/context/base/typo-dir.lua2
-rw-r--r--tex/context/base/typo-itc.lua3
-rw-r--r--tex/context/base/typo-krn.lua3
-rw-r--r--tex/context/base/typo-spa.lua3
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua18
21 files changed, 67 insertions, 46 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index ed69cb76c..b2cd286ae 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{2013.03.19 14:27}
+\newcontextversion{2013.03.19 16:34}
%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 973c1ab68..55950cb0f 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{2013.03.19 14:27}
+\newcontextversion{2013.03.19 16:34}
%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 af99b8369..5c3d53e2e 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 5cfb728c5..90a866ce2 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 87bb0f8cb..cbd731f50 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{2013.03.19 14:27}
+\edef\contextversion{2013.03.19 16:34}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index fd01490f5..96fa9f535 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.03.19 14:27}
+\edef\contextversion{2013.03.19 16:34}
%D For those who want to use this:
diff --git a/tex/context/base/font-ota.lua b/tex/context/base/font-ota.lua
index b80241a06..5a50e704c 100644
--- a/tex/context/base/font-ota.lua
+++ b/tex/context/base/font-ota.lua
@@ -36,7 +36,7 @@ local math_code = nodecodes.math
local traverse_id = node.traverse_id
local traverse_node_list = node.traverse
-local endofmath = nodes.endofmath
+local end_of_math = node.end_of_math
local fontdata = fonts.hashes.identifiers
local categories = characters and characters.categories or { } -- sorry, only in context
@@ -127,8 +127,9 @@ function analyzers.setstate(head,font)
last[a_state] = s_fina
end
first, last, n = nil, nil, 0
--- elseif id == math_code then
--- current = endofmath(current)
+ if id == math_code then
+ current = end_of_math(current)
+ end
end
current = current.next
end
@@ -370,8 +371,9 @@ function methods.arab(head,font,attr) -- maybe make a special version with no tr
end
else
first, last = finish(first,last)
--- elseif id == math_code then
--- current = endofmath(current).next
+ if id == math_code then
+ current = end_of_math(current)
+ end
end
current = current.next
end
diff --git a/tex/context/base/font-otn.lua b/tex/context/base/font-otn.lua
index 6eed30c94..739caa997 100644
--- a/tex/context/base/font-otn.lua
+++ b/tex/context/base/font-otn.lua
@@ -175,8 +175,7 @@ local delete_node = nodes.delete
local copy_node = node.copy
local find_node_tail = node.tail or node.slide
local flush_node_list = node.flush_list
-
-local endofmath = nodes.endofmath
+local end_of_math = node.end_of_math
local setmetatableindex = table.setmetatableindex
@@ -2203,7 +2202,7 @@ for s=1,#datasets do
start = start.next
end
elseif id == math_code then
- start = endofmath(start).next
+ start = end_of_math(start).next
else
start = start.next
end
@@ -2244,7 +2243,7 @@ for s=1,#datasets do
end
start = start.next
elseif id == math_code then
- start = endofmath(start).next
+ start = end_of_math(start).next
else
start = start.next
end
@@ -2324,7 +2323,7 @@ for s=1,#datasets do
end
start = start.next
elseif id == math_code then
- start = endofmath(start).next
+ start = end_of_math(start).next
else
start = start.next
end
diff --git a/tex/context/base/node-aux.lua b/tex/context/base/node-aux.lua
index 2e431d364..e3fc7ad6f 100644
--- a/tex/context/base/node-aux.lua
+++ b/tex/context/base/node-aux.lua
@@ -204,12 +204,15 @@ function nodes.firstcharinbox(n)
return 0
end
-function nodes.endofmath(n)
- for n in traverse_id(math_code,n.next) do
- return n
+if not node.end_of_math then
+ function node.end_of_math(n)
+ for n in traverse_id(math_code,n.next) do
+ return n
+ end
end
end
+nodes.endofmath = node.end_of_math
-- local function firstline(n)
-- while n do
diff --git a/tex/context/base/node-fnt.lua b/tex/context/base/node-fnt.lua
index 946b07ee5..54359117e 100644
--- a/tex/context/base/node-fnt.lua
+++ b/tex/context/base/node-fnt.lua
@@ -95,7 +95,6 @@ function handlers.characters(head)
n = n.next
end
end
- -- todo: time a while and skip over or make a special traverse_id that skips over math
for n in traverse_id(glyph_code,head) do
-- if n.subtype<256 then -- all are 1
local font = n.font
diff --git a/tex/context/base/node-ini.lua b/tex/context/base/node-ini.lua
index be1eb77bf..5a3986c3a 100644
--- a/tex/context/base/node-ini.lua
+++ b/tex/context/base/node-ini.lua
@@ -281,19 +281,18 @@ local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
local glue_code = nodecodes.glue
---~ if t.id == glue_code then
---~ local s = t.spec
---~ print(t)
---~ print(s,s and s.writable)
---~ if s and s.writable then
---~ free_node(s)
---~ end
---~ t.spec = nil
---~ end
+-- if t.id == glue_code then
+-- local s = t.spec
+-- print(t)
+-- print(s,s and s.writable)
+-- if s and s.writable then
+-- free_node(s)
+-- end
+-- t.spec = nil
+-- end
local function remove(head, current, free_too)
local t = current
---~ print(t)
head, current = remove_node(head,current)
if t then
if free_too then
diff --git a/tex/context/base/node-rul.lua b/tex/context/base/node-rul.lua
index bac042353..09300964e 100644
--- a/tex/context/base/node-rul.lua
+++ b/tex/context/base/node-rul.lua
@@ -43,12 +43,12 @@ function nodes.striprange(first,last) -- todo: dir
if id == glyph_code or id == disc_code then -- or id == rule_code
break
else
-local prev = last.prev -- luatex < 0.70 has italic correction kern not prev'd
-if prev then
- last = last.prev
-else
- break
-end
+ local prev = last.prev -- luatex < 0.70 has italic correction kern not prev'd
+ if prev then
+ last = last.prev
+ else
+ break
+ end
end
end
if not last then
diff --git a/tex/context/base/spac-chr.lua b/tex/context/base/spac-chr.lua
index 2502b1992..24364978a 100644
--- a/tex/context/base/spac-chr.lua
+++ b/tex/context/base/spac-chr.lua
@@ -74,7 +74,7 @@ local function inject_char_space(unicode,head,current,parent)
local font = current.font
local char = fontcharacters[font][parent]
local glue = new_glue(char and char.width or fontparameters[font].space)
--- glue.attr = copy_node_list(current.attr)
+ -- glue.attr = copy_node_list(current.attr)
glue.attr = current.attr
current.attr = nil
glue[a_character] = unicode
@@ -86,10 +86,10 @@ local function inject_nobreak_space(unicode,head,current,space,spacestretch,spac
local attr = current.attr
local glue = new_glue(space,spacestretch,spaceshrink)
local penalty = new_penalty(10000)
--- glue.attr = copy_node_list(attr)
+ -- glue.attr = copy_node_list(attr)
glue.attr = attr
-current.attr = nil
--- penalty.attr = attr
+ current.attr = nil
+ -- penalty.attr = attr
glue[a_character] = unicode
head, current = insert_node_after(head,current,penalty)
head, current = insert_node_after(head,current,glue)
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 2ba67a882..8b9695149 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 c94f04130..b6bdfe561 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/typo-cap.lua b/tex/context/base/typo-cap.lua
index 0285b262e..8f49580a4 100644
--- a/tex/context/base/typo-cap.lua
+++ b/tex/context/base/typo-cap.lua
@@ -18,6 +18,7 @@ local nodes, node = nodes, node
local traverse_id = node.traverse_id
local copy_node = node.copy
+local end_of_math = node.end_of_math
local texattribute = tex.attribute
local unsetvalue = attributes.unsetvalue
@@ -83,7 +84,6 @@ local function helper(start, codes, special, attribute, once)
if next then
next.prev = prev
end
---~ node.free(start)
return prev, true
elseif lastfont and start.prev.id ~= glyph_code then
fnt = lastfont
@@ -279,8 +279,10 @@ local function process(namespace,attribute,head) -- not real fast but also not u
report_casing("unknown case trigger %a",attr)
end
end
+ elseif id == math_code then
+ start = end_of_math(start)
end
- if start then
+ if start then -- why test
start = start.next
end
end
diff --git a/tex/context/base/typo-dir.lua b/tex/context/base/typo-dir.lua
index 7f8975082..7e5f8c2d3 100644
--- a/tex/context/base/typo-dir.lua
+++ b/tex/context/base/typo-dir.lua
@@ -6,6 +6,8 @@ if not modules then modules = { } end modules ['typo-dir'] = {
license = "see context related readme files"
}
+-- todo: also use end_of_math here?
+
local next, type = next, type
local format, insert, sub, find, match = string.format, table.insert, string.sub, string.find, string.match
local utfchar = utf.char
diff --git a/tex/context/base/typo-itc.lua b/tex/context/base/typo-itc.lua
index ef44a7f28..73d841aa3 100644
--- a/tex/context/base/typo-itc.lua
+++ b/tex/context/base/typo-itc.lua
@@ -25,6 +25,7 @@ local tasks = nodes.tasks
local insert_node_after = node.insert_after
local delete_node = nodes.delete
+local end_of_math = node.end_of_math
local texattribute = tex.attribute
local a_italics = attributes.private("italics")
@@ -159,6 +160,8 @@ local function process(namespace,attribute,head)
italic = 0
done = true
end
+ elseif id == math_code then
+ current = end_of_math(current)
elseif italic ~= 0 then
if trace_italics then
report_italics("inserting %p between italic %C and whatever",italic,prevchar)
diff --git a/tex/context/base/typo-krn.lua b/tex/context/base/typo-krn.lua
index 6dd3e6bd7..cd50c205e 100644
--- a/tex/context/base/typo-krn.lua
+++ b/tex/context/base/typo-krn.lua
@@ -18,6 +18,7 @@ local copy_node = node.copy
local copy_nodelist = node.copy_list
local insert_node_before = node.insert_before
local insert_node_after = node.insert_after
+local end_of_math = node.end_of_math
local texattribute = tex.attribute
local unsetvalue = attributes.unsetvalue
@@ -280,6 +281,8 @@ local function do_process(namespace,attribute,head,force) -- todo: glue so that
insert_node_after(head,start,kern_injector(fillup,quaddata[lastfont]*krn))
done = true
end
+ elseif id == math_code then
+ start = end_of_math(start)
end
end
end
diff --git a/tex/context/base/typo-spa.lua b/tex/context/base/typo-spa.lua
index 1464ea2af..4810a7163 100644
--- a/tex/context/base/typo-spa.lua
+++ b/tex/context/base/typo-spa.lua
@@ -18,6 +18,7 @@ local nodes, fonts, node = nodes, fonts, node
local insert_node_before = node.insert_before
local insert_node_after = node.insert_after
local remove_node = nodes.remove
+local end_of_math = node.end_of_math
local fonthashes = fonts.hashes
local fontdata = fonthashes.identifiers
@@ -156,6 +157,8 @@ local function process(namespace,attribute,head)
end
end
end
+ elseif id == math_code then
+ start = end_of_math(start)
end
start = start.next
end
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 8d0a51e5f..d7d76dd7c 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 : 03/19/13 14:27:10
+-- merge date : 03/19/13 16:34:04
do -- begin closure to overcome local limits and interference
@@ -7948,7 +7948,7 @@ local glyph_code=nodecodes.glyph
local math_code=nodecodes.math
local traverse_id=node.traverse_id
local traverse_node_list=node.traverse
-local endofmath=nodes.endofmath
+local end_of_math=node.end_of_math
local fontdata=fonts.hashes.identifiers
local categories=characters and characters.categories or {}
local otffeatures=fonts.constructors.newfeatures("otf")
@@ -8020,6 +8020,9 @@ function analyzers.setstate(head,font)
last[a_state]=s_fina
end
first,last,n=nil,nil,0
+ if id==math_code then
+ current=end_of_math(current)
+ end
end
current=current.next
end
@@ -8224,6 +8227,9 @@ function methods.arab(head,font,attr)
end
else
first,last=finish(first,last)
+ if id==math_code then
+ current=end_of_math(current)
+ end
end
current=current.next
end
@@ -8290,7 +8296,7 @@ local delete_node=nodes.delete
local copy_node=node.copy
local find_node_tail=node.tail or node.slide
local flush_node_list=node.flush_list
-local endofmath=nodes.endofmath
+local end_of_math=node.end_of_math
local setmetatableindex=table.setmetatableindex
local zwnj=0x200C
local zwj=0x200D
@@ -10022,7 +10028,7 @@ for s=1,#datasets do
start=start.next
end
elseif id==math_code then
- start=endofmath(start).next
+ start=end_of_math(start).next
else
start=start.next
end
@@ -10063,7 +10069,7 @@ for s=1,#datasets do
end
start=start.next
elseif id==math_code then
- start=endofmath(start).next
+ start=end_of_math(start).next
else
start=start.next
end
@@ -10142,7 +10148,7 @@ for s=1,#datasets do
end
start=start.next
elseif id==math_code then
- start=endofmath(start).next
+ start=end_of_math(start).next
else
start=start.next
end