From f7049c2619684d6bfe6688d3a669455a6ecb6713 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Mon, 18 May 2020 17:33:44 +0200 Subject: 2020-05-18 16:49:00 --- tex/context/base/mkii/cont-new.mkii | 2 +- tex/context/base/mkii/context.mkii | 2 +- tex/context/base/mkiv/back-pdf.mkiv | 2 +- tex/context/base/mkiv/buff-ver.mkxl | 10 +- tex/context/base/mkiv/colo-ini.mkxl | 26 +- tex/context/base/mkiv/cont-new.mkiv | 2 +- tex/context/base/mkiv/context.mkiv | 2 +- tex/context/base/mkiv/context.mkxl | 2 +- tex/context/base/mkiv/font-emp.mklx | 2 +- tex/context/base/mkiv/font-fil.mklx | 14 +- tex/context/base/mkiv/font-ini.mklx | 16 +- tex/context/base/mkiv/font-sty.mklx | 4 +- tex/context/base/mkiv/lang-ini.mkxl | 24 +- tex/context/base/mkiv/lang-lab.mkxl | 8 +- tex/context/base/mkiv/lpdf-lmt.lua | 2 +- tex/context/base/mkiv/math-ini.mkxl | 66 ++--- tex/context/base/mkiv/meta-ini.mkxl | 28 +- tex/context/base/mkiv/mult-aux.mkxl | 113 ++++++-- tex/context/base/mkiv/mult-prm.lua | 9 +- tex/context/base/mkiv/pack-lyr.mkxl | 7 +- tex/context/base/mkiv/pack-rul.mkxl | 61 ++-- tex/context/base/mkiv/page-txt.mklx | 38 +-- tex/context/base/mkiv/spac-hor.mkiv | 16 +- tex/context/base/mkiv/spac-ver.mkiv | 2 + tex/context/base/mkiv/spac-ver.mkxl | 34 +-- tex/context/base/mkiv/status-files.pdf | Bin 27825 -> 27808 bytes tex/context/base/mkiv/status-lua.pdf | Bin 251926 -> 252066 bytes tex/context/base/mkiv/strc-itm.mklx | 36 +-- tex/context/base/mkiv/supp-box.mkxl | 4 +- tex/context/base/mkiv/syst-aux.lua | 103 ++++++- tex/context/base/mkiv/syst-aux.mkxl | 311 ++++++++++++--------- tex/context/base/mkiv/tabl-ntb.mkxl | 14 +- tex/context/base/mkiv/tabl-tbl.mkxl | 60 ++-- tex/context/base/mkiv/type-ini.mklx | 10 +- tex/context/modules/mkiv/m-visual.mkiv | 6 +- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 36 files changed, 630 insertions(+), 408 deletions(-) (limited to 'tex') diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 2460e83ce..083a54921 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{2020.05.12 16:17} +\newcontextversion{2020.05.18 16:46} %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 41553e217..2fa248da0 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{2020.05.12 16:17} +\edef\contextversion{2020.05.18 16:46} %D For those who want to use this: diff --git a/tex/context/base/mkiv/back-pdf.mkiv b/tex/context/base/mkiv/back-pdf.mkiv index 697aa311f..b8c3d429b 100644 --- a/tex/context/base/mkiv/back-pdf.mkiv +++ b/tex/context/base/mkiv/back-pdf.mkiv @@ -88,7 +88,7 @@ \appendtoks \edef\p_file{\backendparameter{xmpfile}}% - \ifx\p_file\empty\else + \ifempty\p_file\else \clf_setxmpfile{\p_file}% \fi \to \everysetupbackend diff --git a/tex/context/base/mkiv/buff-ver.mkxl b/tex/context/base/mkiv/buff-ver.mkxl index dec4dfb4a..058681a85 100644 --- a/tex/context/base/mkiv/buff-ver.mkxl +++ b/tex/context/base/mkiv/buff-ver.mkxl @@ -78,7 +78,7 @@ \edef\p_buff_option{\typeparameter\c!option}% \ifx\p_buff_option\v!none \usetypestyleandcolor\c!style\c!color - \orelse\ifx\p_buff_option\empty + \orelse\ifempty\p_buff_option \usetypestyleandcolor\c!style\c!color \else \usetypestyleparameter\c!style % no color @@ -120,7 +120,7 @@ \edef\p_buff_option{\typingparameter\c!option}% \ifx\p_buff_option\v!none \usetypingstyleandcolor\c!style\c!color - \orelse\ifx\p_buff_option\empty + \orelse\ifempty\p_buff_option \usetypingstyleandcolor\c!style\c!color \else \usetypingstyleparameter\c!style % no color ! @@ -177,7 +177,7 @@ \appendtoks \setuevalue{\e!start\currenttyping}{\buff_verbatim_typing_start{\currenttyping}}% \setuevalue{\e!stop \currenttyping}{\buff_verbatim_typing_stop {\currenttyping}}% - \ifx\currenttypingparent\empty + \ifempty\currenttypingparent \normalexpanded{\definelinenumbering[\currenttyping]}% \else \normalexpanded{\definelinenumbering[\currenttyping][\currenttypingparent]}% @@ -610,10 +610,10 @@ \unexpanded\def\doifelsetypingfile#1% {\edef\askedtypingfile{\locfilename{#1}}% - \ifx\askedtypingfile\empty + \ifempty\askedtypingfile \edef\askedtypingfile{\locfilename{#1.tex}}% downward compatible \fi - \ifx\askedtypingfile\empty + \ifempty\askedtypingfile \expandafter\secondoftwoarguments \else \expandafter\firstoftwoarguments diff --git a/tex/context/base/mkiv/colo-ini.mkxl b/tex/context/base/mkiv/colo-ini.mkxl index ee2dc64a6..d2c3e610d 100644 --- a/tex/context/base/mkiv/colo-ini.mkxl +++ b/tex/context/base/mkiv/colo-ini.mkxl @@ -167,7 +167,7 @@ \unexpanded\def\coloronly[#1]% {\bgroup \edef\currentcolorname{#1}% - \ifx\currentcolorprefix\empty + \ifempty\currentcolorprefix \colo_helpers_activate_nop_only \else \colo_helpers_activate_yes_only @@ -177,7 +177,7 @@ \unexpanded\def\startcoloronly[#1]%$ {\begingroup \edef\currentcolorname{#1}% - \ifx\currentcolorprefix\empty + \ifempty\currentcolorprefix \colo_helpers_activate_nop_only \else \colo_helpers_activate_yes_only @@ -191,7 +191,7 @@ \unexpanded\def\color[#1]% {\bgroup \edef\currentcolorname{#1}% - \ifx\currentcolorprefix\empty + \ifempty\currentcolorprefix \colo_helpers_activate_nop \else \colo_helpers_activate_yes @@ -206,7 +206,7 @@ \unexpanded\def\startcolor[#1]%$ {\begingroup \edef\currentcolorname{#1}% - \ifx\currentcolorprefix\empty + \ifempty\currentcolorprefix \colo_helpers_activate_nop \else \colo_helpers_activate_yes @@ -232,7 +232,7 @@ \unexpanded\def\fastcolor[#1]#2% {\begingroup % is this command still needed? \edef\currentcolorname{#1}% - \ifx\currentcolorprefix\empty + \ifempty\currentcolorprefix \colo_helpers_activate_nop \else \colo_helpers_activate_yes @@ -242,7 +242,7 @@ \unexpanded\def\directcolor[#1]% {\edef\currentcolorname{#1}% - \ifx\currentcolorprefix\empty + \ifempty\currentcolorprefix \colo_helpers_activate_nop \else \colo_helpers_activate_yes @@ -250,7 +250,7 @@ %D The following command is obsolete: -\unexpanded\def\startcolorpage {\startcolor[\ifx\maintextcolor\empty\defaulttextcolor\else\maintextcolor\fi]} +\unexpanded\def\startcolorpage {\startcolor[\ifempty\maintextcolor\defaulttextcolor\else\maintextcolor\fi]} \unexpanded\def\stopcolorpage {\stopcolor} \unexpanded\def\getcolorattributevalue#1#2% obsolete, use \thecolorattribute instead ... @@ -546,7 +546,7 @@ \def\colo_palets_setup[#1]% {\edef\currentcolorpalet{#1}% - \ifx\currentcolorpalet\empty + \ifempty\currentcolorpalet % seems to be a reset \let\currentcolorprefix\empty %\t_colo_prefix\emptytoks @@ -728,7 +728,7 @@ % new: expandable (see tbl) \def\colo_helpers_fast_activate - {\ifx\currentcolorprefix\empty + {\ifempty\currentcolorprefix \expandafter\colo_helpers_fast_activate_nop \else \expandafter\colo_helpers_fast_activate_yes @@ -759,7 +759,7 @@ \def\colo_helpers_activate#1% two-step is not that much faster but less tracing {\edef\currentcolorname{#1}% - \ifx\currentcolorprefix\empty + \ifempty\currentcolorprefix %\expandafter \colo_helpers_activate_nop \else @@ -1097,10 +1097,10 @@ \def\s!themaintextcolor{themaintextcolor} \unexpanded\def\inheritmaintextcolor - {\ifx\maintextcolor\empty\else\colo_helpers_activate\maintextcolor\fi} + {\ifempty\maintextcolor\else\colo_helpers_activate\maintextcolor\fi} \unexpanded\def\onlyinheritmaintextcolor - {\ifx\maintextcolor\empty + {\ifempty\maintextcolor \deactivatecolor \else \colo_helpers_activate\maintextcolor @@ -1127,7 +1127,7 @@ \def\colo_helpers_initialize_maintextcolor {\edef\p_colo_textcolor{\directcolorsparameter\c!textcolor}% - \ifx\p_colo_textcolor\empty + \ifempty\p_colo_textcolor \colo_helpers_switch_to_maintextcolor\defaulttextcolor \else \colo_helpers_switch_to_maintextcolor\p_colo_textcolor diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 93fc7b12c..1857b934a 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{2020.05.12 16:17} +\newcontextversion{2020.05.18 16:46} %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 7adad8602..de600c70b 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -45,7 +45,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2020.05.12 16:17} +\edef\contextversion{2020.05.18 16:46} \edef\contextkind {beta} %D Kind of special: diff --git a/tex/context/base/mkiv/context.mkxl b/tex/context/base/mkiv/context.mkxl index 1e4d4b45c..8054489ff 100644 --- a/tex/context/base/mkiv/context.mkxl +++ b/tex/context/base/mkiv/context.mkxl @@ -29,7 +29,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2020.05.12 16:17} +\edef\contextversion{2020.05.18 16:46} \edef\contextkind {beta} %D Kind of special: diff --git a/tex/context/base/mkiv/font-emp.mklx b/tex/context/base/mkiv/font-emp.mklx index 2bd6f3cf9..8ceee2723 100644 --- a/tex/context/base/mkiv/font-emp.mklx +++ b/tex/context/base/mkiv/font-emp.mklx @@ -46,7 +46,7 @@ #slanted% \orelse\ifx\m_font_emphasized_typeface\v!italic #italic% - \orelse\ifx\m_font_emphasized_typeface\empty + \orelse\ifempty\m_font_emphasized_typeface #slanted% \else \csname\m_font_emphasized_typeface\endcsname diff --git a/tex/context/base/mkiv/font-fil.mklx b/tex/context/base/mkiv/font-fil.mklx index 6cc25db10..2b8224dfe 100644 --- a/tex/context/base/mkiv/font-fil.mklx +++ b/tex/context/base/mkiv/font-fil.mklx @@ -78,7 +78,7 @@ \unexpanded\def\definefontsynonym[#name]#crap[#file]% {\edef\m_font_name{#name}% \edef\m_font_file{#file}% - \ifx\fontclass\empty + \ifempty\fontclass \expandafter\font_basics_define_font_synonym_nop \else \expandafter\font_basics_define_font_synonym_yes @@ -95,7 +95,7 @@ \unexpanded\def\edefinefontsynonym[#name]#crap[#file]% {\edef\m_font_name{#name}% \edef\m_font_file{#file}% - \ifx\fontclass\empty + \ifempty\fontclass \expandafter\font_basics_define_font_synonym_nop_expanded \else \expandafter\font_basics_define_font_synonym_yes_expanded @@ -207,7 +207,7 @@ \def\font_helpers_true_fontname#name*#first#rest*#crap\relax {\ifcsname\??fontfile\fontclass#name\endcsname - \ifx#first\empty + \ifempty#first% %\expandafter\truefontname\csname\??fontfile\fontclass#name\endcsname \expandafter\truefontname\lastnamedcs \else @@ -215,7 +215,7 @@ \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest% \fi \orelse\ifcsname\??fontfile\defaultfontclass#name\endcsname - \ifx#first\empty + \ifempty#first% %\expandafter\truefontname\csname\??fontfile\defaultfontclass#name\endcsname \expandafter\truefontname\lastnamedcs \else @@ -223,7 +223,7 @@ \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest% \fi \orelse\ifcsname\??fontfile#name\endcsname - \ifx#first\empty + \ifempty#first% %\expandafter\truefontname\csname\??fontfile#name\endcsname \expandafter\truefontname\lastnamedcs \else @@ -231,7 +231,7 @@ \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest% \fi \else - #name\ifx#first\empty\else*#first#rest\fi + #name\ifempty#first\else*#first#rest\fi \fi} \def\font_helpers_true_fontname_check#name% @@ -401,7 +401,7 @@ \font_helpers_set_designsize_nop\somefontname} \def\font_helpers_update_font_parameters - {\ifx\fontclass\empty\font_helpers_update_font_parameters_nop\else\font_helpers_update_font_parameters_yes\fi} + {\ifempty\fontclass\font_helpers_update_font_parameters_nop\else\font_helpers_update_font_parameters_yes\fi} \installcorenamespace{fontclass} diff --git a/tex/context/base/mkiv/font-ini.mklx b/tex/context/base/mkiv/font-ini.mklx index 4b112322d..db031ba42 100644 --- a/tex/context/base/mkiv/font-ini.mklx +++ b/tex/context/base/mkiv/font-ini.mklx @@ -756,7 +756,7 @@ \font_helpers_update_font_class_parameters %\writestatus{fonts}{low level define: #csname/\somefontfile/\number\d_font_scaled_font_size/\fontface/\number\d_font_scaled_text_face}% \clf_definefont_two - \ifx\fontclass\empty\s!false\else\s!true\fi + \ifempty\fontclass\s!false\else\s!true\fi {#csname}% {\somefontfile}% \d_font_scaled_font_size @@ -1440,7 +1440,7 @@ \processcommalist[#assignments]\font_basics_define_body_font_defs} \unexpanded\def\font_basics_define_body_font_defs - {\ifx\fontclass\empty + {\ifempty\fontclass \expandafter\font_basics_define_body_font_defs_nop \else \expandafter\font_basics_define_body_font_defs_yes @@ -1670,7 +1670,7 @@ \def\font_helpers_set_font#method#specification% {\edef\m_font_specification{#specification}% - \ifx\m_font_specification\empty \else + \ifempty\m_font_specification \else \ifx\m_font_specification\v!global % we can have all kind of presets \restoreglobalbodyfont \else @@ -1680,7 +1680,7 @@ \font_preloads_at_definition \font_basics_switch_points\normalizedbodyfontsize \font_basics_switch_style\fontstyle - \ifx\defaultfontclass\empty + \ifempty\defaultfontclass \let\defaultfontclass\fontclass \fi \fi @@ -1829,7 +1829,7 @@ \font_helpers_synchronize_font} \unexpanded\def\font_helpers_synchronize_font % we can have dups i.e. no need to let fontstrategy - {\ifx\fontclass\empty + {\ifempty\fontclass \applyfontstrategies \else \applyfontclassstrategies @@ -2227,7 +2227,7 @@ \unexpanded\def\font_basics_switchtobodyfont#specification% {\edef\m_font_step{\font_bodyfontvariable{#specification}}% - \ifx\m_font_step\empty + \ifempty\m_font_step \font_helpers_set_font\zerocount{#specification}% \else \font_helpers_switch_bodyfont_step % so we have a fast [small] switch @@ -2240,7 +2240,7 @@ \unexpanded\def\usebodyfontparameter#1% {\edef\m_font_bodyfont_asked{#1\c!bodyfont}% - \ifx\m_font_bodyfont_asked\empty\else + \ifempty\m_font_bodyfont_asked\else \font_basics_switchtobodyfont\m_font_bodyfont_asked \fi} @@ -2285,7 +2285,7 @@ %D \stoptyping \unexpanded\def\usebodyfont[#1]% - {\ifx\fontclass\empty + {\ifempty\fontclass \setupbodyfont[#1]% \else \switchtobodyfont[#1]% diff --git a/tex/context/base/mkiv/font-sty.mklx b/tex/context/base/mkiv/font-sty.mklx index 81884333b..f0fe65183 100644 --- a/tex/context/base/mkiv/font-sty.mklx +++ b/tex/context/base/mkiv/font-sty.mklx @@ -148,7 +148,7 @@ \unexpanded\def\doconvertfont#specification% takes second argument / this command is obsolete {\edef\m_current_convert_font{#specification}% - \ifx\m_current_convert_font\empty + \ifempty\m_current_convert_font %\expandafter\firstofoneargument \else \expandafter\font_helpers_do_convert_font @@ -183,7 +183,7 @@ \unexpanded\def\dousestyleparameter#value% {\edef\currentstyleparameter{#value}% - \ifx\currentstyleparameter\empty\else + \ifempty\currentstyleparameter\else \expandafter\dousecurrentstyleparameter \fi} diff --git a/tex/context/base/mkiv/lang-ini.mkxl b/tex/context/base/mkiv/lang-ini.mkxl index 8bcba01d8..f86628069 100644 --- a/tex/context/base/mkiv/lang-ini.mkxl +++ b/tex/context/base/mkiv/lang-ini.mkxl @@ -121,7 +121,7 @@ \unexpanded\def\setusedlanguage#1% {\edef\currentusedlanguage{\reallanguagetag{#1}}% - \ifx\currentusedlanguage\empty + \ifempty\currentusedlanguage \let\currentusedlanguage \currentlanguage \let\usedlanguageparameter\languageparameter \orelse\ifx\currentusedlanguage\v!global @@ -139,14 +139,14 @@ \unexpanded\def\setcurrentlanguage#1#2% sets modes: **id (currentmain) *id (current) {\edef\xaskedlanguage{#1}% otherwise clash with \askedlanguage - \ifx\xaskedlanguage\empty \else - \ifx\currentmainlanguage\empty\else\resetsystemmode{\systemmodeprefix\currentmainlanguage}\fi + \ifempty\xaskedlanguage \else + \ifempty\currentmainlanguage\else\resetsystemmode{\systemmodeprefix\currentmainlanguage}\fi \let\currentmainlanguage\xaskedlanguage \setsystemmode{\systemmodeprefix\currentmainlanguage}% \fi \edef\xaskedlanguage{#2}% - \ifx\xaskedlanguage\empty \else - \ifx\currentlanguage\empty\else\resetsystemmode\currentlanguage\fi + \ifempty\xaskedlanguage \else + \ifempty\currentlanguage\else\resetsystemmode\currentlanguage\fi \let\currentlanguage\xaskedlanguage \setsystemmode\currentlanguage \fi} @@ -454,7 +454,7 @@ \appendtoks \edef\currentlanguagesetups{\languageparameter\c!setups}% - \ifx\currentlanguagesetups\empty \else + \ifempty\currentlanguagesetups \else \setups[\currentlanguagesetups]% \fi \to \everylanguage @@ -492,7 +492,7 @@ \appendtoks \edef\p_language_font{\languageparameter\s!font}% - \ifx\p_language_font\empty + \ifempty\p_language_font \orelse\ifx\p_language_font\v!auto \doaddfeature\currentlanguage \else @@ -513,15 +513,15 @@ \unexpanded\def\uselanguageparameter#1% {\edef\askedlanguage{#1\c!language}% - \ifx\askedlanguage\empty\else\lang_basics_switch_asked\fi} + \ifempty\askedlanguage\else\lang_basics_switch_asked\fi} \unexpanded\def\douselanguageparameter#1% fast setter {\edef\askedlanguage{#1}% - \ifx\askedlanguage\empty\else\lang_basics_switch_asked\fi} + \ifempty\askedlanguage\else\lang_basics_switch_asked\fi} \unexpanded\def\lang_basics_set_current[#1]% {\edef\askedlanguage{#1}% - \ifx\askedlanguage\empty\else\lang_basics_switch_asked\fi} + \ifempty\askedlanguage\else\lang_basics_switch_asked\fi} \unexpanded\def\language {\doifelsenextoptionalcs\lang_basics_set_current\normallanguage} @@ -542,7 +542,7 @@ \unexpanded\def\mainlanguage[#1]% {\edef\askedlanguage{#1}% - \ifx\askedlanguage\empty + \ifempty\askedlanguage \orelse\ifcsname\??languagelinked\askedlanguage\endcsname %\edef\askedlanguage{\csname\??languagelinked\askedlanguage\endcsname}% \edef\askedlanguage{\lastnamedcs}% @@ -699,7 +699,7 @@ \def\lang_basics_start_exceptions[#1]#2\stopexceptions % multilingual or not? {\begingroup \edef\askedlanguage{\reallanguagetag{#1}}% - \ifx\askedlanguage\empty + \ifempty\askedlanguage \let\askedlanguage\currentlanguage \fi \clf_setlanguageexceptions{\askedlanguage}{#2}% diff --git a/tex/context/base/mkiv/lang-lab.mkxl b/tex/context/base/mkiv/lang-lab.mkxl index a527224e9..117aa9e2b 100644 --- a/tex/context/base/mkiv/lang-lab.mkxl +++ b/tex/context/base/mkiv/lang-lab.mkxl @@ -223,8 +223,8 @@ % \def\lang_labels_text_prefix_assign_yes#1[#2,#3,#4]% % {\def\m_lang_labels_left {#2}% no longer an edef ... else \Word undefined expansion issues % \def\m_lang_labels_right{#3}% no longer an edef ... else \Word undefined expansion issues -% \ifx\m_lang_labels_right\empty -% \ifx\m_lang_labels_left\empty +% \ifempty\m_lang_labels_right +% \ifempty\m_lang_labels_left % \expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{\empty\empty}% % \else % \expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{{#2}\empty}% @@ -239,8 +239,8 @@ {\def\m_lang_labels_left {#2}% no longer an edef ... else \Word undefined expansion issues \def\m_lang_labels_right{#3}% no longer an edef ... else \Word undefined expansion issues \expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1% - \ifx\m_lang_labels_right\empty - \ifx\m_lang_labels_left\empty + \ifempty\m_lang_labels_right + \ifempty\m_lang_labels_left \endcsname{\empty\empty}% \else \endcsname{{#2}\empty}% diff --git a/tex/context/base/mkiv/lpdf-lmt.lua b/tex/context/base/mkiv/lpdf-lmt.lua index f4e30274a..43c4c1059 100644 --- a/tex/context/base/mkiv/lpdf-lmt.lua +++ b/tex/context/base/mkiv/lpdf-lmt.lua @@ -803,7 +803,7 @@ local flushsave, flushrestore, flushsetmatrix do rx, sx, sy, ry = tonumber(rx), tonumber(sx), tonumber(sy), tonumber(ry) local tx = pos_h * (1 - rx) - pos_v * sy local ty = pos_v * (1 - ry) - pos_h * sx - if nofmatrices > 1 then + if nofmatrices > 0 then local t = matrices[nofmatrices] local r_x, s_x, s_y, r_y, te, tf = t[1], t[2], t[3], t[4], t[5], t[6] rx, sx = rx * r_x + sx * s_y, rx * s_x + sx * r_y diff --git a/tex/context/base/mkiv/math-ini.mkxl b/tex/context/base/mkiv/math-ini.mkxl index 00f70cf07..9cc3dfe1f 100644 --- a/tex/context/base/mkiv/math-ini.mkxl +++ b/tex/context/base/mkiv/math-ini.mkxl @@ -446,7 +446,7 @@ \appendtoks \edef\p_stylealternative{\mathematicsparameter\c!stylealternative}% - \ifx\p_stylealternative\empty\else + \ifempty\p_stylealternative\else \clf_presetmathalternate\defaultmathfamily{\p_stylealternative}% \fi \to \everymathematics @@ -829,7 +829,7 @@ {\begingroup \usemathematicscolorparameter\c!functioncolor \edef\p_functionstyle{\mathematicsparameter\c!functionstyle}% - \ifx\p_functionstyle\empty + \ifempty\p_functionstyle \expandafter\math_mfunction_styled_none \orelse\ifcsname\??alternativestyle\p_functionstyle\endcsname \doubleexpandafter\math_mfunction_styled_text @@ -1308,7 +1308,7 @@ \enabledirectives\disabledirectives[math.virtual.optional]} \appendtoks - \ifx\currentmathematics\empty + \ifempty\currentmathematics \math_basics_check_compact % less tracing \fi \to \everysetupmathematics @@ -1813,7 +1813,7 @@ % 7 = crampedscriptscript \def\uncramped#1% - {{\ifcase\normalmathstyle + {{\ifmathstyle \or \displaystyle \or \or \textstyle \or \or \scriptstyle \or @@ -1821,7 +1821,7 @@ #1}} \def\cramped#1% - {{\ifcase\normalmathstyle + {{\ifmathstyle \crampeddisplaystyle \or \or % 0 -> 1 \crampedtextstyle \or \or % 2 -> 3 \crampedscriptstyle \or \or % 4 -> 5 @@ -2040,7 +2040,7 @@ %D \stoptabulate \def\triggerdisplaystyle - {\ifcase\normalmathstyle\relax + {\ifmathstyle \displaystyle \or \crampeddisplaystyle \or \displaystyle \or @@ -2052,7 +2052,7 @@ \fi} \def\triggertextstyle - {\ifcase\normalmathstyle\relax + {\ifmathstyle \textstyle \or \crampedtextstyle \or \textstyle \or @@ -2064,7 +2064,7 @@ \fi} \def\triggerscriptstyle - {\ifcase\normalmathstyle\relax + {\ifmathstyle \scriptstyle \or \crampedscriptstyle \or \scriptstyle \or @@ -2076,7 +2076,7 @@ \fi} \def\triggerscriptscriptstyle - {\ifcase\normalmathstyle\relax + {\ifmathstyle \scriptscriptstyle \or \crampedscriptscriptstyle \or \scriptscriptstyle \or @@ -2088,21 +2088,21 @@ \fi} \def\triggeruncrampedstyle - {\ifcase\normalmathstyle\relax + {\ifmathstyle \or \displaystyle \or \or \textstyle \or \or \scriptstyle \or \or \scriptscriptstyle \fi} \def\triggercrampedstyle - {\ifcase\normalmathstyle\relax + {\ifmathstyle \crampeddisplaystyle \or \or \crampedtextstyle \or \or \crampedscriptstyle \or \or \crampedscriptscriptstyle \fi} \def\triggersmallstyle - {\ifcase\normalmathstyle\relax + {\ifmathstyle \scriptstyle \or \crampedscriptstyle \or \scriptstyle \or @@ -2114,7 +2114,7 @@ \fi} \def\triggeruncrampedsmallstyle - {\ifcase\normalmathstyle\relax + {\ifmathstyle \scriptstyle \or \scriptstyle \or \scriptstyle \or @@ -2126,7 +2126,7 @@ \fi} \def\triggercrampedsmallstyle - {\ifcase\normalmathstyle\relax + {\ifmathstyle \crampedscriptstyle \or \crampedscriptstyle \or \crampedscriptstyle \or @@ -2138,7 +2138,7 @@ \fi} \def\triggerbigstyle - {\ifcase\normalmathstyle\relax + {\ifmathstyle \displaystyle \or \crampeddisplaystyle \or \textstyle \or @@ -2150,7 +2150,7 @@ \fi} \def\triggeruncrampedbigstyle - {\ifcase\normalmathstyle\relax + {\ifmathstyle \displaystyle \or \displaystyle \or \textstyle \or @@ -2162,7 +2162,7 @@ \fi} \def\triggercrampedbigstyle - {\ifcase\normalmathstyle\relax + {\ifmathstyle \crampeddisplaystyle \or \crampeddisplaystyle \or \crampedtextstyle \or @@ -2265,7 +2265,7 @@ \unexpanded\def\math_style_set#1% {\edef\m_math_style_asked{#1}% - \ifx\m_math_style_asked\empty \else + \ifempty\m_math_style_asked \else \math_style_set_indeed \fi} @@ -2294,13 +2294,13 @@ \unexpanded\def\setupmathstyle[#1]% {\edef\m_math_style_asked{#1}% - \ifx\m_math_style_asked\empty \else + \ifempty\m_math_style_asked \else \math_style_set_indeed \fi} \unexpanded\def\usemathstyleparameter#1% faster local variant {\edef\m_math_style_asked{#1\c!mathstyle}% - \ifx\m_math_style_asked\empty \else + \ifempty\m_math_style_asked \else \math_style_set_indeed \fi} @@ -2385,7 +2385,7 @@ \unexpanded\def\startmathstyle[#1]% {\edef\m_math_style_asked{#1}% - \ifx\m_math_style_asked\empty + \ifempty\m_math_style_asked \let\stopmathstyle\relax \else \bgroup @@ -2397,7 +2397,7 @@ \unexpanded\def\startusemathstyleparameter#1% {\edef\m_math_style_asked{#1\c!mathstyle}% - \ifx\m_math_style_asked\empty + \ifempty\m_math_style_asked \let\stopusemathstyleparameter\relax \else \bgroup @@ -2587,7 +2587,7 @@ \appendtoks \edef\p_setups{\mathematicsparameter\c!setups}% - \ifx\p_setups\empty\else + \ifempty\p_setups\else \directsetup\p_setups \fi \to \everyswitchmathematics @@ -2779,7 +2779,7 @@ \appendtoks \edef\p_domain{\mathematicsparameter\c!domain}% - \ifx\p_domain\empty + \ifempty\p_domain \c_math_domain_attribute\attributeunsetvalue \else \c_math_domain_attribute\clf_getmathdomain\p_domain\relax @@ -2905,7 +2905,7 @@ % \ifcondition\mdim#1\scriptscriptstyle \frozen#1\scriptscriptstyle #2\dimexpr#1\scriptscriptstyle \relax\fi % \ifcondition\mdim#1\crampedscriptscriptstyle\frozen#1\crampedscriptscriptstyle#2\dimexpr#1\crampedscriptscriptstyle\relax\fi} -% \Umathparameter : 0=zero, 1=set, 2=unset (les stracing clutter this way) +% \ifmathparameter : 0=zero, 1=set, 2=unset (les stracing clutter this way) %D New stuff: %D @@ -2914,14 +2914,14 @@ %D \stoptyping \unexpanded\def\mathopenupparameter#1#2% - {\ifcase\Umathparameter#1\displaystyle \or\frozen#1\displaystyle #2#1\displaystyle \fi - \ifcase\Umathparameter#1\crampeddisplaystyle \or\frozen#1\crampeddisplaystyle #2#1\crampeddisplaystyle \fi - \ifcase\Umathparameter#1\textstyle \or\frozen#1\textstyle #2#1\textstyle \fi - \ifcase\Umathparameter#1\crampedtextstyle \or\frozen#1\crampedtextstyle #2#1\crampedtextstyle \fi - \ifcase\Umathparameter#1\scriptstyle \or\frozen#1\scriptstyle #2#1\scriptstyle \fi - \ifcase\Umathparameter#1\crampedscriptstyle \or\frozen#1\crampedscriptstyle #2#1\crampedscriptstyle \fi - \ifcase\Umathparameter#1\scriptscriptstyle \or\frozen#1\scriptscriptstyle #2#1\scriptscriptstyle \fi - \ifcase\Umathparameter#1\crampedscriptscriptstyle\or\frozen#1\crampedscriptscriptstyle#2#1\crampedscriptscriptstyle\fi} + {\ifmathparameter#1\displaystyle \or\frozen#1\displaystyle #2#1\displaystyle \fi + \ifmathparameter#1\crampeddisplaystyle \or\frozen#1\crampeddisplaystyle #2#1\crampeddisplaystyle \fi + \ifmathparameter#1\textstyle \or\frozen#1\textstyle #2#1\textstyle \fi + \ifmathparameter#1\crampedtextstyle \or\frozen#1\crampedtextstyle #2#1\crampedtextstyle \fi + \ifmathparameter#1\scriptstyle \or\frozen#1\scriptstyle #2#1\scriptstyle \fi + \ifmathparameter#1\crampedscriptstyle \or\frozen#1\crampedscriptstyle #2#1\crampedscriptstyle \fi + \ifmathparameter#1\scriptscriptstyle \or\frozen#1\scriptscriptstyle #2#1\scriptscriptstyle \fi + \ifmathparameter#1\crampedscriptscriptstyle\or\frozen#1\crampedscriptscriptstyle#2#1\crampedscriptscriptstyle\fi} %D New stuff: %D diff --git a/tex/context/base/mkiv/meta-ini.mkxl b/tex/context/base/mkiv/meta-ini.mkxl index e08aa560a..0f632c854 100644 --- a/tex/context/base/mkiv/meta-ini.mkxl +++ b/tex/context/base/mkiv/meta-ini.mkxl @@ -93,7 +93,7 @@ \def\meta_start_definitions#1#2\stopMPdefinitions {\let\m_meta_saved_instance\currentMPinstance \edef\currentMPinstance{#1}% - \ifx\currentMPinstance\empty + \ifempty\currentMPinstance \let\currentMPinstance\defaultMPinstance \fi \gtoksapp\t_meta_definitions{#2}% @@ -124,7 +124,7 @@ \def\meta_start_inclusions_indeed#1#2\stopMPinclusions {\let\m_meta_saved_instance\currentMPinstance \edef\currentMPinstance{#1}% - \ifx\currentMPinstance\empty + \ifempty\currentMPinstance \let\currentMPinstance\defaultMPinstance \fi \ifx\m_meta_option\!!plustoken \else @@ -145,7 +145,7 @@ \def\meta_inclusions_indeed#1#2% {\let\m_meta_saved_instance\currentMPinstance \edef\currentMPinstance{#1}% - \ifx\currentMPinstance\empty + \ifempty\currentMPinstance \let\currentMPinstance\defaultMPinstance \fi \ifx\m_meta_option\!!plustoken \else @@ -194,7 +194,7 @@ \unexpanded\def\meta_analyze_graphicname_indeed[#1::#2::#3]% instance :: {\edef\currentMPgraphicname{#2}% - \ifx\currentMPgraphicname\empty + \ifempty\currentMPgraphicname \edef\currentMPgraphicname{#1}% \let\currentMPinstance\defaultMPinstance \orelse\ifcsname\??mpdefinitions#1\endcsname @@ -262,7 +262,7 @@ \setfalse\c_meta_include_initializations \fi \edef\p_setups{\MPinstanceparameter\c!setups}% - \ifx\p_setups\empty \else + \ifempty\p_setups \else \setups[\p_setups]% \fi \useMPinstancestyleparameter\c!textstyle} @@ -289,7 +289,7 @@ \unexpanded\def\meta_process_graphic_instance#1% {\edef\currentMPinstance{#1}% - \ifx\currentMPinstance\empty + \ifempty\currentMPinstance \let\currentMPinstance\defaultMPinstance \fi \edef\currentMPformat{\MPinstanceparameter\s!format}% @@ -539,7 +539,7 @@ {\??graphicvariable\currentmpvariableclass:#1}% \edef\m_meta_current_variable {\begincsname\m_meta_current_variable_template\endcsname}% - \ifx\m_meta_current_variable\empty + \ifempty\m_meta_current_variable \expandafter\meta_prepare_variable_nop \else \expandafter\meta_prepare_variable_yes @@ -557,7 +557,7 @@ \else \begincsname\??graphicvariable\currentMPgraphicname:#1\endcsname \fi}% - \ifx\m_meta_current_variable\empty + \ifempty\m_meta_current_variable \expandafter\meta_prepare_variable_nop \else \expandafter\meta_prepare_variable_yes @@ -712,7 +712,7 @@ {\begingroup \edef\currentmpvariableclass{#1}% \edef\m_meta_instance_variables{#2}% - \ifx\m_meta_instance_variables\empty \else + \ifempty\m_meta_instance_variables \else \meta_prepare_instance_variables \fi \meta_enable_include % redundant @@ -745,7 +745,7 @@ {\begingroup \edef\currentmpvariableclass{#1}% \edef\m_meta_instance_variables{#2}% - \ifx\m_meta_instance_variables\empty \else + \ifempty\m_meta_instance_variables \else \meta_prepare_instance_variables \fi \meta_enable_include % redundant @@ -778,7 +778,7 @@ \else \let\usedMPgraphicname\empty \fi - \ifx\usedMPgraphicname\empty + \ifempty\usedMPgraphicname % message \else \doifsomething{#2}{\setupMPvariables[\usedMPgraphicname][#2]}% @@ -1072,8 +1072,8 @@ %D that fails with spot colors. \startMPinitializations - def OverlayLineColor=\ifx\overlaylinecolor\empty black \else\MPcolor{\overlaylinecolor} \fi enddef; - def OverlayColor =\ifx\overlaycolor \empty black \else\MPcolor{\overlaycolor} \fi enddef; + def OverlayLineColor=\ifempty\overlaylinecolor black \else\MPcolor{\overlaylinecolor} \fi enddef; + def OverlayColor =\ifempty\overlaycolor black \else\MPcolor{\overlaycolor} \fi enddef; \stopMPinitializations % \newcount\c_overlay_colormodel @@ -1448,7 +1448,7 @@ \appendtoks \edef\p_mpy{\directMPgraphicsparameter{mpy}}% - \ifx\p_mpy\empty \else + \ifempty\p_mpy \else \let\MPdataMPYfile\p_mpy \clf_registermpyfile{\p_mpy}% \fi diff --git a/tex/context/base/mkiv/mult-aux.mkxl b/tex/context/base/mkiv/mult-aux.mkxl index 7a5e60b29..f8eceb9a1 100644 --- a/tex/context/base/mkiv/mult-aux.mkxl +++ b/tex/context/base/mkiv/mult-aux.mkxl @@ -112,7 +112,18 @@ \def\mult_interfaces_get_parameters_error_indeed#1#2% {\showassignerror{#2}{\the\inputlineno\space(#1)}} -\def\mult_interfaces_get_parameters_assign#1=#2=#3#4^^^^0004% +% \def\mult_interfaces_get_parameters_assign#1=#2=#3#4^^^^0004% +% {\ifx\empty#1\empty +% \expandafter\mult_interfaces_get_parameters_error +% \orelse\ifx#3\empty +% \expandafter\mult_interfaces_get_parameters_error +% \else +% \expandafter\mult_interfaces_adef % assignment def +% \fi +% \m_mult_interfaces_namespace{#1}{#2}% +% \doubleexpandafter\mult_interfaces_get_parameters_item} + +\def\mult_interfaces_get_parameters_assign#1=#2=#3#0^^^^0004% {\ifx\empty#1\empty \expandafter\mult_interfaces_get_parameters_error \orelse\ifx#3\empty @@ -129,13 +140,29 @@ \let\mult_interfaces_get_parameters_error\undefined - \def\mult_interfaces_get_parameters_error_one#1\csname#2#3\endcsname#4% +% \def\mult_interfaces_get_parameters_error_one#1\csname#2#3\endcsname#4% +% {\mult_interfaces_get_parameters_error_indeed{#2}{#3}\iftrue} + +% \def\mult_interfaces_get_parameters_error_two#1\csname#2#3\endcsname#4% +% {\mult_interfaces_get_parameters_error_indeed{#2}{#3}} + +% \def\mult_interfaces_get_parameters_assign#1=#2=#3#4^^^^0004% +% {\ifx\empty#1\empty +% \mult_interfaces_get_parameters_error_one +% \orelse\ifx#3\empty +% \mult_interfaces_get_parameters_error_two +% \else +% \expandafter\def\csname\m_mult_interfaces_namespace#1\endcsname{#2}% +% \fi +% \doubleexpandafter\mult_interfaces_get_parameters_item} + + \def\mult_interfaces_get_parameters_error_one#1\csname#2#3\endcsname#0% {\mult_interfaces_get_parameters_error_indeed{#2}{#3}\iftrue} - \def\mult_interfaces_get_parameters_error_two#1\csname#2#3\endcsname#4% + \def\mult_interfaces_get_parameters_error_two#1\csname#2#3\endcsname#0% {\mult_interfaces_get_parameters_error_indeed{#2}{#3}} - \def\mult_interfaces_get_parameters_assign#1=#2=#3#4^^^^0004% + \def\mult_interfaces_get_parameters_assign#1=#2=#3#0^^^^0004% {\ifx\empty#1\empty \mult_interfaces_get_parameters_error_one \orelse\ifx#3\empty @@ -149,10 +176,16 @@ \newif\ifassignment -\def\mult_check_for_assignment_indeed#1=#2#3^^^^0004% +% \def\mult_check_for_assignment_indeed#1=#2#3^^^^0004% +% {\if#2^^^^0003\assignmentfalse\else\assignmenttrue\fi} + +% \def\mult_check_for_assignment_indeed_begin_#1=#2#3^^^^0004% +% {\if#2^^^^0003} + +\def\mult_check_for_assignment_indeed#0=#2#0^^^^0004% {\if#2^^^^0003\assignmentfalse\else\assignmenttrue\fi} -\def\mult_check_for_assignment_indeed_begin_#1=#2#3^^^^0004% +\def\mult_check_for_assignment_indeed_begin_#0=#2#0^^^^0004% {\if#2^^^^0003} \def\mult_check_for_assignment#1% @@ -250,7 +283,8 @@ \def#5##1##2{\ifx##1\relax\else#4##1{##2}\fi}% \def#6{#1#2:}% \def#7##1{#1##1:}% - \def#8{\ifx#2\empty\orelse\ifcsname#1#2:\s!parent\endcsname\else\expandafter\let\csname#1#2:\s!parent\endcsname#1\fi}% + %\def#8{\ifx#2\empty\orelse\ifcsname#1#2:\s!parent\endcsname\else\expandafter\let\csname#1#2:\s!parent\endcsname#1\fi}% + \def#8{\ifempty#2\orelse\ifcsname#1#2:\s!parent\endcsname\else\expandafter\let\csname#1#2:\s!parent\endcsname#1\fi}% \unexpanded\def#9##1{\expandafter\edef\csname#1##1:\s!parent\endcsname{#1#2}}} \unexpanded\def\installparameterhashhandler#1#2% @@ -306,15 +340,19 @@ \unexpanded\def\mult_interfaces_install_style_and_color_handler#1#2#3#4% {\unexpanded\def#2##1##2% style color {\edef\currentstyleparameter{#1{##1}}% this name is public (can also set color e.g. in underline) - \ifx\currentstyleparameter\empty\else\dousecurrentstyleparameter\fi + %\ifx\currentstyleparameter\empty\else\dousecurrentstyleparameter\fi + \ifempty\currentstyleparameter\else\dousecurrentstyleparameter\fi \edef\currentcolorparameter{#1{##2}}% this name is public (so we do this after the style switch) - \ifx\currentcolorparameter\empty\else\dousecurrentcolorparameter\fi}% + %\ifx\currentcolorparameter\empty\else\dousecurrentcolorparameter\fi}% + \ifempty\currentcolorparameter\else\dousecurrentcolorparameter\fi}% \unexpanded\def#3##1% style {\edef\currentstyleparameter{#1{##1}}% this name is public - \ifx\currentstyleparameter\empty\else\dousecurrentstyleparameter\fi}% + %\ifx\currentstyleparameter\empty\else\dousecurrentstyleparameter\fi}% + \ifempty\currentstyleparameter\else\dousecurrentstyleparameter\fi}% \unexpanded\def#4##1% color {\edef\currentcolorparameter{#1{##1}}% this name is public - \ifx\currentcolorparameter\empty\else\dousecurrentcolorparameter\fi}} + %\ifx\currentcolorparameter\empty\else\dousecurrentcolorparameter\fi}} + \ifempty\currentcolorparameter\else\dousecurrentcolorparameter\fi}} \unexpanded\def\installstyleandcolorhandler#1#2% {\normalexpanded @@ -1044,7 +1082,8 @@ \unexpanded\def\mult_interfaces_install_parent_injector#1#2#3#4% {\unexpanded\def#4##1% - {\ifx#3\empty + %{\ifx#3\empty + {\ifempty#3% \expandafter\def\csname#1#2:\s!parent\endcsname{#1##1}% \fi}} @@ -1058,24 +1097,40 @@ % Faster but not used that much to make a dent in performance. But, because it's % cleaner anyway and also gives less tracing, we apply it a few times. -\unexpanded\def\syst_helpers_install_macro_stack#1#2#3% - {\xdef\m_syst_helpers_push_macro{\csstring#1}% - \ifcsname#3\m_syst_helpers_push_macro\endcsname\else - \expandafter\newcount\csname#3\m_syst_helpers_push_macro\endcsname - \expandafter\edef\csname push_macro_\m_syst_helpers_push_macro\endcsname - {\noexpand\expandafter\glet - \noexpand\csname\m_syst_helpers_push_macro\noexpand\the\csname#3\m_syst_helpers_push_macro\endcsname\endcsname - \noexpand#1% - \global\advance\csname#3\m_syst_helpers_push_macro\endcsname\plusone}% - \expandafter\edef\csname pop_macro_\m_syst_helpers_push_macro\endcsname - {\global\advance\csname#3\m_syst_helpers_push_macro\endcsname\minusone - \noexpand\expandafter#2% - \noexpand\expandafter\noexpand#1% - \noexpand\csname\m_syst_helpers_push_macro\noexpand\the\csname#3\m_syst_helpers_push_macro\endcsname\endcsname}% - \fi} +% \unexpanded\def\syst_helpers_install_macro_stack#1#2#3% +% {\xdef\m_syst_helpers_push_macro{\csstring#1}% +% \ifcsname#3\m_syst_helpers_push_macro\endcsname\else +% \expandafter\newcount\csname#3\m_syst_helpers_push_macro\endcsname +% \expandafter\edef\csname push_macro_\m_syst_helpers_push_macro\endcsname +% {\noexpand\expandafter\glet +% \noexpand\csname\m_syst_helpers_push_macro\noexpand\the\csname#3\m_syst_helpers_push_macro\endcsname\endcsname +% \noexpand#1% +% \global\advance\csname#3\m_syst_helpers_push_macro\endcsname\plusone}% +% \expandafter\edef\csname pop_macro_\m_syst_helpers_push_macro\endcsname +% {\global\advance\csname#3\m_syst_helpers_push_macro\endcsname\minusone +% \noexpand\expandafter#2% +% \noexpand\expandafter\noexpand#1% +% \noexpand\csname\m_syst_helpers_push_macro\noexpand\the\csname#3\m_syst_helpers_push_macro\endcsname\endcsname}% +% \fi} +% +% \unexpanded\def\installmacrostack #1{\syst_helpers_install_macro_stack#1\let \??localpushedmacro } +% \unexpanded\def\installglobalmacrostack#1{\syst_helpers_install_macro_stack#1\glet\??globalpushedmacro} + +% The \LUA\ based variant is twice as fast as the above but as said, we don't use +% this one that often. It's more about less tracing than speed here. + +\unexpanded\def\installmacrostack#1% + {\ifdefined#1\else\let#1\empty\fi + \unexpanded\expandafter\gdef\csname push_macro_\csstring#1\endcsname{\localpushmacro#1}% + \unexpanded\expandafter\gdef\csname pop_macro_\csstring#1\endcsname{\localpopmacro #1}} + + +\unexpanded\def\installglobalmacrostack#1% + {\ifdefined#1\else\glet#1\empty\fi + \unexpanded\expandafter\gdef\csname push_macro_\csstring#1\endcsname{\globalpushmacro#1}% + \unexpanded\expandafter\gdef\csname pop_macro_\csstring#1\endcsname{\globalpopmacro #1}} -\unexpanded\def\installmacrostack #1{\syst_helpers_install_macro_stack#1\let \??localpushedmacro } -\unexpanded\def\installglobalmacrostack#1{\syst_helpers_install_macro_stack#1\glet\??globalpushedmacro} +% \showmacrostack can be used to see if there are different entries % \unprotect % diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua index 5a77349c5..469fab85c 100644 --- a/tex/context/base/mkiv/mult-prm.lua +++ b/tex/context/base/mkiv/mult-prm.lua @@ -160,7 +160,6 @@ return { "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", - "Umathparameter", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", @@ -238,6 +237,7 @@ return { "aftergrouped", "alignmark", "aligntab", + "atendofgrouped", "attribute", "attributedef", "automaticdiscretionary", @@ -301,8 +301,11 @@ return { "ifcondition", "ifcstok", "ifdimval", + "ifempty", "iffrozen", "ifincsname", + "ifmathparameter", + "ifmathstyle", "ifnumval", "ifprotected", "iftok", @@ -354,6 +357,7 @@ return { "mathstyle", "mathsurroundmode", "mathsurroundskip", + "noalignmode", "noboundary", "nohrule", "nokerns", @@ -522,8 +526,10 @@ return { "accent", "adjdemerits", "advance", + "afterassigned", "afterassignment", "aftergroup", + "atendofgroup", "atop", "atopwithdelims", "badness", @@ -665,6 +671,7 @@ return { "leqno", "let", "limits", + "linepar", "linepenalty", "lineskip", "lineskiplimit", diff --git a/tex/context/base/mkiv/pack-lyr.mkxl b/tex/context/base/mkiv/pack-lyr.mkxl index 43460092e..419c9f279 100644 --- a/tex/context/base/mkiv/pack-lyr.mkxl +++ b/tex/context/base/mkiv/pack-lyr.mkxl @@ -342,7 +342,7 @@ \let\p_pack_layers_height \zeropoint \let\p_pack_layers_position\v!yes \fi - \ifx\p_pack_layers_rotation\empty \else + \ifempty\p_pack_layers_rotation \else % use direct call \setbox\nextbox\hpack {\rotate[\c!location=\v!high,\c!rotation=\layerparameter\c!rotation]{\box\nextbox}}% @@ -359,7 +359,7 @@ \pack_layers_set_last_position_nop \fi % - \ifx\m_pack_layers_page\empty \else % is expanded + \ifempty\m_pack_layers_page \else % is expanded \edef\m_pack_layers_page{:\m_pack_layers_page}% \ifcsname\??layerbox\m_pack_layers_target\currentlayer\m_pack_layers_page\endcsname \else \expandafter\newbox\csname\??layerbox\m_pack_layers_target\currentlayer\m_pack_layers_page\endcsname @@ -670,8 +670,7 @@ % \edef\p_pack_layers_position{\layerparameter\c!position}% local \ifx\p_pack_layers_position\v!yes \edef\p_pack_layers_region{\layerparameter\c!region}% - \ifx\p_pack_layers_region\empty - \else + \ifempty\p_pack_layers_region\else \anch_mark_tagged_box\nextbox\p_pack_layers_region % was \layeranchor \fi \fi diff --git a/tex/context/base/mkiv/pack-rul.mkxl b/tex/context/base/mkiv/pack-rul.mkxl index 8131c3fc5..4fef06ad0 100644 --- a/tex/context/base/mkiv/pack-rul.mkxl +++ b/tex/context/base/mkiv/pack-rul.mkxl @@ -345,7 +345,7 @@ \def\pack_framed_background_box_color {\edef\p_framed_backgroundcolor{\framedparameter\c!backgroundcolor}% - \ifx\p_framed_backgroundcolor\empty \else + \ifempty\p_framed_backgroundcolor \else \doifcolor\p_framed_backgroundcolor\pack_framed_background_box_color_indeed \fi} @@ -605,7 +605,7 @@ \d_framed_target_ht\dimexpr\framedbackgroundheight+ \framedbackgroundoffset\relax \d_framed_target_dp\dimexpr\framedbackgrounddepth + \framedbackgroundoffset+\framedparameter\c!backgrounddepth\relax \let\pack_framed_overlay_initialize\pack_framed_overlay_initialize_indeed - \ifx\p_framed_component\empty + \ifempty\p_framed_component \resetlayoutcomponentattribute \else \setlayoutcomponentattribute{\v!background:\p_framed_component}% @@ -663,7 +663,7 @@ \setbox\b_framed_extra\hpack {\kern-\d_framed_frameoffset \raise\scratchdimen - \hpack{\ifx\overlaylinecolor\empty\else\dousecolorparameter\overlaylinecolor\fi\pack_framed_stroked_box}}% + \hpack{\ifempty\overlaylinecolor\else\dousecolorparameter\overlaylinecolor\fi\pack_framed_stroked_box}}% \wd\b_framed_extra\wd\b_framed_normal \ht\b_framed_extra\ht\b_framed_normal \dp\b_framed_extra\dp\b_framed_normal @@ -920,7 +920,7 @@ \setbox\b_framed_normal\hbox{#4}% \iftrialtypesetting \else \edef\m_overlay_region{\framedparameter\c!region}% - \ifx\m_overlay_region\empty\else + \ifempty\m_overlay_region\else \pack_framed_set_region \fi \fi @@ -932,12 +932,12 @@ % not here, in calling macro: setups \pack_framed_remove_depth \ifx\p_framed_frame\v!overlay \orelse \ifx\p_framed_frame\v!none \else - \ifx\p_framed_rulethickness\empty\else + \ifempty\p_framed_rulethickness\else \d_framed_linewidth\p_framed_rulethickness\relax \fi \pack_framed_add_outline % real or invisible frame \fi - \ifx\p_framed_background\empty \else + \ifempty\p_framed_background \else \edef\p_framed_backgroundoffset{\framedparameter\c!backgroundoffset}% \d_framed_backgroundoffset \ifx\p_framed_backgroundoffset\v!frame @@ -949,7 +949,7 @@ \pack_framed_add_background \fi \pack_framed_restore_depth - \iftrialtypesetting\orelse\ifx\m_overlay_region\empty\else + \iftrialtypesetting\orelse\ifempty\m_overlay_region\else \pack_framed_add_region \fi \box\b_framed_normal @@ -961,7 +961,7 @@ \unexpanded\def\pack_framed_process_box_indeed#1#2% component box (assumes parameters set and grouped usage) {\setbox\b_framed_normal\box#2% could actually be \let\b_framed_normal#2 \edef\m_overlay_region{\framedparameter\c!region}% - \ifx\m_overlay_region\empty\else + \ifempty\m_overlay_region\else \pack_framed_set_region \fi \edef\p_framed_rulethickness{\framedparameter\c!rulethickness}% also used in backgrounds @@ -969,12 +969,12 @@ \edef\p_framed_frame{\framedparameter\c!frame}% \edef\p_framed_background{\framedparameter\c!background}% \ifx\p_framed_frame\v!overlay \orelse \ifx\p_framed_frame\v!none \else - \ifx\p_framed_rulethickness\empty \else + \ifempty\p_framed_rulethickness \else \d_framed_linewidth\p_framed_rulethickness\relax \fi \pack_framed_add_outline % real or invisible frame \fi - \ifx\p_framed_background\empty \else + \ifempty\p_framed_background \else \edef\p_framed_backgroundoffset{\framedparameter\c!backgroundoffset}% \d_framed_backgroundoffset \ifx\p_framed_backgroundoffset\v!frame @@ -985,7 +985,7 @@ \edef\p_framed_component{#1}% \pack_framed_add_background \fi - \ifx\m_overlay_region\empty\else + \ifempty\m_overlay_region\else \pack_framed_add_region \fi \box\b_framed_normal @@ -1073,7 +1073,7 @@ \framedparameter\c!extras % to get the right spacing \edef\p_framed_foregroundstyle{\framedparameter\c!foregroundstyle}% - \ifx\p_framed_foregroundstyle\empty\else\dousestyleparameter\p_framed_foregroundstyle\fi + \ifempty\p_framed_foregroundstyle\else\dousestyleparameter\p_framed_foregroundstyle\fi % beware, both the frame and background offset can be overruled % \edef\p_framed_setups{\framedparameter\c!setups}% @@ -1103,7 +1103,7 @@ \fi \ifconditional\c_framed_has_frame \edef\p_framed_rulethickness{\framedparameter\c!rulethickness}% - \ifx\p_framed_rulethickness\empty\else + \ifempty\p_framed_rulethickness\else \d_framed_linewidth\p_framed_rulethickness\relax \fi \else @@ -1116,7 +1116,7 @@ % \forgetall % should happen after \localwidth but before align % - \ifx\localformat\empty + \ifempty\localformat \setfalse\c_framed_has_format \else \settrue\c_framed_has_format @@ -1143,7 +1143,7 @@ % obey user set height, also downward compatible \else \edef\p_framed_lines{\framedparameter\c!lines}% - \ifx\p_framed_lines\empty + \ifempty\p_framed_lines \orelse\ifcase\p_framed_lines \else \d_framed_height\p_framed_lines\lineheight @@ -1226,7 +1226,7 @@ \fi \pack_framed_check_extra_offsets \edef\p_framed_background{\framedparameter\c!background}% -% \ifx\p_framed_background\empty +% \ifempty\p_framed_background % \let\pack_framed_forgetall\forgetall % \else % \let\pack_framed_forgetall\relax @@ -1235,7 +1235,7 @@ \edef\framedwidth {\the\ifdim\d_framed_width >\zeropoint \d_framed_width \else\zeropoint\fi}% public \edef\framedheight{\the\ifdim\d_framed_height>\zeropoint \d_framed_height\else\zeropoint\fi}% public \edef\framedoffset{\the\dimexpr\ifconditional\c_framed_has_offset\localoffset \else\zeropoint\fi}% public - \ifx\p_framed_orientation\empty + \ifempty\p_framed_orientation \let\pack_framed_stop_orientation\relax \else \pack_framed_start_orientation @@ -1419,7 +1419,7 @@ \def\doassigncheckedframeoffset#1#2% could be a fast \csname .. \endcsname {\edef\checkedframeoffset{#2}% #1% - \ifx\checkedframeoffset\empty \zeropoint\orelse + \ifempty\checkedframeoffset \zeropoint\orelse \ifx\checkedframeoffset\v!overlay\zeropoint\orelse \ifx\checkedframeoffset\v!none \zeropoint\orelse \ifx\checkedframeoffset\v!frame \zeropoint\orelse @@ -1493,7 +1493,7 @@ \ifconditional\c_framed_has_format %\ifconditional\c_framed_has_height \else % \edef\p_profile{\framedparameter\c!profile}% - % \ifx\p_profile\empty\else + % \ifempty\p_profile\else % \pack_framed_profile_box % \fi %\fi @@ -1512,7 +1512,7 @@ \fi \ifconditional\c_framed_has_height \else \edef\p_profile{\framedparameter\c!profile}% - \ifx\p_profile\empty\else + \ifempty\p_profile\else \pack_framed_profile_box \fi \fi @@ -1530,7 +1530,7 @@ \ht\b_framed_normal\d_framed_height \else \edef\p_framed_minheight{\framedparameter\c!minheight}% - \ifx\p_framed_minheight\empty \else + \ifempty\p_framed_minheight \else \ifdim\ht\b_framed_normal<\p_framed_minheight \ht\b_framed_normal\p_framed_minheight \fi @@ -1540,13 +1540,13 @@ \ifx\p_framed_empty\v!yes \pack_framed_fake_box \fi - \ifx\p_framed_anchoring\empty\else + \ifempty\p_framed_anchoring\else \pack_framed_handle_anchoring \fi \pack_framed_stop_orientation % moved here at 2014-05-25 \iftrialtypesetting \else \edef\m_overlay_region{\framedparameter\c!region}% - \ifx\m_overlay_region\empty\else + \ifempty\m_overlay_region\else \pack_framed_set_region \fi \fi @@ -1579,14 +1579,14 @@ \ifconditional\c_framed_has_frame % real or invisible frame \pack_framed_add_outline \fi - \ifx\p_framed_background\empty \else + \ifempty\p_framed_background \else \edef\p_framed_component{\framedparameter\c!component}% \pack_framed_add_background \fi \fi \pack_framed_locator_after\p_framed_location \iftrialtypesetting \else - \ifx\m_overlay_region\empty\else + \ifempty\m_overlay_region\else \pack_framed_add_region \fi \fi @@ -1630,8 +1630,8 @@ % using the keyword approachs works ok, don't mess with orientation % directly here using \boxorientation ... it doesn't work that well \s!orientation\scratchcounter - \ifx\p_xanchor\empty\else \s!xoffset \p_xanchor\fi - \ifx\p_yanchor\empty\else \s!yoffset \p_yanchor\fi + \ifempty\p_xanchor\else \s!xoffset \p_xanchor\fi + \ifempty\p_yanchor\else \s!yoffset \p_yanchor\fi {\box\b_framed_normal}}} \installcorenamespace{framedlocatorbefore} @@ -2172,10 +2172,10 @@ \def\pack_framed_set_foregroundcolor {\edef\p_framed_foregroundcolor{\framedparameter\c!foregroundcolor}% - \ifx\p_framed_foregroundcolor\empty\else\dousecolorparameter\p_framed_foregroundcolor\fi} + \ifempty\p_framed_foregroundcolor\else\dousecolorparameter\p_framed_foregroundcolor\fi} \def\pack_framed_do_setups - {\ifx\p_framed_setups\empty \else + {\ifempty\p_framed_setups \else \setups[\p_framed_setups]% \texsetup (or only one!) % \fastsetup\p_framed_setup % singular would have been better \fi} @@ -2197,6 +2197,7 @@ \bgroup \synchronizeinlinedirection \localbegstrut + %\aftergrouped{\localendstrut\pack_framed_do_bottom\egroup}% \aftergroup\localendstrut \aftergroup\pack_framed_do_bottom \aftergroup\egroup @@ -3083,7 +3084,7 @@ \immediateassignment\edef\tempstring{#1\c!bottomframe}\ifx\tempstring\v!on +\plusone\fi \immediateassignment\edef\tempstring{#1\c!leftframe }\ifx\tempstring\v!on +\plusone\fi \immediateassignment\edef\tempstring{#1\c!rightframe }\ifx\tempstring\v!on +\plusone\fi - \immediateassignment\edef\tempstring{#1\c!background }\ifx\tempstring\empty\else+\plusone\fi + \immediateassignment\edef\tempstring{#1\c!background }\ifempty\tempstring\else+\plusone\fi \relax\expandafter\secondoftwoarguments\else\expandafter\firstoftwoarguments\fi} \protect \endinput diff --git a/tex/context/base/mkiv/page-txt.mklx b/tex/context/base/mkiv/page-txt.mklx index b8184e443..ff582e561 100644 --- a/tex/context/base/mkiv/page-txt.mklx +++ b/tex/context/base/mkiv/page-txt.mklx @@ -88,7 +88,7 @@ \fi} \appendtoks - \ifx\currentlayoutelement\empty\else + \ifempty\currentlayoutelement\else \page_layouts_synchronize_element\currentlayoutelement % brr, can be vertical:horizontal \fi \to \everysetuplayoutelement @@ -251,7 +251,7 @@ \begincsname\??layouttextstrut\layoutelementparameter\c!strut\endcsname \ignorecrlf \edef\currentlayoutelementwidth{\layoutelementparameter#width}% - \ifx\currentlayoutelementwidth\empty\else + \ifempty\currentlayoutelementwidth\else \expandafter\page_layouts_process_element_limited \fi\p_text \endgroup} @@ -500,7 +500,7 @@ \def\page_layouts_left_edge_element_indeed#text#style#color#width% {\letfromlayoutelementparameter\p_text#text% - \ifx\p_text\empty + \ifempty\p_text \kern\leftedgewidth \else \hbox to \leftedgewidth\bgroup @@ -517,7 +517,7 @@ \def\page_layouts_right_edge_element_indeed#text#style#color#width% {\letfromlayoutelementparameter\p_text#text% - \ifx\p_text\empty + \ifempty\p_text \kern\rightedgewidth \else \hbox to \rightedgewidth\bgroup @@ -536,7 +536,7 @@ \def\page_layouts_left_margin_element_indeed#text#style#color#width#margintoo% {\letfromlayoutelementparameter\p_text#text% - \ifx\p_text\empty + \ifempty\p_text \kern\leftmarginwidth \else \hbox to \leftmarginwidth\bgroup @@ -546,7 +546,7 @@ \fi \ifcase#margintoo\or \letfromlayoutelementparameter\p_text\c!margintext - \ifx\p_text\empty\else + \ifempty\p_text\else \kern-\leftmarginwidth \hbox to \leftmarginwidth\bgroup \hss @@ -563,7 +563,7 @@ \def\page_layouts_right_margin_element_indeed#text#style#color#width#margintoo% {\letfromlayoutelementparameter\p_text#text% - \ifx\p_text\empty + \ifempty\p_text \kern\rightmarginwidth \else \hbox to \rightmarginwidth\bgroup @@ -573,7 +573,7 @@ \fi \ifcase#margintoo\or \letfromlayoutelementparameter\p_text\c!margintext - \ifx\p_text\empty\else + \ifempty\p_text\else \kern-\rightmarginwidth \hbox to \rightmarginwidth\bgroup \p_text % ? styling @@ -590,8 +590,8 @@ \def\page_layouts_text_body_element_indeed_l_m_r_e {\letfromlayoutelementparameter\p_text\c!lefttext - \ifx\p_text\empty - \ifx\page_layouts_place_extra_text_left\empty\else + \ifempty\p_text + \ifempty\page_layouts_place_extra_text_left\else \hbox to \makeupwidth\bgroup \page_layouts_place_extra_text_left \hss @@ -607,7 +607,7 @@ \kern-\makeupwidth \fi \letfromlayoutelementparameter\p_text\c!middletext - \ifx\p_text\empty\else + \ifempty\p_text\else \hbox to \makeupwidth\bgroup \hss \page_layouts_process_element_indeed\c!middlestyle\c!middlecolor\c!middlewidth @@ -616,7 +616,7 @@ \kern-\makeupwidth \fi \letfromlayoutelementparameter\p_text\c!righttext - \ifx\p_text\empty + \ifempty\p_text \kern\makeupwidth \else \hbox to \makeupwidth\bgroup @@ -627,7 +627,7 @@ \def\page_layouts_text_body_element_indeed_e_r_m_l {\letfromlayoutelementparameter\p_text\c!righttext - \ifx\p_text\empty\else + \ifempty\p_text\else \hbox to \makeupwidth\bgroup \page_layouts_process_element_indeed\c!rightstyle\c!rightcolor\c!rightwidth \hss @@ -635,7 +635,7 @@ \kern-\makeupwidth \fi \letfromlayoutelementparameter\p_text\c!middletext - \ifx\p_text\empty\else + \ifempty\p_text\else \hbox to \makeupwidth\bgroup \hss \page_layouts_process_element_indeed\c!middlestyle\c!middlecolor\c!middlewidth @@ -644,8 +644,8 @@ \kern-\makeupwidth \fi \letfromlayoutelementparameter\p_text\c!lefttext - \ifx\p_text\empty - \ifx\page_layouts_place_extra_text_right\empty + \ifempty\p_text + \ifempty\page_layouts_place_extra_text_right \kern\makeupwidth \else \hbox to \makeupwidth\bgroup @@ -824,7 +824,7 @@ \else \let\m_page_layouts_page_number_location\p_strc_pagenumbers_location \page_layouts_reset_page_number_location - \ifx\p_strc_pagenumbers_location\empty + \ifempty\p_strc_pagenumbers_location % set otherwise \orelse\ifx\p_strc_pagenumbers_location\v!none % set otherwise @@ -839,7 +839,7 @@ \setbox\scratchbox\hbox{\ignorespaces\layoutelementparameter\c!marginedgetext\removeunwantedspaces}% \ifzeropt\wd\scratchbox\else \edef\p_strc_pagenumbers_width{\directpagenumberingparameter\c!width}% - \ifx\p_strc_pagenumbers_width\empty + \ifempty\p_strc_pagenumbers_width \box\scratchbox\tfskip \else \hpack to \p_strc_pagenumbers_width{\box\scratchbox\hss}% @@ -852,7 +852,7 @@ \setbox\scratchbox\hbox{\ignorespaces\layoutelementparameter\c!marginedgetext\removeunwantedspaces}% \ifzeropt\wd\scratchbox\else \edef\p_strc_pagenumbers_width{\directpagenumberingparameter\c!width}% - \ifx\p_strc_pagenumbers_width\empty + \ifempty\p_strc_pagenumbers_width \tfskip\box\scratchbox \else \hpack to \p_strc_pagenumbers_width{\hss\box\scratchbox}% diff --git a/tex/context/base/mkiv/spac-hor.mkiv b/tex/context/base/mkiv/spac-hor.mkiv index 0f65eea33..5c7163822 100644 --- a/tex/context/base/mkiv/spac-hor.mkiv +++ b/tex/context/base/mkiv/spac-hor.mkiv @@ -210,12 +210,12 @@ %D Here come the handlers (still rather messy ... we need states). -\newif\ifindentation \indentationtrue % will become a mode +%newif\ifindentation \indentationtrue % will become a mode \let\checkindentation\relax \installmacrostack\checkindentation -\installmacrostack\ifindentation +%installmacrostack\ifindentation \def\spac_indentation_remove {\ifzeropt\parindent \else @@ -225,20 +225,20 @@ \fi} \def\spac_indentation_kill_indeed - {\global\indentationfalse + {%\global\indentationfalse \spac_indentation_remove} \def\spac_indentation_do_toggle_indeed - {\global\indentationfalse + {%\global\indentationfalse \glet\checkindentation\spac_indentation_no_toggle_indeed \spac_indentation_remove} \def\spac_indentation_no_toggle_indeed - {\global\indentationtrue + {%\global\indentationtrue \glet\checkindentation\spac_indentation_do_toggle_indeed} \def\spac_indentation_do_indeed - {\global\indentationtrue} + {}%\global\indentationtrue} \def\spac_indentation_do_toggle {\glet\checkindentation\spac_indentation_do_toggle_indeed} @@ -264,13 +264,13 @@ \def\spac_indentation_variant_no % made global {\ifinpagebody \else - \global\indentationfalse + %\global\indentationfalse \glet\checkindentation\spac_indentation_no_next_check \fi} \def\nonoindentation % bv bij floats {\ifinpagebody \else - \global\indentationtrue + %\global\indentationtrue \glet\checkindentation\spac_indentation_do_indeed \fi} diff --git a/tex/context/base/mkiv/spac-ver.mkiv b/tex/context/base/mkiv/spac-ver.mkiv index 6ed1847c5..e75ea4e1b 100644 --- a/tex/context/base/mkiv/spac-ver.mkiv +++ b/tex/context/base/mkiv/spac-ver.mkiv @@ -2655,6 +2655,8 @@ % test \par % test \par +% only main vertical list + \unexpanded\def\ignoreparskip{\c_spac_vspacing_ignore_parskip\plusone} \protect \endinput diff --git a/tex/context/base/mkiv/spac-ver.mkxl b/tex/context/base/mkiv/spac-ver.mkxl index 0151fe311..f719e1f09 100644 --- a/tex/context/base/mkiv/spac-ver.mkxl +++ b/tex/context/base/mkiv/spac-ver.mkxl @@ -88,7 +88,7 @@ {\edef\normallineheight{\interlinespaceparameter\c!line}% \iflocalinterlinespace \else \edef\m_spac_normallineheight{\bodyfontinterlinespace}% - \ifx\m_spac_normallineheight\empty \else + \ifempty\m_spac_normallineheight \else \let\normallineheight\m_spac_normallineheight \fi \fi} @@ -144,7 +144,7 @@ \fi} \def\spac_linespacing_set_relative_interlinespace - {\ifx\currentrelativeinterlinespace\empty\else + {\ifempty\currentrelativeinterlinespace\else \spacing\currentrelativeinterlinespace \fi} @@ -158,7 +158,7 @@ \unexpanded\def\useinterlinespaceparameter#1% see footnotes {\edef\m_spac_interlinespace{#1\c!interlinespace}% - \ifx\m_spac_interlinespace\empty \else + \ifempty\m_spac_interlinespace \else \spac_linespacing_setup_use \fi} @@ -210,7 +210,7 @@ \unexpanded\def\dosetupcheckedinterlinespace#1% often a chain {\edef\p_spac_checked_interlinespace{#1}% - \ifx\p_spac_checked_interlinespace\empty + \ifempty\p_spac_checked_interlinespace \spac_linespacing_synchronize_local \orelse\ifcsname\namedinterlinespacehash\p_spac_checked_interlinespace\s!parent\endcsname % we could have a \s!check \push_macro_currentinterlinespace @@ -373,7 +373,7 @@ \def\spac_whitespace_setup_yes[#1]% {\edef\m_spac_whitespace_asked{#1}% - \ifx\m_spac_whitespace_asked\empty + \ifempty\m_spac_whitespace_asked \spac_whitespace_setup_nop \else \let\v_spac_whitespace_current\m_spac_whitespace_asked @@ -1524,7 +1524,7 @@ \def\spac_grids_expand_snapper#1% {\edef\m_spac_snapper - {\ifx\m_spac_snapper\empty\else\m_spac_snapper,\fi + {\ifempty\m_spac_snapper\else\m_spac_snapper,\fi \ifcsname\??gridsnappersets#1\endcsname \lastnamedcs\else#1% \fi}} @@ -1546,7 +1546,7 @@ \unexpanded\def\usegridparameter#1% no checking here {\edef\m_spac_grid_asked{#1\c!grid}% - \ifx\m_spac_grid_asked\empty + \ifempty\m_spac_grid_asked \attribute \snapvboxattribute\attributeunsetvalue \else \spac_grids_snap_value_set\m_spac_grid_asked @@ -1742,7 +1742,7 @@ \spac_grids_check_nop \orelse\ifx\askedgridmode\v!off % for taco and luigi \spac_grids_check_nop - \orelse\ifx\askedgridmode\empty % to be sure + \orelse\ifempty\askedgridmode % to be sure \spac_grids_check_nop \else \spac_grids_check_yes @@ -1753,12 +1753,12 @@ \unexpanded\def\checkgridmethod#1% {\edef\p_grid{#1}% - \ifx\p_grid\empty + \ifempty\p_grid \let\checkedgridmethod\empty \let\checkedgridscope \v!local \else \splitatcolon\p_grid\checkedgridscope\checkedgridmethod - \ifx\checkedgridmethod\empty + \ifempty\checkedgridmethod \ifx\checkedgridscope\v!local\orelse\ifx\checkedgridscope\v!global\else \let\checkedgridmethod\checkedgridscope \let\checkedgridscope \v!local @@ -1769,7 +1769,7 @@ \unexpanded\def\applygridmethod#1#2#3% content localsettings (used in head rendering) {\checkgridmethod{#1}% \ifx\checkedgridscope\v!global - \ifx\checkedgridmethod\empty \else + \ifempty\checkedgridmethod \else % we assume that the call is grouped because grouping here has the side % effect that the eventually constructed line will get the value outside % the group @@ -1784,7 +1784,7 @@ % we really need that in this case (compatibility etc etc) so here we don't % het an already done hit (otherwise we would not snap) \hbox\bgroup - \ifx\checkedgridmethod\empty\orelse\ifconditional\headisdisplay + \ifempty\checkedgridmethod\orelse\ifconditional\headisdisplay #2% \fi \snaptogrid[\checkedgridmethod]\hbox{#3}% @@ -2165,7 +2165,7 @@ \unexpanded\def\useblankparameter#1% faster local variant {\edef\m_spac_blank_asked{#1\c!blank}% - \ifx\m_spac_blank_asked\empty\else + \ifempty\m_spac_blank_asked\else \directvspacing\m_spac_blank_asked \fi} @@ -2200,7 +2200,7 @@ } \def\setupvspacing_nop - {\ifx\empty\currentvspacing % mistakenly had an \else + {\ifempty\currentvspacing % mistakenly had an \else \let\currentvspacing\s!default \fi \spac_whitespace_setup_nop} @@ -2426,7 +2426,7 @@ {\let\m_spac_hanging_location\empty \setupcurrenthanging[#1]}% {\edef\m_spac_hanging_location{#1}}% - \ifx\m_spac_hanging_location\empty + \ifempty\m_spac_hanging_location \edef\m_spac_hanging_location{\directhangingparameter\c!location}% \fi \dowithnextboxcs\spac_hanging_finish\hbox} @@ -2552,7 +2552,7 @@ \unexpanded\def\checkedblank[#1]% {\edef\p_blank{#1}% - \ifx\p_blank\empty + \ifempty\p_blank % ignore \orelse\ifx\p_blank\v!none % ignore @@ -2569,7 +2569,7 @@ \unexpanded\def\prerollblank[#1]% {\begingroup \edef\p_blank{#1}% - \ifx\p_blank\empty + \ifempty\p_blank \global\prerolledblank\zeropoint \orelse\ifx\p_blank\v!none \global\prerolledblank\zeropoint diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf index fe106c62b..d153ea9cd 100644 Binary files a/tex/context/base/mkiv/status-files.pdf and b/tex/context/base/mkiv/status-files.pdf differ diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf index 551550e7d..eb92931f3 100644 Binary files a/tex/context/base/mkiv/status-lua.pdf and b/tex/context/base/mkiv/status-lua.pdf differ diff --git a/tex/context/base/mkiv/strc-itm.mklx b/tex/context/base/mkiv/strc-itm.mklx index 60fe3ee74..2f3cc8425 100644 --- a/tex/context/base/mkiv/strc-itm.mklx +++ b/tex/context/base/mkiv/strc-itm.mklx @@ -248,12 +248,12 @@ % todo: \dodosetreference -> \strc_counters_register_component (to be checked) \def\strc_itemgroups_insert_reference % we will make a decent number helper - {\iftrialtypesetting \orelse \ifx\currentitemreference \empty \else + {\iftrialtypesetting \orelse \ifempty\currentitemreference \else \strc_itemgroups_insert_reference_indeed \fi} \def\strc_itemgroups_insert_extra_reference - {\iftrialtypesetting \orelse \ifx\currentitemreference \empty \else + {\iftrialtypesetting \orelse \ifempty\currentitemreference \else \normalexpanded{\textreference[\currentitemreference]{\strc_itemgroups_extra_symbol}}% \fi} @@ -396,9 +396,9 @@ \def\strc_itemgroups_process_option#option% {\edef\itemgroupconstantvalue{#option}% - \ifx\itemgroupconstantvalue\empty\else + \ifempty\itemgroupconstantvalue\else \splitatasterisk\itemgroupconstantvalue\itemgroupfirst\itemgroupsecond - \ifx\itemgroupsecond\empty + \ifempty\itemgroupsecond \let\itemgroupsecond\itemgroupfirst \let\itemgroupfirst\!!plusone \fi @@ -424,7 +424,7 @@ \setvalue{\??itemgroupkeyword\v!unpacked }{\strc_itemgroups_process_set_option_unpack} \setvalue{\??itemgroupkeyword\v!intro }{\settrue\c_strc_itemgroups_intro} % here? not set to false \setvalue{\??itemgroupkeyword\v!autointro }{\settrue\c_strc_itemgroups_auto_intro} -\setvalue{\??itemgroupkeyword\v!broad }{\ifx\itemgroupfirst\empty +\setvalue{\??itemgroupkeyword\v!broad }{\ifempty\itemgroupfirst \let\itemgroupfirst\!!plusone \fi \letitemgroupparameter\c!factor\itemgroupfirst} @@ -450,7 +450,7 @@ \setvalue{\??itemgroupkeyword\v!joinedup }{\settrue\c_strc_itemgroups_joined \strc_itemgroups_process_set_option_pack} \setvalue{\??itemgroupkeyword\v!notjoinedup}{\setfalse\c_strc_itemgroups_joined} -\setvalue{\??itemgroupkeyword\v!serried }{\edef\itemgroupfirst{-\ifx\itemgroupfirst\empty1\else\itemgroupfirst\fi}% +\setvalue{\??itemgroupkeyword\v!serried }{\edef\itemgroupfirst{-\ifempty\itemgroupfirst1\else\itemgroupfirst\fi}% \letitemgroupparameter\c!factor\itemgroupfirst} \setvalue{\??itemgroupkeyword\v!stopper }{\letitemgroupparameter\c!placestopper\v!yes} % keep {} \setvalue{\??itemgroupkeyword\v!nostopper }{\letitemgroupparameter\c!placestopper\v!no} % keep {} @@ -658,7 +658,7 @@ \def\strc_itemgroups_increment_item_counter {\ifconditional\c_strc_itemgroups_sub \else - \ifconditional\c_strc_itemgroups_symbol \else % \ifx\strc_itemgroups_extra_symbol\empty + \ifconditional\c_strc_itemgroups_symbol \else % \ifempty\strc_itemgroups_extra_symbol \strc_counters_increment_sub\v_strc_itemgroups_counter\currentitemlevel \fi \fi} @@ -733,7 +733,7 @@ \def\strc_itemgroups_set_symbol#symbol% {\edef\strc_itemgroups_tmp_symbol{#symbol}% - \ifx\strc_itemgroups_tmp_symbol\empty \else + \ifempty\strc_itemgroups_tmp_symbol \else \doifelsesymboldefined\strc_itemgroups_tmp_symbol \strc_itemgroups_set_symbol_symbol {\doifelseconversiondefined\strc_itemgroups_tmp_symbol @@ -813,9 +813,9 @@ \def\strc_itemgroups_start_indeed[#options][#settings]% {\edef\itemgroupoptions{\itemgroupparameter\c!option}% \edef\itemgroupextraoptions{#options}% - \ifx\itemgroupoptions\empty + \ifempty\itemgroupoptions \let\itemgroupoptions\itemgroupextraoptions - \orelse\ifx\itemgroupextraoptions\empty + \orelse\ifempty\itemgroupextraoptions % ok \else \edef\itemgroupoptions{\itemgroupoptions,\itemgroupextraoptions}% @@ -844,7 +844,7 @@ \fi \c_strc_itemgroups_n_of_items\zerocount \strc_itemgroups_check_n_of_items - \ifx\itemgroupoptions\empty + \ifempty\itemgroupoptions \strc_itemgroups_setup_symbol_default \strc_itemgroups_reset_continue_state \setupcurrentitemgroup[#settings]% @@ -896,9 +896,9 @@ \strc_counters_restart_sub\v_strc_itemgroups_counter\currentitemlevel{\numexpr\itemgroupparameter\c!start-\plusone\relax}% \fi \fi - \ifx\strc_itemgroups_used_symbol\empty + \ifempty\strc_itemgroups_used_symbol \strc_itemgroups_set_symbol\strc_itemgroups_asked_symbol % ** default value - \ifx\strc_itemgroups_used_symbol\empty + \ifempty\strc_itemgroups_used_symbol \let\currentitemgroupsymbol\currentitemlevel % ** fall back \fi \fi @@ -932,7 +932,7 @@ \advance\leftskip\d_strc_itemgroups_list_width\relax \fi \fi - \ifx\m_strc_itemgroups_repeat_start\empty + \ifempty\m_strc_itemgroups_repeat_start \let\currentitemgroupconversionset \currentitemgroupsymbol \edef\currentitemgroupsegments {\currentitemlevel}% \else @@ -1453,13 +1453,13 @@ {\box\b_strc_itemgroups\hskip\itemgroupparameter\c!distance}}} \def\strc_itemgroups_make_destination_box - {\iftrialtypesetting \orelse \ifx\m_strc_itemgroups_destination\empty \else + {\iftrialtypesetting \orelse \ifempty\m_strc_itemgroups_destination \else \setbox\b_strc_itemgroups\hbox{\directgotobox{\box\b_strc_itemgroups}[\m_strc_itemgroups_destination]}% \fi} \def\strc_itemgroups_check_indenting {\setfalse\c_strc_itemgroups_indented_first - \ifx\m_strc_itemgroups_indenting\empty \else + \ifempty\m_strc_itemgroups_indenting \else \normalexpanded{\setupindenting[\v!reset,\v!yes,\m_strc_itemgroups_indenting]}% \ifconditional\c_spac_indentation_indent_first % better is to have a mode \doifnot{\itemgroupparameter\c!alignsymbol}\v!yes @@ -1469,7 +1469,7 @@ \def\strc_itemgroups_check_for_repeated {\ifconditional\c_strc_itemgroups_repeat - \ifx\m_strc_itemgroups_repeat_start\empty + \ifempty\m_strc_itemgroups_repeat_start \edef\m_strc_itemgroups_repeat_start{\currentitemlevel}% \fi \else @@ -1546,7 +1546,7 @@ \unexpanded\def\strc_itemgroups_set_text_item_distance {\edef\m_strc_itemgroups_text_distance{\itemgroupparameter\c!textdistance}% - \ifx\m_strc_itemgroups_text_distance\empty + \ifempty\m_strc_itemgroups_text_distance % \orelse\ifcsname\??itemgroupdistance\m_strc_itemgroups_text_distance\endcsname \lastnamedcs diff --git a/tex/context/base/mkiv/supp-box.mkxl b/tex/context/base/mkiv/supp-box.mkxl index 912eefc63..454e1fab7 100644 --- a/tex/context/base/mkiv/supp-box.mkxl +++ b/tex/context/base/mkiv/supp-box.mkxl @@ -1252,7 +1252,7 @@ % % \unexpanded\def\limitatetext#1#2#3% \expanded added 2003/01/16 % {\splitatcomma{#2}\leftlimit\rightlimit -% \ifx\rightlimit\empty +% \ifempty\rightlimit % \normallimitatetext {#1}\leftlimit {#3}% % \else % \speciallimitatetext{#1}\leftlimit\rightlimit{#3}% @@ -1262,7 +1262,7 @@ {\splitatcomma{#2}\leftlimit\rightlimit \limitated left \leftlimit - \ifx\rightlimit\empty\else + \ifempty\rightlimit\else right \rightlimit \fi strip true diff --git a/tex/context/base/mkiv/syst-aux.lua b/tex/context/base/mkiv/syst-aux.lua index e28e23be0..09232488d 100644 --- a/tex/context/base/mkiv/syst-aux.lua +++ b/tex/context/base/mkiv/syst-aux.lua @@ -409,7 +409,12 @@ implement { arguments = "integer", actions = function(n) statistics.stoptiming("whatever") - context("%0.9f",statistics.elapsed("whatever")/(n > 0 and n or 1)) + local t = statistics.elapsed("whatever")/(n > 0 and n or 1) + if t > 0 then + context("%0.9f",t) + else + context(0) + end end } @@ -835,3 +840,99 @@ implement { public = true, actions = function() getshape("widowpenalties") end, } + +if CONTEXTLMTXMODE > 0 then + + -- This is kind of tricky and might not work for all csnames but as long as we use + -- it in a controlled way, we're okay. The engine implementation might be changed + -- a bit (no need to go through strings, but fetching a cs index and passing that + -- back also takes time). + + -- Another approach is to have the predefined stack operate use private stacks and + -- then the pop doesn't need the cs. But ... we then also need to store stuff in + -- the format so that complicates maters more than I'm willing to do. + + local insert, remove = table.insert, table.remove + + local push_macro = token.push_macro + local pop_macro = token.pop_macro + local scan_csname = token.scan_csname + + local stack = table.setmetatableindex("table") + + local report = logs.reporter("system","macrostack") + + local function pushmacro(name,global) + local s = push_macro(name,global) + if s then + insert(stack[name],s) + else + report("no macro %a",name) + insert(stack[name],false) + end + end + + local function popmacro(name) + local s = remove(stack[name]) + if s then + pop_macro(s) + else + -- error + end + end + + tokens.pushmacro = pushmacro + tokens.popmacro = popmacro + + interfaces.implement { + name = "localpushmacro", + public = true, + protected = true, + actions = function() + pushmacro(scan_csname()) + end + } + + interfaces.implement { + name = "globalpushmacro", + public = true, + protected = true, + actions = function() + pushmacro(scan_csname(),true) + end + } + + interfaces.implement { + name = "localpopmacro", + public = true, + protected = true, + actions = function() + popmacro(scan_csname()) + end + } + + interfaces.implement { + name = "globalpopmacro", + public = true, + protected = true, + actions = function() + popmacro(scan_csname()) + end + } + + interfaces.implement { + name = "showmacrostack", + public = true, + protected = true, + actions = function() + local n = scan_csname() + local s = stack[n] + local m = #s + report("%s : %i stack slots used",n,m) + for i=1,m do + report("% 3i %S",i,s[i]) + end + end + } + +end diff --git a/tex/context/base/mkiv/syst-aux.mkxl b/tex/context/base/mkiv/syst-aux.mkxl index be48007c9..1506e26b1 100644 --- a/tex/context/base/mkiv/syst-aux.mkxl +++ b/tex/context/base/mkiv/syst-aux.mkxl @@ -194,22 +194,38 @@ %D The next set of macros just do nothing, except that they get rid of a number of %D arguments. -\def\gobbleoneargument #1{} -\def\gobbletwoarguments #1#2{} -\def\gobblethreearguments#1#2#3{} -\def\gobblefourarguments #1#2#3#4{} -\def\gobblefivearguments #1#2#3#4#5{} -\def\gobblesixarguments #1#2#3#4#5#6{} -\def\gobblesevenarguments#1#2#3#4#5#6#7{} -\def\gobbleeightarguments#1#2#3#4#5#6#7#8{} -\def\gobbleninearguments #1#2#3#4#5#6#7#8#9{} -\def\gobbletenarguments #1{\gobbleninearguments} - -\def\gobbleoneoptional [#1]{} -\def\gobbletwooptionals [#1][#2]{} -\def\gobblethreeoptionals[#1][#2][#3]{} -\def\gobblefouroptionals [#1][#2][#3][#4]{} -\def\gobblefiveoptionals [#1][#2][#3][#4][#5]{} +% \def\gobbleoneargument #1{} +% \def\gobbletwoarguments #1#2{} +% \def\gobblethreearguments#1#2#3{} +% \def\gobblefourarguments #1#2#3#4{} +% \def\gobblefivearguments #1#2#3#4#5{} +% \def\gobblesixarguments #1#2#3#4#5#6{} +% \def\gobblesevenarguments#1#2#3#4#5#6#7{} +% \def\gobbleeightarguments#1#2#3#4#5#6#7#8{} +% \def\gobbleninearguments #1#2#3#4#5#6#7#8#9{} +% \def\gobbletenarguments #1{\gobbleninearguments} + +% \def\gobbleoneoptional [#1]{} +% \def\gobbletwooptionals [#1][#2]{} +% \def\gobblethreeoptionals[#1][#2][#3]{} +% \def\gobblefouroptionals [#1][#2][#3][#4]{} +% \def\gobblefiveoptionals [#1][#2][#3][#4][#5]{} + +\def\gobbleoneargument #0{} +\def\gobbletwoarguments #0#0{} +\def\gobblethreearguments #0#0#0{} +\def\gobblefourarguments #0#0#0#0{} +\def\gobblefivearguments #0#0#0#0{} +\def\gobblesixarguments #0#0#0#0{} +\def\gobblesevenarguments #0#0#0#0#0{} +\def\gobbleeightarguments #0#0#0#0#0#0{} +\def\gobbleninearguments #0#0#0#0#0#0#0{} + +\def\gobbleoneoptional [#0]{} +\def\gobbletwooptionals [#0][#0]{} +\def\gobblethreeoptionals[#0][#0][#0]{} +\def\gobblefouroptionals [#0][#0][#0][#0]{} +\def\gobblefiveoptionals [#0][#0][#0][#0][#0]{} %D Reserved macros for tests: @@ -667,7 +683,7 @@ \unexpanded\def\doifelseempty#1% {\def\m_syst_string_one{#1}% - \ifx\m_syst_string_one\empty + \ifempty\m_syst_string_one \expandafter\firstoftwoarguments \else \expandafter\secondoftwoarguments @@ -677,7 +693,7 @@ \unexpanded\def\doifempty#1% {\def\m_syst_string_one{#1}% - \ifx\m_syst_string_one\empty + \ifempty\m_syst_string_one \expandafter\firstofoneargument \else \expandafter\gobbleoneargument @@ -685,7 +701,7 @@ \unexpanded\def\doifnotempty#1% {\def\m_syst_string_one{#1}% - \ifx\m_syst_string_one\empty + \ifempty\m_syst_string_one \expandafter\gobbleoneargument \else \expandafter\firstofoneargument @@ -1017,7 +1033,7 @@ \unexpanded\def\processaction[#1]#2[% {\edef\m_syst_string_one{#1}% - \ifx\m_syst_string_one\empty + \ifempty\m_syst_string_one \let\syst_helpers_do_compare_process_action\syst_helpers_do_compare_process_action_a \else \let\syst_helpers_do_compare_process_action\syst_helpers_do_compare_process_action_b @@ -1042,7 +1058,7 @@ \unexpanded\def\processfirstactioninset[#1]% {\edef\m_syst_string_one{#1}% - \ifx\m_syst_string_one\empty + \ifempty\m_syst_string_one \expandafter\processaction \else \expandafter\syst_helpers_process_first_action_in_set_indeed @@ -1077,7 +1093,7 @@ \unexpanded\def\processallactionsinset[#1]% {\edef\m_syst_string_one{#1}% - \ifx\m_syst_string_one\empty + \ifempty\m_syst_string_one \expandafter\processaction \else \expandafter\syst_helpers_process_all_actions_in_set_indeed @@ -1140,7 +1156,7 @@ \unexpanded\def\doifelseinstring#1% {\edef\m_syst_sub_string{#1}% expand #1 here - \ifx\m_syst_sub_string\empty + \ifempty\m_syst_sub_string \expandafter\thirdofthreearguments \else \expandafter\syst_helpers_do_if_in_string_else_indeed @@ -1157,7 +1173,7 @@ \unexpanded\def\doifinstring#1%% {\edef\m_syst_sub_string{#1}% expand #1 here - \ifx\m_syst_sub_string\empty + \ifempty\m_syst_sub_string \expandafter\gobbletwoarguments \else \expandafter\syst_helpers_do_if_in_string_indeed @@ -1172,7 +1188,7 @@ \unexpanded\def\doifnotinstring#1%% {\edef\m_syst_sub_string{#1}% expand #1 here - \ifx\m_syst_sub_string\empty + \ifempty\m_syst_sub_string \expandafter\gobbletwoarguments \else \expandafter\syst_helpers_do_if_not_in_string_indeed @@ -1296,7 +1312,7 @@ \unexpanded\def\makerawcommalist[#1]#2% use \processnext ... here {\def\syst_helpers_do_make_raw_comma_list##1% we don't expand ##1 - {\ifx#2\empty + {\ifempty#2% \def#2{##1}% \else \expandafter\def\expandafter#2\expandafter{#2,##1}% @@ -1385,7 +1401,7 @@ {\edef\m_syst_string_one{#1}% \edef\m_syst_string_two{undefined}% better \!!undefined \let\m_syst_helpers_process_action\m_syst_string_two - \ifx\m_syst_string_one\empty + \ifempty\m_syst_string_one \expandafter\syst_helpers_do_raw_process_action\expandafter[\s!default][#3]% \else \expandafter\syst_helpers_do_raw_process_action\expandafter[\m_syst_string_one][#3]% @@ -2607,41 +2623,77 @@ %D The next six macros (dedicated to Taco) can conveniently used to select %D arguments. Their names explain their functionality. +% \def\firstofoneargument #1{#1} +% +% \def\firstoftwoarguments #1#2{#1} +% \def\secondoftwoarguments #1#2{#2} +% +% \def\firstofthreearguments #1#2#3{#1} +% \def\secondofthreearguments #1#2#3{#2} +% \def\thirdofthreearguments #1#2#3{#3} +% +% \def\firstoffourarguments #1#2#3#4{#1} +% \def\secondoffourarguments #1#2#3#4{#2} +% \def\thirdoffourarguments #1#2#3#4{#3} +% \def\fourthoffourarguments #1#2#3#4{#4} +% +% \def\firstoffivearguments #1#2#3#4#5{#1} +% \def\secondoffivearguments #1#2#3#4#5{#2} +% \def\thirdoffivearguments #1#2#3#4#5{#3} +% \def\fourthoffivearguments #1#2#3#4#5{#4} +% \def\fifthoffivearguments #1#2#3#4#5{#5} +% +% \def\firstofsixarguments #1#2#3#4#5#6{#1} +% \def\secondofsixarguments#1#2#3#4#5#6{#2} +% \def\thirdofsixarguments #1#2#3#4#5#6{#3} +% \def\fourthofsixarguments#1#2#3#4#5#6{#4} +% \def\fifthofsixarguments #1#2#3#4#5#6{#5} +% \def\sixthofsixarguments #1#2#3#4#5#6{#6} + \def\firstofoneargument #1{#1} -\def\firstoftwoarguments #1#2{#1} -\def\secondoftwoarguments #1#2{#2} +\def\firstoftwoarguments #1#0{#1} +\def\secondoftwoarguments #0#2{#2} -\def\firstofthreearguments #1#2#3{#1} -\def\secondofthreearguments #1#2#3{#2} -\def\thirdofthreearguments #1#2#3{#3} +\def\firstofthreearguments #1#0#0{#1} +\def\secondofthreearguments #0#2#0{#2} +\def\thirdofthreearguments #0#0#3{#3} -\def\firstoffourarguments #1#2#3#4{#1} -\def\secondoffourarguments #1#2#3#4{#2} -\def\thirdoffourarguments #1#2#3#4{#3} -\def\fourthoffourarguments #1#2#3#4{#4} +\def\firstoffourarguments #1#0#0#0{#1} +\def\secondoffourarguments #0#2#0#0{#2} +\def\thirdoffourarguments #0#0#3#0{#3} +\def\fourthoffourarguments #0#0#0#4{#4} -\def\firstoffivearguments #1#2#3#4#5{#1} -\def\secondoffivearguments #1#2#3#4#5{#2} -\def\thirdoffivearguments #1#2#3#4#5{#3} -\def\fourthoffivearguments #1#2#3#4#5{#4} -\def\fifthoffivearguments #1#2#3#4#5{#5} +\def\firstoffivearguments #1#0#0#0#0{#1} +\def\secondoffivearguments #0#2#0#0#0{#2} +\def\thirdoffivearguments #0#0#3#0#0{#3} +\def\fourthoffivearguments #0#0#0#4#0{#4} +\def\fifthoffivearguments #0#0#0#0#5{#5} -\def\firstofsixarguments #1#2#3#4#5#6{#1} -\def\secondofsixarguments#1#2#3#4#5#6{#2} -\def\thirdofsixarguments #1#2#3#4#5#6{#3} -\def\fourthofsixarguments#1#2#3#4#5#6{#4} -\def\fifthofsixarguments #1#2#3#4#5#6{#5} -\def\sixthofsixarguments #1#2#3#4#5#6{#6} +\def\firstofsixarguments #1#0#0#0#0#0{#1} +\def\secondofsixarguments#0#2#0#0#0#0{#2} +\def\thirdofsixarguments #0#0#3#0#0#0{#3} +\def\fourthofsixarguments#0#0#0#4#0#0{#4} +\def\fifthofsixarguments #0#0#0#0#5#0{#5} +\def\sixthofsixarguments #0#0#0#0#0#6{#6} + +% \unexpanded\def\firstofoneunexpanded #1{#1} +% +% \unexpanded\def\firstoftwounexpanded #1#2{#1} +% \unexpanded\def\secondoftwounexpanded #1#2{#2} +% +% \unexpanded\def\firstofthreeunexpanded #1#2#3{#1} +% \unexpanded\def\secondofthreeunexpanded#1#2#3{#2} +% \unexpanded\def\thirdofthreeunexpanded #1#2#3{#3} \unexpanded\def\firstofoneunexpanded #1{#1} -\unexpanded\def\firstoftwounexpanded #1#2{#1} -\unexpanded\def\secondoftwounexpanded #1#2{#2} +\unexpanded\def\firstoftwounexpanded #1#0{#1} +\unexpanded\def\secondoftwounexpanded #0#2{#2} -\unexpanded\def\firstofthreeunexpanded #1#2#3{#1} -\unexpanded\def\secondofthreeunexpanded#1#2#3{#2} -\unexpanded\def\thirdofthreeunexpanded #1#2#3{#3} +\unexpanded\def\firstofthreeunexpanded #1#0#0{#1} +\unexpanded\def\secondofthreeunexpanded#0#2#0{#2} +\unexpanded\def\thirdofthreeunexpanded #0#0#3{#3} %D \macros %D {globalletempty,letempty, @@ -4414,7 +4466,7 @@ \unexpanded\def\removetoks#1\from#2% {\def\syst_helpers_remove_toks##1#1##2\empty\empty\empty##3^^^^0004% {\def\m_syst_string_one{##3}% - \ifx\m_syst_string_one\empty#2{##1}\else#2{##1##2}\fi}% + \ifempty\m_syst_string_one#2{##1}\else#2{##1##2}\fi}% \expandafter\syst_helpers_remove_toks\the#2\empty\empty\empty#1\empty\empty\empty^^^^0004} %D Also: @@ -4481,7 +4533,7 @@ {\def\syst_helpers_split_string##1#2##2\empty\empty\empty##3\\% {\def#3{##1}% \def\syst_helpers_split_string{##3}% - \ifx\syst_helpers_split_string\empty + \ifempty\syst_helpers_split_string \let#4\empty \else \def#4{##2}% @@ -4495,7 +4547,7 @@ \let#4\empty \doloop {\expandafter\splitstring\asciib\at#2\to\asciia\and\asciib - \ifx\asciib\empty + \ifempty\asciib \exitloop \else % not \edef#3{\ifx#3\empty\else#3#2\fi\asciia} else @@ -4503,7 +4555,7 @@ \edef#3{\ifcase\recurselevel\or\else#3#2\fi\asciia}% \let#4\asciib \fi}% - \ifx#3\empty\let#3\asciic\fi} + \ifempty#3\let#3\asciic\fi} %D \macros %D {beforetestandsplitstring, @@ -4512,17 +4564,17 @@ \unexpanded\def\beforetestandsplitstring#1\at#2\to#3% {\def\syst_helpers_split_string##1#2##2#2##3##4\\% - {\ifx##3\empty\let#3\empty\else\def#3{##1}\fi}% + {\ifempty##3\let#3\empty\else\def#3{##1}\fi}% \expandafter\syst_helpers_split_string#1#2#2\empty\\} \unexpanded\def\aftertestandsplitstring#1\at#2\to#3% {\def\syst_helpers_split_string ##1#2##2@@@##3##4\\% - {\ifx##3\empty\let#3\empty\else\def#3{##2}\fi}% + {\ifempty##3\let#3\empty\else\def#3{##2}\fi}% \expandafter\syst_helpers_split_string #1@@@#2@@@\empty\\} \def\testandsplitstring#1\at#2\to#3\and#4% {\def\syst_helpers_split_string##1#2##2#2##3##4\\% - {\ifx##3\empty\let#3\empty\let#4\empty\else\def#3{##1}\def#4{##2}\fi}% + {\ifempty##3\let#3\empty\let#4\empty\else\def#3{##1}\def#4{##2}\fi}% \expandafter\syst_helpers_split_string#1#2#2\empty\\} %D \macros @@ -4613,18 +4665,18 @@ %D The faster alternatives are: \unexpanded\def\appendtocommalist#1#2% - {\dodoglobal\edef#2{\ifx#2\empty\else#2,\fi#1}} + {\dodoglobal\edef#2{\ifempty#2\else#2,\fi#1}} \unexpanded\def\prependtocommalist#1#2% - {\dodoglobal\edef#2{#1\ifx#2\empty\else,#2\fi}} + {\dodoglobal\edef#2{#1\ifempty#2\else,#2\fi}} \unexpanded\def\addtocommalist#1#2% {item} \cs {\rawdoifelseinset{#1}#2\resetglobal - {\dodoglobal\edef#2{\ifx#2\empty\else#2,\fi#1}}} + {\dodoglobal\edef#2{\ifempty#2\else#2,\fi#1}}} \unexpanded\def\pretocommalist#1#2% {item} \cs {\rawdoifelseinset{#1}#2\resetglobal - {\dodoglobal\edef#2{#1\ifx#2\empty\else,#2\fi}}} + {\dodoglobal\edef#2{#1\ifempty#2\else,#2\fi}}} \unexpanded\def\robustdoifelseinset#1#2% {\edef\m_syst_string_one{\detokenize\expandafter{\normalexpanded{#1}}}% @@ -4635,11 +4687,11 @@ \unexpanded\def\robustaddtocommalist#1#2% {item} \cs {\robustdoifelseinset{#1}#2\resetglobal - {\dodoglobal\edef#2{\ifx#2\empty\else#2,\fi#1}}} + {\dodoglobal\edef#2{\ifempty#2\else#2,\fi#1}}} \unexpanded\def\robustpretocommalist#1#2% {item} \cs {\robustdoifelseinset{#1}#2\resetglobal - {\dodoglobal\edef#2{#1\ifx#2\empty\else,#2\fi}}} + {\dodoglobal\edef#2{#1\ifempty#2\else,#2\fi}}} \unexpanded\def\xsplitstring#1#2% \cs {str} {\def\syst_helpers_split_string##1,#2,##2,#2,##3\\% @@ -4655,10 +4707,10 @@ {\rawdoifelseinset{#1}#2% {\normalexpanded{\xsplitstring\noexpand#2{#1}}% \dodoglobal\edef#2% - {\ifx\m_syst_string_one\empty + {\ifempty\m_syst_string_one \m_syst_string_two \else - \m_syst_string_one\ifx\m_syst_string_two\empty\else,\m_syst_string_two\fi + \m_syst_string_one\ifempty\m_syst_string_two\else,\m_syst_string_two\fi \fi}} \resetglobal} @@ -4674,11 +4726,11 @@ \def\syst_helpers_substitute_in_comma_list_step#1% {\edef\m_syst_string_three{#1}% \ifx\m_syst_string_one\m_syst_string_three - \ifx\m_syst_string_two\empty \else - \edef\m_syst_string_four{\ifx\m_syst_string_four\empty\else\m_syst_string_four,\fi\m_syst_string_two}% + \ifempty\m_syst_string_two \else + \edef\m_syst_string_four{\ifempty\m_syst_string_four\else\m_syst_string_four,\fi\m_syst_string_two}% \fi \else - \edef\m_syst_string_four{\ifx\m_syst_string_four\empty\else\m_syst_string_four,\fi#1}% + \edef\m_syst_string_four{\ifempty\m_syst_string_four\else\m_syst_string_four,\fi#1}% \fi} \unexpanded\def\substituteincommalist#1#2#3% old, new, list (slooow) @@ -4717,8 +4769,8 @@ \def\syst_helpers_replace_in_comma_list_step#1% {\ifnum\commalistcounter=\c_syst_helpers_comma_list_index\relax - \ifx\newcommalistelement\empty\else - \ifx\m_syst_helpers_comma_list_target\empty + \ifempty\newcommalistelement\else + \ifempty\m_syst_helpers_comma_list_target \let\m_syst_helpers_comma_list_target\newcommalistelement \else \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter @@ -4728,7 +4780,7 @@ \fi \def\commalistelement{#1}% \else - \ifx\m_syst_helpers_comma_list_target\empty + \ifempty\m_syst_helpers_comma_list_target \ifx\nexttoken\bgroup % is known -) \def\m_syst_helpers_comma_list_target{{#1}}% \else @@ -4845,50 +4897,50 @@ %D %D Beware: global! -\installsystemnamespace{localpushedmacro} -\installsystemnamespace{globalpushedmacro} - -\let\m_syst_helpers_push_macro\empty - -\newcount\c_syst_helpers_pop_count - -\def\syst_helpers_push_macro_new_global - {\expandafter\newcount\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname - \global\advance\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname\plusone} - -\def\syst_helpers_push_macro_new_local - {\expandafter\newcount\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname - \global\advance\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname\plusone} - -\unexpanded\def\globalpushmacro#1% - {\xdef\m_syst_helpers_push_macro{\csstring#1}% - \ifcsname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname - \global\advance\lastnamedcs\plusone - \else - \syst_helpers_push_macro_new_global - \fi - \expandafter\glet\csname\the\lastnamedcs\m_syst_helpers_push_macro\endcsname#1} - -\unexpanded\def\localpushmacro#1% this one can be used to push a value over an \egroup - {\xdef\m_syst_helpers_push_macro{\csstring#1}% - \ifcsname\??localpushedmacro\m_syst_helpers_push_macro\endcsname - \global\advance\lastnamedcs\plusone - \else - \syst_helpers_push_macro_new_local - \fi - \expandafter\glet\csname\the\lastnamedcs\m_syst_helpers_push_macro\endcsname#1} - -\unexpanded\def\globalpopmacro#1% - {\xdef\m_syst_helpers_push_macro{\csstring#1}% - \c_syst_helpers_pop_count\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname - \global\advance\lastnamedcs \minusone - \expandafter\glet\expandafter#1\csname\the\c_syst_helpers_pop_count\m_syst_helpers_push_macro\endcsname} - -\unexpanded\def\localpopmacro#1% - {\xdef\m_syst_helpers_push_macro{\csstring#1}% - \c_syst_helpers_pop_count\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname - \global\advance\lastnamedcs \minusone - \expandafter\let\expandafter#1\csname\the\c_syst_helpers_pop_count\m_syst_helpers_push_macro\endcsname} +% \installsystemnamespace{localpushedmacro} +% \installsystemnamespace{globalpushedmacro} +% +% \let\m_syst_helpers_push_macro\empty +% +% \newcount\c_syst_helpers_pop_count +% +% \def\syst_helpers_push_macro_new_global +% {\expandafter\newcount\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname +% \global\advance\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname\plusone} +% +% \def\syst_helpers_push_macro_new_local +% {\expandafter\newcount\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname +% \global\advance\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname\plusone} +% +% \unexpanded\def\globalpushmacro#1% +% {\xdef\m_syst_helpers_push_macro{\csstring#1}% +% \ifcsname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname +% \global\advance\lastnamedcs\plusone +% \else +% \syst_helpers_push_macro_new_global +% \fi +% \expandafter\glet\csname\the\lastnamedcs\m_syst_helpers_push_macro\endcsname#1} +% +% \unexpanded\def\localpushmacro#1% this one can be used to push a value over an \egroup +% {\xdef\m_syst_helpers_push_macro{\csstring#1}% +% \ifcsname\??localpushedmacro\m_syst_helpers_push_macro\endcsname +% \global\advance\lastnamedcs\plusone +% \else +% \syst_helpers_push_macro_new_local +% \fi +% \expandafter\glet\csname\the\lastnamedcs\m_syst_helpers_push_macro\endcsname#1} +% +% \unexpanded\def\globalpopmacro#1% +% {\xdef\m_syst_helpers_push_macro{\csstring#1}% +% \c_syst_helpers_pop_count\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname +% \global\advance\lastnamedcs \minusone +% \expandafter\glet\expandafter#1\csname\the\c_syst_helpers_pop_count\m_syst_helpers_push_macro\endcsname} +% +% \unexpanded\def\localpopmacro#1% +% {\xdef\m_syst_helpers_push_macro{\csstring#1}% +% \c_syst_helpers_pop_count\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname +% \global\advance\lastnamedcs \minusone +% \expandafter\let\expandafter#1\csname\the\c_syst_helpers_pop_count\m_syst_helpers_push_macro\endcsname} \let\pushmacro\localpushmacro \let\popmacro \localpopmacro @@ -5028,7 +5080,7 @@ %D Also handy: \def\doifelseemptyvalue#1% - {\expandafter\ifx\csname#1\endcsname\empty + {\expandafter\ifempty\csname#1\endcsname \expandafter\firstoftwoarguments \else \expandafter\secondoftwoarguments @@ -5037,14 +5089,14 @@ \let\doifemptyvalueelse\doifelseemptyvalue \def\doifemptyvalue#1% - {\expandafter\ifx\csname#1\endcsname\empty + {\expandafter\ifempty\csname#1\endcsname \expandafter\firstofoneargument \else \expandafter\gobbleoneargument \fi} \def\doifnotemptyvalue#1% - {\expandafter\ifx\csname#1\endcsname\empty + {\expandafter\ifempty\csname#1\endcsname \expandafter\gobbleoneargument \else \expandafter\firstofoneargument @@ -6125,7 +6177,7 @@ \unexpanded\def\syst_helpers_if_has_space_else#1 #2#3\relax % \space\empty\relax {\ifx\m_syst_string_one\space \expandafter\firstoftwoarguments - \orelse\ifx#2\empty + \orelse\ifempty#2% \expandafter\secondoftwoarguments \else \expandafter\firstoftwoarguments @@ -6255,11 +6307,16 @@ \c_syst_helpers_test_feature_n\zerocount \syst_helpers_test_feature_nop \clf_benchmarktimer - \writestatus\m!system{starting feature test (n=\number\c_syst_helpers_test_feature_m)}\wait + \writestatus\m!system + {starting feature test: % + \number\c_syst_helpers_test_feature_m\space steps}% \c_syst_helpers_test_feature_n\zerocount \syst_helpers_test_feature_yes - \writestatus\m!system{\number\c_syst_helpers_test_feature_m\space feature tests done (\elapsedseconds s)}% - \wait + \writestatus\m!system + {feature test done: % + \number\c_syst_helpers_test_feature_m\space steps, % + \clf_elapsedtime\space seconds, % + \clf_elapsedsteptime\elapsedsteps\space\space per step}% \egroup} \unexpanded\def\showtimer#1% @@ -6327,7 +6384,7 @@ \def\syst_helpers_with_range#1% {\splitstring#1\at:\to\m_syst_helpers_range_from\and\m_syst_helpers_range_to - \ifx\m_syst_helpers_range_to\empty\let\m_syst_helpers_range_to\m_syst_helpers_range_from\fi + \ifempty\m_syst_helpers_range_to\let\m_syst_helpers_range_to\m_syst_helpers_range_from\fi \dostepwiserecurse\m_syst_helpers_range_from\m_syst_helpers_range_to\plusone{\m_helpers_range_action{##1}}}% \unexpanded\def\processranges[#1]#2% #1= n:m,p,q:r @@ -6480,7 +6537,7 @@ \fi} \def\constantemptyargument#1% - {\ifx#1\empty + {\ifempty#1% \noexpand\empty \else {#1}% @@ -6588,6 +6645,6 @@ \unexpanded\def\emptyargumentcondition#1% {\edef\m_syst_string_one{#1}% - \ifx\m_syst_string_one\empty} + \ifempty\m_syst_string_one} \protect \endinput diff --git a/tex/context/base/mkiv/tabl-ntb.mkxl b/tex/context/base/mkiv/tabl-ntb.mkxl index adabc3139..cc2df4c69 100644 --- a/tex/context/base/mkiv/tabl-ntb.mkxl +++ b/tex/context/base/mkiv/tabl-ntb.mkxl @@ -711,12 +711,12 @@ \edef\m_tabl_ntb_n{\naturaltableparameter\c!n}% \edef\m_tabl_ntb_m{\naturaltableparameter\c!m}% % - \ifx\m_tabl_ntb_n\empty + \ifempty\m_tabl_ntb_n \global\advance\c_tabl_ntb_spn\c_tabl_ntb_nx\relax \orelse\ifnum\m_tabl_ntb_n=\c_tabl_ntb_running_col\else \tabl_ntb_td_pass_n{#1}% \fi - \ifx\m_tabl_ntb_m\empty \else + \ifempty\m_tabl_ntb_m \else \ifnum\m_tabl_ntb_m=\c_tabl_ntb_running_col\else \tabl_ntb_td_pass_m{#1}% \fi @@ -1351,7 +1351,7 @@ \ifnum\scratchcounter>\c_tabl_ntb_n_of_hdnx_lines\relax \ifnum\scratchcounter<\c_tabl_ntb_maximum_row\relax \edef\p_spaceinbetween{\naturaltablelocalparameter\c!spaceinbetween}% - \ifx\p_spaceinbetween\empty\else + \ifempty\p_spaceinbetween\else \blank[\p_spaceinbetween]% \fi \fi @@ -1515,7 +1515,7 @@ \fi \dp\scratchbox\zeropoint \edef\!!stringa{\tabl_ntb_get_ref{#1}{#2}}% - \ifx\!!stringa\empty + \ifempty\!!stringa \box\scratchbox \else \normalexpanded{\noexpand\directgotobox{\box\scratchbox}[\!!stringa]}% to be checked @@ -1534,7 +1534,7 @@ % nothing \orelse\ifx\localwidth\v!broad % nothing - \orelse\ifx\localwidth\empty + \orelse\ifempty\localwidth % nothing (safeguard) \else \tabl_ntb_cell_finalize_indeed @@ -1729,7 +1729,7 @@ \setbox\tsplitnext\vbox{\unvcopy\tsplitnext\unvcopy\scratchbox}}% \vpack ? \fi \edef\p_spaceinbetween{\naturaltablelocalparameter\c!spaceinbetween}% - \ifx\p_spaceinbetween\empty\else + \ifempty\p_spaceinbetween\else \blank[\p_spaceinbetween]% \fi \def\postprocesstsplit{\postprocessTABLEsplitbox{\box\tsplitresult}}% @@ -2057,7 +2057,7 @@ \fi \ifcase\c_anch_backgrounds_text_count\else \edef\p_region{\naturaltablelocalparameter\c!region}% - \ifx\p_region\empty\ifnum\tabl_ntb_get_bck{#1}{#2}>\zerocount + \ifempty\p_region\ifnum\tabl_ntb_get_bck{#1}{#2}>\zerocount \letnaturaltablelocalparameter\c!region\v!yes \fi\fi \fi diff --git a/tex/context/base/mkiv/tabl-tbl.mkxl b/tex/context/base/mkiv/tabl-tbl.mkxl index dc8ae0214..3a1d835ea 100644 --- a/tex/context/base/mkiv/tabl-tbl.mkxl +++ b/tex/context/base/mkiv/tabl-tbl.mkxl @@ -297,7 +297,9 @@ % 1 = RC column raw RQ equal column raw % 2 = HC column hook HQ equal column hook -% handy helper +% handy helper (problem: we have an extra group when we nest; playing with en engine +% solution turned out to be too messy due to states; an ignoreendgroup trick also is +% messy and interferes). \def\tabulatenoalign % public ? {\noalign @@ -364,7 +366,7 @@ \unexpanded\def\tabl_tabulate_check_local_color_second#1#2% {\relax - \ifx\m_tabl_tabulate_color_local\empty + \ifempty\m_tabl_tabulate_color_local \xdef\m_tabl_tabulate_color{#1}% \else \glet\m_tabl_tabulate_color\m_tabl_tabulate_color_local @@ -391,7 +393,7 @@ \unexpanded\def\tabl_tabulate_check_local_vrule_color_second#1% {\relax - \ifx\m_tabl_tabulate_vrule_color_local\empty + \ifempty\m_tabl_tabulate_vrule_color_local \xdef\m_tabl_tabulate_vrule_color{#1}% \else \glet\m_tabl_tabulate_vrule_color\m_tabl_tabulate_vrule_color_local @@ -475,7 +477,7 @@ \bgroup % we cannot combine the if because a cell may have only one ## \tabl_tabulate_hook_b \c_tabl_tabulate_align\constantnumber\c_tabl_tabulate_align % needed in tag passing - \ifx\m_tabl_tabulate_alignment\empty \else + \ifempty\m_tabl_tabulate_alignment \else \spac_align_use_now{\m_tabl_tabulate_alignment}% \fi \noexpand\dostarttagged\noexpand\t!tabulatecell\noexpand\empty @@ -490,7 +492,7 @@ \the\t_tabl_tabulate_font \the\t_tabl_tabulate_settings \the\t_tabl_tabulate_before - \ifx\m_tabl_tabulate_text_color\empty + \ifempty\m_tabl_tabulate_text_color \expandafter\gobbleoneargument \else \expandafter\dofastcoloractivation @@ -818,7 +820,7 @@ \global\advance\c_tabl_tabulate_columns\plusone \expandafter\let\csname\??tabulatesetup\the\c_tabl_tabulate_columns\endcsname\donothing % here ? \edef\currenttabulationtrulespec{#1}% - \ifx\currenttabulationtrulespec\empty + \ifempty\currenttabulationtrulespec \global\d_tabl_tabulate_vrulethickness\zeropoint \else \global\d_tabl_tabulate_vrulethickness\d_tabl_tabulate_vrulethickness_default @@ -839,7 +841,7 @@ {\glet\m_tabl_tabulate_color\empty \glet\m_tabl_tabulate_vrule_color\empty \edef\currenttabulationtrulespec{#1}% - \ifx\currenttabulationtrulespec\empty + \ifempty\currenttabulationtrulespec \global\d_tabl_tabulate_vrulethickness\zeropoint \else \global\d_tabl_tabulate_vrulethickness\d_tabl_tabulate_vrulethickness_default @@ -1099,8 +1101,8 @@ \def\tabl_tabulate_check_full_content % - needed, else confusion with \c!header {\ifcsname\??tabulatehead\currenttabulation\endcsname - %\expandafter\ifx\csname\??tabulatehead\currenttabulation\endcsname\empty - \expandafter\ifx\lastnamedcs\empty + %\expandafter\ifempty\csname\??tabulatehead\currenttabulation\endcsname + \expandafter\ifempty\lastnamedcs \let\tabl_tabulate_insert_head\empty \else \let\tabl_tabulate_insert_head\tabl_tabulate_insert_head_content @@ -1109,8 +1111,8 @@ \let\tabl_tabulate_insert_head\empty \fi \ifcsname\??tabulatefoot\currenttabulation\endcsname - \expandafter\ifx\csname\??tabulatefoot\currenttabulation\endcsname\empty - %\expandafter\ifx\lastnamedcs\empty + \expandafter\ifempty\csname\??tabulatefoot\currenttabulation\endcsname + %\expandafter\ifempty\lastnamedcs \let\tabl_tabulate_insert_foot\empty \else \let\tabl_tabulate_insert_foot\tabl_tabulate_insert_foot_content @@ -1213,7 +1215,7 @@ \setupcurrenttabulation[#1]% \else \def\p_format{#1}% - \ifx\p_format\empty + \ifempty\p_format \def\p_format{|l|p|}% \fi \lettabulationparameter\c!format\p_format @@ -1222,7 +1224,7 @@ \def\tabl_start_regular_two[#1][#2]% {\def\p_format{#1}% - \ifx\p_format\empty + \ifempty\p_format \let\p_format\tabl_default_format \fi \lettabulationparameter\c!format\p_format @@ -1368,7 +1370,7 @@ \let\m_tabl_tabulate_hrule_color_default\p_rulecolor \d_tabl_tabulate_vrulethickness_default\p_rulethickness \d_tabl_tabulate_hrulethickness_default\p_rulethickness - \ifx\p_bodyfont\empty\else + \ifempty\p_bodyfont\else \switchtobodyfont[\p_bodyfont]% \fi \postponenotes % new, to be tested / will be configurable @@ -1379,7 +1381,7 @@ \d_tabl_tabulate_indent\dimexpr\leftskip+\hangindent\ifx\p_indenting\v!yes+\parindent\fi\relax \global\c_tabl_tabulate_column\zerocount \processcontent - {\ifconditional\c_tabl_generic stoptabulate\else\e!stop\ifx\currenttabulationparent\empty\v!tabulate\else\currenttabulationparent\fi\fi} + {\ifconditional\c_tabl_generic stoptabulate\else\e!stop\ifempty\currenttabulationparent\v!tabulate\else\currenttabulationparent\fi\fi} \tabl_tabulate_insert_body \tabl_tabulate_process} @@ -1421,13 +1423,13 @@ \to \t_tabl_tabulate_every_row \unexpanded\def\tabl_tabulate_color_side_right_second - {\ifx\m_tabl_tabulate_color_previous\empty \else + {\ifempty\m_tabl_tabulate_color_previous \else \tabl_tabulate_color_set\m_tabl_tabulate_color_previous \glet\m_tabl_tabulate_color_previous\empty \fi} \unexpanded\def\tabl_tabulate_color_side_left_second - {\ifx\m_tabl_tabulate_color\empty \else + {\ifempty\m_tabl_tabulate_color \else \ifcase\c_tabl_tabulate_colorspan \or \tabl_tabulate_color_set\m_tabl_tabulate_color @@ -1437,7 +1439,7 @@ \fi} \unexpanded\def\tabl_tabulate_color_side_both_second - {\ifx\m_tabl_tabulate_color\empty \else + {\ifempty\m_tabl_tabulate_color \else \tabl_tabulate_color_set\m_tabl_tabulate_color \ifcase\c_tabl_tabulate_colorspan %\glet\m_tabl_tabulate_color_previous\empty @@ -1572,7 +1574,7 @@ \unexpanded\def\tabl_tabulate_column_vrule_inject_second {\ifcase\d_tabl_tabulate_vrulethickness\else - \ifx\m_tabl_tabulate_vrule_color\empty + \ifempty\m_tabl_tabulate_vrule_color \tabl_tabulate_column_vruled_normal \else \tabl_tabulate_column_vruled_colored @@ -1622,7 +1624,7 @@ \def\tabl_tabulate_column_rule_separator_inject % can be sped up (will do when used frequently) {\bgroup \s_tabl_tabulate_separator\strutdp - \ifx\p_distance\empty\else + \ifempty\p_distance\else \let\m_tabl_tabulate_separator_factor\plusone \processcommacommand[\p_distance]\tabl_tabulate_column_rule_separator_step \s_tabl_tabulate_separator\m_tabl_tabulate_separator_factor\s_tabl_tabulate_separator @@ -1671,7 +1673,7 @@ \unexpanded\def\tabl_tabulate_hrule_inject_second {\ifcase\d_tabl_tabulate_hrulethickness_local\else - \ifx\currenttabulationlocalhrulecolor\empty + \ifempty\currenttabulationlocalhrulecolor \tabl_tabulate_hrule_inject_normal \else \tabl_tabulate_hrule_inject_colored @@ -2005,7 +2007,7 @@ \unexpanded\def\tabl_tabulate_bbskip_second_split_yes {\ifvoid\b_tabl_tabulate_current\c_tabl_tabulate_column - \ifx\tabl_tabulate_flush_collected_indeed\empty\else + \ifempty\tabl_tabulate_flush_collected_indeed\else \setbox0\hbox \fi \fi} @@ -2501,7 +2503,7 @@ \def\tabl_tabulate_TB_indeed[#1]% {\iffirstargument \blank[#1] - \orelse\ifx\m_tabl_tabulate_blank_default\empty + \orelse\ifempty\m_tabl_tabulate_blank_default \blank \else \blank[\m_tabl_tabulate_blank_default]% @@ -2820,8 +2822,8 @@ \unexpanded\def\tabl_synchronize_row_background {\iftrialtypesetting\else - \ifx\m_table_current_row_background_filler\empty - \ifx\m_table_current_row_background\empty + \ifempty\m_table_current_row_background_filler + \ifempty\m_table_current_row_background % nothing \tabl_synchronize_row_background_dummy \else @@ -2952,8 +2954,8 @@ \unexpanded\def\tabl_tabulate_BC_first % overloaded {\tabl_tabulate_column_normal\plusone\zerocount \let\fontstyle\globalfontstyle - \ifx\m_table_current_row_background\empty - \ifx\m_table_current_row_background_filler\empty + \ifempty\m_table_current_row_background + \ifempty\m_table_current_row_background_filler \usetabulationstyleandcolor\c!headstyle\c!headcolor \else \usetabulationstyleandcolor\c!foregroundstyle\c!foregroundcolor @@ -2965,11 +2967,11 @@ \unexpanded\def\tabl_tabulate_A_first {\global\advance\c_tabl_tabulate_autocolor\plusone \edef\m_table_current_row_background_auto{\tabulateparameter{\c!backgroundcolor:\number\c_tabl_tabulate_autocolor}}% - \ifx\m_table_current_row_background_auto\empty + \ifempty\m_table_current_row_background_auto \global\c_tabl_tabulate_autocolor\plusone \edef\m_table_current_row_background_auto{\tabulateparameter{\c!backgroundcolor:\number\c_tabl_tabulate_autocolor}}% \fi - \ifx\m_table_current_row_background_auto\empty + \ifempty\m_table_current_row_background_auto \let\m_table_current_row_background_auto\empty % \m_table_current_row_background_default \fi \tabl_register_row_background{\m_table_current_row_background_auto}} diff --git a/tex/context/base/mkiv/type-ini.mklx b/tex/context/base/mkiv/type-ini.mklx index 5470c9016..b4eee64d8 100644 --- a/tex/context/base/mkiv/type-ini.mklx +++ b/tex/context/base/mkiv/type-ini.mklx @@ -337,7 +337,7 @@ \def\font_typescripts_check#asked#target#followup[#value]% script use value next {\donefalse \edef\m_font_typescripts_check{#value}% - \ifx\m_font_typescripts_check\empty % no longer needed / met + \ifempty\m_font_typescripts_check % no longer needed / met \ifcase\typescriptmethod\or\donetrue\fi \orelse\ifx#asked\s!all \donetrue @@ -504,7 +504,7 @@ \the\everybeforedefinetypeface} \def\tsvar#key#default% undocumented and unofficial - {\expandafter\ifx\csname\??ts#key\endcsname\empty + {\expandafter\ifempty\csname\??ts#key\endcsname #default% \else \csname\??ts#key\endcsname @@ -532,7 +532,7 @@ \let\globalfontclass\fontclass \ifsecondargument \setupbodyfont[#settings]% - \orelse\ifx\fontclass\empty + \orelse\ifempty\fontclass \setupbodyfont[\s!rm]% \orelse\ifcsname\??typescriptdefaultstyles\fontclass\endcsname %\setupbodyfont[\csname\??typescriptdefaultstyles\fontclass\endcsname]% @@ -547,7 +547,7 @@ \let\globalfontclass\globalfontclass \ifsecondargument \switchtobodyfont[#settings]% - \orelse\ifx\fontclass\empty + \orelse\ifempty\fontclass \switchtobodyfont[\s!rm]% \orelse\ifcsname\??typescriptdefaultstyles\fontclass\endcsname %\switchtobodyfont[\csname\??typescriptdefaultstyles\fontclass\endcsname]% @@ -606,7 +606,7 @@ \s!Serif \fi\fi\fi} \unexpanded\def\font_helpers_set_fontstyle_of_fontclass - {\ifx\fontclass\empty + {\ifempty\fontclass \let\fontstyle\s!rm \orelse\ifcsname\??typescriptdefaultstyles\fontclass\endcsname %\edef\fontstyle{\csname\??typescriptdefaultstyles\fontclass\endcsname}% diff --git a/tex/context/modules/mkiv/m-visual.mkiv b/tex/context/modules/mkiv/m-visual.mkiv index 6ec0a52b0..a7cecef93 100644 --- a/tex/context/modules/mkiv/m-visual.mkiv +++ b/tex/context/modules/mkiv/m-visual.mkiv @@ -56,9 +56,7 @@ \unexpanded\def\fakelines#1#2% min max / 3 10 {\fakeparindent \scratchdimen\hsize - \ifindentation - \advance\scratchdimen -\parindent - \fi + \advance\scratchdimen -\parindent \fakerule\scratchdimen\break \getrandomcount\scratchcounter{\ifcase0#1 3\else#1\fi}{\ifcase0#2 10\else#2\fi}% \dorecurse\scratchcounter{\fakerule\hsize}% @@ -128,7 +126,7 @@ \unexpanded\def\fakeparindent {\noindent - \ifindentation + \ifzeropt\parindent\else \ifx\dofakedroppedcaps\relax {\fakeparindentcolor \vrule diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 6c07e67f2..eec0c0a5b 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 : 2020-05-12 16:17 +-- merge date : 2020-05-18 16:46 do -- begin closure to overcome local limits and interference -- cgit v1.2.3