summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv')
-rw-r--r--tex/context/base/mkiv/anch-pgr.lua23
-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/file-lib.lua30
-rw-r--r--tex/context/base/mkiv/mult-prm.lua2
-rw-r--r--tex/context/base/mkiv/page-one.mkiv8
-rw-r--r--tex/context/base/mkiv/publ-ini.lua4
-rw-r--r--tex/context/base/mkiv/spac-ver.lua5
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24763 -> 24314 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin257684 -> 236799 bytes
10 files changed, 37 insertions, 39 deletions
diff --git a/tex/context/base/mkiv/anch-pgr.lua b/tex/context/base/mkiv/anch-pgr.lua
index e822f12b4..8681239c9 100644
--- a/tex/context/base/mkiv/anch-pgr.lua
+++ b/tex/context/base/mkiv/anch-pgr.lua
@@ -81,7 +81,6 @@ local nodecodes = nodes.nodecodes
local par_code = nodecodes.par
local startofpar = nuts.startofpar
-
local insertbefore = nuts.insertbefore
local insertafter = nuts.insertafter
@@ -102,6 +101,7 @@ local enabled = false
-- many pages but for an arbitrary background shape that is not so common.
local function check(specification)
+ --
local a = specification.attribute
local index = specification.index
local depth = specification.depth
@@ -208,21 +208,6 @@ local function registerbackground(name)
end
end
--- local function collectbackgrounds(r,n)
--- if enabled then
--- local parent = getbox(n)
--- local head = getlist(parent)
--- realpage = r
--- processranges(a_textbackground,flush,head) -- ,parent)
--- end
--- end
---
--- interfaces.implement {
--- name = "collectbackgrounds",
--- actions = collectbackgrounds,
--- arguments = { "integer", "integer" }
--- }
-
nodes.handlers.textbackgrounds = function(head,where,parent) -- we have hlistdir and local dir
-- todo enable action in register
index = index + 1
@@ -785,9 +770,7 @@ local function calculatemultipar(tag)
for i=bindex+1,eindex-1 do
br = f_tag_two(btag,i)
local r = collected[br]
- if not r then
- report_graphics("invalid middle for %a",br)
- else
+ if r then
local rp = r.p -- page
local pp = list[rp]
local mp = middlepart(b,e,p,rp,r,left,right)
@@ -796,6 +779,8 @@ local function calculatemultipar(tag)
else
list[rp] = { mp }
end
+ else
+ report_graphics("invalid middle for %a",br)
end
end
local ep = e.p -- page
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index d61d0887e..98dbc868f 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{2021.12.14 19:16}
+\newcontextversion{2021.12.24 19:07}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 4675386c8..bc37c8aab 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -49,7 +49,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2021.12.14 19:16}
+\edef\contextversion{2021.12.24 19:07}
%D Kind of special:
diff --git a/tex/context/base/mkiv/file-lib.lua b/tex/context/base/mkiv/file-lib.lua
index 9b0679e25..50ac5e1db 100644
--- a/tex/context/base/mkiv/file-lib.lua
+++ b/tex/context/base/mkiv/file-lib.lua
@@ -18,10 +18,11 @@ local report_library = logs.reporter("files","library")
----- report_files = logs.reporter("files","readfile")
local removesuffix = file.removesuffix
+local collapsepath = file.collapsepath
local getreadfilename = resolvers.getreadfilename
-local loaded = { }
+local libraries = table.setmetatableindex("table")
local defaultpatterns = { "%s" }
local function defaultaction(name,foundname)
@@ -46,6 +47,7 @@ function resolvers.uselibrary(specification) -- todo: reporter
local foundname = getreadfilename("any",".",somename) -- maybe some day also an option not to backtrack .. and ../.. (or block global)
return foundname ~= "" and foundname
end
+ local loaded = libraries[patterns]
for i=1,#files do
local filename = files[i]
if not loaded[filename] then
@@ -76,17 +78,25 @@ function resolvers.uselibrary(specification) -- todo: reporter
end
end
end
- if not loaded[foundname] then
- if foundname then
- action(name,foundname)
+ if type(foundname) == "string" then
+ if not loaded[foundname] then
+ if foundname then
+ foundname = collapsepath(foundname)
+ -- this way we can run a module (nil when making a format):
+ local inputname = environment.inputfilename
+ if not inputname or collapsepath(inputname) ~= foundname then
+ action(name,foundname)
+ end
+ -- afterwards:
+ if onlyonce then
+ loaded[foundname] = true -- todo: base this on return value
+ end
+ elseif failure then
+ failure(name)
+ end
if onlyonce then
- loaded[foundname] = true -- todo: base this on return value
+ loaded[filename] = true -- todo: base this on return value
end
- elseif failure then
- failure(name)
- end
- if onlyonce then
- loaded[filename] = true -- todo: base this on return value
end
end
end
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index 87c52de04..0249b906b 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -312,6 +312,7 @@ return {
"efcode",
"endlocalcontrol",
"enforced",
+ "etoks",
"etoksapp",
"etokspre",
"everybeforepar",
@@ -552,6 +553,7 @@ return {
"wordboundary",
"wrapuppar",
"xdefcsname",
+ "xtoks",
"xtoksapp",
"xtokspre",
},
diff --git a/tex/context/base/mkiv/page-one.mkiv b/tex/context/base/mkiv/page-one.mkiv
index dbed7429a..567a19884 100644
--- a/tex/context/base/mkiv/page-one.mkiv
+++ b/tex/context/base/mkiv/page-one.mkiv
@@ -372,13 +372,13 @@
\def\page_one_command_flush_bottom_insertions_indeed
{\ifgridsnapping
- % \floatparameter\c!bottombefore
+ % \rootfloatparameter\c!bottombefore
\snaptogrid\hbox{\box\namedinsertionnumber\s!bottomfloat}%
- % \floatparameter\c!bottomafter
+ % \rootfloatparameter\c!bottomafter
\else
- \floatparameter\c!bottombefore
+ \rootfloatparameter\c!bottombefore
\unvbox\namedinsertionnumber\s!bottomfloat
- \floatparameter\c!bottomafter
+ \rootfloatparameter\c!bottomafter
\fi}
\unexpanded\def\page_one_command_flush_floats
diff --git a/tex/context/base/mkiv/publ-ini.lua b/tex/context/base/mkiv/publ-ini.lua
index bc0a9106f..9d43f69f4 100644
--- a/tex/context/base/mkiv/publ-ini.lua
+++ b/tex/context/base/mkiv/publ-ini.lua
@@ -2408,6 +2408,10 @@ do
s = k
break
end
+ -- weird
+ if type(s) == "table" then
+ return citevariants.default
+ end
end
if s then
s = specifications[s]
diff --git a/tex/context/base/mkiv/spac-ver.lua b/tex/context/base/mkiv/spac-ver.lua
index 9e0bc2dd8..8baf25184 100644
--- a/tex/context/base/mkiv/spac-ver.lua
+++ b/tex/context/base/mkiv/spac-ver.lua
@@ -2005,10 +2005,7 @@ do
function vspacing.vboxhandler(head,where)
if head and not ignore[where] and getnext(head) then
- if getnext(head) then -- what if a one liner and snapping?
- head = collapser(head,"vbox",where,trace_vbox_vspacing,true,a_snapvbox) -- todo: local snapper
- return head
- end
+ head = collapser(head,"vbox",where,trace_vbox_vspacing,true,a_snapvbox) -- todo: local snapper
end
return head
end
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 708b6ffd2..64c9917b6 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 10f855c72..38d788622 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ