diff options
36 files changed, 320 insertions, 102 deletions
diff --git a/doc/context/documents/general/manuals/luatex.pdf b/doc/context/documents/general/manuals/luatex.pdf Binary files differindex e5f03b0ee..8e4c9aa85 100644 --- a/doc/context/documents/general/manuals/luatex.pdf +++ b/doc/context/documents/general/manuals/luatex.pdf diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf Binary files differindex a6aab1839..4f4fb7a28 100644 --- a/doc/context/documents/general/qrcs/setup-cs.pdf +++ b/doc/context/documents/general/qrcs/setup-cs.pdf diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf Binary files differindex 17ed863e3..a413bae81 100644 --- a/doc/context/documents/general/qrcs/setup-de.pdf +++ b/doc/context/documents/general/qrcs/setup-de.pdf diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf Binary files differindex e1a52e7d5..73e966d22 100644 --- a/doc/context/documents/general/qrcs/setup-en.pdf +++ b/doc/context/documents/general/qrcs/setup-en.pdf diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf Binary files differindex 1b3f15b53..730da7b97 100644 --- a/doc/context/documents/general/qrcs/setup-fr.pdf +++ b/doc/context/documents/general/qrcs/setup-fr.pdf diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf Binary files differindex 7e5eb8451..6e6766746 100644 --- a/doc/context/documents/general/qrcs/setup-it.pdf +++ b/doc/context/documents/general/qrcs/setup-it.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf Binary files differindex 63be2c48f..c667d5546 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-de.pdf b/doc/context/documents/general/qrcs/setup-mapping-de.pdf Binary files differindex b32cabfe6..dec3b21ce 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-de.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-de.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-en.pdf b/doc/context/documents/general/qrcs/setup-mapping-en.pdf Binary files differindex 6274c104f..be6536689 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-en.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-en.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf Binary files differindex 620e6b650..42f592ee9 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-it.pdf b/doc/context/documents/general/qrcs/setup-mapping-it.pdf Binary files differindex 7586ae857..f70c0cd12 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-it.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-it.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf Binary files differindex 5e20ad25f..9a92a28b2 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf Binary files differindex 13851ec05..5dbc1e9b8 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf Binary files differindex e1b58428e..76a8a5999 100644 --- a/doc/context/documents/general/qrcs/setup-nl.pdf +++ b/doc/context/documents/general/qrcs/setup-nl.pdf diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf Binary files differindex 376d31dde..67b4a9b62 100644 --- a/doc/context/documents/general/qrcs/setup-ro.pdf +++ b/doc/context/documents/general/qrcs/setup-ro.pdf diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 7cb24385a..220ea6e69 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.07.26 20:40} +\newcontextversion{2018.07.27 19:12} %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 7e37a446c..5d5d44bde 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.07.26 20:40} +\edef\contextversion{2018.07.27 19:12} %D For those who want to use this: diff --git a/tex/context/base/mkii/mult-en.mkii b/tex/context/base/mkii/mult-en.mkii index 5c233a0c4..a9fffa0ea 100644 --- a/tex/context/base/mkii/mult-en.mkii +++ b/tex/context/base/mkii/mult-en.mkii @@ -1027,6 +1027,7 @@ \setinterfaceconstant{otherstext}{otherstext} \setinterfaceconstant{outermargin}{outermargin} \setinterfaceconstant{overprint}{overprint} +\setinterfaceconstant{ownerpassword}{ownerpassword} \setinterfaceconstant{ownnumber}{ownnumber} \setinterfaceconstant{page}{page} \setinterfaceconstant{pageboundaries}{pageboundaries} @@ -1268,12 +1269,14 @@ \setinterfaceconstant{up}{up} \setinterfaceconstant{urlalternative}{urlalternative} \setinterfaceconstant{urlspace}{urlspace} +\setinterfaceconstant{userpassword}{userpassword} \setinterfaceconstant{validate}{validate} \setinterfaceconstant{values}{values} \setinterfaceconstant{vcommand}{vcommand} \setinterfaceconstant{vcompact}{vcompact} \setinterfaceconstant{vector}{vector} \setinterfaceconstant{veroffset}{veroffset} +\setinterfaceconstant{vfactor}{vfactor} \setinterfaceconstant{vfil}{vfil} \setinterfaceconstant{viewerprefix}{viewerprefix} \setinterfaceconstant{voffset}{voffset} diff --git a/tex/context/base/mkiv/back-exp.lua b/tex/context/base/mkiv/back-exp.lua index 28929bc57..0cdeab6bb 100644 --- a/tex/context/base/mkiv/back-exp.lua +++ b/tex/context/base/mkiv/back-exp.lua @@ -2067,7 +2067,7 @@ do structures.tags.registerextradata("btx",function() local t = { "<btxdata>"} for dataset, used in sortedhash(tagsindatasets) do - t[#t+1] = publications.converttoxml(dataset,true,false,true,false,true) + t[#t+1] = publications.converttoxml(dataset,true,false,true,false,true,true) end t[#t+1] = "</btxdata>" return concat(t,"\n") @@ -3886,7 +3886,10 @@ local htmltemplate = [[ end t[#t+1] = "</extradata>" t[#t+1] = "</document>" - result = gsub(result,"</document>",concat(t,"\n")) + -- we use a function because otherwise we can have a bad capture index + result = gsub(result,"</document>",function() + return concat(t,"\n") + end) end -- done with ugly diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 3de47eb86..d25377d08 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.07.26 20:40} +\newcontextversion{2018.07.27 19:12} %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 63ac7b100..741bde22d 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.07.26 20:40} +\edef\contextversion{2018.07.27 19:12} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/mkiv/node-par.lua b/tex/context/base/mkiv/node-par.lua index bcb4621c9..56741e765 100644 --- a/tex/context/base/mkiv/node-par.lua +++ b/tex/context/base/mkiv/node-par.lua @@ -9,19 +9,48 @@ if not modules then modules = { } end modules ['node-par'] = { local starttiming = statistics.starttiming local stoptiming = statistics.stoptiming -local actions = nodes.tasks.actions("everypar") +local sequencers = utilities.sequencers --- this one is called a lot! +-- This are called a lot! + +if LUATEXFUNCTIONALITY > 6857 then + + local actions = nodes.tasks.actions("everypar") + + local function everypar(head) + starttiming(builders) + head = actions(head) + stoptiming(builders) + return head + end + + callbacks.register("insert_local_par",everypar,"after paragraph start") -local function everypar(head) - starttiming(builders) - head = actions(head) - stoptiming(builders) - return head end -if LUATEXFUNCTIONALITY > 6857 then +if LUATEXFUNCTIONALITY > 6870 then + + local actions = sequencers.new { + name = "newgraf", + arguments = "mode,indented", + returnvalues = "indented", + results = "indented", + } + + sequencers.appendgroup(actions,"before") -- user + sequencers.appendgroup(actions,"system") -- private + sequencers.appendgroup(actions,"after" ) -- user + + local function newgraf(mode,indented) + local runner = actions.runner + if runner then + starttiming(builders) + indent = runner(mode,indented) + stoptiming(builders) + end + return indented + end - callbacks.register("insert_local_par",everypar,"paragraph start") + callbacks.register("new_graf",newgraf,"before paragraph start") end diff --git a/tex/context/base/mkiv/node-tsk.lua b/tex/context/base/mkiv/node-tsk.lua index f2f78252a..0378c14c6 100644 --- a/tex/context/base/mkiv/node-tsk.lua +++ b/tex/context/base/mkiv/node-tsk.lua @@ -758,3 +758,40 @@ nonut = [[ -- ]], -- }, -- } + +-- -- math -- -- + +-- not really a node processor + +-- tasks.new { +-- name = "newpar", +-- processor = nodeprocessor, +-- sequence = { +-- "before", +-- "normalizers", +-- "after", +-- }, +-- templates = { +-- +-- default = [[ +-- return function(mode,indent) +-- return indent +-- end +-- ]], +-- +-- process = [[ +-- %localize% +-- +-- return function(mode,indent) +-- +-- %actions% +-- return indent +-- end +-- ]], +-- +-- step = [[ +-- indent = %action%(mode,indent) +-- ]], +-- +-- } +-- } diff --git a/tex/context/base/mkiv/page-sid.mkiv b/tex/context/base/mkiv/page-sid.mkiv index e983455bc..9304af6d9 100644 --- a/tex/context/base/mkiv/page-sid.mkiv +++ b/tex/context/base/mkiv/page-sid.mkiv @@ -760,7 +760,8 @@ %\ignoreparskip} \def\page_sides_handle_float#1% grid (4) is rather experimental - {\page_sides_check_horizontal_skips + {\page_sides_initialize_checker + \page_sides_check_horizontal_skips \page_sides_check_vertical_skips \page_sides_apply_horizontal_shift \page_sides_check_previous_float @@ -803,7 +804,16 @@ \fi \parskip\s_spac_whitespace_parskip} % not needed -\let\page_sides_check_floats\page_sides_check_floats_indeed +% \let\page_sides_check_floats\page_sides_check_floats_indeed + +\let\page_sides_check_floats\relax + +\def\page_sides_initialize_checker + {\ifx\page_sides_check_floats\relax + \glet\page_sides_check_floats\page_sides_check_floats_indeed + \clf_enablesidefloatchecker + \glet\page_sides_initialize_checker\relax + \fi} \unexpanded\def\page_sides_check_floats_tracer {\begingroup @@ -913,7 +923,8 @@ \global\c_page_sides_hangafter\zerocount \hangindent\zeropoint \fi - \global\c_page_sides_checks_done\zerocount + % \global % no, otherwise a next hangindent won't work + \c_page_sides_checks_done\zerocount \fi} \unexpanded\def\page_sides_synchronize_floats diff --git a/tex/context/base/mkiv/publ-dat.lua b/tex/context/base/mkiv/publ-dat.lua index cdcdf35b4..79b593345 100644 --- a/tex/context/base/mkiv/publ-dat.lua +++ b/tex/context/base/mkiv/publ-dat.lua @@ -721,7 +721,7 @@ do local compact = false -- can be a directive but then we also need to deal with newlines ... not now - function publications.converttoxml(dataset,nice,dontstore,usedonly,subset,noversion) -- we have fields ! + function publications.converttoxml(dataset,nice,dontstore,usedonly,subset,noversion,rawtoo) -- we have fields ! local current = datasets[dataset] local luadata = subset or (current and current.luadata) if luadata then @@ -755,9 +755,11 @@ do end end end -local s = publications.savers.bib(current,false,{ [tag] = entry }) -s = utilities.strings.striplines(s,"prune and collapse") -r = r + 1 ; result[r] = f_cdata(xml.escaped(s)) + if rawtoo then + local s = publications.savers.bib(current,false,{ [tag] = entry }) + s = utilities.strings.striplines(s,"prune and collapse") + r = r + 1 ; result[r] = f_cdata(s) + end r = r + 1 ; result[r] = s_entry_stop n = n + 1 end @@ -1156,8 +1158,8 @@ do table.save(filename,list) end - function savers.xml(dataset,filename,tobesaved) - local result, n = publications.converttoxml(dataset,true,true,false,tobesaved) + function savers.xml(dataset,filename,tobesaved,rawtoo) + local result, n = publications.converttoxml(dataset,true,true,false,tobesaved,false,rawtoo) report("%s entries from dataset %a saved in %a",n,dataset,filename) io.savedata(filename,result) end diff --git a/tex/context/base/mkiv/spac-flr.mkiv b/tex/context/base/mkiv/spac-flr.mkiv index 29351a3dd..bd50bfea6 100644 --- a/tex/context/base/mkiv/spac-flr.mkiv +++ b/tex/context/base/mkiv/spac-flr.mkiv @@ -60,6 +60,35 @@ \endgroup \ignorespaces} +% \definefiller +% [MyFiller] +% [offset=.25\emwidth, +% rightmargindistance=-\rightskip, +% method=middle] +% +% \startitemize[packed,joinedup][rightmargin=5em] +% \startitem +% \input sapolsky \fillupto[MyFiller]{RS} +% \stopitem +% \stopitemize + +\unexpanded\def\fillupto + {\dosingleempty\spac_fillers_upto} + +\def\spac_fillers_upto[#1]#2% + {\removeunwantedspaces + \begingroup + \edef\currentfiller{#1}% + \scratchdimen\dimexpr\fillerparameter\c!rightmargindistance\relax + \ifdim\scratchdimen=\zeropoint\else + \parfillskip \scratchdimen\s!plus \plusone\s!fil\relax + \fi + \spac_fillers_indeed[#1]% + \doifsomething{#2}{\hbox{#2}}% + \par + \endgroup + \ignorespaces} + \setvalue{\??filleralternative\s!unknown}% {} @@ -87,8 +116,8 @@ \setvalue{\??filleralternative\v!rule}% {\expandnamespaceparameter\??fillerleadermethod\fillerparameter\c!method\v!local \hrule - \!!height\fillerparameter\c!height - \!!depth \fillerparameter\c!depth + \s!height\fillerparameter\c!height + \s!depth \fillerparameter\c!depth \hfill} \letvalue{\??fillerleadermethod\s!local }\normalleaders % overflow ends up inbetween (current box) @@ -106,6 +135,7 @@ \c!depth=\zeropoint, \c!leftmargin=\zeropoint, \c!rightmargin=\zeropoint, + \c!rightmargindistance=\zeropoint, \c!alternative=\v!symbol, \c!method=\s!local] diff --git a/tex/context/base/mkiv/spac-ver.lua b/tex/context/base/mkiv/spac-ver.lua index aae9913f7..d056d6ed3 100644 --- a/tex/context/base/mkiv/spac-ver.lua +++ b/tex/context/base/mkiv/spac-ver.lua @@ -117,6 +117,7 @@ local a_snapvbox = attributes.private('snapvbox') local nuts = nodes.nuts local tonut = nuts.tonut +local tonode = nuts.tonode local getnext = nuts.getnext local setlink = nuts.setlink @@ -212,76 +213,80 @@ vspacingdata.snapmethods = snapmethods storage.register("builders/vspacing/data/snapmethods", snapmethods, "builders.vspacing.data.snapmethods") -local default = { - [v_maxheight] = true, - [v_maxdepth] = true, - [v_strut] = true, - [v_hfraction] = 1, - [v_dfraction] = 1, - [v_bfraction] = 0.25, -} +do -local fractions = { - [v_minheight] = v_hfraction, [v_maxheight] = v_hfraction, - [v_mindepth] = v_dfraction, [v_maxdepth] = v_dfraction, - [v_box] = v_bfraction, - [v_top] = v_tlines, [v_bottom] = v_blines, -} + local default = { + [v_maxheight] = true, + [v_maxdepth] = true, + [v_strut] = true, + [v_hfraction] = 1, + [v_dfraction] = 1, + [v_bfraction] = 0.25, + } -local values = { - offset = "offset" -} + local fractions = { + [v_minheight] = v_hfraction, [v_maxheight] = v_hfraction, + [v_mindepth] = v_dfraction, [v_maxdepth] = v_dfraction, + [v_box] = v_bfraction, + [v_top] = v_tlines, [v_bottom] = v_blines, + } -local colonsplitter = lpeg.splitat(":") + local values = { + offset = "offset" + } -local function listtohash(str) - local t = { } - for s in gmatch(str,"[^, ]+") do - local key, detail = lpegmatch(colonsplitter,s) - local v = variables[key] - if v then - t[v] = true - if detail then - local k = fractions[key] - if k then - detail = tonumber("0" .. detail) - if detail then - t[k] = detail - end - else - k = values[key] + local colonsplitter = lpeg.splitat(":") + + local function listtohash(str) + local t = { } + for s in gmatch(str,"[^, ]+") do + local key, detail = lpegmatch(colonsplitter,s) + local v = variables[key] + if v then + t[v] = true + if detail then + local k = fractions[key] if k then - detail = todimen(detail) + detail = tonumber("0" .. detail) if detail then t[k] = detail end + else + k = values[key] + if k then + detail = todimen(detail) + if detail then + t[k] = detail + end + end end end + else + detail = tonumber("0" .. key) + if detail then + t[v_hfraction] = detail + t[v_dfraction] = detail + end end + end + if next(t) then + t[v_hfraction] = t[v_hfraction] or 1 + t[v_dfraction] = t[v_dfraction] or 1 + return t else - detail = tonumber("0" .. key) - if detail then - t[v_hfraction] = detail - t[v_dfraction] = detail - end + return default end end - if next(t) then - t[v_hfraction] = t[v_hfraction] or 1 - t[v_dfraction] = t[v_dfraction] or 1 - return t - else - return default + + function vspacing.definesnapmethod(name,method) + local n = #snapmethods + 1 + local t = listtohash(method) + snapmethods[n] = t + t.name = name -- not interfaced + t.specification = method -- not interfaced + context(n) end -end -function vspacing.definesnapmethod(name,method) - local n = #snapmethods + 1 - local t = listtohash(method) - snapmethods[n] = t - t.name = name -- not interfaced - t.specification = method -- not interfaced - context(n) end local function validvbox(parentid,list) @@ -1911,6 +1916,8 @@ do -- ugly code: we get partial lists (check if this stack is still okay) ... and we run -- into temp nodes (sigh) + local forceflush = false + function vspacing.pagehandler(newhead,where) -- local newhead = texlists.contrib_head if newhead then @@ -1937,6 +1944,12 @@ do end end texsetcount("c_spac_vspacing_ignore_parskip",0) + + if forceflush then + forceflush = false + flush = true + end + if flush then if stackhead then if trace_collect_vspacing then report("%s > appending %s nodes to stack (final): %s",where,newhead) end @@ -1962,30 +1975,44 @@ do if trace_collect_vspacing then report("%s > storing %s nodes in stack (initial): %s",where,newhead) end stackhead = newhead end -if not flush then - local h = 0 - for n, id in nextnode, stackhead do - if id == glue_code then - h = h + getwidth(n) - elseif id == kern_code then - h = h + getkern(n) - end - end - if h + tex.pagetotal >= tex.pagegoal then - newhead = stackhead - stackhead, stacktail = nil, nil - return newhead - end -end stacktail = newtail - -- texlists.contrib_head = nil - -- newhead = nil end end --- tex.triggerbuildpage() return nil end + -- function vspacing.flushpagestack() + -- if stackhead then + -- local head = texlists.contrib_head + -- if head then + -- local tail = find_node_tail(head) + -- setlink(tail,stackhead) + -- else + -- texlists.contrib_head = tonode(stackhead) + -- end + -- stackhead, stacktail = nil, nil + -- end + -- + -- end + + function vspacing.pageoverflow() + local h = 0 + if stackhead then + for n, id in nextnode, stackhead do + if id == glue_code then + h = h + getwidth(n) + elseif id == kern_code then + h = h + getkern(n) + end + end + end + return h + end + + function vspacing.forcepageflush() + forceflush = true + end + local ignore = table.tohash { "split_keep", "split_off", @@ -2225,7 +2252,7 @@ do -- end -- } - interfaces.implement { + implement { name = "removelastline", actions = function() local head = texlists.page_head @@ -2241,7 +2268,7 @@ do end } - interfaces.implement { + implement { name = "showpagelist", -- will improve actions = function() local head = texlists.page_head @@ -2255,4 +2282,14 @@ do end } + implement { + name = "pageoverflow", + actions = { vspacing.pageoverflow, context } + } + + implement { + name = "forcepageflush", + actions = vspacing.forcepageflush + } + end diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex 0aad91c73..784f1b3a2 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex b3ef64c67..b314749a6 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkiv/strc-flt.lua b/tex/context/base/mkiv/strc-flt.lua index 466fd515e..e3a0ea30e 100644 --- a/tex/context/base/mkiv/strc-flt.lua +++ b/tex/context/base/mkiv/strc-flt.lua @@ -7,3 +7,37 @@ if not modules then modules = { } end modules ['strc-flt'] = { } -- nothing + +local sequencers = utilities.sequencers +local appendaction = sequencers.appendaction +local enableaction = sequencers.enableaction +local disableaction = sequencers.disableaction + +local texgetdimen = tex.getdimen + +local trace = trackers.register("structure.sidefloats.pageflush") +local report = logs.reporter("structure","floats") + +local forcepageflush = builders.vspacing.forcepageflush + +function builders.checksidefloat(mode,indented) + local s = texgetdimen("d_page_sides_vsize") + if s > 0 then + if trace then + report("force flushing page state, height %p",s) + end + forcepageflush() + end + return indented +end + +appendaction ("newgraf","system","builders.checksidefloat") +disableaction("newgraf","builders.checksidefloat") + +interfaces.implement { + name = "enablesidefloatchecker", + onlyonce = true, + actions = function() + enableaction("newgraf","builders.checksidefloat") + end, +} diff --git a/tex/context/interface/mkii/keys-en.xml b/tex/context/interface/mkii/keys-en.xml index dccff3a98..e948cda23 100644 --- a/tex/context/interface/mkii/keys-en.xml +++ b/tex/context/interface/mkii/keys-en.xml @@ -1033,6 +1033,7 @@ <cd:constant name='otherstext' value='otherstext'/> <cd:constant name='outermargin' value='outermargin'/> <cd:constant name='overprint' value='overprint'/> + <cd:constant name='ownerpassword' value='ownerpassword'/> <cd:constant name='ownnumber' value='ownnumber'/> <cd:constant name='page' value='page'/> <cd:constant name='pageboundaries' value='pageboundaries'/> @@ -1274,12 +1275,14 @@ <cd:constant name='up' value='up'/> <cd:constant name='urlalternative' value='urlalternative'/> <cd:constant name='urlspace' value='urlspace'/> + <cd:constant name='userpassword' value='userpassword'/> <cd:constant name='validate' value='validate'/> <cd:constant name='values' value='values'/> <cd:constant name='vcommand' value='vcommand'/> <cd:constant name='vcompact' value='vcompact'/> <cd:constant name='vector' value='vector'/> <cd:constant name='veroffset' value='veroffset'/> + <cd:constant name='vfactor' value='vfactor'/> <cd:constant name='vfil' value='vfil'/> <cd:constant name='viewerprefix' value='viewerprefix'/> <cd:constant name='voffset' value='voffset'/> diff --git a/tex/context/interface/mkiv/context-en.xml b/tex/context/interface/mkiv/context-en.xml index 4d624ef20..a1e2c4941 100644 --- a/tex/context/interface/mkiv/context-en.xml +++ b/tex/context/interface/mkiv/context-en.xml @@ -9558,6 +9558,21 @@ </cd:keywords> </cd:arguments> </cd:command> + <cd:command category="rules" file="spac-flr.mkiv" level="style" name="fillupto"> + <cd:arguments> + <cd:keywords> + <cd:constant type="sym"/> + <cd:constant type="symbol"/> + <cd:constant type="rule"/> + <cd:constant type="width"/> + <cd:constant type="space"/> + <cd:constant type="cd:name"/> + </cd:keywords> + <cd:keywords delimiters="braces"> + <cd:constant type="cd:text"/> + </cd:keywords> + </cd:arguments> + </cd:command> <cd:command category="rules" file="spac-flr.mkiv" level="style" name="checkedfiller"> <cd:arguments> <cd:keywords delimiters="braces"> diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf Binary files differindex e1a52e7d5..73e966d22 100644 --- a/tex/context/interface/mkiv/i-context.pdf +++ b/tex/context/interface/mkiv/i-context.pdf diff --git a/tex/context/interface/mkiv/i-filler.xml b/tex/context/interface/mkiv/i-filler.xml index 69cc37fca..d9a43378e 100644 --- a/tex/context/interface/mkiv/i-filler.xml +++ b/tex/context/interface/mkiv/i-filler.xml @@ -99,6 +99,20 @@ </cd:arguments> </cd:command> + <cd:command name="fillupto" level="style" category="rules" file="spac-flr.mkiv"> + <cd:arguments> + <cd:keywords> + <cd:constant type="sym"/> + <cd:constant type="symbol"/> + <cd:constant type="rule"/> + <cd:constant type="width"/> + <cd:constant type="space"/> + <cd:constant type="cd:name"/> + </cd:keywords> + <cd:resolve name="argument-text"/> + </cd:arguments> + </cd:command> + <cd:command name="checkedfiller" level="style" category="rules" file="spac-flr.mkiv"> <cd:arguments> <cd:keywords delimiters="braces"> @@ -207,4 +221,4 @@ </cd:arguments> </cd:command> -</cd:interface>
\ No newline at end of file +</cd:interface> diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf Binary files differindex 620d1d368..87725c503 100644 --- a/tex/context/interface/mkiv/i-readme.pdf +++ b/tex/context/interface/mkiv/i-readme.pdf diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 875849f1f..bacd3bb91 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 : 07/26/18 20:40:42 +-- merge date : 07/27/18 19:12:09 do -- begin closure to overcome local limits and interference |