summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-09-08 00:30:40 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-09-08 00:30:40 +0200
commit8601b3c9b34e6ff21d413b5b9256d76d867c2aec (patch)
tree4772ae6802c7dd8491094a53015b7ed5176bc9e0 /tex/context/base/mkiv
parent9e7f89f8e06f60cd518f013074cd56599a69fb8f (diff)
downloadcontext-8601b3c9b34e6ff21d413b5b9256d76d867c2aec.tar.gz
2017-09-07 23:55:00
Diffstat (limited to 'tex/context/base/mkiv')
-rw-r--r--tex/context/base/mkiv/back-exp.lua196
-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-ctx.lua9
-rw-r--r--tex/context/base/mkiv/font-unk.mkiv29
-rw-r--r--tex/context/base/mkiv/luat-run.lua1
-rw-r--r--tex/context/base/mkiv/math-ali.mkiv71
-rw-r--r--tex/context/base/mkiv/math-tag.lua19
-rw-r--r--tex/context/base/mkiv/node-syn.lua10
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin25844 -> 25840 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin426471 -> 426575 bytes
-rw-r--r--tex/context/base/mkiv/strc-sec.mkiv8
-rw-r--r--tex/context/base/mkiv/strc-tag.mkiv2
13 files changed, 229 insertions, 120 deletions
diff --git a/tex/context/base/mkiv/back-exp.lua b/tex/context/base/mkiv/back-exp.lua
index 98e28eca1..3ad9418ec 100644
--- a/tex/context/base/mkiv/back-exp.lua
+++ b/tex/context/base/mkiv/back-exp.lua
@@ -1238,24 +1238,23 @@ do
}
end
if ndata == 0 then
+root.skip = "comment" -- get rid of weird artefacts
+root.nota = "weird"
return
elseif ndata == 1 then
local d = data[1]
- if not d or d == "" or d.content then
+ if not d or d == "" then
+root.skip = "comment"
+ return
+ elseif d.content then
return
else -- if ndata == 1 then
local tg = d.tg
- if automathrows and roottg == "mrow" then
+-- if automathrows and roottg == "mrow" then
+if automathrows and (roottg == "mrow" or roottg == "mtext") then
-- maybe just always ! check spec first
+-- or we can have chesks.* for each as we then can flatten
if no_mrow[tg] then
--- local r = root.__p__
--- while r do
--- if r.data[1].tg == "mrow" then
--- r.data[1].skip = "comment"
--- r.skip = "comment"
--- end
--- break
--- end
root.skip = "comment"
end
elseif roottg == "mo" then
@@ -1588,55 +1587,157 @@ do
return di
end
end
- -- could be integrated but is messy then
--- while roottg == "mrow" and #data == 1 do
--- data = data[1]
--- for k, v in next, data do
--- root[k] = v
--- end
--- roottg = data.tg
--- end
end
end
function checks.math(di)
- local specification = specifications[di.fulltag]
- local mode = specification and specification.mode == "display" and "block" or "inline"
- di.attributes = {
- ["display"] = mode,
- ["xmlns:m"] = mathmlns,
- }
- -- can be option if needed:
- if mode == "inline" then
- -- di.nature = "mixed" -- else spacing problem (maybe inline)
- di.nature = "inline" -- we need to catch x$X$x and x $X$ x
+ if di.skip == "comment" then
+ -- already done, kind of weird, happens in mathmatrix, maybe some collapse
+ -- issue that i need to look into
else
- di.nature = "display"
+ local specification = specifications[di.fulltag]
+ local mode = specification and specification.mode == "display" and "block" or "inline"
+ di.attributes = {
+ ["display"] = mode,
+ ["xmlns:m"] = mathmlns,
+ }
+ -- can be option if needed:
+ if mode == "inline" then
+ -- di.nature = "mixed" -- else spacing problem (maybe inline)
+ di.nature = "inline" -- we need to catch x$X$x and x $X$ x
+ else
+ di.nature = "display"
+ end
+ if automathstrip then
+ stripmath(di)
+ end
+ checkmath(di)
end
- if automathstrip then
- stripmath(di)
+ end
+
+ -- this one can replace some of the previous code .. todo (test on mathmatrix)
+
+ -- ignore with no data can be removed
+
+ local function checked(d)
+ local n = #d
+ if n == 1 then
+ local di = d[1]
+ local tg = di.tg
+ if tg == "ignore" then
+ -- todo: we can move ignore's data one level up
+ return 1
+ elseif di.content then
+ return 1
+ else
+ local dd = di.data
+ if #dd > 0 and checked(dd) > 0 then
+ return 1
+ else
+ return 0
+ end
+ end
+ else
+ local m = 0
+ for i=1,n do
+ local di = d[i]
+ local tg = di.tg
+ if tg == "ignore" then
+ -- skip
+ elseif di.content then
+ m = m + 1
+ d[m] = di
+ else
+ local dd = di.data
+ if #dd > 0 and checked(dd) > 0 then
+ m = m + 1
+ d[m] = di
+ end
+ end
+ end
+ if m < n then
+ for i=n,m+1,-1 do
+ d[i] = nil
+ end
+ end
+ return m
end
- checkmath(di)
end
- local a, z, A, Z = 0x61, 0x7A, 0x41, 0x5A
+ function checks.mrow(di)
+-- local d = di.data
+-- if d then
+-- checked(d)
+-- end
+ end
+
+ -- we can move more checks here
+
+ local function flatten(di)
+ local r = di.__p__
+ while r do
+ local d = r.data
+ local n = #d
+ if d and n > 1 then
+ n = checked(d)
+ end
+ local tg = r.tg
+ if n == 1 and (tg == "mtext" or tg == "mrow") then
+ r.skip = "comment" -- weird error
+ r = r.__p__
+ else
+ break
+ end
+ end
+ end
- function extras.mi(di,element,n,fulltag) -- check with content
- local str = di.data[1].content
- if str and sub(str,1,1) ~= "&" then -- hack but good enough (maybe gsub op eerste)
- for v in utfvalues(str) do
- if (v >= a and v <= z) or (v >= A and v <= Z) then
- local a = di.attributes
- if a then
- a.mathvariant = "normal"
+ function checks.mtable(di)
+ flatten(di)
+ local d = di.data
+ for i=1,#d do
+ local d = d[i]
+ if d.tg == "mtr" then
+ local d = d.data
+ for i=1,#d do
+ local d = d[i]
+ if d.tg == "mtd" then
+ -- okay
+ elseif d.content then
+ d.content = ""
else
- di.attributes = { mathvariant = "normal" }
+ d.skip = "comment" -- weird error
end
end
+ elseif d.content then
+ d.content = ""
+ else
+ d.skip = "comment" -- weird error
end
end
end
+ do
+
+ local a, z, A, Z = 0x61, 0x7A, 0x41, 0x5A
+
+ function extras.mi(di,element,n,fulltag) -- check with content
+ local str = di.data[1].content
+ if str and sub(str,1,1) ~= "&" then -- hack but good enough (maybe gsub op eerste)
+ for v in utfvalues(str) do
+ if (v >= a and v <= z) or (v >= A and v <= Z) then
+ local a = di.attributes
+ if a then
+ a.mathvariant = "normal"
+ else
+ di.attributes = { mathvariant = "normal" }
+ end
+ end
+ end
+ end
+ end
+
+ end
+
function extras.msub(di,element,n,fulltag)
-- m$^2$
local data = di.data
@@ -2380,7 +2481,7 @@ do
if check then
check(d)
end
- checktree(d)
+ checktree(d) -- so parts can pass twice
end
end
end
@@ -3577,6 +3678,15 @@ local htmltemplate = [[
local xmltree = cleanxhtmltree(xml.convert(result))
+-- local xmltree = xml.convert(result)
+-- for c in xml.collected(xmltree,"m:mtext[lastindex()=1]/m:mrow") do
+-- print(c)
+-- end
+-- for c in xml.collected(xmltree,"mtext/mrow") do
+-- print(c)
+-- end
+-- local xmltree = cleanxhtmltree(xmltree)
+
xml.save(xmltree,xhtmlfilename)
-- now we save a specification file that can b eused for generating an epub file
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index cb106828b..eb134e077 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{2017.09.05 15:10}
+\newcontextversion{2017.09.07 23:44}
%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 ac617fc5b..62ffab044 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -41,7 +41,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2017.09.05 15:10}
+\edef\contextversion{2017.09.07 23:44}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/font-ctx.lua b/tex/context/base/mkiv/font-ctx.lua
index 53683c491..8e57e568b 100644
--- a/tex/context/base/mkiv/font-ctx.lua
+++ b/tex/context/base/mkiv/font-ctx.lua
@@ -1673,6 +1673,15 @@ do -- else too many locals
return infofont
end
+ -- abstract interfacing
+
+ implement { name = "tf", actions = function() setmacro("fontalternative","tf") end }
+ implement { name = "bf", actions = function() setmacro("fontalternative","bf") end }
+ implement { name = "it", actions = function() setmacro("fontalternative","it") end }
+ implement { name = "sl", actions = function() setmacro("fontalternative","sl") end }
+ implement { name = "bi", actions = function() setmacro("fontalternative","bi") end }
+ implement { name = "bs", actions = function() setmacro("fontalternative","bs") end }
+
end
local enable_auto_r_scale = false
diff --git a/tex/context/base/mkiv/font-unk.mkiv b/tex/context/base/mkiv/font-unk.mkiv
index 988e5df3d..4b2615c20 100644
--- a/tex/context/base/mkiv/font-unk.mkiv
+++ b/tex/context/base/mkiv/font-unk.mkiv
@@ -52,17 +52,19 @@
\definefontsynonym [Handwriting] [unknown]
\definefontsynonym [Calligraphic] [unknown]
-%D This permit us to define (use) fonts that refer to the default
-%D style (so, Bold may expand to SansBold or SerifBold, depending
-%D on the default style in the typeface).
-
-\definefontsynonym[\s!Normal] [\noexpand\v_font_string_d]
-\definefontsynonym[\s!Bold] [\noexpand\v_font_string_d\noexpand\s!Bold]
-\definefontsynonym[\s!Italic] [\noexpand\v_font_string_d\noexpand\s!Italic]
-\definefontsynonym[\s!Slanted] [\noexpand\v_font_string_d\noexpand\s!Slanted]
-\definefontsynonym[\s!BoldItalic] [\noexpand\v_font_string_d\noexpand\s!BoldItalic]
-\definefontsynonym[\s!BoldSlanted][\noexpand\v_font_string_d\noexpand\s!BoldSlanted]
-\definefontsynonym[\s!Caps] [\noexpand\v_font_string_d\noexpand\s!Caps]
+%D This permit us to define (use) fonts that refer to the default style (so, Bold
+%D may expand to SansBold or SerifBold, depending on the default style in the
+%D typeface). The \LUA\ call is used to set the current alternative in a
+%D non|-|interfering way. This make sure that the CurrentFont synonym (in font-sym)
+%D is working as expected (e.g.\ in MixedCaps). Yes, this is complicates stuff.
+
+\definefontsynonym[\s!Normal] [\noexpand\clf_tf\noexpand\v_font_string_d]
+\definefontsynonym[\s!Bold] [\noexpand\clf_bf\noexpand\v_font_string_d\noexpand\s!Bold]
+\definefontsynonym[\s!Italic] [\noexpand\clf_it\noexpand\v_font_string_d\noexpand\s!Italic]
+\definefontsynonym[\s!Slanted] [\noexpand\clf_sl\noexpand\v_font_string_d\noexpand\s!Slanted]
+\definefontsynonym[\s!BoldItalic] [\noexpand\clf_bi\noexpand\v_font_string_d\noexpand\s!BoldItalic]
+\definefontsynonym[\s!BoldSlanted][\noexpand\clf_bs\noexpand\v_font_string_d\noexpand\s!BoldSlanted]
+\definefontsynonym[\s!Caps] [\noexpand\clf_tf\noexpand\v_font_string_d\noexpand\s!Caps]
%D Also handy:
@@ -143,8 +145,7 @@
\definebodyfont [default] [cg]
[\s!tf=Calligraphy sa 1]
-%D These definitions come into action as soon as names are
-%D mapped onto real file names (or names that themselves are
-%D mapped).
+%D These definitions come into action as soon as names are mapped onto real file
+%D names (or names that themselves are mapped).
\protect \endinput
diff --git a/tex/context/base/mkiv/luat-run.lua b/tex/context/base/mkiv/luat-run.lua
index b194e755e..14927dbbc 100644
--- a/tex/context/base/mkiv/luat-run.lua
+++ b/tex/context/base/mkiv/luat-run.lua
@@ -207,6 +207,7 @@ local function report_stop(right)
-- report_close("%i > %i > %s",level,total,name or "?")
report_close("level %i, order %i, name %a",level,total,name or "?")
level = level - 1
+ synctex.setfilename(stack[#stack] or tex.jobname)
end
end
end
diff --git a/tex/context/base/mkiv/math-ali.mkiv b/tex/context/base/mkiv/math-ali.mkiv
index 81ec511e6..c82170463 100644
--- a/tex/context/base/mkiv/math-ali.mkiv
+++ b/tex/context/base/mkiv/math-ali.mkiv
@@ -891,8 +891,7 @@
\let\endmath\relax
\def\MC{\NC}%
%
- \mathmatrixleft
- \mathmatrixbox \bgroup
+ \setbox\nextbox\vbox\bgroup
\math_matrix_start_table
\halign \bgroup
% preamble
@@ -907,6 +906,8 @@
\egroup
\math_matrix_stop_table
\egroup
+ \mathmatrixleft
+ \math_matrix_finish_nextbox
\mathmatrixright
\egroup}
@@ -951,7 +952,6 @@
\setupcurrentmathmatrix[#1]%
\fi
\math_matrix_check_settings
- \math_matrix_align_method_analyze
\math_matrix_set_defaults
\math_matrix_set_columns
\math_matrix_start_processing}
@@ -961,51 +961,34 @@
\endgroup
\popmacro\NC}
-\installcorenamespace{mathmatrixalignmethod}
+% vcenter:
+%
+% delta = (height(v) + depth(v))/2
+% axis = math_axis_size(cur_size)
+% height(v) = delta + axis
+% depth(v) = delta - axis
+
+\installcorenamespace{mathmatrixalignlocation}
\let\mathmatrixleft \empty % experimental hook
\let\mathmatrixright\empty % experimental hook
-\def\math_matrix_process#1#2%
- {\dowithnextbox
- {\scratchdimen\dimexpr(\nextboxdp-\nextboxht)/2 \ifcase#2\or+\mathaxisheight\textfont2\fi\relax
- \ifcase#1\relax\or\lower\scratchdimen\or\or\raise\scratchdimen\fi\hbox\bgroup
- \forgettagging % otherwise dummy mrows and such
- \normalstartimath
- \mathmatrixparameter\c!left
- \vcenter{\unvbox\nextbox}%
- \mathmatrixparameter\c!right
- \normalstopimath
- \egroup}%
- \vbox}
-
-\unexpanded\def\installmathmatrixalignmethod#1#2%
- {\setvalue{\??mathmatrixalignmethod#1}{#2}}
-
-\def\math_matrix_box_normal{\math_matrix_process\plustwo\zerocount}
-
-\let\mathmatrixbox\math_matrix_box_normal
-
-% \def\math_matrix_align_method_analyze
-% {\csname\??mathmatrixalignmethod\ifcsname\??mathmatrixalignmethod\mathmatrixparameter\c!location\endcsname
-% \mathmatrixparameter\c!location
-% \else
-% \v!normal
-% \fi\endcsname}
-
-\def\math_matrix_align_method_analyze
- {\ifcsname\??mathmatrixalignmethod\mathmatrixparameter\c!location\endcsname
- \lastnamedcs
- \else
- \let\mathmatrixbox\math_matrix_box_normal
- \fi}
-
-\installmathmatrixalignmethod\v!top {\def\mathmatrixbox{\math_matrix_process\plusthree\plusone }}
-\installmathmatrixalignmethod\v!high {\def\mathmatrixbox{\math_matrix_process\plusthree\zerocount}}
-\installmathmatrixalignmethod\v!lohi {\def\mathmatrixbox{\math_matrix_process\plustwo \zerocount}}
-\installmathmatrixalignmethod\v!low {\def\mathmatrixbox{\math_matrix_process\plusone \zerocount}}
-\installmathmatrixalignmethod\v!bottom{\def\mathmatrixbox{\math_matrix_process\plusone \plusone }}
-\installmathmatrixalignmethod\v!normal{\let\mathmatrixbox \math_matrix_box_normal} % lohi
+\setvalue{\??mathmatrixalignlocation\v!top }{\raise\dimexpr(\nextboxdp-\nextboxht)/2 +\mathaxisheight\textfont\zerocount\relax}
+\setvalue{\??mathmatrixalignlocation\v!high }{\raise\dimexpr(\nextboxdp-\nextboxht)/2\relax}
+\setvalue{\??mathmatrixalignlocation\v!center}{\relax}
+\setvalue{\??mathmatrixalignlocation\v!lohi} {\relax}
+\setvalue{\??mathmatrixalignlocation\v!normal}{\relax}
+\setvalue{\??mathmatrixalignlocation\v!bottom}{\lower\dimexpr(\nextboxdp-\nextboxht)/2 +\mathaxisheight\textfont\zerocount\relax}
+\setvalue{\??mathmatrixalignlocation\v!low }{\lower\dimexpr(\nextboxdp-\nextboxht)/2\relax}
+
+\def\math_matrix_finish_nextbox
+ {\begincsname\??mathmatrixalignlocation\mathmatrixparameter\c!location\endcsname\hbox\bgroup
+ \normalstartimath
+ \mathmatrixparameter\c!left
+ \vcenter{\box\nextbox}%
+ \mathmatrixparameter\c!right
+ \normalstopimath
+ \egroup}
\definemathmatrix[matrix]
\definemathmatrix[\v!mathmatrix]
diff --git a/tex/context/base/mkiv/math-tag.lua b/tex/context/base/mkiv/math-tag.lua
index 3b717af15..d1ed90d38 100644
--- a/tex/context/base/mkiv/math-tag.lua
+++ b/tex/context/base/mkiv/math-tag.lua
@@ -64,6 +64,7 @@ local math_fixed_both = accentcodes.fixedboth
local kerncodes = nodes.kerncodes
local fontkern_code = kerncodes.fontkern
+local italickern_code = kerncodes.italickern
local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
@@ -88,7 +89,7 @@ local taglist = tags.taglist
local chardata = characters.data
-local getmathcode = tex.getmathcode
+local getmathcodes = tex.getmathcodes
local mathcodes = mathematics.codes
local ordinary_code = mathcodes.ordinary
local variable_code = mathcodes.variable
@@ -193,7 +194,7 @@ process = function(start) -- we cannot use the processor as we have no finalizer
mtexttag = start_tagged("mtext")
end
setattr(start,a_tagged,mtexttag)
- elseif mtexttag and id == kern_code and getsubtype(start) == fontkern_code then
+ elseif mtexttag and id == kern_code and (getsubtype(start) == fontkern_code or getsubtype(start) == italickern_code) then -- italickern
setattr(start,a_tagged,mtexttag)
else
if mtexttag then
@@ -202,10 +203,7 @@ process = function(start) -- we cannot use the processor as we have no finalizer
end
if id == math_char_code then
local char = getchar(start)
- local code = getmathcode(char)
- if code then
- code = code[1]
- end
+ local code = getmathcodes(char)
local tag
if code == ordinary_code or code == variable_code then
local ch = chardata[char]
@@ -250,6 +248,9 @@ process = function(start) -- we cannot use the processor as we have no finalizer
elseif id == math_box_code or id == hlist_code or id == vlist_code then
-- keep an eye on math_box_code and see what ends up in there
local attr = getattr(start,a_tagged)
+if not attr then
+ -- just skip
+else
local specification = taglist[attr]
if specification then
local tag = specification.tagname
@@ -321,7 +322,8 @@ process = function(start) -- we cannot use the processor as we have no finalizer
if id == hlist_code or id == vlist_code then
runner(getlist(n),depth+1)
elseif id == glyph_code then
- runner(getcomponents(n),depth+1) -- this should not be needed
+ -- this should not be needed (todo: use tounicode info)
+ runner(getcomponents(n),depth+1)
elseif id == disc_code then
local pre, post, replace = getdisc(n)
runner(pre,depth+1) -- idem
@@ -341,6 +343,7 @@ process = function(start) -- we cannot use the processor as we have no finalizer
stop_tagged()
end
end
+end
elseif id == math_sub_code then -- normally a hbox
local list = getlist(start)
if list then
@@ -425,7 +428,7 @@ process = function(start) -- we cannot use the processor as we have no finalizer
-- left
local properties = { }
insert(fencesstack,properties)
- setattr(start,a_tagged,start_tagged("mfenced",{ properties = properties })) -- needs checking
+ setattr(start,a_tagged,start_tagged("mfenced",properties)) -- needs checking
if delim then
start_tagged("ignore")
local chr = getfield(delim,"small_char")
diff --git a/tex/context/base/mkiv/node-syn.lua b/tex/context/base/mkiv/node-syn.lua
index ee4387f00..d6730bb4d 100644
--- a/tex/context/base/mkiv/node-syn.lua
+++ b/tex/context/base/mkiv/node-syn.lua
@@ -246,24 +246,20 @@ function synctex.blockfilename(name)
end
function synctex.setfilename(name,line)
-if paused == 0 then
- if force_synctex_tag and name then
+ if paused == 0 and force_synctex_tag and name then
force_synctex_tag(sttags[name])
if line then
force_synctex_line(line)
end
end
end
-end
function synctex.resetfilename()
-if paused == 0 then
- if force_synctex_tag then
+ if paused == 0 and force_synctex_tag then
force_synctex_tag(0)
force_synctex_line(0)
end
end
-end
-- the node stuff
@@ -706,6 +702,8 @@ function synctex.finish()
end
end
+local filename = nil
+
function synctex.pause()
paused = paused + 1
if paused == 1 and enabled then
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 60c16486a..22fbd7c09 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 334bdaa7b..82507f21e 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/base/mkiv/strc-sec.mkiv b/tex/context/base/mkiv/strc-sec.mkiv
index e976c2373..ef7e9108a 100644
--- a/tex/context/base/mkiv/strc-sec.mkiv
+++ b/tex/context/base/mkiv/strc-sec.mkiv
@@ -471,9 +471,11 @@
% compatible but better
\appendtoks
- \doifelse{\headparameter\c!ownnumber}\v!yes
- {\setuevalue\currenthead{\strc_sectioning_handle_own[\currenthead]}}
- {\setuevalue\currenthead{\strc_sectioning_handle_nop[\currenthead]}}%
+ \ifx\currenthead\empty \else
+ \doifelse{\headparameter\c!ownnumber}\v!yes
+ {\setuevalue\currenthead{\strc_sectioning_handle_own[\currenthead]}}
+ {\setuevalue\currenthead{\strc_sectioning_handle_nop[\currenthead]}}%
+ \fi
\to \everysetuphead
\unexpanded\def\doredefinehead#1#2% called at lua end
diff --git a/tex/context/base/mkiv/strc-tag.mkiv b/tex/context/base/mkiv/strc-tag.mkiv
index b25cd6108..9a234d6c8 100644
--- a/tex/context/base/mkiv/strc-tag.mkiv
+++ b/tex/context/base/mkiv/strc-tag.mkiv
@@ -539,4 +539,6 @@
\unexpanded\def\bpar{\dostarttagged\t!paragraph\empty\strc_tagged_saved_bpar}
\unexpanded\def\epar{\strc_tagged_saved_epar\dostoptagged}
+% \def\untagged{attr \taggedattribute\attributeunsetvalue}
+
\protect