summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2022-01-18 11:52:31 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2022-01-18 11:52:31 +0100
commita16a68418d3acc0cfa13b8e5a5409263e4c2fedb (patch)
treedb4f1423c09c9953b11e78e4c3be3af99631199f /tex/context/base/mkxl
parent7bf27c6f21e1054c3753515d363d1196228467c9 (diff)
downloadcontext-a16a68418d3acc0cfa13b8e5a5409263e4c2fedb.tar.gz
2022-01-18 10:51:00
Diffstat (limited to 'tex/context/base/mkxl')
-rw-r--r--tex/context/base/mkxl/cont-new.mkxl2
-rw-r--r--tex/context/base/mkxl/context.mkxl2
-rw-r--r--tex/context/base/mkxl/core-con.mkxl16
-rw-r--r--tex/context/base/mkxl/math-acc.mklx14
-rw-r--r--tex/context/base/mkxl/math-fen.mkxl2
-rw-r--r--tex/context/base/mkxl/math-frc.lmt98
-rw-r--r--tex/context/base/mkxl/math-frc.mkxl41
-rw-r--r--tex/context/base/mkxl/math-ini.mkxl57
-rw-r--r--tex/context/base/mkxl/node-aux.lmt35
-rw-r--r--tex/context/base/mkxl/page-brk.mkxl1
-rw-r--r--tex/context/base/mkxl/spac-ver.lmt38
-rw-r--r--tex/context/base/mkxl/strc-pag.mkxl18
12 files changed, 204 insertions, 120 deletions
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index 92cc1fe7f..e8d91be4c 100644
--- a/tex/context/base/mkxl/cont-new.mkxl
+++ b/tex/context/base/mkxl/cont-new.mkxl
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2022.01.15 17:29}
+\newcontextversion{2022.01.18 10:48}
%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/mkxl/context.mkxl b/tex/context/base/mkxl/context.mkxl
index 6cd516c3d..1c3563ee3 100644
--- a/tex/context/base/mkxl/context.mkxl
+++ b/tex/context/base/mkxl/context.mkxl
@@ -29,7 +29,7 @@
%D {YYYY.MM.DD HH:MM} format.
\immutable\edef\contextformat {\jobname}
-\immutable\edef\contextversion{2022.01.15 17:29}
+\immutable\edef\contextversion{2022.01.18 10:48}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/core-con.mkxl b/tex/context/base/mkxl/core-con.mkxl
index 33dc921b7..645eb2308 100644
--- a/tex/context/base/mkxl/core-con.mkxl
+++ b/tex/context/base/mkxl/core-con.mkxl
@@ -86,9 +86,14 @@
\permanent\def\Alphabeticnumerals#1{\clf_Alphabetic\numexpr#1\relax{}}
\permanent\def\thainumerals #1{\clf_alphabetic\numexpr#1\relax{thai}}
-\permanent\def\devanagarinumerals#1{\clf_alphabetic\numexpr#1\relax{devanagari}}
-\permanent\def\gurmurkhinumerals #1{\clf_alphabetic\numexpr#1\relax{gurmurkhi}}
-\permanent\def\gujaratinumerals #1{\clf_alphabetic\numexpr#1\relax{gujarati}}
+\permanent\def\devanagarinumerals#1{\clf_decimals\numexpr#1\relax{devanagari}}
+\permanent\def\malayalamnumerals #1{\clf_decimals\numexpr#1\relax{malayalam}}
+\permanent\def\tamilnumerals #1{\clf_decimals\numexpr#1\relax{tamil}}
+\permanent\def\kannadanumerals #1{\clf_decimals\numexpr#1\relax{kannada}}
+\permanent\def\telugunumerals #1{\clf_decimals\numexpr#1\relax{telugu}}
+\permanent\def\bengalinumerals #1{\clf_decimals\numexpr#1\relax{bengali}}
+\permanent\def\gujaratinumerals #1{\clf_decimals\numexpr#1\relax{gujarati}}
+\permanent\def\gurmurkhinumerals #1{\clf_decimals\numexpr#1\relax{gurmurkhi}}
\permanent\def\tibetannumerals #1{\clf_alphabetic\numexpr#1\relax{tibetan}}
\permanent\def\greeknumerals #1{\clf_alphabetic\numexpr#1\relax{greek}}
\permanent\def\Greeknumerals #1{\clf_Alphabetic\numexpr#1\relax{greek}}
@@ -724,6 +729,11 @@
\defineconversion [thainumerals] [\thainumerals]
\defineconversion [devanagarinumerals] [\devanagarinumerals]
+\defineconversion [malayalamnumerals] [\malayalamnumerals]
+\defineconversion [tamilnumerals] [\tamilnumerals]
+\defineconversion [kannadanumerals] [\kannadanumerals]
+\defineconversion [telugunumerals] [\telugunumerals]
+\defineconversion [bengalinumerals] [\bengalinumerals]
\defineconversion [gurmurkhinumerals] [\gurmurkhinumerals]
\defineconversion [gujaratinumerals] [\gujaratinumerals]
\defineconversion [tibetannumerals] [\tibetannumerals]
diff --git a/tex/context/base/mkxl/math-acc.mklx b/tex/context/base/mkxl/math-acc.mklx
index 9d8656630..aab7e4874 100644
--- a/tex/context/base/mkxl/math-acc.mklx
+++ b/tex/context/base/mkxl/math-acc.mklx
@@ -68,23 +68,23 @@
\permanent\tolerant\protected\def\definemathtopaccent[#1]#*[#2]#*[#3]% class name top
{\ifparameter#3\or
- \frozen\instance\setuevalue{#2}{\math_accents_make_double {#1}\plusone{\number#3}\zerocount}%
+ \frozen\protected\instance\edefcsname#2\endcsname{\math_accents_make_double {#1}\plusone{\number#3}\zerocount}%
\else
- \frozen\instance\setuevalue{#1}{\math_accents_make_double\noexpand\currentmathaccents\plusone{\number#2}\zerocount}%
+ \frozen\protected\instance\edefcsname#1\endcsname{\math_accents_make_double\noexpand\currentmathaccents\plusone{\number#2}\zerocount}%
\fi}
\permanent\tolerant\protected\def\definemathbottomaccent[#1]#*[#2]#*[#3]% class name bottom
{\ifparameter#3\or
- \frozen\instance\setuevalue{#2}{\math_accents_make_double {#1}\plustwo\zerocount{\number#3}}%
+ \frozen\protected\instance\edefcsname#2\endcsname{\math_accents_make_double {#1}\plustwo\zerocount{\number#3}}%
\else
- \frozen\instance\setuevalue{#1}{\math_accents_make_double\noexpand\currentmathaccents\plustwo\zerocount{\number#2}}%
+ \frozen\protected\instance\edefcsname#1\endcsname{\math_accents_make_double\noexpand\currentmathaccents\plustwo\zerocount{\number#2}}%
\fi}
\permanent\tolerant\protected\def\definemathdoubleaccent[#1]#*[#2]#*[#3]#*[#4]% class name top bottom
{\ifparameter#4\or
- \frozen\instance\setuevalue{#2}{\math_accents_make_double {#1}\plusthree{\number#3}{\number#4}}%
+ \frozen\protected\instance\edefcsname#2\endcsname{\math_accents_make_double {#1}\plusthree{\number#3}{\number#4}}%
\else
- \frozen\instance\setuevalue{#1}{\math_accents_make_double\noexpand\currentmathaccents\plusthree{\number#2}{\number#3}}%
+ \frozen\protected\instance\edefcsname#1\endcsname{\math_accents_make_double\noexpand\currentmathaccents\plusthree{\number#2}{\number#3}}%
\fi}
\let\math_accents_color_pop\donothing
@@ -100,7 +100,7 @@
{\begingroup
\edef\currentmathaccents {#class}%
\edef\p_math_accent_color{\mathaccentsparameter\c!color}%
- \startusemathstyleparameter\mathaccentsparameter
+ \startusemathstyleparameter\mathaccentsparameter\c!mathstyle
\ifempty\p_math_accent_color
\math_accents_color_push_nop
\else
diff --git a/tex/context/base/mkxl/math-fen.mkxl b/tex/context/base/mkxl/math-fen.mkxl
index 9f328847e..4a3144530 100644
--- a/tex/context/base/mkxl/math-fen.mkxl
+++ b/tex/context/base/mkxl/math-fen.mkxl
@@ -201,7 +201,7 @@
\newcount\c_math_fenced_nesting
\protected\def\math_fenced_fenced_common
- {\startusemathstyleparameter\mathfenceparameter
+ {\startusemathstyleparameter\mathfenceparameter\c!mathstyle
\enforced\let\fence\math_fenced_middle
\edef\p_math_fenced_color{\mathfenceparameter\c!color}%
\ifempty\p_math_fenced_color
diff --git a/tex/context/base/mkxl/math-frc.lmt b/tex/context/base/mkxl/math-frc.lmt
index 0bc0e3895..c82b8387d 100644
--- a/tex/context/base/mkxl/math-frc.lmt
+++ b/tex/context/base/mkxl/math-frc.lmt
@@ -29,50 +29,79 @@ end)
local ctx_Uatop = context.Uatop
local ctx_Uover = context.Uover
-local function umathfraction(how,style,left,right,width)
- style = tonumber(style) -- or nil
+-- local function umathfraction(how,style,left,right,width)
+-- style = tonumber(style) -- or nil
+-- if how == v_no then
+-- if left == 0x002E and right == 0x002E then
+-- if style then
+-- context("\\Uatop style %i",style)
+-- else
+-- ctx_Uatop()
+-- end
+-- else
+-- if style then
+-- context("\\Uatopwithdelims style %i %s%s",style,resolved[left],resolved[right])
+-- else
+-- context("\\Uatopwithdelims%s%s",resolved[left],resolved[right])
+-- end
+-- end
+-- elseif how == v_yes or how == v_hidden then
+-- local norule = how == v_hidden and " norule " or ""
+-- if style then
+-- if left == 0x002E and right == 0x002E then
+-- context("\\Uabove style %i %s%ssp",style,norule,width)
+-- else
+-- context("\\Uabovewithdelims style %i %s%s%s%ssp",style,norule,resolved[left],resolved[right],width)
+-- end
+-- else
+-- if left == 0x002E and right == 0x002E then
+-- context("\\Uabove%s%ssp",norule,width)
+-- else
+-- context("\\Uabovewithdelims%s%s%s%ssp",norule,resolved[left],resolved[right],width)
+-- end
+-- end
+-- else -- v_auto
+-- if left == 0x002E and right == 0x002E then
+-- if style then
+-- context("\\Uover style %i",style)
+-- else
+-- ctx_Uover()
+-- end
+-- else
+-- if style then
+-- context("\\Uoverwithdelims style %i %s%s",style,resolved[left],resolved[right])
+-- else
+-- context("\\Uoverwithdelims%s%s",resolved[left],resolved[right])
+-- end
+-- end
+-- end
+-- end
+--
+-- interfaces.implement {
+-- name = "umathfraction",
+-- actions = umathfraction,
+-- arguments = { "string", "string", "number", "number", "dimen" }
+-- }
+
+local function umathfraction(how,left,right,width)
if how == v_no then
if left == 0x002E and right == 0x002E then
- if style then
- context("\\Uatop style %i",style)
- else
- ctx_Uatop()
- end
+ ctx_Uatop()
else
- if style then
- context("\\Uatopwithdelims style %i %s%s",style,resolved[left],resolved[right])
- else
- context("\\Uatopwithdelims%s%s",resolved[left],resolved[right])
- end
+ context("\\Uatopwithdelims%s%s",resolved[left],resolved[right])
end
elseif how == v_yes or how == v_hidden then
local norule = how == v_hidden and " norule " or ""
- if style then
- if left == 0x002E and right == 0x002E then
- context("\\Uabove style %i %s%ssp",style,norule,width)
- else
- context("\\Uabovewithdelims style %i %s%s%s%ssp",style,norule,resolved[left],resolved[right],width)
- end
+ if left == 0x002E and right == 0x002E then
+ context("\\Uabove %s%ssp",norule,width)
else
- if left == 0x002E and right == 0x002E then
- context("\\Uabove%s%ssp",norule,width)
- else
- context("\\Uabovewithdelims%s%s%s%ssp",norule,resolved[left],resolved[right],width)
- end
+ context("\\Uabovewithdelims %s%s%s%ssp",norule,resolved[left],resolved[right],width)
end
else -- v_auto
if left == 0x002E and right == 0x002E then
- if style then
- context("\\Uover style %i",style)
- else
- ctx_Uover()
- end
+ ctx_Uover()
else
- if style then
- context("\\Uoverwithdelims style %i %s%s",style,resolved[left],resolved[right])
- else
- context("\\Uoverwithdelims%s%s",resolved[left],resolved[right])
- end
+ context("\\Uoverwithdelims%s%s",resolved[left],resolved[right])
end
end
end
@@ -80,5 +109,6 @@ end
interfaces.implement {
name = "umathfraction",
actions = umathfraction,
- arguments = { "string", "string", "number", "number", "dimen" }
+ protected = true,
+ arguments = { "string", "number", "number", "dimen" }
}
diff --git a/tex/context/base/mkxl/math-frc.mkxl b/tex/context/base/mkxl/math-frc.mkxl
index 1175eef1b..8835ea997 100644
--- a/tex/context/base/mkxl/math-frc.mkxl
+++ b/tex/context/base/mkxl/math-frc.mkxl
@@ -108,6 +108,8 @@
\setupmathfractions
[\c!mathstyle=,
+ \c!mathnumeratorstyle=\mathfractionparameter\c!mathstyle,
+ \c!mathdenominatorstyle=\mathfractionparameter\c!mathstyle,
\c!alternative=\v!inner,
\c!margin=\zeropoint,
\c!rulethickness=.25\exheight,
@@ -130,7 +132,7 @@
\math_fraction_set_distance
\to \everymathematics
-% why only displaystyle .. a bit weak
+% why only displaystyle .. a bit weak .. will become a set
\protected\def\math_fraction_set_distance_top
{\Umathfractionnumup \displaystyle\m_math_fraction_distance_top
@@ -266,10 +268,16 @@
% See \MKIV\ for the old (more messy) implementation where we have to fight the over
% related syntax (we now use a lmtx primitive).
-\def\math_frac_command_u#1%
+% {\ifcstok{#1}\emptytoks\else\tomathstyle#1\fi}%
+%
+% {\expandedmathstyleparameter\mathfractionparameter\c!mathstyle}%
+
+% timestamp: 01/2022 : (re)watching eNerdā“ - Time Capsule 2020 a.k.a. Farewell Party
+% for Normalcy (UHD) with the soekris/neumanns combination
+
+\def\math_frac_command_u
{\clf_umathfraction
{\mathfractionparameter\c!rule}%
- {\ifcstok{#1}\emptytoks\else\tomathstyle#1\fi}%
\ifempty\p_math_fraction_fences
\mathfractionparameter\c!left \space
\mathfractionparameter\c!right\space
@@ -282,22 +290,20 @@
\protected\defcsname\??mathfractionalternative\v!inner\endcsname#1#2%
{\math_frac_command_u
- {}% {\expandedmathstyleparameter\mathfractionparameter}%
{\math_fraction_margin_kern
-\usemathstyleparameter\mathfractionparameter
+ \usemathstyleparameter\mathfractionparameter\c!mathnumeratorstyle
\m_fractions_strut_top#1%
\math_fraction_margin_kern}%
{\math_fraction_margin_kern
-\usemathstyleparameter\mathfractionparameter
+ \usemathstyleparameter\mathfractionparameter\c!mathdenominatorstyle
\m_fractions_strut_bot#2%
\math_fraction_margin_kern}%
\math_frac_wrapup}
\protected\defcsname\??mathfractionalternative\v!outer\endcsname#1#2%
{\beginmathgroup
- \usemathstyleparameter\mathfractionparameter
+ \usemathstyleparameter\mathfractionparameter\c!mathstyle
\math_frac_command_u
- {}%
{\math_fraction_margin_kern
\m_fractions_strut_top#1%
\math_fraction_margin_kern}%
@@ -309,15 +315,14 @@
\protected\defcsname\??mathfractionalternative\v!both\endcsname#1#2%
{\beginmathgroup
- \usemathstyleparameter\mathfractionparameter
+ \usemathstyleparameter\mathfractionparameter\c!mathstyle
\math_frac_command_u
-{}% {\expandedmathstyleparameter\mathfractionparameter}%
{\math_fraction_margin_kern
-\usemathstyleparameter\mathfractionparameter
+ \usemathstyleparameter\mathfractionparameter\c!mathnumeratorstyle
\m_fractions_strut_top#1%
\math_fraction_margin_kern}%
{\math_fraction_margin_kern
-\usemathstyleparameter\mathfractionparameter
+ \usemathstyleparameter\mathfractionparameter\c!mathdenominatorstyle
\m_fractions_strut_bot#2%
\math_fraction_margin_kern}%
\endmathgroup
@@ -445,15 +450,15 @@
% $$ {{a}\abovewithdelims()#1pt{b}} $$
% }
-\definemathfraction[i:frac] [\c!alternative=\v!inner,\c!mathstyle=\s!script]
-\definemathfraction[i:tfrac][i:frac]
+\definemathfraction[i:frac] [\c!alternative=\v!inner,\c!mathstyle=\v!small]
+\definemathfraction[i:tfrac][\c!alternative=\v!inner,\c!mathstyle=\s!script]
\definemathfraction[i:sfrac][\c!alternative=\v!inner,\c!mathstyle=\s!scriptscript]
\definemathfraction[i:dfrac][\c!alternative=\v!inner,\c!mathstyle=\s!display]
-\definemathfraction[d:frac] [\c!alternative=\v!inner,\c!mathstyle=\s!cramped] % was cramped,text
-\definemathfraction[d:tfrac][\c!alternative=\v!both, \c!mathstyle={\s!cramped,\s!text}]
-\definemathfraction[d:sfrac][\c!alternative=\v!both, \c!mathstyle={\s!cramped,\s!script}]
-\definemathfraction[d:dfrac][d:frac]
+\definemathfraction[d:frac] [\c!alternative=\v!inner,\c!mathstyle=\s!cramped]
+\definemathfraction[d:tfrac][\c!alternative=\v!both,\c!mathstyle={\s!cramped,\s!script}]
+\definemathfraction[d:sfrac][\c!alternative=\v!both,\c!mathstyle={\s!cramped,\s!scriptscript}]
+\definemathfraction[d:dfrac][\c!alternative=\v!both,\c!mathstyle=\s!display]
%D \protected\def\ShowMathFractions#1#2%
%D {\dontleavehmode
diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl
index f65856e73..990341c99 100644
--- a/tex/context/base/mkxl/math-ini.mkxl
+++ b/tex/context/base/mkxl/math-ini.mkxl
@@ -642,6 +642,8 @@
\aliased\let\mathnothing\firstofoneunexpanded
\aliased\let\mathalpha \firstofoneunexpanded
+% todo 'frac' and 'rad'
+
\setnewconstant\mathordcode \zerocount \letcsname\??mathcodecommand ord\endcsname\mathord
\setnewconstant\mathopcode \plusone \letcsname\??mathcodecommand op\endcsname\mathop
\setnewconstant\mathbincode \plustwo \letcsname\??mathcodecommand bin\endcsname\mathbin
@@ -2398,18 +2400,6 @@
\defcsname\??mathstylecommand\v!small \endcsname{\c_math_styles_state_size \plusone}
\defcsname\??mathstylecommand\v!big \endcsname{\c_math_styles_state_size \plustwo}
-% \permanent\protected\def\setupmathstyle[#1]%
-% {\edef\m_math_style_asked{#1}%
-% \ifempty\m_math_style_asked \else
-% \math_style_set_indeed
-% \fi}
-%
-% \permanent\protected\def\usemathstyleparameter#1% faster local variant
-% {\edef\m_math_style_asked{#1\c!mathstyle}%
-% \ifempty\m_math_style_asked \else
-% \math_style_set_indeed
-% \fi}
-
%D \startbuffer
%D \definemathstyle[mystyle][scriptscript]
%D
@@ -2422,35 +2412,6 @@
\installcorenamespace {mathstyle}
-% \permanent\tolerant\protected\def\definemathstyle[#1]#*[#2]%
-% {\c_math_styles_state_style \zerocount
-% \c_math_styles_state_cramped\zerocount
-% \c_math_styles_state_size \zerocount
-% \rawprocesscommacommand[#2]\math_style_collect
-% \letcsname\??mathstyle#1\normalexpanded{\endcsname\math_style_add_to_cache_choice}}
-%
-% \def\math_style_set_indeed
-% {\ifcsname\??mathstyle\m_math_style_asked\endcsname
-% \lastnamedcs
-% \else
-% \math_style_set_mathstyle_mathstyle
-% \fi}
-%
-% \def\math_style_set_mathstyle_mathstyle
-% {\ifcsname\??mathstylecache\m_math_style_asked\endcsname
-% \lastnamedcs
-% \else
-% \math_style_set_mathstyle_mathstylecache
-% \fi}
-%
-% \def\math_style_set_mathstyle_mathstylecache
-% {\c_math_styles_state_style \zerocount
-% \c_math_styles_state_cramped\zerocount
-% \c_math_styles_state_size \zerocount
-% \rawprocesscommacommand[\m_math_style_asked]\math_style_collect
-% \gletcsname\??mathstylecache\m_math_style_asked\normalexpanded{\endcsname\math_style_add_to_cache_choice}%
-% \csname\??mathstylecache\m_math_style_asked\endcsname}
-
\letcsname\??mathstyle \endcsname\empty
\letcsname\??mathstylecache\endcsname\empty
@@ -2463,8 +2424,8 @@
\math_style_set_mathstyle_mathstylecache\m_math_style_asked
\fi}
-\permanent\def\expandedmathstyleparameter#1%
- {\normalexpanded{\noexpand\math_style_set_expanded{#1\c!mathstyle}}}
+\permanent\def\expandedmathstyleparameter#1#2%
+ {\normalexpanded{\noexpand\math_style_set_expanded{#1#2}}}
\def\math_style_set_expanded#1%
{\ifcsname\??mathstyle#1e\endcsname
@@ -2475,14 +2436,14 @@
\math_style_set_mathstyle_mathstylecache{#1}%
\fi}
-\permanent\protected\def\usemathstyleparameter#1%
- {\edef\m_math_style_asked{#1\c!mathstyle}%
+\permanent\protected\def\usemathstyleparameter#1#2%
+ {\edef\m_math_style_asked{#1#2}%
\ifempty\m_math_style_asked \else
\math_style_set_indeed
\fi}
\permanent\tolerant\protected\def\setmathstyle[#1]#;#=% so we accept [] and {}
- {\edef\m_math_style_asked{#1#2}%
+ {\edef\m_math_style_asked{#1\c!mathstyle}%
\ifempty\m_math_style_asked \else
\math_style_set_indeed
\fi}
@@ -2527,8 +2488,8 @@
\aliased\let\stopmathstyle\relax
-\permanent\protected\def\startusemathstyleparameter#1%
- {\edef\m_math_style_asked{#1\c!mathstyle}%
+\permanent\protected\def\startusemathstyleparameter#1#2%
+ {\edef\m_math_style_asked{#1#2}%
\ifempty\m_math_style_asked
\enforced\let\stopusemathstyleparameter\relax
\else
diff --git a/tex/context/base/mkxl/node-aux.lmt b/tex/context/base/mkxl/node-aux.lmt
index 5915f5985..a640addc1 100644
--- a/tex/context/base/mkxl/node-aux.lmt
+++ b/tex/context/base/mkxl/node-aux.lmt
@@ -385,3 +385,38 @@ end
function nodes.hpack(h,...) return tonode(hpack_nodes(tonut(h),...)) end
function nodes.vpack(h,...) return tonode(vpack_nodes(tonut(h),...)) end
+
+--
+
+local report_slide = logs.reporter("nodes", "slide")
+
+function nuts.checkslide(head,banner)
+ local c = head
+ local x = nil
+ local b = false
+ while c do
+ local p, n = getboth(c)
+ if p and p ~= x then
+ b = true
+ end
+ x = c
+ c = n
+ end
+ if b then
+ report_slide("")
+ report_slide(banner or "?")
+ report_slide("")
+ c = head
+ x = nil
+ while c do
+ local p, n = getboth(c)
+ report_slide("%s %s",(p and p ~= x and "!") or " ",tostring(tonode(c)))
+ x = c
+ c = getnext(c)
+ end
+ report_slide("")
+ nuts.show(head)
+ report_slide("")
+ nuts.slide(head)
+ end
+end
diff --git a/tex/context/base/mkxl/page-brk.mkxl b/tex/context/base/mkxl/page-brk.mkxl
index aca1d097d..f30d9cb2c 100644
--- a/tex/context/base/mkxl/page-brk.mkxl
+++ b/tex/context/base/mkxl/page-brk.mkxl
@@ -90,6 +90,7 @@
% disable reset after shipout
\global\pageornamentstate\plustwo
\fi
+ % maybe \ifcstok{#1}\emptytoks
\ifparameter#1\or
\page_breaks_handle{#1}%
\else % so, no pagebreak when \pagebreak[] ! ! !
diff --git a/tex/context/base/mkxl/spac-ver.lmt b/tex/context/base/mkxl/spac-ver.lmt
index d41e3be18..6258fb261 100644
--- a/tex/context/base/mkxl/spac-ver.lmt
+++ b/tex/context/base/mkxl/spac-ver.lmt
@@ -102,7 +102,7 @@ local trace_vspacing = false trackers.register("vspacing.spacing", fun
local trace_vsnapping = false trackers.register("vspacing.snapping", function(v) trace_vsnapping = v end)
local trace_specials = false trackers.register("vspacing.specials", function(v) trace_specials = v end)
-local remove_math_skips = true directives.register("vspacing.removemathskips", function(v) remnove_math_skips = v end)
+local remove_math_skips = true directives.register("vspacing.removemathskips", function(v) remnove_math_skips = v end)
local report_vspacing = logs.reporter("vspacing","spacing")
local report_collapser = logs.reporter("vspacing","collapsing")
@@ -948,6 +948,7 @@ do
setspecification(n,b_category,b_penalty,b_order or 1)
setvisual(k)
write_node(n)
+ -- todo: inject via value
end
local function flush()
@@ -1513,8 +1514,19 @@ do
-- where -> scope
-- what -> where (original context)
- local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also pass tail
+ local checkslide = false
+ directives.register("vspacing.checkslide", function(v)
+ if v then
+ checkslide = function(head,where,what)
+ nuts.checkslide(head,where .. " : " .. what)
+ end
+ else
+ checkslide = false
+ end
+ end)
+
+ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also pass tail
if trace then
reset_tracing(head)
end
@@ -1699,6 +1711,9 @@ do
if snap and where == "page" then
removetopsnap()
end
+ if checkslide then
+ checkslide(head,where,what)
+ end
while current do
local id = getid(current)
if id == hlist_code or id == vlist_code then
@@ -2166,6 +2181,22 @@ do
return head
end
+-- local function collapser(head,...)
+-- local current = head
+-- while current do
+-- local id = getid(current)
+-- if id == glue_code then
+-- if getsubtype(current) == userskip_code then
+-- local glue_data
+-- head, current, glue_data = remove_node(head,current)
+-- head, current = insertnodebefore(head,current,glue_data)
+-- end
+-- end
+-- current = getnext(current)
+-- end
+-- return head
+-- end
+
local stackhead, stacktail, stackhack = nil, nil, false
local function report(message,where,lst)
@@ -2267,11 +2298,12 @@ do
local ignored = table.tohash {
"splitkeep",
"splitoff",
--- "insert",
+-- "insert",
}
function vspacing.vboxhandler(head,where)
if head and not ignored[where] and getnext(head) then
+-- if getid(head) == glue_code and getsubtype(head) == topskip_code then
head = collapser(head,"vbox",where,trace_vbox_vspacing,true,a_snapvbox) -- todo: local snapper
end
return head
diff --git a/tex/context/base/mkxl/strc-pag.mkxl b/tex/context/base/mkxl/strc-pag.mkxl
index c27fd9429..a959faf18 100644
--- a/tex/context/base/mkxl/strc-pag.mkxl
+++ b/tex/context/base/mkxl/strc-pag.mkxl
@@ -335,12 +335,22 @@
\let\strc_pagenumbers_set_location\relax
\fi
+% \protected\def\strc_pagenumbers_flush_final_page
+% {\edef\p_strc_pagenumbers_page{\directpagenumberingparameter\c!page}%
+% \ifempty\p_strc_pagenumbers_page \else
+% \ifx\p_strc_pagenumbers_page\v!no \else
+% \page[\p_strc_pagenumbers_page]%
+% \fi
+% \fi}
+
\protected\def\strc_pagenumbers_flush_final_page
{\edef\p_strc_pagenumbers_page{\directpagenumberingparameter\c!page}%
- \ifempty\p_strc_pagenumbers_page \else
- \ifx\p_strc_pagenumbers_page\v!no \else
- \page[\p_strc_pagenumbers_page]%
- \fi
+ \ifempty\p_strc_pagenumbers_page
+ % nothing
+ \orelse\ifx\p_strc_pagenumbers_page\v!no
+ % nothing
+ \else
+ \page[\p_strc_pagenumbers_page]%
\fi}
% The numbered location handler is there because we need to be downward