diff options
author | Hans Hagen <pragma@wxs.nl> | 2023-06-01 11:20:49 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2023-06-01 11:20:49 +0200 |
commit | e2ffa186c8e622ce9235533b91bb2399dd051672 (patch) | |
tree | 6e1e9ef371a8b26e6eb4120041762bf3d9fdf2f3 /tex/context/base/mkxl | |
parent | 9111ac6d97d7931a2a9bbdad69f5c54de4172318 (diff) | |
download | context-e2ffa186c8e622ce9235533b91bb2399dd051672.tar.gz |
2023-05-30 22:24:00
Diffstat (limited to 'tex/context/base/mkxl')
-rw-r--r-- | tex/context/base/mkxl/cont-new.mkxl | 2 | ||||
-rw-r--r-- | tex/context/base/mkxl/context.mkxl | 2 | ||||
-rw-r--r-- | tex/context/base/mkxl/math-ini.mkxl | 41 | ||||
-rw-r--r-- | tex/context/base/mkxl/spac-ali.mkxl | 16 |
4 files changed, 51 insertions, 10 deletions
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl index fd8513ae7..ca65e70f3 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{2023.05.30 22:18} +\newcontextversion{2023.06.01 09:35} %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 261dd6e8d..a3ace100b 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{2023.05.30 22:18} +\immutable\edef\contextversion{2023.06.01 09:35} %overloadmode 1 % check frozen / warning %overloadmode 2 % check frozen / error diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl index b8c69b78c..e269ed535 100644 --- a/tex/context/base/mkxl/math-ini.mkxl +++ b/tex/context/base/mkxl/math-ini.mkxl @@ -577,6 +577,7 @@ % +\checkligatureclassoptioncode +\checkkernpairclassoptioncode % +\flattenclassoptioncode + +\obeynestingclassoptioncode \relax \setmathoptions\mathrelationcode\numexpr @@ -586,6 +587,7 @@ +\checkkernpairclassoptioncode % +\flattenclassoptioncode % +\omitpenaltyclassoptioncode + +\obeynestingclassoptioncode \relax \setmathoptions\mathopencode\numexpr @@ -594,6 +596,7 @@ % +\openfenceclassoptioncode % +\checkligatureclassoptioncode +\checkkernpairclassoptioncode + +\pushnestingclassoptioncode \relax \setmathoptions\mathclosecode\numexpr @@ -603,6 +606,7 @@ % +\checkligatureclassoptioncode +\checkkernpairclassoptioncode +\raiseprimeclassoptioncode + +\popnestingclassoptioncode \relax \setmathoptions\mathpunctuationcode\numexpr @@ -612,6 +616,7 @@ % +\flattenclassoptioncode +\checkkernpairclassoptioncode +\removeitaliccorrectionclassoptioncode + +\obeynestingclassoptioncode \relax \setmathoptions\mathvariablecode\numexpr @@ -4666,6 +4671,42 @@ \permanent\protected\def\mathscriptbelow{\math_axis_inject\plustwo\plusone} \permanent\protected\def\mathscriptontop{\math_axis_inject\plustwo\plustwo} +%D \macros{kt} +%D +%D Bonus (keep together): +%D +%D \startbuffer +%D test $a + b + c + d + x + x + e + f + g = h$ test +%D test $a + b + c + \keeptogether{\red d + x + x + e + f} + g = h$ test +%D \stopbuffer +%D +%D \typebuffer +%D +%D \startlines \getbuffer \stoplines + +\mathinlinepenaltyfactor = 1500 % a reasonable default +\mathdisplaypenaltyfactor = 1000 + +\permanent\tolerant\protected\def\definemathnesting[#1]#*[#2]#*[#3]% + {\frozen\protected\edefcsname#1\endcsname{\math_nesting{#2}{#3}}} + +\protected\def\math_nesting#1#2% + {\groupedcommand + {\mathboundary\plustwo + \ifconditional\indisplaymath + \ifchknum#2\or#2\else\mathdisplaypenaltyfactor\fi + \else + \ifchknum#1\or#1\else\mathinlinepenaltyfactor\fi + \fi + \relax}% + {\mathboundary\plusone}} + +\permanent\tolerant\protected\def\mathnesting[#1]#*[#2]% + {\math_nesting{#1}{#2}} + +\definemathnesting[mathtogether][1500][1000] +\definemathnesting[mathloose] [500][1000] + \protect \endinput % % not used (yet) diff --git a/tex/context/base/mkxl/spac-ali.mkxl b/tex/context/base/mkxl/spac-ali.mkxl index ec8bffbc5..3c13643e9 100644 --- a/tex/context/base/mkxl/spac-ali.mkxl +++ b/tex/context/base/mkxl/spac-ali.mkxl @@ -327,7 +327,7 @@ \parinitleftskip \zeropoint \parinitrightskip \zeropoint \parfillleftskip \zeropoint - \parfillrightskip \zeropoint % \s_zero_plus_zero + \parfillrightskip \s_zero_plus_zero \parindent \zeropoint \relax} @@ -342,7 +342,7 @@ \parinitleftskip \zeropoint \parinitrightskip \zeropoint \parfillleftskip \zeropoint - \parfillrightskip \zeropoint % \s_zero_plus_zero + \parfillrightskip \s_zero_plus_zero \parindent \zeropoint \relax} @@ -357,7 +357,7 @@ \parinitleftskip \zeropoint \parinitrightskip \zeropoint \parfillleftskip \zeropoint - \parfillrightskip \zeropoint % \s_zero_plus_one_fil + \parfillrightskip \s_zero_plus_one_fil %\parindent \parindent \relax} @@ -371,7 +371,7 @@ \parinitleftskip \zeropoint \parinitrightskip \zeropoint \parfillleftskip \zeropoint - \parfillrightskip \zeropoint % \s_zero_plus_zero + \parfillrightskip \s_zero_plus_zero \parindent \zeropoint \relax} @@ -385,7 +385,7 @@ \parinitleftskip \zeropoint \parinitrightskip \zeropoint \parfillleftskip \zeropoint - \parfillrightskip \zeropoint % \s_zero_plus_zero + \parfillrightskip \s_zero_plus_zero \parindent \zeropoint \relax} @@ -399,7 +399,7 @@ \parinitleftskip \zeropoint \parinitrightskip \zeropoint \parfillleftskip \zeropoint - \parfillrightskip \zeropoint % \s_zero_plus_zero + \parfillrightskip \s_zero_plus_zero %\parindent \parindent \relax} @@ -414,7 +414,7 @@ \parinitleftskip \zeropoint \parinitrightskip \zeropoint \parfillleftskip \zeropoint - \parfillrightskip \zeropoint % \s_zero_plus_zero + \parfillrightskip \s_zero_plus_zero \parindent \zeropoint \relax} @@ -818,7 +818,7 @@ \defcsname\??aligncommand 1*\v!more\endcsname{\toksapp\t_spac_align_collected{\looseness\plusone}} \defcsname\??aligncommand 2*\v!more\endcsname{\toksapp\t_spac_align_collected{\looseness\plustwo}} -\defcsname\??aligncommand \v!fit\endcsname{\toksapp\t_spac_align_collected{\lastlinefit\plusone}} +\defcsname\??aligncommand \v!fit\endcsname{\toksapp\t_spac_align_collected{\lastlinefit\plusthousand}} %defcsname\??aligncommand ...\endcsname{\toksapp\t_spac_align_collected{\nopenalties}} %defcsname\??aligncommand ...\endcsname{\toksapp\t_spac_align_collected{\setdefaultpenalties}} |