summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-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/context.mkxl2
-rw-r--r--tex/context/base/mkiv/node-syn.lua22
-rw-r--r--tex/context/base/mkiv/pack-mrl.mkiv2
-rw-r--r--tex/context/base/mkiv/page-mix.lua94
-rw-r--r--tex/context/base/mkiv/spac-ali.lua18
-rw-r--r--tex/context/base/mkiv/spac-ali.mkiv4
-rw-r--r--tex/context/base/mkiv/spac-chr.lua4
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin26587 -> 26561 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin269625 -> 269619 bytes
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin894028 -> 893762 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin61165 -> 61165 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
16 files changed, 95 insertions, 61 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 88451da74..b632a2017 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{2019.12.16 18:37}
+\newcontextversion{2019.12.17 16:16}
%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 2981ef1b9..fcc668f18 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{2019.12.16 18:37}
+\edef\contextversion{2019.12.17 16:16}
%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 0e8a9b8b4..a54f4dc49 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2019.12.16 18:37}
+\newcontextversion{2019.12.17 16: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/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index f11a853e2..a2a62cc8a 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -45,7 +45,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2019.12.16 18:37}
+\edef\contextversion{2019.12.17 16:16}
\edef\contextkind {beta}
%D Kind of special:
diff --git a/tex/context/base/mkiv/context.mkxl b/tex/context/base/mkiv/context.mkxl
index 3ec65f1f4..6f7388f59 100644
--- a/tex/context/base/mkiv/context.mkxl
+++ b/tex/context/base/mkiv/context.mkxl
@@ -29,7 +29,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2019.12.16 18:37}
+\edef\contextversion{2019.12.17 16:16}
\edef\contextkind {beta}
%D Kind of special:
diff --git a/tex/context/base/mkiv/node-syn.lua b/tex/context/base/mkiv/node-syn.lua
index 9096809c4..68a05234e 100644
--- a/tex/context/base/mkiv/node-syn.lua
+++ b/tex/context/base/mkiv/node-syn.lua
@@ -154,8 +154,11 @@ local kern_code = nodecodes.kern
----- rule_code = nodecodes.rule
local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
+local dir_code = nodecodes.dir
local fontkern_code = kerncodes.fontkern
+local cancel_code = nodes.dircodes.cancel
+
local insert_before = nuts.insert_before
local insert_after = nuts.insert_after
@@ -641,6 +644,19 @@ local function collect_max(head,parent)
current = getnext(current)
if current then
id = getid(current)
+
+-- while id == dir_code do
+-- current = getnext(current)
+-- if current then
+-- id = getid(current)
+-- else
+-- if tag > 0 then
+-- head = inject(parent,head,first,last,tag,line)
+-- end
+-- return head
+-- end
+-- end
+
else
if tag > 0 then
head = inject(parent,head,first,last,tag,line)
@@ -649,12 +665,12 @@ local function collect_max(head,parent)
end
end
end
- -- pick up(as id can have changed)
+ -- pick up (as id can have changed)
if id == hlist_code or id == vlist_code then
local list = getlist(current)
if list then
local l = collect(list,current)
- if l ~= list then
+ if l and l ~= list then
setlist(current,l)
end
end
@@ -692,7 +708,7 @@ end
function synctex.stop()
if enabled then
--- filehandle:write(s_vlist,s_hlist)
+ -- filehandle:write(s_vlist,s_hlist)
filehandle:write(s_hlist)
writeanchor()
filehandle:write("}",nofsheets,eol)
diff --git a/tex/context/base/mkiv/pack-mrl.mkiv b/tex/context/base/mkiv/pack-mrl.mkiv
index 6b76a4b74..e5d19d3b3 100644
--- a/tex/context/base/mkiv/pack-mrl.mkiv
+++ b/tex/context/base/mkiv/pack-mrl.mkiv
@@ -644,7 +644,7 @@
\pack_textrule_correct_depth_yes
\pack_textrule_correct_depth_nop
\nointerlineskip
- \noindent\vpack % was \dontleavehmode
+ \noindent\naturalvpack % was \dontleavehmode
{\color[\directtextrulesparameter\c!rulecolor]
{\hrule
\s!depth \directtextrulesparameter\c!rulethickness
diff --git a/tex/context/base/mkiv/page-mix.lua b/tex/context/base/mkiv/page-mix.lua
index d64646d8a..dacc829d7 100644
--- a/tex/context/base/mkiv/page-mix.lua
+++ b/tex/context/base/mkiv/page-mix.lua
@@ -349,49 +349,50 @@ local function preparesplit(specification) -- a rather large function
lastcontent = nil
end
- -- local function backtrack(start)
- -- local current = start
- -- -- first skip over glue and penalty
- -- while current do
- -- local id = getid(current)
- -- if id == glue_code then
- -- if trace_state then
- -- report_state("backtracking over %s in column %s, value %p","glue",column,getwidth(current))
- -- end
- -- current = getprev(current)
- -- elseif id == penalty_code then
- -- if trace_state then
- -- report_state("backtracking over %s in column %s, value %i","penalty",column,getpenalty(current))
- -- end
- -- else
- -- break
- -- end
- -- end
- -- -- then skip over content
- -- while current do
- -- local id = getid(current)
- -- if id == glue_code then
- -- if trace_state then
- -- report_state("quitting at %s in column %s, value %p","glue",column,getwidth(current))
- -- end
- -- break
- -- elseif id == penalty_code then
- -- if trace_state then
- -- report_state("quitting at %s in column %s, value %i","penalty",column,getpenalty(current))
- -- end
- -- break
- -- else
- -- current = getprev(current)
- -- end
- -- end
- -- if not current then
- -- if trace_state then
- -- report_state("no effective backtracking in column %s",column)
- -- end
- -- current = start
- -- end
- -- return current
- -- end
+ local function backtrack(start)
+ local current = start
+ -- first skip over glue and penalty
+ while current do
+ local id = getid(current)
+ if id == glue_code then
+ if trace_state then
+ report_state("backtracking over %s in column %s, value %p","glue",column,getwidth(current))
+ end
+ current = getprev(current)
+ elseif id == penalty_code then
+ if trace_state then
+ report_state("backtracking over %s in column %s, value %i","penalty",column,getpenalty(current))
+ end
+ current = getprev(current)
+ else
+ break
+ end
+ end
+ -- then skip over content
+ while current do
+ local id = getid(current)
+ if id == glue_code then
+ if trace_state then
+ report_state("quitting at %s in column %s, value %p","glue",column,getwidth(current))
+ end
+ break
+ elseif id == penalty_code then
+ if trace_state then
+ report_state("quitting at %s in column %s, value %i","penalty",column,getpenalty(current))
+ end
+ break
+ else
+ current = getprev(current)
+ end
+ end
+ if not current then
+ if trace_state then
+ report_state("no effective backtracking in column %s",column)
+ end
+ current = start
+ end
+ return current
+ end
local function gotonext()
if lastcurrent then
@@ -400,8 +401,11 @@ local function preparesplit(specification) -- a rather large function
report_state("backtracking to preferred break in column %s",column)
end
-- todo: also remember height/depth
- -- current = backtrack(lastcurrent) -- not ok, we go to far back so why was this needed
- current = lastcurrent
+ if true then -- todo: option to disable this
+ current = backtrack(lastcurrent) -- not ok yet
+ else
+ current = lastcurrent
+ end
backtracked = true
end
lastcurrent = nil
diff --git a/tex/context/base/mkiv/spac-ali.lua b/tex/context/base/mkiv/spac-ali.lua
index b58040ac7..c30a4fa94 100644
--- a/tex/context/base/mkiv/spac-ali.lua
+++ b/tex/context/base/mkiv/spac-ali.lua
@@ -24,11 +24,14 @@ local getid = nuts.getid
local getlist = nuts.getlist
local setlist = nuts.setlist
local setlink = nuts.setlink
+local getdirection = nuts.getdirection
local takeattr = nuts.takeattr
local getsubtype = nuts.getsubtype
local getwidth = nuts.getwidth
local findtail = nuts.tail
+local righttoleft_code = nodes.dirvalues.righttoleft
+
local hpack_nodes = nuts.hpack
local unsetvalue = attributes.unsetvalue
@@ -85,17 +88,28 @@ local function handler(head,leftpage,realpageno) -- traverse_list
elseif align == 2 then -- flushleft
action = leftpage and 2 or 1
end
+ -- WS: watch this
+ local direction = getdirection(current)
+ -- or should this happen at the tex end:
+ if direction == righttoleft_code then
+ if action == 1 then
+ action = 2
+ elseif action == 2 then
+ action = 1
+ end
+ end
+ --
if action == 1 then
local head = getlist(current)
setlink(findtail(head),new_stretch(3)) -- append
- setlist(current,hpack_nodes(head,getwidth(current),"exactly"))
+ setlist(current,hpack_nodes(head,getwidth(current),"exactly",direction))
if trace_realign then
report_realign("flushing left, align %a, page %a, realpage %a",align,pageno,realpageno)
end
elseif action == 2 then
local list = getlist(current)
local head = setlink(new_stretch(3),list) -- prepend
- setlist(current,hpack_nodes(head,getwidth(current),"exactly"))
+ setlist(current,hpack_nodes(head,getwidth(current),"exactly",direction))
if trace_realign then
report_realign("flushing right. align %a, page %a, realpage %a",align,pageno,realpageno)
end
diff --git a/tex/context/base/mkiv/spac-ali.mkiv b/tex/context/base/mkiv/spac-ali.mkiv
index 3c3c6b4a1..f80b1a192 100644
--- a/tex/context/base/mkiv/spac-ali.mkiv
+++ b/tex/context/base/mkiv/spac-ali.mkiv
@@ -691,8 +691,8 @@
\c_spac_align_state_horizontal\zerocount}
\setvalue{\??aligncommand\v!inner }{\c_spac_align_state_horizontal\plusfour }
\setvalue{\??aligncommand\v!outer }{\c_spac_align_state_horizontal\plusfive }
-\setvalue{\??aligncommand\v!flushinner }{\c_spac_align_state_horizontal\plusfive }
-\setvalue{\??aligncommand\v!flushouter }{\c_spac_align_state_horizontal\plusfour }
+\setvalue{\??aligncommand\v!flushinner }{\c_spac_align_state_horizontal\plusfour }
+\setvalue{\??aligncommand\v!flushouter }{\c_spac_align_state_horizontal\plusfive }
\setvalue{\??aligncommand\v!right }{\c_spac_align_state_horizontal\plustwo }
\setvalue{\??aligncommand\v!left }{\c_spac_align_state_horizontal\plusthree}
\setvalue{\??aligncommand\v!center }{\c_spac_align_state_horizontal\plusone
diff --git a/tex/context/base/mkiv/spac-chr.lua b/tex/context/base/mkiv/spac-chr.lua
index b32565f19..9b8453ca6 100644
--- a/tex/context/base/mkiv/spac-chr.lua
+++ b/tex/context/base/mkiv/spac-chr.lua
@@ -27,6 +27,7 @@ local nodes, node = nodes, node
local nuts = nodes.nuts
+local getboth = nuts.getboth
local getnext = nuts.getnext
local getprev = nuts.getprev
local getattr = nuts.getattr
@@ -198,7 +199,7 @@ local methods = {
end,
[0x00A0] = function(head,current) -- nbsp
- local next = getnext(current)
+ local prev, next = getboth(current)
if next then
local char = isglyph(current)
if not char then
@@ -215,7 +216,6 @@ local methods = {
return false
end
end
- local prev = getprev(current)
if prev then
local char = isglyph(prev)
if char and nbsphash[char] then
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 7b25a5d94..51d2c9706 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 b74c34419..b3a54adee 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/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 3b6d7bb7e..5948b8a59 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index c419f853d..cce00c05a 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index df96d6b0b..60dd39e39 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/16/19 18:37:19
+-- merge date : 12/17/19 16:16:32
do -- begin closure to overcome local limits and interference