From d1f4da02201fd33c139ee1756296e8df53580ff7 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 17 Dec 2019 17:22:50 +0100 Subject: 2019-12-17 16:25:00 --- doc/context/documents/general/qrcs/setup-cs.pdf | Bin 888155 -> 888063 bytes doc/context/documents/general/qrcs/setup-de.pdf | Bin 889978 -> 889578 bytes doc/context/documents/general/qrcs/setup-en.pdf | Bin 894028 -> 893762 bytes doc/context/documents/general/qrcs/setup-fr.pdf | Bin 886020 -> 886147 bytes doc/context/documents/general/qrcs/setup-it.pdf | Bin 891875 -> 891861 bytes .../documents/general/qrcs/setup-mapping-cs.pdf | Bin 383830 -> 383749 bytes .../documents/general/qrcs/setup-mapping-de.pdf | Bin 383942 -> 384100 bytes .../documents/general/qrcs/setup-mapping-en.pdf | Bin 380665 -> 380389 bytes .../documents/general/qrcs/setup-mapping-fr.pdf | Bin 384071 -> 384288 bytes .../documents/general/qrcs/setup-mapping-it.pdf | Bin 383483 -> 383491 bytes .../documents/general/qrcs/setup-mapping-nl.pdf | Bin 381856 -> 381768 bytes .../documents/general/qrcs/setup-mapping-ro.pdf | Bin 620008 -> 620275 bytes doc/context/documents/general/qrcs/setup-nl.pdf | Bin 881269 -> 881303 bytes doc/context/documents/general/qrcs/setup-ro.pdf | Bin 886138 -> 885777 bytes .../manuals/luametatex/luametatex-style.tex | 5 ++ scripts/context/perl/mptopdf.pl | 8 +- tex/context/base/mkii/cont-new.mkii | 2 +- tex/context/base/mkii/context.mkii | 2 +- tex/context/base/mkiv/cont-new.mkiv | 2 +- tex/context/base/mkiv/context.mkiv | 2 +- tex/context/base/mkiv/context.mkxl | 2 +- tex/context/base/mkiv/node-syn.lua | 22 ++++- tex/context/base/mkiv/pack-mrl.mkiv | 2 +- tex/context/base/mkiv/page-mix.lua | 94 +++++++++++---------- tex/context/base/mkiv/spac-ali.lua | 18 +++- tex/context/base/mkiv/spac-ali.mkiv | 4 +- tex/context/base/mkiv/spac-chr.lua | 4 +- tex/context/base/mkiv/status-files.pdf | Bin 26587 -> 26561 bytes tex/context/base/mkiv/status-lua.pdf | Bin 269625 -> 269619 bytes tex/context/interface/mkiv/i-context.pdf | Bin 894028 -> 893762 bytes tex/context/interface/mkiv/i-readme.pdf | Bin 61165 -> 61165 bytes tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 32 files changed, 107 insertions(+), 62 deletions(-) diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf index 08faefcd7..4470e5cde 100644 Binary files a/doc/context/documents/general/qrcs/setup-cs.pdf and b/doc/context/documents/general/qrcs/setup-cs.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf index 599c8ada7..e34603f95 100644 Binary files a/doc/context/documents/general/qrcs/setup-de.pdf and b/doc/context/documents/general/qrcs/setup-de.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf index 3b6d7bb7e..5948b8a59 100644 Binary files a/doc/context/documents/general/qrcs/setup-en.pdf and b/doc/context/documents/general/qrcs/setup-en.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf index 3aec6a16f..8301ec459 100644 Binary files a/doc/context/documents/general/qrcs/setup-fr.pdf and b/doc/context/documents/general/qrcs/setup-fr.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf index 51527717d..c935d6a32 100644 Binary files a/doc/context/documents/general/qrcs/setup-it.pdf and b/doc/context/documents/general/qrcs/setup-it.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf index 2dd82b88e..5e225f8b9 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf and b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-de.pdf b/doc/context/documents/general/qrcs/setup-mapping-de.pdf index 1178fab2d..3289bd8e8 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-de.pdf and b/doc/context/documents/general/qrcs/setup-mapping-de.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-en.pdf b/doc/context/documents/general/qrcs/setup-mapping-en.pdf index e0ab522a2..f765dac55 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-en.pdf and b/doc/context/documents/general/qrcs/setup-mapping-en.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf index b7ec60497..cf30c563f 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf and b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-it.pdf b/doc/context/documents/general/qrcs/setup-mapping-it.pdf index 3c90959d7..c80554c77 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-it.pdf and b/doc/context/documents/general/qrcs/setup-mapping-it.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf index 1dd695607..ea6d1f7a6 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf and b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf index 1c583d367..9f72e95e0 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf and b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf index 9bb620972..0d6fc4795 100644 Binary files a/doc/context/documents/general/qrcs/setup-nl.pdf and b/doc/context/documents/general/qrcs/setup-nl.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf index 329ce4fc9..896588745 100644 Binary files a/doc/context/documents/general/qrcs/setup-ro.pdf and b/doc/context/documents/general/qrcs/setup-ro.pdf differ diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-style.tex b/doc/context/sources/general/manuals/luametatex/luametatex-style.tex index 96a28a0dc..88fbb4d90 100644 --- a/doc/context/sources/general/manuals/luametatex/luametatex-style.tex +++ b/doc/context/sources/general/manuals/luametatex/luametatex-style.tex @@ -52,6 +52,7 @@ \setuptabulate [blank={small,samepage}, + margin=.25em, headstyle=bold, rulecolor=maincolor, rulethickness=1pt, @@ -438,6 +439,10 @@ \def\currentlibraryindex{\namedstructureuservariable{section}{library}} +\setupregister + [alternative=a, + balance=no] + \setupregister [libraryindex] [indicator=no,before=] diff --git a/scripts/context/perl/mptopdf.pl b/scripts/context/perl/mptopdf.pl index d653029a6..5fe53c98f 100644 --- a/scripts/context/perl/mptopdf.pl +++ b/scripts/context/perl/mptopdf.pl @@ -3,6 +3,12 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $ # MikTeX users can set environment variable TEXSYSTEM to "miktex". +# There have been suggestions to patch this script for dealing with different +# output templates (a relative new metapost feature) but these have given +# unwanted side effects. One can always wrap this script in another script +# to deal with whatever patterns needed. We won't touch what has worked for +# ages. (December 2019) + #D \module #D [ file=mptopdf.pl, #D version=2010.05.28, % 2000.05.29 @@ -120,7 +126,7 @@ if (($pattern eq '')||($Help)) { foreach my $file (@files) { $_ = $file ; - if (s/\.(\d+|mps|ps)$// && -e $file) { + if (s/\.(\d+|mps)$// && -e $file) { if ($miktex) { $command = "pdftex -undump=mptopdf" ; } else { 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 Binary files a/tex/context/base/mkiv/status-files.pdf and b/tex/context/base/mkiv/status-files.pdf differ diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf index b74c34419..b3a54adee 100644 Binary files a/tex/context/base/mkiv/status-lua.pdf and b/tex/context/base/mkiv/status-lua.pdf differ diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf index 3b6d7bb7e..5948b8a59 100644 Binary files a/tex/context/interface/mkiv/i-context.pdf and b/tex/context/interface/mkiv/i-context.pdf differ diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf index c419f853d..cce00c05a 100644 Binary files a/tex/context/interface/mkiv/i-readme.pdf and b/tex/context/interface/mkiv/i-readme.pdf 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 -- cgit v1.2.3