summaryrefslogtreecommitdiff
path: root/tex/context/base
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-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/font-otj.lua113
-rw-r--r--tex/context/base/mkiv/page-ini.lua17
-rw-r--r--tex/context/base/mkiv/page-set.mkiv4
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin25802 -> 25832 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin254077 -> 254074 bytes
9 files changed, 77 insertions, 65 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 30c27eb44..0c189965f 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2018.03.15 15:27}
+\newcontextversion{2018.03.16 22:20}
%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/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index dfa109af4..2dcc7482e 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2018.03.15 15:27}
+\edef\contextversion{2018.03.16 22:20}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 3951d8e3f..aef280dc3 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{2018.03.15 15:27}
+\newcontextversion{2018.03.16 22:20}
%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 6a3eddf9f..1ff75e083 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -42,7 +42,7 @@
%D has to match \type {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2018.03.15 15:27}
+\edef\contextversion{2018.03.16 22:20}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/font-otj.lua b/tex/context/base/mkiv/font-otj.lua
index 1f9fd1ac1..9037939df 100644
--- a/tex/context/base/mkiv/font-otj.lua
+++ b/tex/context/base/mkiv/font-otj.lua
@@ -34,13 +34,20 @@ if not nodes.properties then return end
local next, rawget, tonumber = next, rawget, tonumber
local fastcopy = table.fastcopy
-local registertracker = trackers.register
+local registertracker = trackers.register
+local registerdirective = directives.register
local trace_injections = false registertracker("fonts.injections", function(v) trace_injections = v end)
local trace_marks = false registertracker("fonts.injections.marks", function(v) trace_marks = v end)
local trace_cursive = false registertracker("fonts.injections.cursive", function(v) trace_cursive = v end)
local trace_spaces = false registertracker("fonts.injections.spaces", function(v) trace_spaces = v end)
+-- local fix_cursive_marks = false
+--
+-- registerdirective("fonts.injections.fixcursivemarks", function(v)
+-- fix_cursive_marks = v
+-- end)
+
local report_injections = logs.reporter("fonts","injections")
local report_spaces = logs.reporter("fonts","spaces")
@@ -1033,6 +1040,8 @@ local function inject_everything(head,where)
local marks = { }
local nofmarks = 0
--
+ -- local applyfix = hascursives and fix_cursive_marks
+ --
-- move out
--
local function processmark(p,n,pn) -- p = basenode
@@ -1118,7 +1127,7 @@ local function inject_everything(head,where)
end
end
-- begin of temp fix --
- local base = nil -- bah, some arabic fonts have no mark anchoring
+ -- local base = nil -- bah, some arabic fonts have no mark anchoring
-- end of temp fix --
while current do
local next = getnext(current)
@@ -1126,62 +1135,62 @@ local function inject_everything(head,where)
if char then
local p = rawget(properties,current)
-- begin of temp fix --
- if hascursives then
- if not p then
- local m = fontmarks[getfont(current)]
- if m and m[char] then
- if base then
- p = { injections = { markbasenode = base } }
- nofmarks = nofmarks + 1
- marks[nofmarks] = current
- properties[current] = p
- hasmarks = true
- end
- else
- base = current
- end
- end
- end
+ -- if applyfix then
+ -- if not p then
+ -- local m = fontmarks[getfont(current)]
+ -- if m and m[char] then
+ -- if base then
+ -- p = { injections = { markbasenode = base } }
+ -- nofmarks = nofmarks + 1
+ -- marks[nofmarks] = current
+ -- properties[current] = p
+ -- hasmarks = true
+ -- end
+ -- else
+ -- base = current
+ -- end
+ -- end
+ -- end
-- end of temp fix
if p then
local i = p.injections
-- begin of temp fix --
- if hascursives then
- if not i then
- local m = fontmarks[getfont(current)]
- if m and m[char] then
- if base then
- i = { markbasenode = base }
- nofmarks = nofmarks + 1
- marks[nofmarks] = current
- p.injections = i
- hasmarks = true
- end
- else
- base = current
- end
- end
- end
+ -- if applyfix then
+ -- if not i then
+ -- local m = fontmarks[getfont(current)]
+ -- if m and m[char] then
+ -- if base then
+ -- i = { markbasenode = base }
+ -- nofmarks = nofmarks + 1
+ -- marks[nofmarks] = current
+ -- p.injections = i
+ -- hasmarks = true
+ -- end
+ -- else
+ -- base = current
+ -- end
+ -- end
+ -- end
-- end of temp fix --
if i then
local pm = i.markbasenode
-- begin of temp fix --
- if hascursives then
- if not pm then
- local m = fontmarks[getfont(current)]
- if m and m[char] then
- if base then
- pm = base
- i.markbasenode = pm
- hasmarks = true
- end
- else
- base = current
- end
- else
- base = current
- end
- end
+ -- if applyfix then
+ -- if not pm then
+ -- local m = fontmarks[getfont(current)]
+ -- if m and m[char] then
+ -- if base then
+ -- pm = base
+ -- i.markbasenode = pm
+ -- hasmarks = true
+ -- end
+ -- else
+ -- base = current
+ -- end
+ -- else
+ -- base = current
+ -- end
+ -- end
-- end of temp fix --
if pm then
nofmarks = nofmarks + 1
@@ -1326,9 +1335,11 @@ local function inject_everything(head,where)
prevdisc = nil
prevglyph = current
elseif char == false then
+ -- base = nil
prevdisc = nil
prevglyph = current
elseif id == disc_code then
+ -- base = nil
pre, post, replace, pretail, posttail, replacetail = getdisc(current,true)
local done = false
if pre then
@@ -1460,9 +1471,9 @@ local function inject_everything(head,where)
prevglyph = nil
prevdisc = current
else
+ -- base = nil
prevglyph = nil
prevdisc = nil
-base = nil
end
prev = current
current = next
diff --git a/tex/context/base/mkiv/page-ini.lua b/tex/context/base/mkiv/page-ini.lua
index 17723c421..6325e1d39 100644
--- a/tex/context/base/mkiv/page-ini.lua
+++ b/tex/context/base/mkiv/page-ini.lua
@@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['page-ini'] = {
license = "see context related readme files"
}
-local tonumber, rawget, type, next = tonumber, rawget, type, next
+local tonumber, rawget, rawset, type, next = tonumber, rawget, rawset, type, next
local match = string.match
local sort, tohash, insert, remove = table.sort, table.tohash, table.insert, table.remove
local settings_to_array, settings_to_hash = utilities.parsers.settings_to_array, utilities.parsers.settings_to_hash
@@ -14,7 +14,7 @@ local settings_to_array, settings_to_hash = utilities.parsers.settings_to_array,
local texgetcount = tex.getcount
local context = context
-local ctx_testcase = commands.testcase
+local ctx_doifelse = commands.doifelse
local data = table.setmetatableindex("table")
local last = 0
@@ -69,13 +69,14 @@ function pages.mark(name,list)
end
end
-function pages.marked(name)
+local function marked(name)
local realpage = texgetcount("realpageno")
for i=last,realpage-1 do
- data[i] = nil
+ rawset(data,i,nil)
end
local pagedata = rawget(data,realpage)
- return pagedata and pagedata[name]
+ print(pagedata and pagedata[name] and true or false)
+ return pagedata and pagedata[name] and true or false
end
local function toranges(marked)
@@ -97,8 +98,6 @@ local function toranges(marked)
return list
end
-pages.toranges = toranges
-
local function allmarked(list)
if list then
local collected = pages.collected
@@ -139,6 +138,8 @@ local function allmarked(list)
end
end
+pages.marked = marked
+pages.toranges = toranges
pages.allmarked = allmarked
-- An alternative is to use an attribute and identify the state by parsing the node
@@ -170,7 +171,7 @@ interfaces.implement {
interfaces.implement {
name = "doifelsemarkedpage",
arguments = "string",
- actions = { marked, ctx_testcase }
+ actions = { marked, ctx_doifelse }
}
interfaces.implement {
diff --git a/tex/context/base/mkiv/page-set.mkiv b/tex/context/base/mkiv/page-set.mkiv
index fb6f607a1..3579e3b48 100644
--- a/tex/context/base/mkiv/page-set.mkiv
+++ b/tex/context/base/mkiv/page-set.mkiv
@@ -1198,12 +1198,12 @@
{\OTRSETcheckprefered
\enoughcolumncellsfalse
\donefalse
- \dostepwiserecurse{#1}{#2}{#3#4}
+ \dostepwiserecurse{#1}{#2}{#31}
{\ifdone
\exitloop
\else
#4=\recurselevel
- \dostepwiserecurse{#5}{#6}{#7#8}
+ \dostepwiserecurse{#5}{#6}{#71}
{\ifdone
\exitloop
\else
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 1351546fd..531068f8a 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 15354a5ea..22eee2a81 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ