From 8f472c629a996f1c08281198210354a253d7f56b Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 15 Dec 2022 19:13:44 +0100 Subject: 2022-12-15 17:52:00 --- tex/context/base/mkii/cont-new.mkii | 2 +- tex/context/base/mkii/context.mkii | 2 +- tex/context/base/mkiv/cont-new.mkiv | 2 +- tex/context/base/mkiv/context.mkiv | 2 +- tex/context/base/mkiv/mult-fmt.lua | 8 +- tex/context/base/mkiv/mult-low.lua | 3 +- tex/context/base/mkiv/mult-prm.lua | 4 + tex/context/base/mkiv/status-files.pdf | Bin 24606 -> 24575 bytes tex/context/base/mkiv/status-lua.pdf | Bin 264746 -> 264780 bytes tex/context/base/mkxl/anch-bck.mklx | 2 +- tex/context/base/mkxl/anch-box.mkxl | 40 +++- tex/context/base/mkxl/anch-pgr.mkxl | 14 +- tex/context/base/mkxl/anch-pos.mkxl | 8 +- tex/context/base/mkxl/anch-tab.mkxl | 6 +- tex/context/base/mkxl/attr-lay.mkxl | 12 +- tex/context/base/mkxl/back-exp.mkxl | 2 +- tex/context/base/mkxl/bibl-bib.mkxl | 8 +- tex/context/base/mkxl/bibl-tra.mkxl | 46 ++--- tex/context/base/mkxl/buff-ini.mkxl | 2 +- tex/context/base/mkxl/buff-par.mklx | 10 +- tex/context/base/mkxl/buff-ver.mkxl | 4 +- tex/context/base/mkxl/catc-ini.mkxl | 6 +- tex/context/base/mkxl/chem-str.mkxl | 20 +- tex/context/base/mkxl/colo-ext.mkxl | 2 +- tex/context/base/mkxl/colo-ini.mkxl | 24 +-- tex/context/base/mkxl/cont-log.mkxl | 1 - tex/context/base/mkxl/cont-new.mkxl | 2 +- tex/context/base/mkxl/context.mkxl | 4 +- tex/context/base/mkxl/core-con.mkxl | 10 +- tex/context/base/mkxl/core-env.mkxl | 8 +- tex/context/base/mkxl/core-ini.mkxl | 3 +- tex/context/base/mkxl/core-sys.mkxl | 2 +- tex/context/base/mkxl/core-two.mkxl | 5 +- tex/context/base/mkxl/file-ini.mklx | 11 +- tex/context/base/mkxl/file-job.mklx | 6 +- tex/context/base/mkxl/file-mod.mklx | 28 +-- tex/context/base/mkxl/file-res.mklx | 2 +- tex/context/base/mkxl/font-col.mklx | 6 +- tex/context/base/mkxl/font-emp.mklx | 2 +- tex/context/base/mkxl/font-fea.mklx | 18 +- tex/context/base/mkxl/font-fil.mklx | 28 +-- tex/context/base/mkxl/font-ini.mklx | 61 +++--- tex/context/base/mkxl/font-mat.mklx | 56 +++--- tex/context/base/mkxl/font-sel.mklx | 2 +- tex/context/base/mkxl/font-set.mklx | 2 +- tex/context/base/mkxl/font-sol.mklx | 4 +- tex/context/base/mkxl/font-sty.mklx | 10 +- tex/context/base/mkxl/font-sym.mklx | 6 +- tex/context/base/mkxl/font-var.mklx | 8 +- tex/context/base/mkxl/grph-epd.mkxl | 2 +- tex/context/base/mkxl/grph-fig.mkxl | 2 +- tex/context/base/mkxl/grph-inc.mkxl | 2 +- tex/context/base/mkxl/grph-trf.mkxl | 14 +- tex/context/base/mkxl/hand-ini.mkxl | 2 +- tex/context/base/mkxl/lang-hyp.mkxl | 26 +-- tex/context/base/mkxl/lang-ini.mkxl | 10 +- tex/context/base/mkxl/lang-lab.mkxl | 11 +- tex/context/base/mkxl/lang-url.mkxl | 4 +- tex/context/base/mkxl/math-ali.mkxl | 21 ++- tex/context/base/mkxl/math-del.mklx | 127 ------------- tex/context/base/mkxl/math-dld.mklx | 127 +++++++++++++ tex/context/base/mkxl/math-fen.mkxl | 2 +- tex/context/base/mkxl/math-ini.mkxl | 2 +- tex/context/base/mkxl/math-rad.mklx | 4 +- tex/context/base/mkxl/math-stc.mklx | 6 +- tex/context/base/mkxl/meta-ini.mkxl | 50 ++--- tex/context/base/mkxl/meta-pdf.mkxl | 2 +- tex/context/base/mkxl/meta-pdh.mkxl | 9 +- tex/context/base/mkxl/mlib-int.lmt | 6 +- tex/context/base/mkxl/mult-aux.mkxl | 73 ++++---- tex/context/base/mkxl/mult-ini.lmt | 2 +- tex/context/base/mkxl/mult-ini.mkxl | 112 +++++------ tex/context/base/mkxl/node-ext.mkxl | 2 +- tex/context/base/mkxl/node-rul.mkxl | 14 +- tex/context/base/mkxl/pack-box.mkxl | 24 +-- tex/context/base/mkxl/pack-com.mkxl | 32 ++-- tex/context/base/mkxl/pack-cut.mkxl | 11 +- tex/context/base/mkxl/pack-lyr.mkxl | 68 +++---- tex/context/base/mkxl/pack-mat.mkxl | 206 +++++++++++++++++--- tex/context/base/mkxl/pack-obj.mkxl | 2 +- tex/context/base/mkxl/pack-pos.mkxl | 4 +- tex/context/base/mkxl/pack-rul.mkxl | 70 +++---- tex/context/base/mkxl/page-app.mkxl | 4 +- tex/context/base/mkxl/page-bck.mkxl | 2 +- tex/context/base/mkxl/page-box.mklx | 8 +- tex/context/base/mkxl/page-brk.mkxl | 8 +- tex/context/base/mkxl/page-cst.mkxl | 4 +- tex/context/base/mkxl/page-flt.mkxl | 8 +- tex/context/base/mkxl/page-imp.mkxl | 10 +- tex/context/base/mkxl/page-inf.mkxl | 10 +- tex/context/base/mkxl/page-inj.mklx | 4 +- tex/context/base/mkxl/page-lay.mkxl | 58 ++++-- tex/context/base/mkxl/page-lin.mklx | 21 ++- tex/context/base/mkxl/page-mcl.mkxl | 2 +- tex/context/base/mkxl/page-mix.mkxl | 16 +- tex/context/base/mkxl/page-one.mkxl | 4 +- tex/context/base/mkxl/page-pcl.mkxl | 2 +- tex/context/base/mkxl/page-pst.mkxl | 2 +- tex/context/base/mkxl/page-sid.mkxl | 8 +- tex/context/base/mkxl/page-str.mkxl | 2 +- tex/context/base/mkxl/page-txt.mklx | 18 +- tex/context/base/mkxl/publ-ini.mkxl | 217 +++++++++++----------- tex/context/base/mkxl/regi-ini.mkxl | 2 +- tex/context/base/mkxl/scrn-bar.mklx | 6 +- tex/context/base/mkxl/scrn-but.mklx | 14 +- tex/context/base/mkxl/scrn-fld.mklx | 34 ++-- tex/context/base/mkxl/scrn-hlp.mklx | 4 +- tex/context/base/mkxl/scrn-pag.mklx | 12 +- tex/context/base/mkxl/scrn-ref.mklx | 8 +- tex/context/base/mkxl/scrn-wid.mklx | 32 ++-- tex/context/base/mkxl/spac-hor.mkxl | 10 +- tex/context/base/mkxl/spac-lin.mkxl | 4 +- tex/context/base/mkxl/spac-pag.mkxl | 4 +- tex/context/base/mkxl/spac-par.mkxl | 2 +- tex/context/base/mkxl/spac-ver.mkxl | 33 ++-- tex/context/base/mkxl/strc-bkm.mkxl | 6 +- tex/context/base/mkxl/strc-blk.mkxl | 10 +- tex/context/base/mkxl/strc-con.mklx | 65 ++++--- tex/context/base/mkxl/strc-des.mklx | 2 +- tex/context/base/mkxl/strc-doc.mkxl | 76 ++++---- tex/context/base/mkxl/strc-enu.mklx | 8 +- tex/context/base/mkxl/strc-flt.mklx | 112 +++++------ tex/context/base/mkxl/strc-itm.mklx | 93 +++++----- tex/context/base/mkxl/strc-lab.mkxl | 8 +- tex/context/base/mkxl/strc-lnt.mklx | 4 +- tex/context/base/mkxl/strc-lst.mklx | 43 ++--- tex/context/base/mkxl/strc-mat.mkxl | 110 +++++------ tex/context/base/mkxl/strc-not.mklx | 30 +-- tex/context/base/mkxl/strc-num.mkxl | 12 +- tex/context/base/mkxl/strc-ref.mklx | 76 ++++---- tex/context/base/mkxl/strc-reg.mkxl | 74 ++++---- tex/context/base/mkxl/strc-ren.mkxl | 7 +- tex/context/base/mkxl/strc-sbe.mkxl | 2 +- tex/context/base/mkxl/strc-sec.mkxl | 58 +++--- tex/context/base/mkxl/strc-syn.mkxl | 26 +-- tex/context/base/mkxl/strc-tag.mkxl | 8 +- tex/context/base/mkxl/strc-usr.mkxl | 2 +- tex/context/base/mkxl/supp-box.mkxl | 6 +- tex/context/base/mkxl/symb-ini.mkxl | 8 +- tex/context/base/mkxl/syst-aux.mkxl | 141 ++++++++------ tex/context/base/mkxl/syst-ini.mkxl | 17 +- tex/context/base/mkxl/tabl-frm.mkxl | 6 +- tex/context/base/mkxl/tabl-ltb.mkxl | 5 +- tex/context/base/mkxl/tabl-ntb.mkxl | 74 ++++---- tex/context/base/mkxl/tabl-tab.mkxl | 60 +++--- tex/context/base/mkxl/tabl-tbl.mkxl | 135 +++++++------- tex/context/base/mkxl/tabl-tsp.mkxl | 17 +- tex/context/base/mkxl/tabl-xtb.mklx | 8 +- tex/context/base/mkxl/toks-aux.lmt | 2 + tex/context/base/mkxl/trac-tex.mkxl | 2 +- tex/context/base/mkxl/type-ini.mklx | 38 ++-- tex/context/base/mkxl/typo-ada.mkxl | 4 +- tex/context/base/mkxl/typo-del.mkxl | 10 +- tex/context/base/mkxl/typo-dir.mkxl | 4 +- tex/context/base/mkxl/typo-itm.mkxl | 2 +- tex/context/base/mkxl/typo-mar.mkxl | 10 +- tex/context/base/mkxl/typo-shp.mkxl | 4 +- tex/context/base/mkxl/typo-wrp.mkxl | 2 +- tex/context/modules/mkxl/s-publications-show.mkxl | 6 +- tex/context/modules/mkxl/x-mathml.mkxl | 20 +- 160 files changed, 1919 insertions(+), 1630 deletions(-) delete mode 100644 tex/context/base/mkxl/math-del.mklx create mode 100644 tex/context/base/mkxl/math-dld.mklx (limited to 'tex/context') diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 9bd797523..b557f5666 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{2022.12.09 16:31} +\newcontextversion{2022.12.15 17:49} %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 3a7b24584..1c6f24507 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{2022.12.09 16:31} +\edef\contextversion{2022.12.15 17:49} %D For those who want to use this: diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 3c2193719..ac24c71a5 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{2022.12.09 16:31} +\newcontextversion{2022.12.15 17:49} %D This file is loaded at runtime, thereby providing an excellent place for hacks, %D patches, extensions and new features. There can be local overloads in cont-loc diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index b89cecdfe..2e915c2a4 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -49,7 +49,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2022.12.09 16:31} +\edef\contextversion{2022.12.15 17:49} %D Kind of special: diff --git a/tex/context/base/mkiv/mult-fmt.lua b/tex/context/base/mkiv/mult-fmt.lua index 67133aab2..bbcdfd343 100644 --- a/tex/context/base/mkiv/mult-fmt.lua +++ b/tex/context/base/mkiv/mult-fmt.lua @@ -217,9 +217,9 @@ function interfaces.setuserinterface(interface,response) constant = constant[interface] or constant.en or given constants[constant] = given -- breedte -> width nofconstants = nofconstants + 1 - setmacro("c!" .. given,given,"immutable") + setmacro("c!" .. given,given,"immutable","constant") if reversetoo then - setmacro("k!" .. constant,given,"immutable") + setmacro("k!" .. constant,given,"immutable","constant") end report_constant("%-40s: %s",given,constant) end @@ -232,7 +232,7 @@ function interfaces.setuserinterface(interface,response) variable = variable[interface] or variable.en or given variables[given] = variable -- ja -> yes nofvariables = nofvariables + 1 - setmacro("v!" .. given,variable,"immutable") + setmacro("v!" .. given,variable,"immutable","constant") report_variable("%-40s: %s",given,variable) end logs.stopfilelogging() @@ -244,7 +244,7 @@ function interfaces.setuserinterface(interface,response) element = element[interface] or element.en or given elements[element] = given nofelements = nofelements + 1 - setmacro("e!" .. given,element,"immutable") + setmacro("e!" .. given,element,"immutable","constant") report_element("%-40s: %s",given,element) end logs.stopfilelogging() diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua index 835588e46..d213bf7d7 100644 --- a/tex/context/base/mkiv/mult-low.lua +++ b/tex/context/base/mkiv/mult-low.lua @@ -436,7 +436,8 @@ return { -- "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", -- - "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", + "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", + "setexpandeddummyparameter", "resetdummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", -- "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua index 891b795ad..2a73d765b 100644 --- a/tex/context/base/mkiv/mult-prm.lua +++ b/tex/context/base/mkiv/mult-prm.lua @@ -298,8 +298,11 @@ return { "boxymove", "boxyoffset", "catcodetable", + "cdef", + "cdefcsname", "cfcode", "clearmarks", + "constant", "copymathatomrule", "copymathparent", "copymathspacing", @@ -640,6 +643,7 @@ return { "tracinghyphenation", "tracinginserts", "tracinglevels", + "tracinglists", "tracingmarks", "tracingmath", "tracingnodes", diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf index 93a9c8822..8f7009b07 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 089aadf1a..36e22cc39 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/mkxl/anch-bck.mklx b/tex/context/base/mkxl/anch-bck.mklx index 818fade98..2eeebd547 100644 --- a/tex/context/base/mkxl/anch-bck.mklx +++ b/tex/context/base/mkxl/anch-bck.mklx @@ -637,7 +637,7 @@ if nofposboxes = 1 : posboxes[1] := (posboxes[1] enlarged mpvar "lineoffset") cornered mpvar "lineoffset" ; fill posboxes[1] withcolor mpvar "fillcolor" ; - draw posboxes[1] withpen pencircle scaled mpvar "linewidth" withcolor mpvar "linecolor" ; + draw posboxes[1] withpen pencircle scaled mpvar "linewidth" withcolor mpvar "linecolor" ; fi ; \stopMPpositiongraphic diff --git a/tex/context/base/mkxl/anch-box.mkxl b/tex/context/base/mkxl/anch-box.mkxl index 02cdf5fb8..9885123c2 100644 --- a/tex/context/base/mkxl/anch-box.mkxl +++ b/tex/context/base/mkxl/anch-box.mkxl @@ -42,7 +42,6 @@ % linecolor=\namedboxanchorcontentparameter{#1}{\c!rulecolor}}% % \stoppositionoverlay % \endgroup} - \tolerant\permanent\protected\def\connectboxanchors[#1]#*[#2]#*[#3]#*[#4]#*#:#5#6% {\begingroup % @@ -70,17 +69,40 @@ \setMPpositiongraphic {\boxanchorposone}% {\namedboxanchorcontentparameter{#1}\c!mp}% - {from=\boxanchorposone,% + {span=no, + from=\boxanchorposone,% to=\boxanchorpostwo,% - distance={\namedboxanchorcontentparameter{#1}\c!distance},% + % distance={\namedboxanchorcontentparameter{#1}\c!distance},% dashtype={\namedboxanchorcontentparameter{#1}\c!dash},% - arrow={\namedboxanchorcontentparameter{#1}\c!arrow},% - alternative={\namedboxanchorcontentparameter{#1}\c!alternative},% - text={\namedboxanchorcontentparameter{#1}\c!text},% - rulethickness={\namedboxanchorcontentparameter{#1}\c!rulethickness},% - linecolor=\namedboxanchorcontentparameter{#1}{\c!rulecolor}}% + % arrow={\namedboxanchorcontentparameter{#1}\c!arrow},% + % alternative={\namedboxanchorcontentparameter{#1}\c!alternative},% + % text={\namedboxanchorcontentparameter{#1}\c!text},% + % rulethickness={\namedboxanchorcontentparameter{#1}\c!rulethickness},% + linecolor=\namedboxanchorcontentparameter{#1}{\c!rulecolor}, + #3}% + % \stoppositionoverlay }% + \ifcstok{\namedboxanchorcontentparameter{#1}\c!page}\v!yes + \normalexpanded{% + \startpositionoverlay{text+1}% will become configurable region + \setMPpositiongraphic + {\boxanchorpostwo}% + {\namedboxanchorcontentparameter{#1}\c!mp}% + {span=yes, + from=\boxanchorposone,% + to=\boxanchorpostwo,% + % distance={\namedboxanchorcontentparameter{#1}\c!distance},% + dashtype={\namedboxanchorcontentparameter{#1}\c!dash},% + % arrow={\namedboxanchorcontentparameter{#1}\c!arrow},% + % alternative={\namedboxanchorcontentparameter{#1}\c!alternative},% + % text={\namedboxanchorcontentparameter{#1}\c!text},% + % rulethickness={\namedboxanchorcontentparameter{#1}\c!rulethickness},% + linecolor=\namedboxanchorcontentparameter{#1}{\c!rulecolor}% + #3}% + \stoppositionoverlay + }% + \fi \endgroup} % dedicated or not @@ -120,7 +142,7 @@ \stoppositionoverlay \endgroup} -\let\m_anch_matrix_list\empty +\lettonothing\m_anch_matrix_list \tolerant\permanent\protected\def\startmatrixanchors {\glet\m_anch_matrix_list\empty diff --git a/tex/context/base/mkxl/anch-pgr.mkxl b/tex/context/base/mkxl/anch-pgr.mkxl index 4ffedbfc3..5071f16d5 100644 --- a/tex/context/base/mkxl/anch-pgr.mkxl +++ b/tex/context/base/mkxl/anch-pgr.mkxl @@ -204,13 +204,13 @@ %D %D \typebuffer[graphic] -\immutable\def\MPanchoridentifier{mpa} % {mp-anchor} -\mutable \def\MPanchornumber {\the\realpageno} -\mutable \let\MPanchorid \empty +\immutable\def \MPanchoridentifier{mpa} % {mp-anchor} +\mutable \def \MPanchornumber {\the\realpageno} +\mutable \lettonothing\MPanchorid %D The rest of the definitions concerning such overlays may look complicated, -\mutable\let\currentpositionoverlay\empty +\mutable\lettonothing\currentpositionoverlay %D Position actions are automatically executed when a position is set. @@ -256,7 +256,7 @@ \expandafter\gobbletwoarguments \fi} -\let\currentpositionregion\empty +\lettonothing\currentpositionregion \def\anch_positions_region_overlay_indeed#1#2% {\begingroup @@ -294,14 +294,14 @@ \ifdefined\checkpositionoverlays \else \let\checkpositionoverlays\relax \fi -\mutable\let\currentpositionoverlay\empty +\mutable\lettonothing\currentpositionoverlay \def\anch_positions_overlay_start_yes#1% {\checkpositionoverlays \edef\currentpositionoverlay{#1}} \permanent\protected\def\stoppositionoverlay - {\let\currentpositionoverlay\empty} + {\lettonothing\currentpositionoverlay} %D A position graphic is a normal (non||reused) \METAPOST\ graphic, used %D immediately, with zero dimensions, so that a sequence of them does not harm. diff --git a/tex/context/base/mkxl/anch-pos.mkxl b/tex/context/base/mkxl/anch-pos.mkxl index f8891eb33..75e8f87d7 100644 --- a/tex/context/base/mkxl/anch-pos.mkxl +++ b/tex/context/base/mkxl/anch-pos.mkxl @@ -55,10 +55,10 @@ % see top: \newbox\b_anch_position % see top: \newif \ifpositioning % sort of public -\mutable\let\currentposition \empty -\mutable\let\currentpositionaction\empty -\mutable\let\currentpositionanchor\empty -\mutable\let\currentpositionregion\empty +\mutable\lettonothing\currentposition +\mutable\lettonothing\currentpositionaction +\mutable\lettonothing\currentpositionanchor +\mutable\lettonothing\currentpositionregion %D Sometimes we want to trick the position handler a bit: diff --git a/tex/context/base/mkxl/anch-tab.mkxl b/tex/context/base/mkxl/anch-tab.mkxl index 11e9598d9..1c89666dc 100644 --- a/tex/context/base/mkxl/anch-tab.mkxl +++ b/tex/context/base/mkxl/anch-tab.mkxl @@ -227,9 +227,9 @@ %D In order to prevent potential clashes with abbreviations, postpone the mapping and %D make them mutable. -\mutable\let\GSC\empty -\mutable\let\GFC\empty -\mutable\let\GTC\empty +\mutable\lettonothing\GSC +\mutable\lettonothing\GFC +\mutable\lettonothing\GTC \appendtoks \enforced\let\GSC\tbGSC diff --git a/tex/context/base/mkxl/attr-lay.mkxl b/tex/context/base/mkxl/attr-lay.mkxl index 00c633533..122839c06 100644 --- a/tex/context/base/mkxl/attr-lay.mkxl +++ b/tex/context/base/mkxl/attr-lay.mkxl @@ -66,14 +66,14 @@ \def\currentviewerlayer{\the\currentviewerlayertoks} \appendtoks - \let\currentviewerlayer\empty + \lettonothing\currentviewerlayer \to \everybeforepagebody % layout components are implemented rather directly (speed) \installcorenamespace{layoutcomponentattribute} -\mutable\let\layoutcomponentboxattribute\empty +\mutable\lettonothing\layoutcomponentboxattribute \permanent\def\attr_layoutcomponent_initialize#1% {\edef\layoutcomponentboxattribute{\clf_definedlayoutcomponent{#1}}% @@ -87,11 +87,11 @@ \fi} \permanent\def\attr_layoutcomponent_reset - {\let\layoutcomponentboxattribute\empty} + {\lettonothing\layoutcomponentboxattribute} -\permanent\let\setlayoutcomponentattribute \gobbleoneargument -\permanent\let\resetlayoutcomponentattribute\relax - \let\layoutcomponentboxattribute \empty +\permanent\let \setlayoutcomponentattribute \gobbleoneargument +\permanent\let \resetlayoutcomponentattribute\relax + \lettonothing\layoutcomponentboxattribute \permanent\protected\def\showlayoutcomponents {\enforced\let\setlayoutcomponentattribute \attr_layoutcomponent_set diff --git a/tex/context/base/mkxl/back-exp.mkxl b/tex/context/base/mkxl/back-exp.mkxl index 82329cc6a..3c8c23c59 100644 --- a/tex/context/base/mkxl/back-exp.mkxl +++ b/tex/context/base/mkxl/back-exp.mkxl @@ -312,7 +312,7 @@ \permanent\protected\def\dostartexport {%\glet\dostartexport\relax - \let\currentexport\empty + \lettonothing\currentexport \clf_setupexport align {\exportparameter\c!align}% bodyfont \dimexpr\exportparameter\c!bodyfont\relax diff --git a/tex/context/base/mkxl/bibl-bib.mkxl b/tex/context/base/mkxl/bibl-bib.mkxl index cc916b329..d8ab26d28 100644 --- a/tex/context/base/mkxl/bibl-bib.mkxl +++ b/tex/context/base/mkxl/bibl-bib.mkxl @@ -450,7 +450,7 @@ \edef\bibtexpublicationsalternative{\@@pbalternative}% parent \ifempty\bibtexpublicationsalternative \else \processcommacommand[\bibtexpublicationsalternative]\dodoloadbibtexpublicationalternative - \let\@@pbalternative\empty + \lettonothing\@@pbalternative \fi \fi} @@ -655,9 +655,9 @@ {\global\advance\bibtexcounter\plusone \ctxlua{bibtex.hacks.registerplaced("\currentbibtexsessiontag")}% \let\currentlist\currentbibtexsession - \let\currentlistentrynumber \bibtexcounter - \let\currentlistentrytitle \thebibtexpublicationlistelement - \let\currentlistentrypagenumber\empty + \let\currentlistentrynumber\bibtexcounter + \let\currentlistentrytitle\thebibtexpublicationlistelement + \lettonothing\currentlistentrypagenumber \strc_lists_apply_renderingsetup} {}} % invalid diff --git a/tex/context/base/mkxl/bibl-tra.mkxl b/tex/context/base/mkxl/bibl-tra.mkxl index c84d0878e..fc21724b3 100644 --- a/tex/context/base/mkxl/bibl-tra.mkxl +++ b/tex/context/base/mkxl/bibl-tra.mkxl @@ -258,7 +258,7 @@ {\dosingleempty\dosetupbibtex} \protected\def\dosetupbibtex[#1]% - {\let\@@pbdatabase\empty + {\lettonothing\@@pbdatabase \getparameters[\??pb][#1]% \the\everysetupbibtex} @@ -299,7 +299,7 @@ {\readsysfile{bibl-\@@pbalternative.tex} {\showmessage\m!publications{6}{bibl-\@@pbalternative}} {\showmessage\m!publications{1}{bibl-\@@pbalternative}}% - \let\@@pbalternative\empty}% + \lettonothing\@@pbalternative}% \let\setuppublicationlayout\normalsetuppublicationlayout % overloaded in bibl-num ... vadjust needs to be done with option \getparameters[\??pb][#1]% as bibl-* can have set things back \the\everysetuppublications @@ -537,7 +537,7 @@ \fi \ifnum\todocounter>\zerocount % find the current author list - \let\templist\empty + \lettonothing\templist \dorecurse{#2} {\scratchtoks\doubleexpandafter{\csname\??pb @#1\recurselevel\endcsname}% \edef\templist{\ifempty\templist\else\templist,\fi\the\scratchtoks}}% @@ -881,10 +881,10 @@ {\global\advance\bibtexcounter\plusone \def\currentpublicationkey{#1}% \ctxlua{bibtex.hacks.registerplaced("#1")}% - \def \currentlist {pubs}% - \edef\currentlistentrynumber {\number\bibtexcounter}% - \let \currentlistentrytitle \bibtexpubtext - \let \currentlistentrypagenumber\empty + \def\currentlist{pubs}% + \edef\currentlistentrynumber{\number\bibtexcounter}% + \let\currentlistentrytitle\bibtexpubtext + \lettonothing\currentlistentrypagenumber \strc_lists_apply_renderingsetup} {}} % invalid @@ -897,7 +897,7 @@ \the\initializebibdefinitions % NEW \def\@@currentalternative{:l:}% \presetbibvariables - \let\biblanguage\empty + \lettonothing\biblanguage \ignorespaces \bibgetvard{#1}% \removeunwantedspaces @@ -963,9 +963,9 @@ \ifempty\LOextras \setupcite[\@@currentalternative][#1]% \else - \expandafter\ifrelax\csname \??pv \@@currentalternative\c!right\endcsname + \expandafter\ifrelax\csname\??pv\@@currentalternative\c!right\endcsname % avoids tail recursion - \expandafter\let\csname \??pv \@@currentalternative\c!right\endcsname\empty + \expandafter\lettonothing\csname\??pv\@@currentalternative\c!right\endcsname \fi \expandafter\ifrelax\csname LOright\endcsname \edef\LOextras{{\LOextras\bibalternative\c!right}}% @@ -1050,22 +1050,22 @@ %D Delegate this to \LUA. -% \let\ixlastcommand \relax -% \let\ixsecondcomman \relax -% \let\ixfirstcommand \relax -% \let\thebibauthors \empty -% \let\thebibyears \empty -% \let\authorcount \!!zerocount +% \let \ixlastcommand \relax +% \let \ixsecondcomman\relax +% \let \ixfirstcommand\relax +% \lettonothing\thebibauthors +% \lettonothing\thebibyears +% \let \authorcount \!!zerocount -\let\currentbibauthor\empty +\lettonothing\currentbibauthor \protected\def\ixbibauthoryear#1#2#3#4% {\bgroup - \gdef\ixlastcommand {#4}% + \gdef\ixlastcommand{#4}% \gdef\ixsecondcommand{#3}% - \gdef\ixfirstcommand {#2}% - \glet\thebibauthors \empty - \glet\thebibyears \empty + \gdef\ixfirstcommand{#2}% + \glettonothing\thebibauthors + \glettonothing\thebibyears \getcommalistsize[#1]% \ifbibcitecompress \dorecurse\commalistsize{\xdef\thebibyears{\thebibyears,}}% @@ -1105,7 +1105,7 @@ {\getcommacommandsize[#1]% \ifcase\commalistsize % anonymous? - \let\currentbibauthor\empty + \lettonothing\currentbibauthor \or \def\currentbibauthor{#1}% \or @@ -1118,7 +1118,7 @@ \protected\def\handlemultiplebibauthors#1#2% {\citescratchcounter\zerocount - \let\currentbibauthor\empty + \lettonothing\currentbibauthor \protected\def\bibprocessauthoritem##1% {\advance\citescratchcounter\plusone \ifnum \citescratchcounter=#1\relax diff --git a/tex/context/base/mkxl/buff-ini.mkxl b/tex/context/base/mkxl/buff-ini.mkxl index c6aa6de3f..d561841ff 100644 --- a/tex/context/base/mkxl/buff-ini.mkxl +++ b/tex/context/base/mkxl/buff-ini.mkxl @@ -22,7 +22,7 @@ %D pretty and never be efficient but it has served us for ages (conceptually it's %D as in \MKII). -\mutable\let\currentbuffer\empty +\mutable\lettonothing\currentbuffer % \doifelsebuffer {#1} % expandable % \doifelsebufferempty {#1} % non expandable diff --git a/tex/context/base/mkxl/buff-par.mklx b/tex/context/base/mkxl/buff-par.mklx index b6ffa3f53..63e6f47bd 100644 --- a/tex/context/base/mkxl/buff-par.mklx +++ b/tex/context/base/mkxl/buff-par.mklx @@ -131,11 +131,11 @@ \relax \endgroup} -\mutable\let\currentparallelinstance\empty -\mutable\let\currentparallelnumber \empty -\mutable\let\currentparallelline \empty -\mutable\let\currentparallellabel \empty -\mutable\let\currentparallelcontent \empty +\mutable\lettonothing\currentparallelinstance +\mutable\lettonothing\currentparallelnumber +\mutable\lettonothing\currentparallelline +\mutable\lettonothing\currentparallellabel +\mutable\lettonothing\currentparallelcontent \permanent\protected\def\doflushparallel#instance#status#line#label#content% called at lua end {\begingroup diff --git a/tex/context/base/mkxl/buff-ver.mkxl b/tex/context/base/mkxl/buff-ver.mkxl index ec7ef5fc3..6fef148f1 100644 --- a/tex/context/base/mkxl/buff-ver.mkxl +++ b/tex/context/base/mkxl/buff-ver.mkxl @@ -582,7 +582,7 @@ % [category] [settings] {name} % for historic reasons, all filenames are {} -\mutable\let\currenttypingfile\empty +\mutable\lettonothing\currenttypingfile \appendtoks \frozen\protected\instance\edefcsname\e!type\currenttyping\v!file\endcsname{\typefile[\currenttyping]}% @@ -846,7 +846,7 @@ {\dontleavehmode \begingroup \enforced\let\setupcurrenttyping\setupcurrenttype % a terrible hack but it saves code - \let\currenttype\empty + \lettonothing\currenttype \ifparameters \buff_verbatim_type_buffer_indeed_inline\currenttyping\empty% [] \or diff --git a/tex/context/base/mkxl/catc-ini.mkxl b/tex/context/base/mkxl/catc-ini.mkxl index 0740e7e2a..6e40ca822 100644 --- a/tex/context/base/mkxl/catc-ini.mkxl +++ b/tex/context/base/mkxl/catc-ini.mkxl @@ -319,9 +319,9 @@ -% \fi} -\let\syst_catcodes_trace_set \empty -\let\syst_catcodes_trace_push\empty -\let\syst_catcodes_trace_pop \empty +\lettonothing\syst_catcodes_trace_set +\lettonothing\syst_catcodes_trace_push +\lettonothing\syst_catcodes_trace_pop % \tracecatcodetables diff --git a/tex/context/base/mkxl/chem-str.mkxl b/tex/context/base/mkxl/chem-str.mkxl index 6c591225e..5f3f8b6c7 100644 --- a/tex/context/base/mkxl/chem-str.mkxl +++ b/tex/context/base/mkxl/chem-str.mkxl @@ -82,7 +82,7 @@ [\c!align=\v!normal, \c!strut=\v!no] -\mutable\let\currentdefinedchemical\empty +\mutable\lettonothing\currentdefinedchemical \permanent\protected\def\setupchemicalframed {\setupframed[\??chemicalframed]} @@ -120,9 +120,9 @@ \ifcase\currentxfontsize\or\scriptstyle\or\scriptscriptstyle\fi #1}} -\setvalue{\??chemicalsize\v!small }{\txx} -\setvalue{\??chemicalsize\v!medium}{\tx} -\setvalue{\??chemicalsize\v!big }{} +\defcsname\??chemicalsize\v!small \endcsname{\txx} +\defcsname\??chemicalsize\v!medium\endcsname{\tx} +\defcsname\??chemicalsize\v!big \endcsname{} \newtoks \everychemical \newtoks \everystructurechemical @@ -256,14 +256,14 @@ \permanent\protected\def\chemicalbottext#1{\global\settrue\c_chem_some_text\gdef\m_chem_bot_text{#1}\ignorespaces} \permanent\protected\def\chemicalmidtext#1{\global\settrue\c_chem_some_text\gdef\m_chem_mid_text{#1}\ignorespaces} -\mutable\let\toptext\empty -\mutable\let\bottext\empty -\mutable\let\midtext\empty +\mutable\lettonothing\toptext +\mutable\lettonothing\bottext +\mutable\lettonothing\midtext \appendtoks - \let\toptext\chemicaltoptext \glet\m_chem_top_text\empty - \let\bottext\chemicalbottext \glet\m_chem_bot_text\empty - \let\midtext\chemicalmidtext \glet\m_chem_mid_text\empty + \let\toptext\chemicaltoptext \glettonothing\m_chem_top_text + \let\bottext\chemicalbottext \glettonothing\m_chem_bot_text + \let\midtext\chemicalmidtext \glettonothing\m_chem_mid_text \global\setfalse\c_chem_some_text \to \everystructurechemical diff --git a/tex/context/base/mkxl/colo-ext.mkxl b/tex/context/base/mkxl/colo-ext.mkxl index d4747ae94..f3779bb58 100644 --- a/tex/context/base/mkxl/colo-ext.mkxl +++ b/tex/context/base/mkxl/colo-ext.mkxl @@ -80,7 +80,7 @@ \colo_intents_set_text \to \everysetupcolors -\let\p_colo_intent\empty +\lettonothing\p_colo_intent \def\colo_intents_set_text {\edef\p_colo_intent{\colorsparameter\c!intent}% diff --git a/tex/context/base/mkxl/colo-ini.mkxl b/tex/context/base/mkxl/colo-ini.mkxl index f7909e2a3..68aba39ab 100644 --- a/tex/context/base/mkxl/colo-ini.mkxl +++ b/tex/context/base/mkxl/colo-ini.mkxl @@ -61,10 +61,10 @@ \let\m_colo_weight_gray\v!yes -\mutable\let\currentcolormodel \empty -\mutable\let\currentcolorname \empty -\mutable\let\currentcolorpalet \empty -\mutable\let\currentcolorprefix\empty % \currentcolorpalet: +\mutable\lettonothing\currentcolormodel +\mutable\lettonothing\currentcolorname +\mutable\lettonothing\currentcolorpalet +\mutable\lettonothing\currentcolorprefix % \currentcolorpalet: %D \macros %D {definecolor,defineglobalcolor,definenamedcolor,definespotcolor,definemultitonecolor, @@ -490,8 +490,8 @@ \expandafter\secondoftwoarguments \fi} -\mutable\let\paletlist\empty -\mutable\let\paletsize\!!zerocount +\mutable\lettonothing\paletlist +\mutable\let \paletsize\!!zerocount \permanent\protected\def\getpaletlist[#1]% {\edef\paletlist{\begincsname\??paletlist#1\endcsname}} @@ -588,15 +588,15 @@ {\edef\currentcolorpalet{#1}% \ifempty\currentcolorpalet % seems to be a reset - \let\currentcolorprefix\empty + \lettonothing\currentcolorprefix %\t_colo_prefix\emptytoks \orelse\ifcsname\??paletlist\currentcolorpalet\endcsname \edef\currentcolorprefix{#1:}% %\t_colo_prefix\expandafter{\currentcolorprefix}% \else \colo_helpers_show_message\m!colors7\currentcolorpalet - \let\currentcolorpalet\empty - \let\currentcolorprefix\empty + \lettonothing\currentcolorpalet + \lettonothing\currentcolorprefix %\t_colo_prefix\emptytoks \fi \the\everysetuppalet @@ -1101,8 +1101,8 @@ %D \stopregistercolor %D \stoptyping -\mutable\let\maintextcolor \empty -\mutable\def\defaulttextcolor{black} +\mutable\lettonothing\maintextcolor +\mutable\def \defaulttextcolor{black} \permanent\protected\def\inheritmaintextcolor {\ifempty\maintextcolor\else\colo_helpers_activate\maintextcolor\fi} @@ -1130,7 +1130,7 @@ \permanent\protected\lettonothing\stoptextcolor -\let\p_colo_textcolor\empty +\lettonothing\p_colo_textcolor \def\colo_helpers_initialize_maintextcolor {\edef\p_colo_textcolor{\directcolorsparameter\c!textcolor}% diff --git a/tex/context/base/mkxl/cont-log.mkxl b/tex/context/base/mkxl/cont-log.mkxl index 56cf4053f..710848b67 100644 --- a/tex/context/base/mkxl/cont-log.mkxl +++ b/tex/context/base/mkxl/cont-log.mkxl @@ -316,7 +316,6 @@ \enforced\instance\def\LuaTeX {LuaTeX}% \enforced\instance\def\LuajitTeX {LuajitTeX}% \enforced\instance\def\LuaMetaTeX{LuaMetaTeX}% - %\let\wordboundary\empty % primitive so we need to promote it to frozen (orjust preroll) \to \everysimplifycommands \protect \endinput diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl index 12a02f132..b777a015c 100644 --- a/tex/context/base/mkxl/cont-new.mkxl +++ b/tex/context/base/mkxl/cont-new.mkxl @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2022.12.09 16:31} +\newcontextversion{2022.12.15 17:49} %D This file is loaded at runtime, thereby providing an excellent place for hacks, %D patches, extensions and new features. There can be local overloads in cont-loc diff --git a/tex/context/base/mkxl/context.mkxl b/tex/context/base/mkxl/context.mkxl index 6ff802992..882be6cc3 100644 --- a/tex/context/base/mkxl/context.mkxl +++ b/tex/context/base/mkxl/context.mkxl @@ -29,7 +29,7 @@ %D {YYYY.MM.DD HH:MM} format. \immutable\edef\contextformat {\jobname} -\immutable\edef\contextversion{2022.12.09 16:31} +\immutable\edef\contextversion{2022.12.15 17:49} %overloadmode 1 % check frozen / warning %overloadmode 2 % check frozen / error @@ -495,7 +495,7 @@ \loadmkxlfile{math-lop} \loadmklxfile{math-acc} \loadmklxfile{math-rad} -\loadmklxfile{math-del} +\loadmklxfile{math-dld} \loadmkxlfile{math-inl} \loadmkxlfile{math-dis} %loadmkxlfile{math-lan} diff --git a/tex/context/base/mkxl/core-con.mkxl b/tex/context/base/mkxl/core-con.mkxl index 9e2b05778..5a2d50493 100644 --- a/tex/context/base/mkxl/core-con.mkxl +++ b/tex/context/base/mkxl/core-con.mkxl @@ -19,8 +19,8 @@ \unprotect -\ifdefined\currentlanguage \else \let\currentlanguage\empty \fi -\ifdefined\labeltext \else \let\labeltext \firstofoneargument \fi +\ifdefined\currentlanguage \else \lettonothing\currentlanguage \fi +\ifdefined\labeltext \else \let\labeltext\firstofoneargument \fi %D This module deals with all kind of conversions from numbers and dates. I %D considered splitting this module in a support one and a core one, but to keep @@ -973,9 +973,9 @@ %D Taken from x-asciimath (see digits-001.tex for an example): -\mutable\let\spaceddigitsmethod \empty % alternative methods : 1 default, 2 and 3 only when > 4 -\mutable\let\spaceddigitssymbol \empty % extra splitter symbol : {,} -\mutable\let\spaceddigitsseparator\empty % separator symbol : {\Uchar{"2008}} +\mutable\lettonothing\spaceddigitsmethod % alternative methods : 1 default, 2 and 3 only when > 4 +\mutable\lettonothing\spaceddigitssymbol % extra splitter symbol : {,} +\mutable\lettonothing\spaceddigitsseparator % separator symbol : {\Uchar{"2008}} \permanent\protected\def\spaceddigits#1% {\clf_spaceddigits diff --git a/tex/context/base/mkxl/core-env.mkxl b/tex/context/base/mkxl/core-env.mkxl index 77e634212..0777d2823 100644 --- a/tex/context/base/mkxl/core-env.mkxl +++ b/tex/context/base/mkxl/core-env.mkxl @@ -383,7 +383,7 @@ %D The next one is meant for \c!setups situations, hence the check for a %D shortcut. -\let\m_syst_setups_asked\empty +\lettonothing\m_syst_setups_asked \permanent\protected\def\doprocesslocalsetups#1% sort of public, fast local variant {\edef\m_syst_setups_asked{#1}% @@ -623,7 +623,7 @@ \permanent\protected\def\setgvariables{\syst_variables_set[\getrawgparameters]} \permanent\protected\def\setxvariables{\syst_variables_set[\getrawxparameters]} -\mutable\let\currentvariableclass\empty +\mutable\lettonothing\currentvariableclass \tolerant\def\syst_variables_set[#1]#*[#2]#*[#3]% tricky, test on s-pre-60 {\doifelse{#2}\currentvariableclass @@ -643,14 +643,12 @@ \permanent \def\getvariable #1#2{\begincsname\??variables#1:#2\endcsname} \permanent\protected\def\showvariable#1#2{\showvalue{\begincsname\??variables#1:#2\endcsname}} -\let\currentvariableclass\empty - %D \macros %D {checkvariables} %D %D I'll probably forget that this on exists. -\let\m_syst_variables_temp\empty +\lettonothing\m_syst_variables_temp \permanent\tolerant\def\checkvariables[#1]#*[#2]% {\dogetparameters\syst_variables_check_value[#1][#2]} diff --git a/tex/context/base/mkxl/core-ini.mkxl b/tex/context/base/mkxl/core-ini.mkxl index 41c73b903..4e4c696a7 100644 --- a/tex/context/base/mkxl/core-ini.mkxl +++ b/tex/context/base/mkxl/core-ini.mkxl @@ -220,6 +220,7 @@ \let\setlayoutcomponentattribute \gobbleoneargument \let\resetlayoutcomponentattribute\relax -\let\layoutcomponentboxattribute \empty + +\lettonothing\layoutcomponentboxattribute \protect \endinput diff --git a/tex/context/base/mkxl/core-sys.mkxl b/tex/context/base/mkxl/core-sys.mkxl index b8bd7905e..a928508bb 100644 --- a/tex/context/base/mkxl/core-sys.mkxl +++ b/tex/context/base/mkxl/core-sys.mkxl @@ -90,7 +90,7 @@ \permanent\protected\def\setjobfullname#1% #1 = default if not given {\doifelsenothing\jobfilename - {\let\jobfullname\empty} + {\lettonothing\jobfullname} {\doif\jobfilesuffix\c!tex{\edef\jobfullname{\jobfilename.#1}}}} %D There are a couple of system states avaiable: diff --git a/tex/context/base/mkxl/core-two.mkxl b/tex/context/base/mkxl/core-two.mkxl index cadd9d059..38f03c7c4 100644 --- a/tex/context/base/mkxl/core-two.mkxl +++ b/tex/context/base/mkxl/core-two.mkxl @@ -82,8 +82,9 @@ \setfalse\twopassdatafound -\mutable\let\twopassdata \empty -\mutable\let\twopassdatalist\empty +\mutable\lettonothing\twopassdata +\mutable\lettonothing\twopassdatalist + \mutable\let\noftwopassitems\!!zeropoint \def\syst_twopass_check % can be delegated to lua once obsolete is gone diff --git a/tex/context/base/mkxl/file-ini.mklx b/tex/context/base/mkxl/file-ini.mklx index 35a49c72d..8febbdea1 100644 --- a/tex/context/base/mkxl/file-ini.mklx +++ b/tex/context/base/mkxl/file-ini.mklx @@ -182,11 +182,12 @@ \newconstant\splitoffkind \mutable\def\splitoffroot{.} -\mutable\let\splitofffull\empty -\mutable\let\splitoffpath\empty -\mutable\let\splitoffbase\empty -\mutable\let\splitoffname\empty -\mutable\let\splitofftype\empty + +\mutable\lettonothing\splitofffull +\mutable\lettonothing\splitoffpath +\mutable\lettonothing\splitoffbase +\mutable\lettonothing\splitoffname +\mutable\lettonothing\splitofftype \permanent\protected\def\splitfilename{\clf_splitfilename} diff --git a/tex/context/base/mkxl/file-job.mklx b/tex/context/base/mkxl/file-job.mklx index 58c6aa3d5..8f6c0aa56 100644 --- a/tex/context/base/mkxl/file-job.mklx +++ b/tex/context/base/mkxl/file-job.mklx @@ -46,7 +46,7 @@ % helper (not really needed nowadays) -\mutable\let\locatedfilepath\empty +\mutable\lettonothing\locatedfilepath \permanent\protected\def\locatefilepath#name% {\edef\locatedfilepath{\clf_locatefilepath{#name}}} % todo: set at the lua end, catcodes and such @@ -289,7 +289,7 @@ \ifparameters \or \ifhastok={#namespace}% - \let\currentdocument\empty + \lettonothing\currentdocument \setupcurrentdocument[#namespace]% \else \edef\currentdocument{#namespace}% @@ -324,7 +324,7 @@ \ifparameters \or \ifhastok={#namespace}% - \let\currentdocument\empty + \lettonothing\currentdocument \setupcurrentdocument[#namespace]% \fi \or diff --git a/tex/context/base/mkxl/file-mod.mklx b/tex/context/base/mkxl/file-mod.mklx index 56e12f72a..c0059bf94 100644 --- a/tex/context/base/mkxl/file-mod.mklx +++ b/tex/context/base/mkxl/file-mod.mklx @@ -40,9 +40,10 @@ \installcorenamespace{module} -\mutable\let\currentmodule \s!unknown -\mutable\let\currentmodulecategory \empty -\mutable\let\currentmoduleparameters\empty +\mutable\let\currentmodule\s!unknown + +\mutable\lettonothing\currentmodulecategory +\mutable\lettonothing\currentmoduleparameters \installmacrostack\currentmodule \installmacrostack\currentmodulecategory @@ -53,21 +54,20 @@ \push_macro_currentmodulecategory \push_macro_currentmoduleparameters \ifparameters - \let\currentmodule\empty + \lettonothing\currentmodule \or - \let \currentmodulecategory \empty - \edef\currentmodule {#category}% - \let \currentmoduleparameters\empty + \lettonothing\currentmodulecategory + \edef\currentmodule{#category}% + \lettonothing\currentmoduleparameters \or \ifhastok={#name}% - \let\currentmodulecategory \empty - \edef\currentmodule {#category}% + \lettonothing\currentmodulecategory + \edef\currentmodule{#category}% \edef\currentmoduleparameters{#name}% \else - \edef\currentmodulecategory {#category}% - \edef\currentmodulecategory {#category}% - \edef\currentmodule {#name}% - \let \currentmoduleparameters\empty + \edef\currentmodulecategory{#category}% + \edef\currentmodule{#name}% + \lettonothing\currentmoduleparameters \fi \or \edef\currentmodulecategory {#category}% @@ -139,7 +139,7 @@ \getparameters[\??module#name:][#parameters]% internal (defaults) \normalexpanded{\getparameters[\??module#name:][\the\scratchtoks]}% loadtime (user) \fi - \let\currentmoduleparameters\empty + \lettonothing\currentmoduleparameters \the\everysetupmodule} \permanent\def\moduleparameter#name#parameter% should have been \namedmoduleparameter diff --git a/tex/context/base/mkxl/file-res.mklx b/tex/context/base/mkxl/file-res.mklx index a123b5e22..a62408921 100644 --- a/tex/context/base/mkxl/file-res.mklx +++ b/tex/context/base/mkxl/file-res.mklx @@ -62,7 +62,7 @@ %D to redefine the original \type {\input} when needed, for instance when loading %D third party libraries. -\mutable\let\readfilename\empty +\mutable\lettonothing\readfilename \def\syst_files_read_file#protocol#path#name% #true #false {\edef\readfilename{\clf_getreadfilename{#protocol}{#path}{#name}}% diff --git a/tex/context/base/mkxl/font-col.mklx b/tex/context/base/mkxl/font-col.mklx index bd099bbe9..03515201f 100644 --- a/tex/context/base/mkxl/font-col.mklx +++ b/tex/context/base/mkxl/font-col.mklx @@ -34,7 +34,7 @@ \permanent\tolerant\protected\def\definefontfallback[#name]#spacer[#font]#spacer[#ranges]#spacer[#settings]% {\let\mathsizesuffix\relax \clf_fontcollectiondefine{#name}{#font}{#ranges}{#settings}% - \let\mathsizesuffix\empty} + \lettonothing\mathsizesuffix} \permanent\tolerant\protected\def\resetfontfallback[#name]#spacer[#font]% {\clf_fontcollectionreset{#name}{#font}} @@ -54,7 +54,7 @@ \font_fallbacks_prepare#fallbacks% \endgroup} -\let\m_font_fallbacks\empty % set in the font-ini +\lettonothing\m_font_fallbacks % set in the font-ini \appendtoks \ifconditional\c_font_fallbacks_in_progress\else @@ -68,7 +68,7 @@ \fi \to\everydefinefont -\let\m_font_fallbacks_spec\empty +\lettonothing\m_font_fallbacks_spec \def\font_fallbacks_start_cloning {\begingroup diff --git a/tex/context/base/mkxl/font-emp.mklx b/tex/context/base/mkxl/font-emp.mklx index e99f74afd..dfb97426c 100644 --- a/tex/context/base/mkxl/font-emp.mklx +++ b/tex/context/base/mkxl/font-emp.mklx @@ -38,7 +38,7 @@ %D %D or even better: -\let\m_font_emphasized_typeface\empty +\lettonothing\m_font_emphasized_typeface \def\font_emphasis_checked_typeface#slanted#italic% {\edef\m_font_emphasized_typeface{\font_bodyfontvariable\s!em}% diff --git a/tex/context/base/mkxl/font-fea.mklx b/tex/context/base/mkxl/font-fea.mklx index 9f4d2119e..3e6a4b2eb 100644 --- a/tex/context/base/mkxl/font-fea.mklx +++ b/tex/context/base/mkxl/font-fea.mklx @@ -136,12 +136,10 @@ % beware: these are global features on top of existing font features -\mutable\let\currentfeature\s!current - -\let\m_font_feature_list \s!current -\let\m_font_feature_asked\empty - -\newconstant\c_font_feature_state +\mutable\let \currentfeature \s!current +\let \m_font_feature_list \s!current +\lettonothing\m_font_feature_asked +\newconstant \c_font_feature_state \newevery\everyfontfeatureswitch @@ -193,7 +191,7 @@ \the\everyfontfeatureswitch} \protected\def\font_feature_replace - {\ifnum\c_font_feature_state=\zerocount + {\ifzero\c_font_feature_state \ifx\m_font_feature_asked\currentfeature\else \font_feature_replace_indeed \fi @@ -214,9 +212,9 @@ \fi} \protected\def\font_feature_reset_indeed - {\let\m_font_feature_asked\empty - \let\currentfeature \s!current - \let\m_font_feature_list \s!current + {\lettonothing\m_font_feature_asked + \let\currentfeature\s!current + \let\m_font_feature_list\s!current \clf_resetfeature} \permanent\protected\def\revivefeature diff --git a/tex/context/base/mkxl/font-fil.mklx b/tex/context/base/mkxl/font-fil.mklx index b71f8df69..79535ea11 100644 --- a/tex/context/base/mkxl/font-fil.mklx +++ b/tex/context/base/mkxl/font-fil.mklx @@ -44,7 +44,7 @@ \permanent\protected\tolerant\protected\def\startfontclass[#class]% {\push_macro_fontclass \doifelse{#class}\v!each - {\let\fontclass\empty} + {\lettonothing\fontclass} {\doifsomething{#class}{\def\fontclass{#class}}}} \permanent\protected\def\stopfontclass @@ -65,8 +65,8 @@ \installcorenamespace {fontfile} % file synonyms -\let\m_font_name\empty -\let\m_font_file\empty +\lettonothing\m_font_name +\lettonothing\m_font_file \mutable\def\defaultfontfile{\truefontname{Normal}} % was cmtt10, but that one is gone @@ -141,7 +141,7 @@ % \def\fntsetdefname {\glet\somefontname\defaultfontfile} % \def\fntsetsomename{\gdef\somefontname} % takes argument -% \def\fntsetnopsize {\let\somefontsize\empty} +% \def\fntsetnopsize {\lettonothing\somefontsize} % \def\fntsetsomesize{\def\somefontsize} % takes argument % happens later, else mkvi parsing gets into troubles @@ -272,8 +272,8 @@ %D model and at that time we still defaulted to no model at all. Nowadays we default %D to the \type {modern} fontclass. -\let\fontclass \empty -\let\defaultfontclass\empty +\lettonothing\fontclass +\lettonothing\defaultfontclass \permanent\def\fontclassname#class#name% tricky ... no lastnamedcs here due to nesting {\ifcsname\??fontfile#class#name\endcsname @@ -307,48 +307,48 @@ \ifcsname\??fontfile #name\s!features\endcsname \edef\m_font_features{\lastnamedcs}\orelse % symbolic_name \ifcsname\??fontfile\fontclass#name\endcsname \expandafter\font_helpers_set_features_yes\lastnamedcs \orelse % class + parent_name \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_features_yes\lastnamedcs \else % parent_name - \let\m_font_features\empty\fi} + \lettonothing\m_font_features\fi} \def\font_helpers_set_fallbacks_yes#name% {\ifcsname\??fontfile\fontclass#name\s!fallbacks\endcsname \edef\m_font_fallbacks{\lastnamedcs}\orelse \ifcsname\??fontfile #name\s!fallbacks\endcsname \edef\m_font_fallbacks{\lastnamedcs}\orelse \ifcsname\??fontfile\fontclass#name\endcsname \expandafter\font_helpers_set_fallbacks_yes\lastnamedcs \orelse \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_fallbacks_yes\lastnamedcs \else - \let\m_font_fallbacks\empty\fi} + \lettonothing\m_font_fallbacks\fi} \def\font_helpers_set_goodies_yes#name% {\ifcsname\??fontfile\fontclass#name\s!goodies \endcsname \edef\m_font_goodies{\lastnamedcs}\orelse \ifcsname\??fontfile #name\s!goodies \endcsname \edef\m_font_goodies{\lastnamedcs}\orelse \ifcsname\??fontfile\fontclass#name\endcsname \expandafter\font_helpers_set_goodies_yes\lastnamedcs \orelse \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_goodies_yes\lastnamedcs \else - \let\m_font_goodies\empty\fi} + \lettonothing\m_font_goodies\fi} \def\font_helpers_set_designsize_yes#name% {\ifcsname\??fontfile\fontclass#name\s!designsize\endcsname \edef\m_font_designsize{\lastnamedcs}\orelse \ifcsname\??fontfile #name\s!designsize\endcsname \edef\m_font_designsize{\lastnamedcs}\orelse \ifcsname\??fontfile\fontclass#name\endcsname \expandafter\font_helpers_set_designsize_yes\lastnamedcs \orelse \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_designsize_yes\lastnamedcs \else - \let\m_font_designsize\empty\fi} + \lettonothing\m_font_designsize\fi} \def\font_helpers_set_features_nop#name% {\ifcsname\??fontfile#name\s!features\endcsname \edef\m_font_features{\lastnamedcs}\orelse \ifcsname\??fontfile#name\endcsname \expandafter\font_helpers_set_features_nop\lastnamedcs \else - \let\m_font_features\empty\fi} + \lettonothing\m_font_features\fi} \def\font_helpers_set_fallbacks_nop#name% {\ifcsname\??fontfile#name\s!fallbacks\endcsname \edef\m_font_fallbacks{\lastnamedcs}\orelse \ifcsname\??fontfile#name\endcsname \expandafter\font_helpers_set_fallbacks_nop\lastnamedcs \else - \let\m_font_fallbacks\empty\fi} + \lettonothing\m_font_fallbacks\fi} \def\font_helpers_set_goodies_nop#name% {\ifcsname\??fontfile#name\s!goodies\endcsname \edef\m_font_goodies{\lastnamedcs}\orelse \ifcsname\??fontfile#name\endcsname \expandafter\font_helpers_set_goodies_nop\lastnamedcs \else - \let\m_font_goodies\empty\fi} + \lettonothing\m_font_goodies\fi} \def\font_helpers_set_designsize_nop#name% {\ifcsname\??fontfile#name\s!designsize\endcsname \edef\m_font_designsize{\lastnamedcs}\orelse \ifcsname\??fontfile#name\endcsname \expandafter\font_helpers_set_designsize_nop\lastnamedcs \else - \let\m_font_designsize\empty\fi} + \lettonothing\m_font_designsize\fi} \def\font_helpers_update_font_parameters_yes {\font_helpers_set_features_yes \somefontname diff --git a/tex/context/base/mkxl/font-ini.mklx b/tex/context/base/mkxl/font-ini.mklx index 5e521e263..f1691c8eb 100644 --- a/tex/context/base/mkxl/font-ini.mklx +++ b/tex/context/base/mkxl/font-ini.mklx @@ -333,7 +333,7 @@ \the\everybodyfont \settrue\c_font_synchronize} -\mutable\let\savedfont\empty +\mutable\lettonothing\savedfont \installmacrostack\savedfont @@ -712,8 +712,9 @@ \mutable\let\somefontspec \s!unknown \mutable\let\somefontfile \s!unknown \mutable\let\somefontsize \zerocount -\mutable\let\somefontsizex\empty -\mutable\let\somefontsizey\empty + +\mutable\lettonothing\somefontsizex +\mutable\lettonothing\somefontsizey % \newcount\scaledfontmode % font-lib.mklx % \newcount\scaledfontsize % font-lib.mklx @@ -747,7 +748,8 @@ % \newcount\c_font_scaled_font_mode_saved % font-lib.mklx % \newcount\c_font_scaled_points % font-lib.mklx -\mutable\let\somefontspec \empty +\mutable\lettonothing\somefontspec + \mutable\let\lastrawfontcall \relax \mutable\let\lastglobalrawfontcall\relax @@ -763,9 +765,9 @@ \protected\def\font_helpers_low_level_define_normal#specification#csname% {% we can now set more at the lua end \glet\somefontname\defaultfontfile - \let\somefontsize\empty - \let\somefontsizex\empty - \let\somefontsizey\empty + \lettonothing\somefontsize + \lettonothing\somefontsizex + \lettonothing\somefontsizey \clf_definefont_one{\detokenize\expandafter{\normalexpanded{#specification}}}% the escapestring catches at \somedimen % sets \scaledfontmode and \somefontname and \somefontsize \ifcase\fontface\relax @@ -849,7 +851,7 @@ \relax \ifcase\scaledfontsize %\scaledfontsize\plusone - \let\somefontspec\empty + \lettonothing\somefontspec \let\lastrawfontcall\relax \mutable\letcsname#csname\endcsname\relax \else @@ -862,9 +864,9 @@ \protected\def\font_helpers_low_level_define_compact#specification#csname% {% we can now set more at the lua end \glet\somefontname\defaultfontfile - \let\somefontsize\empty - \let\somefontsizex\empty - \let\somefontsizey\empty + \lettonothing\somefontsize + \lettonothing\somefontsizex + \lettonothing\somefontsizey \clf_definefont_one{\detokenize\expandafter{\normalexpanded{#specification}}}% the escapestring catches at \somedimen % sets \scaledfontmode and \somefontname and \somefontsize \ifcase\fontface\relax @@ -961,7 +963,7 @@ \relax \ifcase\scaledfontsize %\scaledfontsize\plusone - \let\somefontspec\empty + \lettonothing\somefontspec \let\lastrawfontcall\relax \mutable\letcsname#csname\endcsname\relax \else @@ -980,7 +982,7 @@ % experiment \expandafter\let\expandafter\lastrawfontcall\csname#csname\endcsname \ifrelax\lastrawfontcall - \let\somefontspec\empty + \lettonothing\somefontspec \else % % \ifempty\fontclass\else\global\fi @@ -1162,7 +1164,7 @@ \newconditional\c_font_auto_size \settrue\c_font_auto_size -\mutable\let\lastfontidentifier\empty +\mutable\lettonothing\lastfontidentifier \def\v_font_identifier_basic{\??fontinstancebasic \lastfontidentifier-\fontsize-\fontface} \def\v_font_identifier_class{\??fontinstanceclass\fontclass-\lastfontidentifier-\fontsize-\fontface} @@ -1455,13 +1457,13 @@ \def\font_basics_define_body_font_environment_empty[#body][#settings][#dummy]% {\push_macro_fontclass - \let\fontclass\empty + \lettonothing\fontclass \font_basics_define_body_font_environment_class[][#body][#settings]% \pop_macro_fontclass} \def\font_basics_define_body_font_environment_unset[#body][#dummya][#dummyb]% {\push_macro_fontclass - \let\fontclass\empty + \lettonothing\fontclass \font_basics_define_body_font_environment_class[][#body][]% \pop_macro_fontclass} @@ -1604,7 +1606,7 @@ \protected\def\font_basics_define_body_font_class_given[#1][#2][#3]#4% {\push_macro_fontclass \doifelse{#4}\s!default - {\let\fontclass\empty} + {\lettonothing\fontclass} {\def\fontclass{#4}}% \definebodyfont[#1][#2][#3]% \pop_macro_fontclass} @@ -1914,8 +1916,8 @@ \edef\m_font_step{\font_bodyfontvariable\m_font_keyword}% \normalexpanded{\font_helpers_set_font_set_font_option_body{#method}{\m_font_step}{#message}}% \orelse\ifx\m_font_keyword\v!reset - \let\fontstyle\empty % new 31/7/2006 - \let\fontsize \empty + \lettonothing\fontstyle % new 31/7/2006 + \lettonothing\fontsize \orelse\ifcsname\??fontstyle\m_font_keyword\endcsname \let\fontstyle\m_font_keyword \else @@ -1965,11 +1967,6 @@ \fi -% \let\defaultfontstyle \s!rm -% \let\defaultfontalternative\s!tf -% \let\defaultfontsize \empty -% \let\defaultfontface \!!zerocount - %D So far for synchronisation. (We can inline the following macros.) \permanent\protected\def\setcurrentfont#body#style#alternative#size% not used @@ -2192,8 +2189,8 @@ {\font_helpers_check_nested_x_fontsize \font_helpers_set_current_font_xxx_alternative{#alternative}{5}\scriptscriptstyle \currentxfontsize\plustwo - \enforced\let\tx\empty - \enforced\let\txx\empty} + \enforced\lettonothing\tx + \enforced\lettonothing\txx} %D This alternative is not really needed, but for old time's sake we keep it there. %D We can speed it up when needed. @@ -2369,8 +2366,8 @@ \else \font_scale_defined_xx \fi - \enforced\let\tx \empty - \enforced\let\txx\empty} + \enforced\lettonothing\tx + \enforced\lettonothing\txx} \permanent\protected\def\sx {\currentxfontsize\plusone @@ -2397,10 +2394,10 @@ \font_scale_inherit_normal_xx \fi \fi - \enforced\let\tx \empty - \enforced\let\txx\empty - \enforced\let\sx \empty - \enforced\let\sxx\empty} + \enforced\lettonothing\tx + \enforced\lettonothing\txx + \enforced\lettonothing\sx + \enforced\lettonothing\sxx} \permanent\protected\def\useinheritxsizes{\settrue \c_font_inherit_scale} % not yet public, playground for WS and me \permanent\protected\def\usedefinedxsizes{\setfalse\c_font_inherit_scale} % not yet public, playground for WS and me diff --git a/tex/context/base/mkxl/font-mat.mklx b/tex/context/base/mkxl/font-mat.mklx index 39ed13069..e7a7574a3 100644 --- a/tex/context/base/mkxl/font-mat.mklx +++ b/tex/context/base/mkxl/font-mat.mklx @@ -121,7 +121,7 @@ \settrue \c_font_auto_size \fi} -\mutable\let\mathsizesuffix\empty +\mutable\lettonothing\mathsizesuffix \mutable\let\fontfamily\relax % for now public but it is a helper @@ -134,16 +134,20 @@ % the order is important as we depend on known id's when completing fonts % enabling is needed when we have fallbacks which spoils the families; per % mid 2022 this is no longer true as we do fallbacks differently - \let\mathsizesuffix\mathscriptscriptsuffix\let\fontface\!!plusthree + \let\mathsizesuffix\mathscriptscriptsuffix + \let\fontface\!!plusthree \font_helpers_set_math_family_a\scriptscriptfont#mrtag\font % defines \font_helpers_set_math_family_a\scriptscriptfont#mrtag\font % enables / still needed ? - \let\mathsizesuffix\mathscriptsuffix \let\fontface\!!plustwo + \let\mathsizesuffix\mathscriptsuffix + \let\fontface\!!plustwo \font_helpers_set_math_family_a\scriptfont #mrtag\font % defines \font_helpers_set_math_family_a\scriptfont #mrtag\font % enables / still needed ? - \let\mathsizesuffix\mathtextsuffix \let\fontface\!!plusone + \let\mathsizesuffix\mathtextsuffix + \let\fontface\!!plusone \font_helpers_set_math_family_a\textfont #mrtag\font % defines \font_helpers_set_math_family_a\textfont #mrtag\font % enables / still needed ? - \let\mathsizesuffix\empty \let\fontface\!!zerocount + \lettonothing\mathsizesuffix + \let\fontface\!!zerocount \let\fontbody\savedfontbody \setfalse\c_font_auto_size} @@ -166,12 +170,14 @@ \font_helpers_set_math_family_set_scales_compact % the order is important as we depend on known id's when completing fonts % enabling is needed when we have fallbacks which spoils the families - \let\mathsizesuffix\mathtextsuffix \let\fontface\!!plusone + \let\mathsizesuffix\mathtextsuffix + \let\fontface\!!plusone \font_helpers_set_math_family_a\textfont #mrtag\font % defines \font_helpers_set_math_family_a\textfont #mrtag\font % enables / still needed ? \scriptfont #mrtag\font % reuses \scriptscriptfont#mrtag\font % reuses - \let\mathsizesuffix\empty \let\fontface\!!zerocount + \lettonothing\mathsizesuffix + \let\fontface\!!zerocount \let\fontbody\savedfontbody \setfalse\c_font_auto_size} @@ -189,16 +195,20 @@ \let\fontfamily#familytag% \c_math_last_family_used\zerocount \font_helpers_set_math_family_set_scales_normal - \let\mathsizesuffix\mathscriptscriptsuffix\let\fontface\!!plusthree + \let\mathsizesuffix\mathscriptscriptsuffix + \let\fontface\!!plusthree \font_helpers_set_math_family_bold_a\scriptscriptfont#mbfam#mrfam% defines \font_helpers_set_math_family_bold_a\scriptscriptfont#mbfam#mrfam% enables / still needed ? - \let\mathsizesuffix\mathscriptsuffix \let\fontface\!!plustwo + \let\mathsizesuffix\mathscriptsuffix + \let\fontface\!!plustwo \font_helpers_set_math_family_bold_a\scriptfont #mbfam#mrfam% defines \font_helpers_set_math_family_bold_a\scriptfont #mbfam#mrfam% enables / still needed ? - \let\mathsizesuffix\mathtextsuffix \let\fontface\!!plusone + \let\mathsizesuffix\mathtextsuffix + \let\fontface\!!plusone \font_helpers_set_math_family_bold_a\textfont #mbfam#mrfam% defines \font_helpers_set_math_family_bold_a\textfont #mbfam#mrfam% enables / still needed ? - \let\mathsizesuffix\empty \let\fontface\!!zerocount + \lettonothing\mathsizesuffix + \let\fontface\!!zerocount \let\fontbody\savedfontbody \let\defaultfontclass\savedfontclass \setfalse\c_font_auto_size} @@ -209,12 +219,14 @@ \let\savedfontbody\fontbody \let\fontfamily#familytag% \c_math_last_family_used\zerocount - \let\mathsizesuffix\mathtextsuffix \let\fontface\!!plusone + \let\mathsizesuffix\mathtextsuffix + \let\fontface\!!plusone \font_helpers_set_math_family_bold_a\textfont #mbfam#mrfam% defines \font_helpers_set_math_family_bold_a\textfont #mbfam#mrfam% enables / still needed ? \scriptfont #mbfam\textfont#mbfam% reuses \scriptscriptfont#mbfam\textfont#mbfam% reuses - \let\mathsizesuffix\empty \let\fontface\!!zerocount + \lettonothing\mathsizesuffix + \let\fontface\!!zerocount \let\fontbody\savedfontbody \let\defaultfontclass\savedfontclass \setfalse\c_font_auto_size} @@ -325,15 +337,15 @@ %D 0 while in rl mode 0 is a copy of 1. There is no real overhead involved in this. %D This also permits different font definitions for normal and mixed. -\let\m_font_class_direction\empty -\let\m_font_class_features \empty -\let\m_font_class_fallbacks\empty -\let\m_font_class_goodies \empty +\lettonothing\m_font_class_direction +\lettonothing\m_font_class_features +\lettonothing\m_font_class_fallbacks +\lettonothing\m_font_class_goodies -\let\m_font_direction\empty -\let\m_font_features \empty -\let\m_font_fallbacks\empty -\let\m_font_goodies \empty +\lettonothing\m_font_direction +\lettonothing\m_font_features +\lettonothing\m_font_fallbacks +\lettonothing\m_font_goodies \appendtoks \font_helpers_set_math_family\c_font_fam_mr\s!mr @@ -474,7 +486,7 @@ \permanent\protected\def\autobigmath{\synchronizebigmathflag\plusone\synchronizebigmath} \permanent\protected\def\bigmath {\synchronizebigmathflag\plustwo\synchronizebigmath} -\mutable\let\bigmathfontsize\empty +\mutable\lettonothing\bigmathfontsize \permanent\protected\def\synchronizebigmath {\ifconditional\c_font_compact diff --git a/tex/context/base/mkxl/font-sel.mklx b/tex/context/base/mkxl/font-sel.mklx index a25b7fab7..9e5c53894 100644 --- a/tex/context/base/mkxl/font-sel.mklx +++ b/tex/context/base/mkxl/font-sel.mklx @@ -269,7 +269,7 @@ \edef\currentselectfont{\expandnamespacevalue\??fontshortstyle{#style}\s!rm}% \setupcurrentselectfont[#settings]% \else - \let\currentselectfont\empty + \lettonothing\currentselectfont \setupcurrentselectfont[#style]% \fi} diff --git a/tex/context/base/mkxl/font-set.mklx b/tex/context/base/mkxl/font-set.mklx index 631c4af05..421217c8b 100644 --- a/tex/context/base/mkxl/font-set.mklx +++ b/tex/context/base/mkxl/font-set.mklx @@ -34,7 +34,7 @@ % \enablemode[lmmath] -\let\m_font_fallback_name\empty +\lettonothing\m_font_fallback_name % keep as reference: % diff --git a/tex/context/base/mkxl/font-sol.mklx b/tex/context/base/mkxl/font-sol.mklx index 8f3d3d712..064f39b9d 100644 --- a/tex/context/base/mkxl/font-sol.mklx +++ b/tex/context/base/mkxl/font-sol.mklx @@ -107,11 +107,11 @@ }% \relax} -\let\currentfontsolution\empty +\lettonothing\currentfontsolution \permanent\protected\def\resetfontsolution % resets all {\clf_resetfontsolution - \let\currentfontsolution\empty} + \lettonothing\currentfontsolution} \permanent\protected\def\startfontsolution % [#1] {\pushmacro\currentfontsolution diff --git a/tex/context/base/mkxl/font-sty.mklx b/tex/context/base/mkxl/font-sty.mklx index 5391f39b6..49fa52d38 100644 --- a/tex/context/base/mkxl/font-sty.mklx +++ b/tex/context/base/mkxl/font-sty.mklx @@ -142,8 +142,8 @@ %D These commands are not grouped! Grouping is most probably done by the calling %D macro's and would lead to unnecessary overhead. -\let\m_current_convert_font \empty -\let\m_current_convert_font_dt\empty +\lettonothing\m_current_convert_font +\lettonothing\m_current_convert_font_dt \permanent\protected\def\doconvertfont#specification% takes second argument / this command is obsolete {\edef\m_current_convert_font{#specification}% @@ -180,7 +180,7 @@ \setfalse\fontattributeisset -\mutable\let\currentdetokenizedstyleparameter\empty +\mutable\lettonothing\currentdetokenizedstyleparameter \permanent\protected\def\dousestyleparameter#value% {\edef\currentstyleparameter{#value}% @@ -259,8 +259,8 @@ \protected\def\font_styles_use_generic#specification% {\let\currentstyle\s!unknown % reasonable generic tag - \letstyleparameter\c!style\empty - \letstyleparameter\c!color\empty + \resetstyleparameter\c!style + \resetstyleparameter\c!color \setupcurrentstyle[#specification]% \usestylestyleandcolor\c!style\c!color} diff --git a/tex/context/base/mkxl/font-sym.mklx b/tex/context/base/mkxl/font-sym.mklx index e1de316ef..83b3447ea 100644 --- a/tex/context/base/mkxl/font-sym.mklx +++ b/tex/context/base/mkxl/font-sym.mklx @@ -129,9 +129,9 @@ \installcorenamespace{symbolfont} -\mutable\let\skedsymbolfont \empty % for diagnostics -\mutable\let\currentsymbolfont\empty -\mutable\let\askedsymbolfont \empty +\mutable\lettonothing\skedsymbolfont % for diagnostics +\mutable\lettonothing\currentsymbolfont +\mutable\lettonothing\askedsymbolfont \permanent\protected\def\setscaledstyledsymbolicfont#1#2#3% quite a slowdown, glyphfontfile {\edef\askedsymbolfont{\truefontname{\glyphfontfile{#3}} at \the\dimexpr#2\dimexpr\currentfontbodyscale\dimexpr#1}% diff --git a/tex/context/base/mkxl/font-var.mklx b/tex/context/base/mkxl/font-var.mklx index 421521f50..aeec18054 100644 --- a/tex/context/base/mkxl/font-var.mklx +++ b/tex/context/base/mkxl/font-var.mklx @@ -38,17 +38,19 @@ \immutable\def\defaultfontbody {\normalizedbodyfontsize} \immutable\let\defaultfontstyle \s!rm \immutable\let\defaultfontalternative\s!tf -\immutable\let\defaultfontsize \empty \immutable\let\defaultfontface \!!zerocount -\mutable\let\globalfontclass\empty -\mutable\let\fontclass \empty +\immutable\lettonothing\defaultfontsize + \mutable\let\fontbody \defaultfontbody \mutable\let\fontstyle \defaultfontstyle \mutable\let\fontalternative\defaultfontalternative \mutable\let\fontsize \defaultfontsize \mutable\let\fontface \!!zerocount +\mutable\lettonothing\globalfontclass +\mutable\lettonothing\fontclass + \installmacrostack\fontstyle % we can use an indirect mapping for fontclasses (map string onto numbers) and indeed this diff --git a/tex/context/base/mkxl/grph-epd.mkxl b/tex/context/base/mkxl/grph-epd.mkxl index c8e5cd1c8..a26ee3235 100644 --- a/tex/context/base/mkxl/grph-epd.mkxl +++ b/tex/context/base/mkxl/grph-epd.mkxl @@ -19,7 +19,7 @@ % hm, this one is globally overloaded -\mutable\let\mergedfigurereference\empty +\mutable\lettonothing\mergedfigurereference \defineoverlay[system:graphics:epdf][\directsetup{system:graphics:epdf}] diff --git a/tex/context/base/mkxl/grph-fig.mkxl b/tex/context/base/mkxl/grph-fig.mkxl index dc709c477..0d4462730 100644 --- a/tex/context/base/mkxl/grph-fig.mkxl +++ b/tex/context/base/mkxl/grph-fig.mkxl @@ -31,7 +31,7 @@ \newconstant\c_grph_buffers_mode -\mutable\let\lasttypesetbuffer\empty +\mutable\lettonothing\lasttypesetbuffer \permanent\protected\def\typesetbuffer {\bgroup\setconstant\c_grph_buffers_mode\plusone \grph_buffers_typeset} \permanent\protected\def\typesetbufferonly{\bgroup\setconstant\c_grph_buffers_mode\zerocount\grph_buffers_typeset} diff --git a/tex/context/base/mkxl/grph-inc.mkxl b/tex/context/base/mkxl/grph-inc.mkxl index 29efe620f..19cce3511 100644 --- a/tex/context/base/mkxl/grph-inc.mkxl +++ b/tex/context/base/mkxl/grph-inc.mkxl @@ -806,7 +806,7 @@ \ifdim\scratchdimen<\d_grph_include_collection_minheight \d_grph_include_collection_minheight\scratchdimen \fi \fi} -\mutable\let\currentexternalfigurecollection\empty +\mutable\lettonothing\currentexternalfigurecollection \permanent\protected\def\startexternalfigurecollection[#1]% {\begingroup diff --git a/tex/context/base/mkxl/grph-trf.mkxl b/tex/context/base/mkxl/grph-trf.mkxl index 0f1458873..639eacbbc 100644 --- a/tex/context/base/mkxl/grph-trf.mkxl +++ b/tex/context/base/mkxl/grph-trf.mkxl @@ -61,9 +61,9 @@ % scratch: -\let\m_grph_scale_temp \empty -\let\m_grph_scale_temp_x\empty -\let\m_grph_scale_temp_y\empty +\lettonothing\m_grph_scale_temp +\lettonothing\m_grph_scale_temp_x +\lettonothing\m_grph_scale_temp_y % public: @@ -104,10 +104,10 @@ {\bgroup % this is quite common so we might make this a helper \ifarguments - \let\currentscale\empty + \lettonothing\currentscale \or \ifhastok={#1}% - \let\currentscale\empty + \lettonothing\currentscale \setupcurrentscale[#1]% \else \edef\currentscale{#1}% @@ -795,8 +795,8 @@ \c!offset=\v!overlay, \c!frame=\v!off] -\let\p_rotation_location\empty -\let\p_rotation_rotation\empty +\lettonothing\p_rotation_location +\lettonothing\p_rotation_rotation \permanent\tolerant\protected\def\rotate[#1]% \bgroup: \rotate kan argument zijn {\bgroup diff --git a/tex/context/base/mkxl/hand-ini.mkxl b/tex/context/base/mkxl/hand-ini.mkxl index 1d4dabf6b..3a4193f1a 100644 --- a/tex/context/base/mkxl/hand-ini.mkxl +++ b/tex/context/base/mkxl/hand-ini.mkxl @@ -73,7 +73,7 @@ % \def\fonthandlingerror{\writestatus\m!fonts{font handling is replaced by features in mkiv}} % -% \let\fonthandling\empty +% \lettonothing\fonthandling % % \protected\def\startfonthandling #1{\fonthandlingerror\fonthandlingerror\gobbleuntil\stopfonthandling} % can't happen % \protected\def\definefonthandling {\dotripleempty\dodefinefonthandling} diff --git a/tex/context/base/mkxl/lang-hyp.mkxl b/tex/context/base/mkxl/lang-hyp.mkxl index ae8b84dcb..25699696e 100644 --- a/tex/context/base/mkxl/lang-hyp.mkxl +++ b/tex/context/base/mkxl/lang-hyp.mkxl @@ -107,19 +107,19 @@ % [\c!method=\s!traditional] % no translations \permanent\tolerant\protected\def\definehyphenationfeatures[#1]#*[#2]% - {\begingroup - \letdummyparameter\c!characters \empty % maybe \s!characters - \letdummyparameter\c!hyphens \empty % maybe \s!hyphens - \letdummyparameter\c!joiners \empty % maybe \s!joiners - \letdummyparameter\c!rightwords \zerocount % maybe \s!rightwords - \letdummyparameter\s!lefthyphenmin \zerocount - \letdummyparameter\s!righthyphenmin \zerocount - \letdummyparameter\s!hyphenmin \zerocount - \letdummyparameter\s!lefthyphenchar \zerocount - \letdummyparameter\s!righthyphenchar\zerocount - \letdummyparameter\c!alternative \empty - \letdummyparameter\c!rightedge \empty - \letdummyparameter\c!rightchars \empty + {\begingroup % maybe simple handler + \resetdummyparameter\c!characters % maybe \s!characters + \resetdummyparameter\c!hyphens % maybe \s!hyphens + \resetdummyparameter\c!joiners % maybe \s!joiners + \letdummyparameter \c!rightwords \zerocount % maybe \s!rightwords + \letdummyparameter \s!lefthyphenmin \zerocount + \letdummyparameter \s!righthyphenmin \zerocount + \letdummyparameter \s!hyphenmin \zerocount + \letdummyparameter \s!lefthyphenchar \zerocount + \letdummyparameter \s!righthyphenchar\zerocount + \resetdummyparameter\c!alternative + \resetdummyparameter\c!rightedge + \resetdummyparameter\c!rightchars \getdummyparameters[#2]% \clf_definehyphenationfeatures {#1}% diff --git a/tex/context/base/mkxl/lang-ini.mkxl b/tex/context/base/mkxl/lang-ini.mkxl index ff9f5cfda..9acc2535b 100644 --- a/tex/context/base/mkxl/lang-ini.mkxl +++ b/tex/context/base/mkxl/lang-ini.mkxl @@ -58,9 +58,9 @@ %D \startmode[*nl] dutch \stopmode} %D \stoptyping -\mutable\let\askedlanguage \empty -\mutable\let\currentlanguage \empty -\mutable\let\currentmainlanguage\empty +\mutable\lettonothing\askedlanguage +\mutable\lettonothing\currentlanguage +\mutable\lettonothing\currentmainlanguage %D \macros %D {defaultlanguage,languageparameter,specificlanguageparameter} @@ -191,7 +191,7 @@ % \language[#1] gave unwanted side effect of loading language specifics -\mutable\let\currentsetuplanguage\empty +\mutable\lettonothing\currentsetuplanguage \permanent\tolerant\protected\def\installlanguage[#1]#*[#2]% {\ifcondition\validassignment{#2}% @@ -544,7 +544,7 @@ %D You can setup the default language to reset settings. -\mutable\let\currentlanguagesetups\empty +\mutable\lettonothing\currentlanguagesetups \appendtoks \edef\currentlanguagesetups{\languageparameter\c!setups}% diff --git a/tex/context/base/mkxl/lang-lab.mkxl b/tex/context/base/mkxl/lang-lab.mkxl index 2a42861cd..a1d758f09 100644 --- a/tex/context/base/mkxl/lang-lab.mkxl +++ b/tex/context/base/mkxl/lang-lab.mkxl @@ -60,7 +60,7 @@ \installcorenamespace{label} -% \let\currentlabelcategory\empty +% \lettonothing\currentlabelcategory \permanent\tolerant\protected\def\definelabelclass[#1]#*[#2]% {\normalexpanded @@ -77,12 +77,13 @@ % hm, not interfaced -\mutable\let\thetextprefix\empty +\mutable\lettonothing\thetextprefix \mutable\let\currenttextprefixclass\s!unknown -\mutable\let\currenttextprefixname \empty \mutable\let\currenttextprefixtag \s!unknown +\mutable\lettonothing\currenttextprefixname + \protected\def\lang_labels_define_class_indeed#1#2#3#4#5#6#7#8#9% {\permanent\instance\protected\defcsname setup#1text\endcsname{\protecttextprefixes #2\def\currenttextprefixclass{#1}\lang_labels_text_prefix_setup}% \permanent\instance\protected\defcsname preset#1text\endcsname{\protecttextprefixes\plusone\def\currenttextprefixclass{#1}\lang_labels_text_prefix_setup}% @@ -223,8 +224,8 @@ \expandafter\lang_labels_text_prefix_assign_dumb \fi{#1}} -\let\m_lang_labels_left \empty -\let\m_lang_labels_right\empty +\lettonothing\m_lang_labels_left +\lettonothing\m_lang_labels_right \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 diff --git a/tex/context/base/mkxl/lang-url.mkxl b/tex/context/base/mkxl/lang-url.mkxl index 87e64feaf..2d41c6c32 100644 --- a/tex/context/base/mkxl/lang-url.mkxl +++ b/tex/context/base/mkxl/lang-url.mkxl @@ -64,8 +64,8 @@ \enforced\let\Ux\eUx \to \everyhyphenatedurl -\mutable\let\hyphenatedurlseparator \empty % \periodcentered -\mutable\let\hyphenatedurldiscretionary\empty +\mutable\lettonothing\hyphenatedurlseparator % \periodcentered +\mutable\lettonothing\hyphenatedurldiscretionary \setnewconstant\hyphenatedurllefthyphenmin \plusthree \setnewconstant\hyphenatedurlrighthyphenmin\plusthree diff --git a/tex/context/base/mkxl/math-ali.mkxl b/tex/context/base/mkxl/math-ali.mkxl index a2b09a084..6c0fb6b82 100644 --- a/tex/context/base/mkxl/math-ali.mkxl +++ b/tex/context/base/mkxl/math-ali.mkxl @@ -395,7 +395,7 @@ \protected\def\math_alignment_lbox#1% {\begingroup - \setbox\scratchbox\hbox{\letformulaparameter\c!location\empty#1}% + \setbox\scratchbox\hbox{\resetformulaparameter\c!location#1}% \ifzeropt\wd\scratchbox\else %\enablematrixalign \hpack @@ -409,7 +409,7 @@ \protected\def\math_alignment_rbox#1% {\begingroup - \setbox\scratchbox\hbox{\letformulaparameter\c!location\empty#1}% + \setbox\scratchbox\hbox{\resetformulaparameter\c!location#1}% \ifzeropt\wd\scratchbox\else %\enablematrixalign \hpack @@ -1499,11 +1499,12 @@ \defcsname\??mathmatrixrulealternative\v!auto\endcsname#1#2% {\math_matrix_hrule_progress{#1}% - \ifnum\c_math_matrix_first=\zerocount - \kern-\dimexpr\linewidth\relax - \else - \kern-\dimexpr.5\d_math_eqalign_distance+\linewidth\relax - \fi + % \ifzero\c_math_matrix_first + % \kern-\dimexpr\linewidth\relax + % \else + % \kern-\dimexpr.5\d_math_eqalign_distance+\linewidth\relax + % \fi + \kern-\dimexpr\ifzero\c_math_matrix_first\else.5\d_math_eqalign_distance+\fi\linewidth\relax \math_matrix_horizontal_rule_yes{#2}% %boundary\c_math_matrix_sl_boundary \enforced\let\NR\math_matrix_NL_NR} @@ -1720,8 +1721,8 @@ \installcorenamespace{mathmatrixalignlocation} -\mutable\let\mathmatrixleft \empty % experimental hook -\mutable\let\mathmatrixright\empty % experimental hook +\mutable\lettonothing\mathmatrixleft % experimental hook +\mutable\lettonothing\mathmatrixright % experimental hook \defcsname\??mathmatrixalignlocation\v!top \endcsname{\raise\dimexpr(\nextboxdp-\nextboxht)/2 +\mathaxisheight\mathstyle\relax} \defcsname\??mathmatrixalignlocation\v!high \endcsname{\raise\dimexpr(\nextboxdp-\nextboxht)/2\relax} @@ -2307,7 +2308,7 @@ \def\strc_math_flush_box_framed_fit_inline {\let\currentformulaframed\currentformula - \letformulaframedparameter\c!location\empty + \resetformulaframedparameter\c!location \letformulaframedparameter\c!width\v!fit \strc_math_flush_box_framed_common} diff --git a/tex/context/base/mkxl/math-del.mklx b/tex/context/base/mkxl/math-del.mklx deleted file mode 100644 index 0377f3507..000000000 --- a/tex/context/base/mkxl/math-del.mklx +++ /dev/null @@ -1,127 +0,0 @@ -%D \module -%D [ file=math-del, -%D version=2022.07.29, -%D title=\CONTEXT\ Math Macros, -%D subtitle=delimiteds, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -\writestatus{loading}{ConTeXt Math Macros / Delimited} - -\unprotect - -%D This is a variant on radicals but in the end it was better to just define a new -%D environment for this. This is because we don't have the rule and we want a -%D different control over the spacing. We also don't want the degree. - -% Todo: also add the mp plugin here but that more fun stuff for later (when we pick -% up school math). - -\installcorenamespace{mathdelimited} -\installcorenamespace{mathdelimitedalternative} - -\installcommandhandler \??mathdelimited {mathdelimited} \??mathdelimited - -\setupmathdelimited - [\c!alternative=\v!normal, - \c!mpoffset=.25\exheight, - \c!topoffset=\zeropoint, - \c!bottomoffset=\zeropoint, - \c!height=\zeropoint, - \c!depth=\zeropoint, - \c!strut=\v!height, - \c!source=\zerocount, - \c!size=\zerocount, - \c!left=\zerocount, - \c!right=\zerocount, - \c!leftmargin=\zeropoint, - \c!rightmargin=\zeropoint] - -\appendtoks - \frozen\protected\instance\edefcsname\currentmathdelimited\endcsname{\math_delimited_handle{\currentmathdelimited}} -\to \everydefinemathdelimited - -\mutable\let\currentmathdelimited\empty - -\tolerant\protected\def\math_delimited_handle#tag#*[#settings]#:#body% - {\begingroup - \edef\currentmathdelimited{#tag}% - \setupcurrentmathdelimited[#settings]% - \math_delimited_alternative{% - \begincsname\??mathwhateverstrut\mathdelimitedparameter\c!strut\endcsname - \scratchdimen\mathdelimitedparameter\c!leftmargin \relax\ifzeropt\scratchdimen\else\kern\scratchdimen\fi - #body% - \scratchdimen\mathdelimitedparameter\c!rightmargin\relax\ifzeropt\scratchdimen\else\kern\scratchdimen\fi - }% - \endgroup} - -\def\math_delimited_alternative{\csname\??mathdelimitedalternative\mathdelimitedparameter\c!alternative\endcsname} - -\protected\def\math_delimited_common - {\Udelimited - \s!height\dimexpr\mathdelimitedparameter\c!height+\mathdelimitedparameter\c!topoffset\relax - \s!depth \dimexpr\mathdelimitedparameter\c!depth+\mathdelimitedparameter\c!bottomoffset\relax - \s!source\numexpr\namedboxanchor{\mathdelimitedparameter\c!source}\relax - \s!style \normalmathstyle - \s!size \numexpr\namedboxanchor{\mathdelimitedparameter\c!size}\relax - \zerocount \mathdelimitedparameter\c!left - \zerocount \mathdelimitedparameter\c!right - \relax} - -\defcsname\??mathdelimitedalternative\v!default\endcsname % #body% - {\math_delimited_common} % {#body}} - -\defcsname\??mathdelimitedalternative\v!normal\endcsname#body% - {\edef\p_color{\mathdelimitedparameter\c!color}% - \ifempty\p_color - \math_delimited_common{#body}% {} really needed as \rootdelimited expands first - \else - \pushcolor[\p_color]% - \math_delimited_common - {\popcolor#body}% - \fi} - -\integerdef\delimitedrighthatuc \privatecharactercode{delimited right hat} -\integerdef\delimitedrighttildeuc \privatecharactercode{delimited right tilde} -\integerdef\delimitedrightcheckuc \privatecharactercode{delimited right check} - -% todo: some more .. are the offsets okay? - -\definemathdelimited - [fourier] - [\c!topoffset=.2\exheight, - \c!right=\delimitedrighthatuc] - -\definemathdelimited - [inversefourier] - [fourier] - [\c!right=\delimitedrightcheckuc] - -\definemathdelimited - [fuzzyfourier] - [fourier] - [\c!right=\delimitedrighttildeuc] - -% \definemathdelimited -% [bannuity] -% [%topoffset=.2\exheight, -% \c!strut=no, -% \c!rightmargin=.05\emwidth, -% \c!right=\delimitedrightanutityuc] - -% $ \autofences \fourier{(z+\frac12)} + \courier{(z+\frac12)} + \xourier{(z+\frac12)} $ - -\definemathdelimited [primed] [\c!right="2032,\c!size=1,\c!topoffset=.2\exheight] -\definemathdelimited [doubleprimed] [primed] [\c!right="2033] -\definemathdelimited [tripleprimed] [primed] [\c!right="2034] -\definemathdelimited [quadrupleprimed] [primed] [\c!right="2057] -\definemathdelimited [reverseprimed] [primed] [\c!right="2035] -\definemathdelimited [doublereverseprimed] [primed] [\c!right="2036] -\definemathdelimited [triplereverseprimed] [primed] [\c!right="2037] - -\protect \endinput diff --git a/tex/context/base/mkxl/math-dld.mklx b/tex/context/base/mkxl/math-dld.mklx new file mode 100644 index 000000000..33849e723 --- /dev/null +++ b/tex/context/base/mkxl/math-dld.mklx @@ -0,0 +1,127 @@ +%D \module +%D [ file=math-dld, +%D version=2022.07.29, +%D title=\CONTEXT\ Math Macros, +%D subtitle=delimiteds, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Math Macros / Delimited} + +\unprotect + +%D This is a variant on radicals but in the end it was better to just define a new +%D environment for this. This is because we don't have the rule and we want a +%D different control over the spacing. We also don't want the degree. + +% Todo: also add the mp plugin here but that more fun stuff for later (when we pick +% up school math). + +\installcorenamespace{mathdelimited} +\installcorenamespace{mathdelimitedalternative} + +\installcommandhandler \??mathdelimited {mathdelimited} \??mathdelimited + +\setupmathdelimited + [\c!alternative=\v!normal, + \c!mpoffset=.25\exheight, + \c!topoffset=\zeropoint, + \c!bottomoffset=\zeropoint, + \c!height=\zeropoint, + \c!depth=\zeropoint, + \c!strut=\v!height, + \c!source=\zerocount, + \c!size=\zerocount, + \c!left=\zerocount, + \c!right=\zerocount, + \c!leftmargin=\zeropoint, + \c!rightmargin=\zeropoint] + +\appendtoks + \frozen\protected\instance\edefcsname\currentmathdelimited\endcsname{\math_delimited_handle{\currentmathdelimited}} +\to \everydefinemathdelimited + +\mutable\lettonothing\currentmathdelimited + +\tolerant\protected\def\math_delimited_handle#tag#*[#settings]#:#body% + {\begingroup + \edef\currentmathdelimited{#tag}% + \setupcurrentmathdelimited[#settings]% + \math_delimited_alternative{% + \begincsname\??mathwhateverstrut\mathdelimitedparameter\c!strut\endcsname + \scratchdimen\mathdelimitedparameter\c!leftmargin \relax\ifzeropt\scratchdimen\else\kern\scratchdimen\fi + #body% + \scratchdimen\mathdelimitedparameter\c!rightmargin\relax\ifzeropt\scratchdimen\else\kern\scratchdimen\fi + }% + \endgroup} + +\def\math_delimited_alternative{\csname\??mathdelimitedalternative\mathdelimitedparameter\c!alternative\endcsname} + +\protected\def\math_delimited_common + {\Udelimited + \s!height\dimexpr\mathdelimitedparameter\c!height+\mathdelimitedparameter\c!topoffset\relax + \s!depth \dimexpr\mathdelimitedparameter\c!depth+\mathdelimitedparameter\c!bottomoffset\relax + \s!source\numexpr\namedboxanchor{\mathdelimitedparameter\c!source}\relax + \s!style \normalmathstyle + \s!size \numexpr\namedboxanchor{\mathdelimitedparameter\c!size}\relax + \zerocount \mathdelimitedparameter\c!left + \zerocount \mathdelimitedparameter\c!right + \relax} + +\defcsname\??mathdelimitedalternative\v!default\endcsname % #body% + {\math_delimited_common} % {#body}} + +\defcsname\??mathdelimitedalternative\v!normal\endcsname#body% + {\edef\p_color{\mathdelimitedparameter\c!color}% + \ifempty\p_color + \math_delimited_common{#body}% {} really needed as \rootdelimited expands first + \else + \pushcolor[\p_color]% + \math_delimited_common + {\popcolor#body}% + \fi} + +\integerdef\delimitedrighthatuc \privatecharactercode{delimited right hat} +\integerdef\delimitedrighttildeuc \privatecharactercode{delimited right tilde} +\integerdef\delimitedrightcheckuc \privatecharactercode{delimited right check} + +% todo: some more .. are the offsets okay? + +\definemathdelimited + [fourier] + [\c!topoffset=.2\exheight, + \c!right=\delimitedrighthatuc] + +\definemathdelimited + [inversefourier] + [fourier] + [\c!right=\delimitedrightcheckuc] + +\definemathdelimited + [fuzzyfourier] + [fourier] + [\c!right=\delimitedrighttildeuc] + +% \definemathdelimited +% [bannuity] +% [%topoffset=.2\exheight, +% \c!strut=no, +% \c!rightmargin=.05\emwidth, +% \c!right=\delimitedrightanutityuc] + +% $ \autofences \fourier{(z+\frac12)} + \courier{(z+\frac12)} + \xourier{(z+\frac12)} $ + +\definemathdelimited [primed] [\c!right="2032,\c!size=1,\c!topoffset=.2\exheight] +\definemathdelimited [doubleprimed] [primed] [\c!right="2033] +\definemathdelimited [tripleprimed] [primed] [\c!right="2034] +\definemathdelimited [quadrupleprimed] [primed] [\c!right="2057] +\definemathdelimited [reverseprimed] [primed] [\c!right="2035] +\definemathdelimited [doublereverseprimed] [primed] [\c!right="2036] +\definemathdelimited [triplereverseprimed] [primed] [\c!right="2037] + +\protect \endinput diff --git a/tex/context/base/mkxl/math-fen.mkxl b/tex/context/base/mkxl/math-fen.mkxl index 1efc6bbe6..69be6adca 100644 --- a/tex/context/base/mkxl/math-fen.mkxl +++ b/tex/context/base/mkxl/math-fen.mkxl @@ -399,7 +399,7 @@ \setfalse\c_math_fenced_level_mode \c_attr_mathsize\attributeunsetvalue % - \letmathfenceparameter\c!size\empty + \resetmathfenceparameter\c!size \letmathfenceparameter\c!factor\v!auto % so far \ifparameter#2\or diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl index 5fcd232a2..480a56642 100644 --- a/tex/context/base/mkxl/math-ini.mkxl +++ b/tex/context/base/mkxl/math-ini.mkxl @@ -1968,7 +1968,7 @@ \protected\def\math_function_handle#1#2#3% {\begingroup - \letdummyparameter\c!mathlimits\empty + \resetdummyparameter\c!mathlimits \getdummyparameters[#1]% \edef\p_limits{\dummyparameter\c!mathlimits}% \mathatom diff --git a/tex/context/base/mkxl/math-rad.mklx b/tex/context/base/mkxl/math-rad.mklx index 9dfc80d13..645d32740 100644 --- a/tex/context/base/mkxl/math-rad.mklx +++ b/tex/context/base/mkxl/math-rad.mklx @@ -101,8 +101,8 @@ \frozen\protected\instance\edefcsname\currentmathradical\endcsname{\math_radical_handle{\currentmathradical}} \to \everydefinemathradical -\mutable\let\currentmathradical \empty -\mutable\let\currentmathradicaldegree\empty +\mutable\lettonothing\currentmathradical +\mutable\lettonothing\currentmathradicaldegree \setmathignore\Umathradicaldegreebefore\plusone diff --git a/tex/context/base/mkxl/math-stc.mklx b/tex/context/base/mkxl/math-stc.mklx index 828115f83..8eb9d59ad 100644 --- a/tex/context/base/mkxl/math-stc.mklx +++ b/tex/context/base/mkxl/math-stc.mklx @@ -215,9 +215,9 @@ %D First we implement the helper that deals with an extensible in the middle and %D top and|/|or bottom texts: -\let\m_math_stackers_text_top \empty -\let\m_math_stackers_text_bottom\empty -\let\m_math_stackers_text_middle\empty +\lettonothing\m_math_stackers_text_top +\lettonothing\m_math_stackers_text_bottom +\lettonothing\m_math_stackers_text_middle \def\math_stackers_flushtext#command#text% {\ifdim\scratchleftoffset >\zeropoint\math_stackers_skip\scratchleftoffset \fi diff --git a/tex/context/base/mkxl/meta-ini.mkxl b/tex/context/base/mkxl/meta-ini.mkxl index 55a0d8043..bd4445a2f 100644 --- a/tex/context/base/mkxl/meta-ini.mkxl +++ b/tex/context/base/mkxl/meta-ini.mkxl @@ -368,15 +368,15 @@ \permanent\protected\def\finalizeMPdrawing {\MPdrawingdonetrue} -\mutable\let\MPdrawingdata\empty +\mutable\lettonothing\MPdrawingdata \permanent\protected\def\resetMPdrawing - {\glet\MPdrawingdata\empty + {\glettonothing\MPdrawingdata \global\MPdrawingdonefalse} \permanent\protected\def\pushMPdrawing {\globalpushmacro\MPdrawingdata - \glet\MPdrawingdata\empty} + \glettonothing\MPdrawingdata} \permanent\protected\def\popMPdrawing {\globalpopmacro\MPdrawingdata} @@ -415,7 +415,7 @@ \mutable\def\width {0 } % left-over, obsolete \mutable\def\height{0 } % left-over, obsolete -\mutable\let\currentMPclip\empty +\mutable\lettonothing\currentMPclip \protected\def\meta_grab_clip_path#1#2#3% {\begingroup @@ -496,7 +496,7 @@ %D Currently the inheritance of backgrounds does not work and we might drop it %D anyway (too messy) -\let\m_meta_current_variable\empty +\lettonothing\m_meta_current_variable \installbasicnativeautosetuphandler \??mpcategory {mpcategory} @@ -681,7 +681,7 @@ \def\meta_uniquempgraphic_yes[#1]#*#=% {% ugly code but we run on top of older code - \letdummyparameter\c!instance\empty + \resetdummyparameter\c!instance \getdummyparameters[#1]% \edef\currentMPinstance{\dummyparameter\c!instance}% % here we feed the instance into the analyzer @@ -757,7 +757,7 @@ % \orelse\ifcsname\??mpgraphic\currentMPgraphicname\endcsname % \let\currentmpcategory\currentMPgraphicname % \else -% \let\currentmpcategory\empty +% \lettonothing\currentmpcategory % \fi % \ifempty\currentmpcategory % % message @@ -773,7 +773,7 @@ \def\meta_usempgraphic_yes[#1]#*#=% {% ugly code but we run on top of older code - \letdummyparameter\c!instance\empty + \resetdummyparameter\c!instance \getdummyparameters[#1]% \edef\currentMPinstance{\dummyparameter\c!instance}% % here we feed the instance into the analyzer @@ -783,7 +783,7 @@ \orelse\ifcsname\??mpgraphic\currentMPgraphicname\endcsname \let\currentmpcategory\currentMPgraphicname \else - \let\currentmpcategory\empty + \lettonothing\currentmpcategory \fi \ifempty\currentmpcategory % message @@ -801,7 +801,7 @@ \orelse\ifcsname\??mpgraphic\currentMPgraphicname\endcsname \let\currentmpcategory\currentMPgraphicname \else - \let\currentmpcategory\empty + \lettonothing\currentmpcategory \fi \ifempty\currentmpcategory % message @@ -973,7 +973,7 @@ % \ifempty\currentMPinstance % \let\currentMPinstance\defaultMPinstance % \fi -% \let\currentMPgraphicname\empty +% \lettonothing\currentMPgraphicname % \edef\currentMPformat{\MPinstanceparameter\s!format}% % \meta_enable_include % \meta_process_graphic{#2}% @@ -988,7 +988,7 @@ \ifempty\currentMPinstance \let\currentMPinstance\defaultMPinstance \fi - \let\currentMPgraphicname\empty + \lettonothing\currentMPgraphicname \edef\currentMPformat{\MPinstanceparameter\s!format}% \meta_enable_include \meta_process_graphic{#2}% @@ -996,15 +996,15 @@ \def\meta_start_mpcode_yes[#1]#2\stopMPcode {\begingroup - \letdummyparameter\c!instance\empty - \letdummyparameter\c!stacking\empty + \resetdummyparameter\c!instance + \resetdummyparameter\c!stacking \getdummyparameters[#1]% \edef\currentMPinstance{\dummyparameter\c!instance}% \setmpcategoryparameter\c!stacking{\dummyparameter\c!stacking}% \ifempty\currentMPinstance \let\currentMPinstance\defaultMPinstance \fi - \let\currentMPgraphicname\empty + \lettonothing\currentMPgraphicname \edef\currentMPformat{\MPinstanceparameter\s!format}% \meta_enable_include \meta_process_graphic{#2}% @@ -1105,17 +1105,17 @@ % \setupcolors[state=stop,conversion=never] % quite tricky ... type mismatch -\startMPinitializations - CurrentLayout:="\currentlayout"; -\stopMPinitializations +% \startMPinitializations +% CurrentLayout:="\currentlayout"; +% \stopMPinitializations %D A dirty trick, ** in colo-ini.lua (mpcolor). We cannot use a vardef, because %D that fails with spot colors. -\startMPinitializations - def OverlayLineColor=\ifempty\overlaylinecolor black \else\MPcolor{\overlaylinecolor} \fi enddef; - def OverlayColor =\ifempty\overlaycolor black \else\MPcolor{\overlaycolor} \fi enddef; -\stopMPinitializations +% \startMPinitializations +% def OverlayLineColor=\ifempty\overlaylinecolor black \else\MPcolor{\overlaylinecolor} \fi enddef; +% def OverlayColor =\ifempty\overlaycolor black \else\MPcolor{\overlaycolor} \fi enddef; +% \stopMPinitializations \appendtoks \disablediscretionaries @@ -1367,7 +1367,7 @@ \ifempty\currentMPinstance \let\currentMPinstance\defaultMPinstance \fi - \let\currentMPgraphicname\empty + \lettonothing\currentMPgraphicname \edef\currentMPformat{\MPinstanceparameter\s!format}% \meta_enable_include \meta_process_graphic{#2;draw origin}% @@ -1398,8 +1398,8 @@ %D Some more helpers (see \type {meta-grd.mkiv} for an example of usage): -\permanent\def\MPdpar#1#2{\the\dimexpr#1#2\relax\empty} -\permanent\def\MPnpar#1#2{\the\numexpr#1#2\relax\empty} +\permanent\def\MPdpar#1#2{\the\dimexpr#1#2\relax\empty} % why \empty here +\permanent\def\MPnpar#1#2{\the\numexpr#1#2\relax\empty} % why \empty here \permanent\def\MPspar#1#2{"#1#2"} %D Done. diff --git a/tex/context/base/mkxl/meta-pdf.mkxl b/tex/context/base/mkxl/meta-pdf.mkxl index 32f53ceb3..8dc0bdfac 100644 --- a/tex/context/base/mkxl/meta-pdf.mkxl +++ b/tex/context/base/mkxl/meta-pdf.mkxl @@ -34,7 +34,7 @@ %D graphics. The color control flags are also gone as we now integrate into the %D regular colorspace handling (i.e.\ no longer independent configurations.) -\mutable\let\MPfilename\empty +\mutable\lettonothing\MPfilename \permanent\protected\def\convertMPtoPDF#1#2#3% scaling no longer supported at this level (so #2 & #3 are ignored) {\dostarttagged\t!mpgraphic\empty diff --git a/tex/context/base/mkxl/meta-pdh.mkxl b/tex/context/base/mkxl/meta-pdh.mkxl index b748682a7..0313d0669 100644 --- a/tex/context/base/mkxl/meta-pdh.mkxl +++ b/tex/context/base/mkxl/meta-pdh.mkxl @@ -84,9 +84,10 @@ \ifdefined\makeMPintoPDFobject \else \newconstant\makeMPintoPDFobject \fi \ifdefined\everyMPtoPDFconversion \else \newtoks \everyMPtoPDFconversion \fi -\let\lastPDFMPobject \!!zerocount -\let\currentPDFresources\empty -\let\setMPextensions \relax +\let\lastPDFMPobject\!!zerocount +\let\setMPextensions\relax + +\lettonothing\currentPDFresources \def\PDFMPformoffset{\ifdefined\objectoffset\objectoffset\else\zeropoint\fi} % no longer used @@ -139,7 +140,7 @@ %D A common hook. -\let\MPfshowcommand\empty +\lettonothing\MPfshowcommand %D Objects. diff --git a/tex/context/base/mkxl/mlib-int.lmt b/tex/context/base/mkxl/mlib-int.lmt index 47560e8c4..ea9092611 100644 --- a/tex/context/base/mkxl/mlib-int.lmt +++ b/tex/context/base/mkxl/mlib-int.lmt @@ -187,8 +187,10 @@ do local d_overlay_depth = isdimen("d_overlay_depth") registerdirect("OverlayDepth", function() return getdimen(d_overlay_depth) * factor end) local d_overlay_linewidth = isdimen("d_overlay_linewidth") registerdirect("OverlayLineWidth", function() return getdimen(d_overlay_linewidth) * factor end) local d_overlay_offset = isdimen("d_overlay_offset") registerdirect("OverlayOffset", function() return getdimen(d_overlay_offset) * factor end) - registerdirect("OverlayRegion", function() return getmacro("m_overlay_region") end) - --------------("CurrentLayout", function() return getmacro("currentlayout") end) + registerdirect("OverlayRegion", function() return getmacro("m_overlay_region") end) + registerdirect("CurrentLayout", function() return getmacro("currentlayout") end) + registerdirect("OverlayColor", function() return getmacro("overlaycolor") end) + registerdirect("OverlayLineColor", function() return getmacro("overlaylinecolor") end) end diff --git a/tex/context/base/mkxl/mult-aux.mkxl b/tex/context/base/mkxl/mult-aux.mkxl index f387bf95d..93d1113a3 100644 --- a/tex/context/base/mkxl/mult-aux.mkxl +++ b/tex/context/base/mkxl/mult-aux.mkxl @@ -15,13 +15,19 @@ %D (interface might change). The code here evolved in an email exchange between me %D and Wolgang Schuster. +%D We use constant definitions here because we don't need to expand the keywords +%D which saves a little on the stack (read: memory access). The gain in performance +%D is normally not noticeable unless one has plenty of parameter checking, which +%D can happen in some scenarios. Even then the gain is only there when one has +%D thousands of runs on e.g. virtual platforms. + \writestatus{loading}{ConTeXt Multilingual Macros / Helpers} \registerctxluafile{mult-aux}{} \unprotect -\immutable\edef\??empty{\Uchar25} \immutable\letvalue{\Uchar25}\empty % hex 19 +\immutable\cdef\??empty{\Uchar25} \immutable\letvalue{\Uchar25}\empty % hex 19 % \edef\s!parent{\Uchar29} % inlining  is ugly, a tiny bit faster, but neglectable on a run @@ -84,7 +90,7 @@ % KEEP THIS: % -% \let\m_mult_interfaces_namespace\empty +% \lettonothing\m_mult_interfaces_namespace % % \def\mult_interfaces_get_parameters#1[#2% % {\if\noexpand#2]% @@ -172,7 +178,7 @@ %D a comma and trigger a warning but we intercept that elsewhere. The alternative is %D to skip to the comma first which takes more time. -\let\m_mult_interfaces_namespace\empty +\lettonothing\m_mult_interfaces_namespace \def\mult_interfaces_get_parameters#1[% {\def\m_mult_interfaces_namespace{#1}% @@ -355,8 +361,8 @@ \mutable\let\dousecurrentstyleparameter\relax \mutable\let\dousecurrentcolorparameter\relax -\mutable\let\currentstyleparameter\empty -\mutable\let\currentcolorparameter\empty +\mutable\lettonothing\currentstyleparameter +\mutable\lettonothing\currentcolorparameter % maybe we should have \names ones too @@ -402,35 +408,35 @@ {\let#8#4% % watch out: no \edef#4{##1} before the ifarguments because #1 can have macros \ifarguments - \let#4\empty + \lettonothing#4% \the#5% predefine - \let#7\empty + \lettonothing#7% \letcsname#1#4:\s!chain\endcsname\empty - \edefcsname#1#4:\s!parent\endcsname{#3}% + \cdefcsname#1#4:\s!parent\endcsname{#3}% \or \edef#4{##1}% \the#5% predefine - \let#7\empty - \edefcsname#1#4:\s!chain\endcsname{##1}% - \edefcsname#1#4:\s!parent\endcsname{#3}% + \lettonothing#7% + \cdefcsname#1#4:\s!chain\endcsname{##1}% + \cdefcsname#1#4:\s!parent\endcsname{#3}% \or \edef#4{##1}% \the#5% predefine \relax \ifhastok={##2}% - \let#7\empty - \edefcsname#1#4:\s!chain\endcsname{##1}% - \edefcsname#1#4:\s!parent\endcsname{#3}% + \lettonothing#7% + \cdefcsname#1#4:\s!chain\endcsname{##1}% + \cdefcsname#1#4:\s!parent\endcsname{#3}% \mult_interfaces_get_parameters{#1#4:}[##2]% \else \edef#7{##2}% \ifempty#7% - \edefcsname#1#4:\s!chain\endcsname{##1}% - \edefcsname#1#4:\s!parent\endcsname{#3}% + \cdefcsname#1#4:\s!chain\endcsname{##1}% + \cdefcsname#1#4:\s!parent\endcsname{#3}% \else \mult_check_for_parent{#1}{#3}#4#7% - \edefcsname#1#4:\s!chain\endcsname{\mult_interfaces_chain#1{##2}##1}% - \edefcsname#1#4:\s!parent\endcsname{#1##2}% + \cdefcsname#1#4:\s!chain\endcsname{\mult_interfaces_chain#1{##2}##1}% + \cdefcsname#1#4:\s!parent\endcsname{#1##2}% \fi \fi \or @@ -438,8 +444,8 @@ \the#5% predefine \edef#7{##2}% \mult_check_for_parent{#1}{#3}#4#7% - \edefcsname#1#4:\s!chain\endcsname{\mult_interfaces_chain#1{##2}##1}% - \edefcsname#1#4:\s!parent\endcsname{#1##2}% + \cdefcsname#1#4:\s!chain\endcsname{\mult_interfaces_chain#1{##2}##1}% + \cdefcsname#1#4:\s!parent\endcsname{#1##2}% \mult_interfaces_get_parameters{#1#4:}[##3]% \fi \the#6% @@ -472,7 +478,7 @@ \the#4}% \processcommalist[##1]#8% \else - \let#3\empty + \lettonothing#3% \mult_interfaces_get_parameters{#1:}[##1]% \the#4% \fi @@ -509,7 +515,7 @@ {\ifarguments % \setuplayout \let#6#3% % previous becomes current - \let#3\empty % current becomes empty + \lettonothing#3% % current becomes empty #2\doingrootsetroot \the#5% \the#8% switchsetups @@ -518,7 +524,7 @@ % \setuplayout[key=value] \let#7#3% \let#6#3% - \let#3\empty + \lettonothing#3% #2\doingrootsetuproot \mult_interfaces_get_parameters{#1:}[##1]% \the#5% @@ -579,10 +585,10 @@ \frozen\tolerant\protected\def#2[##1]##*[##2]##*[##3]% {\let#7#3% \ifarguments - \let#3\empty + \lettonothing#3% \the#4% \or - \let#3\empty + \lettonothing#3% \mult_interfaces_get_parameters{#1:}[##1]% \the#4% \or @@ -757,17 +763,17 @@ {\frozen\tolerant\protected\defcsname#1\endcsname[##1]##*[##2]% {\begingroup \ifarguments - \let#2\empty + \lettonothing#2% \or %\ifcondition\expandafter\mult_check_for_assignment_indeed_begin_\detokenize{##1}=^^^^0003^^^^0003^^^^0004% % \ifcondition\mult_aux_no_assignment_indeed##1\ignorearguments % \edef#2{##1}% % \else - % \let#2\empty + % \lettonothing#2% % #3[##1]% % \fi \ifhastok={##1}% - \let#2\empty + \lettonothing#2% #3[##1]% \else \edef#2{##1}% @@ -825,7 +831,7 @@ \writestatus\m!system{duplicate user namespace '#1'}\wait \else \global\advance\c_mult_interfaces_n_of_namespaces\plusone - \immutable\xdefcsname ????#1\endcsname{\v_interfaces_prefix_template}% + \global\immutable\cdefcsname ????#1\endcsname{\v_interfaces_prefix_template}% \fi} \permanent\protected\def\installcorenamespace#1% @@ -833,7 +839,7 @@ \writestatus\m!system{duplicate core namespace '#1'}\wait \else \global\advance\c_mult_interfaces_n_of_namespaces\plusone - \immutable\xdefcsname ??#1\endcsname{\v_interfaces_prefix_template}% + \global\immutable\cdefcsname ??#1\endcsname{\v_interfaces_prefix_template}% \clf_registernamespace\c_mult_interfaces_n_of_namespaces{#1}% \fi} @@ -858,6 +864,7 @@ \permanent\protected\def\setdummyparameter #1{\defcsname\??dummy#1\endcsname} \permanent\protected\def\setexpandeddummyparameter#1{\edefcsname\??dummy#1\endcsname} \permanent\protected\def\letdummyparameter #1{\letcsname\??dummy#1\endcsname} +\permanent\protected\def\resetdummyparameter #1{\letcsname\??dummy#1\endcsname\empty} \edef\mult_interfaces_dummy{\??dummy} % nor immutable @@ -1006,7 +1013,7 @@ \protected\def\mult_interfaces_install_definition_set#1#2#3#4#5#6#7% {\newcount#3% - \let#6\empty + \lettonothing#6% \protected\def#2% {\expandafter\let\expandafter\c_mult_set\csname #1_t_#6\endcsname \ifrelax\c_mult_set @@ -1197,10 +1204,10 @@ \frozen\tolerant\protected\def#2[##1]##*[##2]##*[##3]% {\let#7#3% \ifarguments - \let#3\empty + \lettonothing#3% \the#4% \or - \let#3\empty + \lettonothing#3% \let\mult_interfaces_adef\mult_interfaces_adef_nop \mult_interfaces_get_parameters{#1:}[##1]% \let\mult_interfaces_adef\mult_interfaces_adef_yes diff --git a/tex/context/base/mkxl/mult-ini.lmt b/tex/context/base/mkxl/mult-ini.lmt index 7c60d5b33..a58e60059 100644 --- a/tex/context/base/mkxl/mult-ini.lmt +++ b/tex/context/base/mkxl/mult-ini.lmt @@ -17,7 +17,7 @@ local implement = interfaces.implement local allocate = utilities.storage.allocate local mark = utilities.storage.mark -local prtcatcodes = catcodes.numbers.prtcatcodes +----- prtcatcodes = catcodes.numbers.prtcatcodes local vrbcatcodes = catcodes.numbers.vrbcatcodes local contextsprint = context.sprint local setmetatableindex = table.setmetatableindex diff --git a/tex/context/base/mkxl/mult-ini.mkxl b/tex/context/base/mkxl/mult-ini.mkxl index b357c3e12..0e010429e 100644 --- a/tex/context/base/mkxl/mult-ini.mkxl +++ b/tex/context/base/mkxl/mult-ini.mkxl @@ -55,14 +55,14 @@ %D \type {!!!!}. In the meantime some of these are obsolete (we had some 12 %D originally). -\immutable\def\c!prefix!{c!} -\immutable\def\k!prefix!{k!} -\immutable\def\e!prefix!{e!} -\immutable\def\f!prefix!{f!} % for the moment we keep this one -\immutable\def\m!prefix!{m!} -\immutable\def\s!prefix!{s!} -\immutable\def\v!prefix!{v!} -\immutable\def\t!prefix!{t!} +\immutable\cdef\c!prefix!{c!} +\immutable\cdef\k!prefix!{k!} +\immutable\cdef\e!prefix!{e!} +\immutable\cdef\f!prefix!{f!} % for the moment we keep this one +\immutable\cdef\m!prefix!{m!} +\immutable\cdef\s!prefix!{s!} +\immutable\cdef\v!prefix!{v!} +\immutable\cdef\t!prefix!{t!} %D \macros %D [constants,variables,commands] @@ -73,22 +73,22 @@ %D \type {??}, and a system constant, which has the prefix \type {c!}. We'll se some %D more of this. -\immutable\def\??prefix {??} -\immutable\def\@@prefix {@@} +\immutable\cdef\??prefix {??} +\immutable\cdef\@@prefix {@@} %D Just to be complete we repeat some of the already defined system constants here. %D Maybe their prefix \type {\s!} now falls into place. -\def\s!next {next} \def\s!default {default} -\def\s!dummy {dummy} \def\s!unknown {unknown} +\cdef\s!next {next} \cdef\s!default {default} +\cdef\s!dummy {dummy} \cdef\s!unknown {unknown} -\def\s!do {do} \def\s!dodo {dodo} +\cdef\s!do {do} \cdef\s!dodo {dodo} -\def\s!complex {complex} \def\s!start {start} -\def\s!simple {simple} \def\s!stop {stop} +\cdef\s!complex {complex} \cdef\s!start {start} +\cdef\s!simple {simple} \cdef\s!stop {stop} -\def\s!true {true} -\def\s!false {false} +\cdef\s!true {true} +\cdef\s!false {false} %D The word \type {height} takes 6~token memory cells. The control sequence \type %D {\height} on the other hand uses only one. Knowing this, we can improve the @@ -109,32 +109,32 @@ %D than once. Savings like this should of course be implemented in english, just %D because \TEX\ is english. -\def\s!width {width} -\def\s!height {height} -\def\s!depth {depth} -\def\s!spread {spread} -\def\s!plus {plus} -\def\s!minus {minus} -\def\s!to {to} - -\def\s!fil {fil} -\def\s!fill {fill} -\def\s!filll {filll} - -\def\s!attr {attr} -\def\s!axis {axis} -\def\s!both {both} -\def\s!bottom {bottom} -\def\s!left {left} -\def\s!options {options} -\def\s!orientation{orientation} -\def\s!reverse {reverse} -\def\s!right {right} -\def\s!top {top} -\def\s!xmove {xmove} -\def\s!xoffset {xoffset} -\def\s!ymove {ymove} -\def\s!yoffset {yoffset} +\cdef\s!width {width} +\cdef\s!height {height} +\cdef\s!depth {depth} +\cdef\s!spread {spread} +\cdef\s!plus {plus} +\cdef\s!minus {minus} +\cdef\s!to {to} + +\cdef\s!fil {fil} +\cdef\s!fill {fill} +\cdef\s!filll {filll} + +\cdef\s!attr {attr} +\cdef\s!axis {axis} +\cdef\s!both {both} +\cdef\s!bottom {bottom} +\cdef\s!left {left} +\cdef\s!options {options} +\cdef\s!orientation{orientation} +\cdef\s!reverse {reverse} +\cdef\s!right {right} +\cdef\s!top {top} +\cdef\s!xmove {xmove} +\cdef\s!xoffset {xoffset} +\cdef\s!ymove {ymove} +\cdef\s!yoffset {yoffset} %D \macros @@ -171,9 +171,9 @@ %D \def\e!name{meaning} %D \stoptyping -%permanent\protected\def\defineinterfaceconstant#1#2{\immutable\defcsname\c!prefix!#1\endcsname{#2}} -\permanent\protected\def\defineinterfacevariable#1#2{\immutable\defcsname\v!prefix!#1\endcsname{#2}} -\permanent\protected\def\defineinterfaceelement #1#2{\immutable\defcsname\e!prefix!#1\endcsname{#2}} +%permanent\protected\def\defineinterfaceconstant#1#2{\immutable\cdefcsname\c!prefix!#1\endcsname{#2}} +\permanent\protected\def\defineinterfacevariable#1#2{\immutable\cdefcsname\v!prefix!#1\endcsname{#2}} +\permanent\protected\def\defineinterfaceelement #1#2{\immutable\cdefcsname\e!prefix!#1\endcsname{#2}} %D Next come some interface independant constants: %D @@ -181,7 +181,7 @@ %D \definefileconstant {name} {meaning} %D \stoptyping -\permanent\protected\def\definefileconstant#1#2{\immutable\defcsname\f!prefix!#1\endcsname{#2}} +\permanent\protected\def\definefileconstant#1#2{\immutable\cdefcsname\f!prefix!#1\endcsname{#2}} %D And finaly we have the one argument, space saving constants %D @@ -190,13 +190,13 @@ %D \definemessageconstant {name} %D \stoptyping -\permanent\protected\def\definesystemconstant #1{\immutable\defcsname\s!prefix!#1\endcsname{#1}} -\permanent\protected\def\definemessageconstant#1{\immutable\defcsname\m!prefix!#1\endcsname{#1}} +\permanent\protected\def\definesystemconstant #1{\immutable\cdefcsname\s!prefix!#1\endcsname{#1}} +\permanent\protected\def\definemessageconstant#1{\immutable\cdefcsname\m!prefix!#1\endcsname{#1}} %D For now here: -\permanent\protected\def\definetagconstant #1{\immutable\defcsname\t!prefix!#1\endcsname{#1}} -\permanent\protected\def\aliastagconstant #1#2{\aliased \letcsname\t!prefix!#1\expandafter\endcsname\csname\t!prefix!#2\endcsname} +\permanent\protected\def\definetagconstant #1{\immutable\cdefcsname\t!prefix!#1\endcsname{#1}} +\permanent\protected\def\aliastagconstant #1#2{\aliased \letcsname\t!prefix!#1\expandafter\endcsname\csname\t!prefix!#2\endcsname} %D In a parameter driven system, some parameters are shared by more system %D components. In \CONTEXT\ we can distinguish parameters by a unique prefix. Such a @@ -206,7 +206,7 @@ %D \definesystemvariable {name} %D \stoptyping -\permanent\protected\def\definesystemvariable#1{\immutable\edefcsname\??prefix#1\endcsname{\@@prefix#1}} +\permanent\protected\def\definesystemvariable#1{\immutable\cdefcsname\??prefix#1\endcsname{\@@prefix#1}} \definesystemvariable{ms} @@ -370,7 +370,7 @@ \aliased\let\stopmessages\relax -\mutable\let\currentmessagetext\empty +\mutable\lettonothing\currentmessagetext \permanent\protected\def\setinterfacemessage#1#2#3% {\ifcsname\m!prefix!#1\endcsname\else\immutable\gdefcsname\m!prefix!#1\endcsname{#1}\fi @@ -685,11 +685,11 @@ \permanent\overloaded\protected\def\setinterfaceconstant#1#2% {\clf_setinterfaceconstant{#1}{#2}% - \immutable\defcsname\c!prefix!#1\endcsname{#1}} + \immutable\cdefcsname\c!prefix!#1\endcsname{#1}} \permanent\overloaded\protected\def\setinterfacevariable#1#2% {\clf_setinterfacevariable{#1}{#2}% - \immutable\defcsname\v!prefix!#1\endcsname{#2}} + \immutable\cdefcsname\v!prefix!#1\endcsname{#2}} %D \macros %D {defineinterfaceconstant} @@ -699,7 +699,7 @@ %D c||version, but for documentation purposes the x||alternative comes in handy. \permanent\overloaded\protected\def\defineinterfaceconstant#1#2% - {\immutable\defcsname\c!prefix!#1\endcsname{#2}} + {\immutable\cdefcsname\c!prefix!#1\endcsname{#2}} %D \macros %D {startelements} diff --git a/tex/context/base/mkxl/node-ext.mkxl b/tex/context/base/mkxl/node-ext.mkxl index 697bb7d29..2f0df1ba3 100644 --- a/tex/context/base/mkxl/node-ext.mkxl +++ b/tex/context/base/mkxl/node-ext.mkxl @@ -66,7 +66,7 @@ %D \dostopclipping %D \stoptyping -\mutable\let\MPclippath\empty +\mutable\lettonothing\MPclippath % \permanent\protected\def\dostartclipping#1#2#3% we can move this to lua and only set a box here % {\forcecolorhack diff --git a/tex/context/base/mkxl/node-rul.mkxl b/tex/context/base/mkxl/node-rul.mkxl index ec9003f58..6f62e3022 100644 --- a/tex/context/base/mkxl/node-rul.mkxl +++ b/tex/context/base/mkxl/node-rul.mkxl @@ -78,9 +78,9 @@ \installcommandhandler \??bar {bar} \??bar -\mutable\let\p_node_color \empty % of just \p_* -\mutable\let\p_node_text \empty -\mutable\let\p_node_offset\empty +\mutable\lettonothing\p_node_color % of just \p_* +\mutable\lettonothing\p_node_text +\mutable\lettonothing\p_node_offset \aliased\let\setupbars\setupbar @@ -298,10 +298,10 @@ \newdimen\d_rule_offset \newdimen\d_rule_factor -\mutable\let\m_rule_direction\empty -% \mutable\let\m_rule_factor \empty -\mutable\let\m_rule_option \empty -\mutable\let\m_rule_color \empty +\mutable\lettonothing\m_rule_direction +%mutable\lettonothing\m_rule_factor +\mutable\lettonothing\m_rule_option +\mutable\lettonothing\m_rule_color \startuseMPgraphic{rules:under:random} draw diff --git a/tex/context/base/mkxl/pack-box.mkxl b/tex/context/base/mkxl/pack-box.mkxl index 7c64b0032..746d225cb 100644 --- a/tex/context/base/mkxl/pack-box.mkxl +++ b/tex/context/base/mkxl/pack-box.mkxl @@ -51,7 +51,7 @@ % % \anchor[text-1][preset=lefttop][framed settings]{HELLO WORLD} -\mutable\let\currentanchor\empty +\mutable\lettonothing\currentanchor \permanent\tolerant\protected\def\defineanchor[#1]#*[#2]#*[#3]#*[#4]% name targetlayer layersetting framedsetting {\defcsname\??anchor#1\endcsname{\pack_anchors_process_defined{#2}{#3}{#4}}} @@ -359,8 +359,8 @@ {\box\nextbox}% \setcollector [caption][#1]% - {\letdummyparameter\c!style\empty - \letdummyparameter\c!color\empty + {\resetdummyparameter\c!style + \resetdummyparameter\c!color \getdummyparameters[#2]% \dousestyleparameter{\directdummyparameter\c!style}% \setupinterlinespace @@ -548,8 +548,8 @@ \defcsname\??bleedinglocation tr\endcsname{\settrue\c_pack_boxes_r\settrue\c_pack_boxes_t} \defcsname\??bleedinglocation rt\endcsname{\settrue\c_pack_boxes_r\settrue\c_pack_boxes_t} -\mutable\let\currentbleedposition\empty -\mutable\let\currentpageposition \empty +\mutable\lettonothing\currentbleedposition +\mutable\lettonothing\currentpageposition \permanent\tolerant\protected\def\bleed[#1]% {\hbox\bgroup @@ -694,10 +694,10 @@ \permanent\tolerant\protected\def\setlayertext[#1]#*[#2]#*[#3]% {\bgroup - \letdummyparameter\c!align\empty - \letdummyparameter\c!width\hsize - \letdummyparameter\c!color\empty - \letdummyparameter\c!style\empty + \resetdummyparameter\c!align + \letdummyparameter \c!width\hsize + \resetdummyparameter\c!color + \resetdummyparameter\c!style \getdummyparameters[#3]% \dowithnextboxcontent {\forgetall @@ -1191,10 +1191,10 @@ \halfwaytotallistanchorcode \fi \relax - \ifdim\scratchxoffset=\zeropoint\else + \ifzeropt\scratchxoffset\else \boxxoffset\nextbox\scratchxoffset \fi - \ifdim\scratchyoffset=\zeropoint\else + \ifzeropt\scratchyoffset\else \boxyoffset\nextbox\scratchyoffset \fi \global\setbox\scratchcounterone\hpack\bgroup @@ -1238,7 +1238,7 @@ \installmacrostack\boxanchoringclass -\mutable\let\boxanchoringclass\empty +\mutable\lettonothing\boxanchoringclass \newcount\c_anchor_auto_box_class diff --git a/tex/context/base/mkxl/pack-com.mkxl b/tex/context/base/mkxl/pack-com.mkxl index 2b751e08b..787fe4d96 100644 --- a/tex/context/base/mkxl/pack-com.mkxl +++ b/tex/context/base/mkxl/pack-com.mkxl @@ -228,9 +228,9 @@ \newtoks\everycombination -\aliased\let\combination\empty +\aliased\lettonothing\combination -\let\p_nx_ny\empty +\lettonothing\p_nx_ny % \permanent\tolerant\protected\def\startcombination[#1]#*[#2]% can be simplified % {\bgroup % so we can grab a group @@ -240,16 +240,16 @@ % % % \ifempty\p_nx_ny % \ifcondition\validassignment{#1}% -% \let\currentcombination\empty +% \lettonothing\currentcombination % \setupcurrentcombination[#1]% % \edef\p_nx_ny{\combinationparameter\c!nx*\combinationparameter\c!ny*}% % \else % \doifelseinstring{*}\currentcombination % {\edef\p_nx_ny{\currentcombination*\plusone*}% -% \let\currentcombination\empty} +% \lettonothing\currentcombination} % {\doifelsenumber\currentcombination % {\edef\p_nx_ny{\currentcombination*\plusone*}% -% \let\currentcombination\empty} +% \lettonothing\currentcombination} % {\edef\p_nx_ny{\combinationparameter\c!nx*\combinationparameter\c!ny*}}}% % \fi % \else @@ -265,15 +265,15 @@ % % % % \ifempty\p_nx_ny % % \ifhastok={#1}% -% % \let\currentcombination\empty +% % \lettonothing\currentcombination % % \setupcurrentcombination[#1]% % % \edef\p_nx_ny{\combinationparameter\c!nx*\combinationparameter\c!ny*}% % % \orelse\ifhastok*{\currentcombination}% % % \edef\p_nx_ny{\currentcombination*\plusone*}% -% % \let\currentcombination\empty +% % \lettonothing\currentcombination % % \orelse\ifchknum\currentcombination\or % % \edef\p_nx_ny{\currentcombination*\plusone*}% -% % \let\currentcombination\empty +% % \lettonothing\currentcombination % % \else % % \edef\p_nx_ny{\combinationparameter\c!nx*\combinationparameter\c!ny*}% % % \fi @@ -303,7 +303,7 @@ % % % \dostarttaggedchained\t!combination\currentcombination\??combination % \vbox \ifx\p_height\v!fit\else to \p_height \fi \bgroup -% \enforced\let\combination\empty % permits \combination{}{} handy for cld +% \enforced\lettonothing\combination % permits \combination{}{} handy for cld % \normalexpanded{\pack_combinations_start_indeed[\p_nx_ny]}} % % \permanent\protected\def\stopcombination @@ -332,16 +332,16 @@ % \ifempty\p_nx_ny \ifcondition\validassignment{#1}% - \let\currentcombination\empty + \lettonothing\currentcombination \setupcurrentcombination[#1]% \edef\p_nx_ny{\combinationparameter\c!nx*\combinationparameter\c!ny*}% \else \doifelseinstring{*}\currentcombination {\edef\p_nx_ny{\currentcombination*\plusone*}% - \let\currentcombination\empty} + \lettonothing\currentcombination} {\doifelsenumber\currentcombination {\edef\p_nx_ny{\currentcombination*\plusone*}% - \let\currentcombination\empty} + \lettonothing\currentcombination} {\edef\p_nx_ny{\combinationparameter\c!nx*\combinationparameter\c!ny*}}}% \fi \else @@ -358,15 +358,15 @@ % % \ifempty\p_nx_ny % \ifhastok={#1}% -% \let\currentcombination\empty +% \lettonothing\currentcombination % \setupcurrentcombination[#1]% % \edef\p_nx_ny{\combinationparameter\c!nx*\combinationparameter\c!ny*}% % \orelse\ifhastok*{\currentcombination}% % \edef\p_nx_ny{\currentcombination*\plusone*}% -% \let\currentcombination\empty +% \lettonothing\currentcombination % \orelse\ifchknum\currentcombination\or % \edef\p_nx_ny{\currentcombination*\plusone*}% -% \let\currentcombination\empty +% \lettonothing\currentcombination % \else % \edef\p_nx_ny{\combinationparameter\c!nx*\combinationparameter\c!ny*}% % \fi @@ -399,7 +399,7 @@ \ifcsname\??combinationmethod\combinationparameter\c!method\endcsname \lastnamedcs\else\vbox \fi\ifx\p_height\v!fit\else to \p_height \fi \bgroup - \enforced\let\combination\empty % permits \combination{}{} handy for cld + \enforced\lettonothing\combination % permits \combination{}{} handy for cld \normalexpanded{\pack_combinations_start_indeed[\p_nx_ny]}} \permanent\protected\def\stopcombination diff --git a/tex/context/base/mkxl/pack-cut.mkxl b/tex/context/base/mkxl/pack-cut.mkxl index 1e23a97e3..3f4e6d0c3 100644 --- a/tex/context/base/mkxl/pack-cut.mkxl +++ b/tex/context/base/mkxl/pack-cut.mkxl @@ -58,13 +58,14 @@ \newcount\cutmarkoffset \cutmarkoffset \plusone \mutable\let\cutmarksymbol \relax -\mutable\let\cutmarktoptext \empty -\mutable\let\cutmarkbottomtext \empty -\mutable\let\cutmarkhoffset \empty -\mutable\let\cutmarkvoffset \empty \mutable\def\cutmarklength {2\bodyfontsize} \mutable\def\cutmarkrulethickness{\onepoint} +\mutable\lettonothing\cutmarktoptext +\mutable\lettonothing\cutmarkbottomtext +\mutable\lettonothing\cutmarkhoffset +\mutable\lettonothing\cutmarkvoffset + \permanent\protected\def\horizontalcuts {\hpack to \d_pack_cutmarks_width {\dorecurse\horizontalcutmarks{\vrule\s!width\cutmarkrulethickness\s!height\cutmarklength\hfill}% @@ -122,7 +123,7 @@ {\scratchskip\ifempty\cutmarkhoffset\cutmarkoffset\scratchdimen\else\cutmarkhoffset\fi \setbox\scratchbox\hpack{\verticalcuts}% \llap{\copy\scratchbox\hskip\scratchskip}% - \ifdim\d_pack_cutmarks_depth=\zeropoint + \ifzeropt\d_pack_cutmarks_depth \hfill \else \bgroup diff --git a/tex/context/base/mkxl/pack-lyr.mkxl b/tex/context/base/mkxl/pack-lyr.mkxl index 3b7e2324d..e1652273e 100644 --- a/tex/context/base/mkxl/pack-lyr.mkxl +++ b/tex/context/base/mkxl/pack-lyr.mkxl @@ -97,35 +97,35 @@ \permanent\def\layeranchor{\currentlayer:\the\realpageno} -\let\p_pack_layers_doublesided\empty -\let\p_pack_layers_state \empty -\let\p_pack_layers_option \empty -\let\p_pack_layers_method \empty -\let\p_pack_layers_preset \empty -\let\p_pack_layers_rotation \empty -\let\p_pack_layers_position \empty -\let\p_pack_layers_hoffset \empty -\let\p_pack_layers_voffset \empty -\let\p_pack_layers_offset \empty -\let\p_pack_layers_dx \empty -\let\p_pack_layers_dy \empty -\let\p_pack_layers_sx \empty -\let\p_pack_layers_sy \empty -\let\p_pack_layers_x \empty -\let\p_pack_layers_y \empty -\let\p_pack_layers_corner \empty -\let\p_pack_layers_location \empty -\let\p_pack_layers_line \empty -\let\p_pack_layers_column \empty -\let\p_pack_layers_width \empty -\let\p_pack_layers_height \empty -\let\p_pack_layers_direction \empty -\let\p_pack_layers_region \empty - -\let\m_pack_layers_page \empty -\let\m_pack_layers_target \empty -\let\m_pack_layers_region \empty -\let\m_pack_layers_anchor \empty +\lettonothing\p_pack_layers_doublesided +\lettonothing\p_pack_layers_state +\lettonothing\p_pack_layers_option +\lettonothing\p_pack_layers_method +\lettonothing\p_pack_layers_preset +\lettonothing\p_pack_layers_rotation +\lettonothing\p_pack_layers_position +\lettonothing\p_pack_layers_hoffset +\lettonothing\p_pack_layers_voffset +\lettonothing\p_pack_layers_offset +\lettonothing\p_pack_layers_dx +\lettonothing\p_pack_layers_dy +\lettonothing\p_pack_layers_sx +\lettonothing\p_pack_layers_sy +\lettonothing\p_pack_layers_x +\lettonothing\p_pack_layers_y +\lettonothing\p_pack_layers_corner +\lettonothing\p_pack_layers_location +\lettonothing\p_pack_layers_line +\lettonothing\p_pack_layers_column +\lettonothing\p_pack_layers_width +\lettonothing\p_pack_layers_height +\lettonothing\p_pack_layers_direction +\lettonothing\p_pack_layers_region + +\lettonothing\m_pack_layers_page +\lettonothing\m_pack_layers_target +\lettonothing\m_pack_layers_region +\lettonothing\m_pack_layers_anchor \newconditional\c_pack_layers_repeated \newconditional\c_pack_layers_trace @@ -196,8 +196,8 @@ %D \setlayer [identifier] [optional parameters] {data} %D \stoptyping -\mutable\let\currentlayerwidth \empty -\mutable\let\currentlayerheight\empty +\mutable\lettonothing\currentlayerwidth +\mutable\lettonothing\currentlayerheight \permanent\tolerant\protected\def\setcurrentlayerdimensions[#1]#*[#2]% name left|right {\edef\currentlayerwidth {\thelayerwidth {#2#1}}% @@ -218,7 +218,7 @@ \edef\m_pack_layers_target{#2}% \pack_layers_set_indeed{#3}% \orelse\ifhastok={#2}% - \let\m_pack_layers_target\empty + \lettonothing\m_pack_layers_target \pack_layers_set_indeed{#2}% \else \edef\m_pack_layers_target{#2}% @@ -400,9 +400,11 @@ {\alignedbox[\p_pack_layers_location]\vpack{\box\nextbox}}% \fi \ifnum\p_pack_layers_line=\zerocount\else % no \ifcase, can be negative + % \ifzero\p_pack_layers_line\else % todo: test this \advance\d_pack_layers_y_position\dimexpr\p_pack_layers_line\lineheight+\topskip-\lineheight-\ht\nextbox\relax \fi \ifnum\p_pack_layers_column=\zerocount\else % no \ifcase, can be negative + % \ifzero\p_pack_layers_column\else % todo: test this \advance\d_pack_layers_x_position\layoutcolumnoffset\p_pack_layers_column\relax \fi \ifx\p_pack_layers_location\v!grid @@ -449,6 +451,7 @@ \def\pack_layers_set_bottom_positions {\ifnum\p_pack_layers_line=\zerocount\else % can be < 0 +% {\ifzero\p_pack_layers_line\else % todo: test this \edef\p_pack_layers_line{\the\numexpr-\p_pack_layers_line+\layoutlines+\plusone\relax}% use counter instead ? \fi \ifdim\d_pack_layers_y_size>\zeropoint @@ -459,6 +462,7 @@ \def\pack_layers_set_right_positions {\ifnum\p_pack_layers_column=\zerocount\else % can be < 0 +% {\ifzero\p_pack_layers_column\else % todo: test this \edef\p_pack_layers_column{\the\numexpr-\layerparameter\c!column+\layoutcolumns+\plusone\relax}% use counter instead ? \fi \ifdim\d_pack_layers_x_size>\zeropoint diff --git a/tex/context/base/mkxl/pack-mat.mkxl b/tex/context/base/mkxl/pack-mat.mkxl index 66be25a9d..e336c195e 100644 --- a/tex/context/base/mkxl/pack-mat.mkxl +++ b/tex/context/base/mkxl/pack-mat.mkxl @@ -18,6 +18,9 @@ \unprotect +% todo \v!mathframed +% todo \v!mathstrikeout + \newconditional \c_framed_math_framed \installtextracker @@ -25,44 +28,199 @@ {\settrue \c_framed_math_framed} {\setfalse\c_framed_math_framed} -\tolerant\protected\def\mathframed[#1]#:#2% +\integerdef\c_framed_math_last_left \zerocount +\integerdef\c_framed_math_last_right\zerocount + +\installglobalmacrostack\c_framed_math_last_left +\installglobalmacrostack\c_framed_math_last_right + +\installcorenamespace{mathframed} + +\defineframed[\??mathframed] + +\setupframed[\??mathframed][\c!location=\v!middle] + +\tolerant\permanent\protected\def\definemathframed[#1]#*[#2]#*[#3]% + {\ifarguments\or + \defineframed[#1][\??mathframed]% + \or + \defineframed[#1][\??mathframed][#2]% + \or + \defineframed[#1][#2][#3]% + \fi + \tolerant\frozen\protected\defcsname#1\endcsname{\math_framed{#1}}} + +\definemathframed[mathframed] + +% \def\math_framed#1#*[#2]#:#3% +% {\begingroup +% \ifconditional\c_framed_math_framed +% \defineboxanchor[temp]% +% \fi +% \setmathatomrule\mathbegincode\mathbincode\allmathstyles\mathbegincode\mathbincode % hm +% \normalexpanded +% {\setbox\scratchbox\hpack +% \ifconditional\c_framed_math_framed +% \s!source \namedboxanchor{temp} +% \fi +% \s!ymove \Umathaxis\Ustyle\mathstyle +% \bgroup +% \localframedwithsettings +% [#1][#2]% +% {\startimath +% \Ustyle\mathstyle +% #3% +% \stopimath +% \integerdef\c_framed_math_last_left \lastleftclass +% \integerdef\c_framed_math_last_right\lastrightclass +% \push_macro_c_framed_math_last_left +% \push_macro_c_framed_math_last_right +% }% +% \egroup}% +% \pop_macro_c_framed_math_last_left +% \pop_macro_c_framed_math_last_right +% \mathatom +% \s!class \mathexplicitcode +% \ifnum\c_framed_math_last_left <\zerocount\else\s!leftclass \c_framed_math_last_left \fi +% \ifnum\c_framed_math_last_right<\zerocount\else\s!rightclass\c_framed_math_last_right\fi +% \bgroup +% \ifconditional\c_framed_math_framed +% \setboxanchor[temp][\c!corner={\v!left ,\v!bottom},\c!location={\v!right,\v!height}]% +% \hpack{\smallinfofont\the\c_framed_math_last_left}% +% \setboxanchor[temp][\c!corner={\v!right,\v!bottom},\c!location={\v!left ,\v!height}]% +% \hpack{\smallinfofont\the\c_framed_math_last_right}% +% \fi +% \box\scratchbox +% \egroup +% \endgroup} + +\dimensiondef\d_math_framed_offset\zeropoint + +\def\math_framed#1#*[#2]#:#3% {\begingroup \ifconditional\c_framed_math_framed \defineboxanchor[temp]% \fi \setmathatomrule\mathbegincode\mathbincode\allmathstyles\mathbegincode\mathbincode % hm - \normalexpanded - {\setbox\scratchbox\hpack - \ifconditional\c_framed_math_framed - \s!source \namedboxanchor{temp} - \fi - \s!ymove \Umathaxis\Ustyle\mathstyle - \bgroup - \framed - [\c!location=\v!middle,#1] - {\startimath - \Ustyle\mathstyle - #2% - \stopimath}% - \egroup}% - \scratchcounterone\lastleftclass - \scratchcountertwo\lastrightclass - % \writestatus{!!}{[\number\lastleftclass,\number\lastrightclass]}% + % + \scratchdimen\Umathaxis\Ustyle\mathstyle + % + \edef\currentframed{#1}% + \setbox\scratchbox\hbox{\localframedwithsettings[#1][#2]% + {\strut\global\dimensiondef\d_math_framed_offset\dimexpr + \framedoffset/2 +% +2\d_framed_linewidth + \relax}}% + % + \setbox\scratchbox\hpack\bgroup + \startimath + \Ustyle\mathstyle + #3% + \stopimath + \normalexpanded{\aftergrouped{% + \integerdef\c_framed_math_last_left \the\lastleftclass + \integerdef\c_framed_math_last_right\the\lastrightclass + }}% + \egroup + % + \boxymove\scratchbox\dimexpr + \scratchdimen + -\d_math_framed_offset/2 + \relax + % + \setbox\scratchbox\hpack + \localframedwithsettings + [#1][#2]% + {\box\scratchbox}% + % + \boxymove\scratchbox\scratchdimen + % + \ifconditional\c_framed_math_framed + \boxsource\scratchbox \namedboxanchor{temp}% test + \fi + % \mathatom \s!class \mathexplicitcode - \ifnum\scratchcounterone<\zerocount\else\s!leftclass \scratchcounterone\fi - \ifnum\scratchcountertwo<\zerocount\else\s!rightclass\scratchcountertwo\fi + \ifnum\c_framed_math_last_left <\zerocount\else\s!leftclass \c_framed_math_last_left \fi + \ifnum\c_framed_math_last_right<\zerocount\else\s!rightclass\c_framed_math_last_right\fi \bgroup \ifconditional\c_framed_math_framed - \setboxanchor[temp][\c!corner={\v!left,\v!bottom},\c!location={\v!right,\v!height}] - \hpack{\smallinfofont \the\scratchcounterone}% - \setboxanchor[temp][\c!corner={\v!right,\v!bottom},\c!location={\v!left,\v!height}] - \hpack{\smallinfofont \the\scratchcountertwo}% + \setboxanchor[temp][\c!corner={\v!left ,\v!bottom},\c!location={\v!right,\v!height}]% + \hpack{\smallinfofont\the\c_framed_math_last_left}% + \setboxanchor[temp][\c!corner={\v!right,\v!bottom},\c!location={\v!left ,\v!height}]% + \hpack{\smallinfofont\the\c_framed_math_last_right}% \fi \box\scratchbox \egroup \endgroup} +\defineoverlay[mathstrikeout][\useMPgraphic{\framedparameter{mp}}] + +\definemathframed + [mathstrikeout] + [\c!offset=\v!overlay, + \c!mp=mathstrikeout, + \c!rulethickness=1.5\linewidth, + \c!background={\v!foreground,mathstrikeout}, + %\c!color=darkgreen, + \c!textstyle=\txx, + \c!mathstyle=\s!script, + \c!frame=\v!off, + \c!arrow=\v!yes] + +\definemathframed + [mathcrossout] + [mathstrikeout] + [\c!mp=mathcrossout, + strike:location=bottom] + +\permanent\protected\def\mathstrikeoutlabel + {\iftok{\framedparameter{strike:math}}\emptytoks + \useframedstyleandcolor\c!textstyle\c!color + \framedparameter{strike:text}% + \else + \startimath + \dousecolorparameter{\framedparameter\c!color}% mathcolor + \usemathstyleparameter\framedparameter\c!mathstyle + \framedparameter{strike:math}% + \stopimath + \fi} + +\startuseMPgraphic{mathstrikeout} + path arr ; arr := (llcorner OverlayBox -- urcorner OverlayBox) ; + if "\framedparameter{arrow}" = "yes" : drawarrow else : draw fi arr + withpen pencircle scaled OverlayLineWidth + withcolor OverlayColor + ; + label.top("\mathstrikeoutlabel", point 1 of arr) + withcolor OverlayColor + ; + % draw OverlayBox + % dashed evenly + % withpen pencircle scaled .5OverlayLineWidth + % withcolor OverlayColor + % ; + setbounds currentpicture to OverlayBox ; +\stopuseMPgraphic + +\startuseMPgraphic{mathcrossout} + draw ( + (llcorner OverlayBox -- urcorner OverlayBox) && + (ulcorner OverlayBox -- lrcorner OverlayBox) + ) + withpen pencircle scaled OverlayLineWidth + withcolor OverlayColor + ; + if "\framedparameter{strike:location}" = "bottom" : + label.bot("\mathstrikeoutlabel", center bottomboundary currentpicture) + else : + label.top("\mathstrikeoutlabel", center topboundary currentpicture) + fi + withcolor OverlayColor + ; + setbounds currentpicture to OverlayBox ; +\stopuseMPgraphic + %D \starttyping %D \enabletrackers[framed.math] %D diff --git a/tex/context/base/mkxl/pack-obj.mkxl b/tex/context/base/mkxl/pack-obj.mkxl index 3dad2644a..e0cce8e08 100644 --- a/tex/context/base/mkxl/pack-obj.mkxl +++ b/tex/context/base/mkxl/pack-obj.mkxl @@ -184,7 +184,7 @@ %D For the moment here: -\mutable\let\lastpredefinedsymbol\empty % some day we can do more at the lua end +\mutable\lettonothing\lastpredefinedsymbol % some day we can do more at the lua end \permanent\protected\def\predefinesymbol[#1]% {\begingroup diff --git a/tex/context/base/mkxl/pack-pos.mkxl b/tex/context/base/mkxl/pack-pos.mkxl index e2fd1c8f8..872d334a7 100644 --- a/tex/context/base/mkxl/pack-pos.mkxl +++ b/tex/context/base/mkxl/pack-pos.mkxl @@ -56,10 +56,10 @@ \permanent\tolerant\protected\def\startpositioning[#1]#*[#2]% {\bgroup \ifparameters - \let\currentpositioning\empty + \lettonothing\currentpositioning \or \ifhastok={#1}% - \let\currentpositioning\empty + \lettonothing\currentpositioning \setupcurrentpositioning[#1]% \else \edef\currentpositioning{#1}% diff --git a/tex/context/base/mkxl/pack-rul.mkxl b/tex/context/base/mkxl/pack-rul.mkxl index 3f43b2abc..3c4d77062 100644 --- a/tex/context/base/mkxl/pack-rul.mkxl +++ b/tex/context/base/mkxl/pack-rul.mkxl @@ -210,30 +210,30 @@ \newdimen\d_framed_target_dp \newdimen\d_framed_linewidth \aliased\let\ruledlinewidth\d_framed_linewidth % needed at lua end -\let\p_framed_frame \empty % \framedparameter\c!frame -\let\p_framed_backgroundoffset\empty -\let\p_framed_foregroundstyle \empty -\let\p_framed_autostrut \empty -\let\p_framed_location \empty -\let\p_framed_orientation \empty -\let\p_framed_anchoring \empty -\let\p_framed_synchronize \empty -\let\p_framed_autowidth \empty -\let\p_framed_franalyze \empty -\let\p_framed_backgroundcorner\empty -\let\p_framed_backgroundradius\empty -\let\p_framed_framecorner \empty -\let\p_framed_frameradius \empty -\let\p_framed_lines \empty -\let\p_framed_empty \empty -\let\p_framed_backgroundcolor \empty -\let\p_framed_framecolor \empty -\let\p_framed_component \empty -\let\p_framed_background \empty -\let\p_framed_rulethickness \empty -\let\p_framed_foregroundcolor \empty -\let\p_framed_setups \empty -\let\p_framed_synchronize \empty +\lettonothing\p_framed_frame % \framedparameter\c!frame +\lettonothing\p_framed_backgroundoffset +\lettonothing\p_framed_foregroundstyle +\lettonothing\p_framed_autostrut +\lettonothing\p_framed_location +\lettonothing\p_framed_orientation +\lettonothing\p_framed_anchoring +\lettonothing\p_framed_synchronize +\lettonothing\p_framed_autowidth +\lettonothing\p_framed_franalyze +\lettonothing\p_framed_backgroundcorner +\lettonothing\p_framed_backgroundradius +\lettonothing\p_framed_framecorner +\lettonothing\p_framed_frameradius +\lettonothing\p_framed_lines +\lettonothing\p_framed_empty +\lettonothing\p_framed_backgroundcolor +\lettonothing\p_framed_framecolor +\lettonothing\p_framed_component +\lettonothing\p_framed_background +\lettonothing\p_framed_rulethickness +\lettonothing\p_framed_foregroundcolor +\lettonothing\p_framed_setups +\lettonothing\p_framed_synchronize %D We don't have to stick to a \TEX\ drawn rule, but also can use rounded %D or even fancier shapes, as we will see later on. @@ -420,7 +420,7 @@ \newdimen\d_overlay_offset \newdimen\d_overlay_linewidth -\let\m_overlay_region\empty +\lettonothing\m_overlay_region % expandable ... in a future version the space will go (in mp one can use Overlay*) @@ -511,7 +511,7 @@ \newtoks\everybackgroundbox -\let\m_framed_background\empty % we might need a public name +\lettonothing\m_framed_background % we might need a public name \def\pack_framed_process_background {\ifcsname\??overlaybuiltin\m_framed_background\endcsname @@ -1112,14 +1112,14 @@ \permanent\protected\lettonothing\localendstrut \permanent\protected\lettonothing\localstrut -\mutable\let\localoffset \empty -\mutable\let\localwidth \empty -\mutable\let\localheight \empty -\mutable\let\localformat \empty +\mutable\lettonothing\localoffset +\mutable\lettonothing\localwidth +\mutable\lettonothing\localheight +\mutable\lettonothing\localformat -\mutable\let\framedwidth \empty -\mutable\let\framedheight\empty -\mutable\let\framedoffset\empty +\mutable\lettonothing\framedwidth +\mutable\lettonothing\framedheight +\mutable\lettonothing\framedoffset % better a constant: @@ -1241,10 +1241,10 @@ \ifcstok{\framedparameter\c!adaptive}\v!yes \let\p_framed_adaptive\s!delay \else - \let\p_framed_adaptive\empty + \lettonothing\p_framed_adaptive \fi \else - \let\p_framed_adaptive\empty + \lettonothing\p_framed_adaptive \edef\p_framed_lines{\framedparameter\c!lines}% \ifempty\p_framed_lines \orelse\ifcase\p_framed_lines diff --git a/tex/context/base/mkxl/page-app.mkxl b/tex/context/base/mkxl/page-app.mkxl index 660dcb879..e8cc12aaa 100644 --- a/tex/context/base/mkxl/page-app.mkxl +++ b/tex/context/base/mkxl/page-app.mkxl @@ -96,10 +96,10 @@ {\setbox\b_page_fitting\hpack\bgroup \scale[\c!scale=\fittingpageparameter\c!scale]{\box\b_page_fitting}% \egroup}% - \ifdim\ht\b_page_fitting=\zeropoint + \ifzeropt\ht\b_page_fitting \ht\b_page_fitting\onepoint \fi - \ifdim\wd\b_page_fitting=\zeropoint + \ifzeropt\wd\b_page_fitting \wd\b_page_fitting\onepoint \fi \d_page_fitting_width \wd\b_page_fitting diff --git a/tex/context/base/mkxl/page-bck.mkxl b/tex/context/base/mkxl/page-bck.mkxl index 5c9b96fd7..597ab419e 100644 --- a/tex/context/base/mkxl/page-bck.mkxl +++ b/tex/context/base/mkxl/page-bck.mkxl @@ -52,7 +52,7 @@ %D We keep calculations and checks to a minimum and also try to minimize %D the amount of tracing due to expansion. -\mutable\let\currentotrbackground\empty +\mutable\lettonothing\currentotrbackground %D This is the only spot where we have a low level dependency on the way %D parent chains are defined but we want the speed. diff --git a/tex/context/base/mkxl/page-box.mklx b/tex/context/base/mkxl/page-box.mklx index a65989222..1cd668e95 100644 --- a/tex/context/base/mkxl/page-box.mklx +++ b/tex/context/base/mkxl/page-box.mklx @@ -80,18 +80,18 @@ % \boxyoffset#box\dimexpr\boxyoffset#box-\topoffset\relax} % \def\page_boxes_apply_offset % #box -% {\unless\ifzeropt\topoffset % we can't do an unless here +% {\unless\ifdim\topoffset=\zeropoint % \expandafter\page_boxes_apply_offset_indeed -% \orunless\ifzeropt\backoffset +% \orunless\ifdim\backoffset=\zeropoint % \expandafter\page_boxes_apply_offset_indeed % \else % \expandafter\gobbleoneargument % \fi} \def\page_boxes_apply_offset % #box - {\unless\ifdim\topoffset=\zeropoint + {\unless\ifzeropt\topoffset \expandafter\page_boxes_apply_offset_indeed - \orunless\ifdim\backoffset=\zeropoint + \orunless\ifzeropt\backoffset \expandafter\page_boxes_apply_offset_indeed \else \expandafter\gobbleoneargument diff --git a/tex/context/base/mkxl/page-brk.mkxl b/tex/context/base/mkxl/page-brk.mkxl index f30d9cb2c..af558b591 100644 --- a/tex/context/base/mkxl/page-brk.mkxl +++ b/tex/context/base/mkxl/page-brk.mkxl @@ -45,8 +45,8 @@ \newtoks\everybeforepagebreak \newtoks\everyafterpagebreak -\let\page_breaks_current_option \empty -\let\page_breaks_current_options\empty +\lettonothing\page_breaks_current_option +\lettonothing\page_breaks_current_options \installcorenamespace{pagebreakmethod} \installcorenamespace{pagebreaks} @@ -288,8 +288,8 @@ \newtoks\everyaftercolumnbreak \newtoks\everysynchronizecolumn -\let\page_breaks_columns_current_option \empty -\let\page_breaks_columns_current_options\empty +\lettonothing\page_breaks_columns_current_option +\lettonothing\page_breaks_columns_current_options \def\page_breaks_columns_handle#1% {\edef\page_breaks_columns_current_options{#1}% diff --git a/tex/context/base/mkxl/page-cst.mkxl b/tex/context/base/mkxl/page-cst.mkxl index 12ee0bd38..d2058ec46 100644 --- a/tex/context/base/mkxl/page-cst.mkxl +++ b/tex/context/base/mkxl/page-cst.mkxl @@ -128,10 +128,10 @@ {\bgroup \enforced\let\startpagegrid\page_grd_start_dummy \ifarguments - \let\currentpagegrid\empty + \lettonothing\currentpagegrid \or \ifhastok={#1}% - \let\currentpagegrid\empty + \lettonothing\currentpagegrid \setupcurrentpagegrid[#1]% \else \def\currentpagegrid{#1}% diff --git a/tex/context/base/mkxl/page-flt.mkxl b/tex/context/base/mkxl/page-flt.mkxl index a360dc42f..32f04e6b3 100644 --- a/tex/context/base/mkxl/page-flt.mkxl +++ b/tex/context/base/mkxl/page-flt.mkxl @@ -182,10 +182,10 @@ % % \placefloatwithsetups[somefigure]{}{\externalfigure[dummy][width=5cm,height=2cm]} -\mutable\let\floatsetupcaption\empty -\mutable\let\floatsetupcontent\empty -\mutable\let\floatsetupwidth \empty -\mutable\let\floatsetupheight \empty +\mutable\lettonothing\floatsetupcaption +\mutable\lettonothing\floatsetupcontent +\mutable\lettonothing\floatsetupwidth +\mutable\lettonothing\floatsetupheight \aliased\let\placesetupfloat\gobbleoneoptional diff --git a/tex/context/base/mkxl/page-imp.mkxl b/tex/context/base/mkxl/page-imp.mkxl index 5846fb22a..c9244224d 100644 --- a/tex/context/base/mkxl/page-imp.mkxl +++ b/tex/context/base/mkxl/page-imp.mkxl @@ -61,7 +61,7 @@ \newbox \shipoutscratchbox \setnewconstant\shipoutfinalizemethod\plusone -\mutable\let\pagestoshipout\empty % {1,3,6} +\mutable\lettonothing\pagestoshipout % {1,3,6} \permanent\protected\def\shipoutrange#1#2% {\begingroup @@ -706,7 +706,7 @@ \wd\arrangedpageA\paperwidth \outputarrangedbox\arrangedpageA \egroup - \ifdim\ht\arrangedpageB=\zeropoint + \ifzeropt\ht\arrangedpageB \exitloop \fi}% \global\arrangedpageN\zerocount @@ -1367,10 +1367,10 @@ \installcorenamespace {pageshift} \permanent\protected\tolerant\def\definepageshift[#1]#*[#2]#*[#3]% - {\setvalue{\??pageshift#2:#1}{#3}} + {\defcsname\??pageshift#2:#1\endcsname{#3}} -\let\page_boxes_h_shifts\empty -\let\page_boxes_v_shifts\empty +\lettonothing\page_boxes_h_shifts +\lettonothing\page_boxes_v_shifts \newcount\c_page_boxes_h_shifts \newcount\c_page_boxes_v_shifts diff --git a/tex/context/base/mkxl/page-inf.mkxl b/tex/context/base/mkxl/page-inf.mkxl index 107591af3..4865d5990 100644 --- a/tex/context/base/mkxl/page-inf.mkxl +++ b/tex/context/base/mkxl/page-inf.mkxl @@ -22,8 +22,8 @@ \newtoks\everyresetversion \newtoks\everysetupversion -\mutable\let\currentversioninfo\empty -\mutable\let\currentversiontext\empty +\mutable\lettonothing\currentversioninfo +\mutable\lettonothing\currentversiontext \let\page_info_add_to_box\gobbleoneargument @@ -35,12 +35,12 @@ \edef\currentversiontext{\dummyparameter\c!text}% \else \edef\currentversioninfo{#1}% - \let \currentversiontext\empty + \lettonothing\currentversiontext \fi \ifcsname\??layoutinfo\currentversioninfo\endcsname \let\page_info_add_to_box\page_info_add_to_box_indeed \else - \let\currentversioninfo\empty + \lettonothing\currentversioninfo \let\page_info_add_to_box\gobbleoneargument \fi \the\everysetupversion} @@ -57,7 +57,7 @@ {\begincsname\??layoutinfo#1\endcsname} \installversioninfo\v!final - {\let\currentversioninfo\empty + {\lettonothing\currentversioninfo \let\page_info_add_to_box\gobbleoneargument} \installversioninfo\v!concept diff --git a/tex/context/base/mkxl/page-inj.mklx b/tex/context/base/mkxl/page-inj.mklx index 8732e2628..02f853c55 100644 --- a/tex/context/base/mkxl/page-inj.mklx +++ b/tex/context/base/mkxl/page-inj.mklx @@ -70,13 +70,13 @@ \fi} \def\page_injections_direct_settings_parameters#settings% #parameters% - {\let\currentpageinjection\empty + {\lettonothing\currentpageinjection \checkpageinjectionparent \setupcurrentpageinjection[#settings]% \page_injections_direct_indeed} \def\page_injections_direct_parameters% #parameters% - {\let\currentpageinjection\empty + {\lettonothing\currentpageinjection \checkpageinjectionparent \page_injections_direct_indeed} diff --git a/tex/context/base/mkxl/page-lay.mkxl b/tex/context/base/mkxl/page-lay.mkxl index 628e112b6..d030c3ff9 100644 --- a/tex/context/base/mkxl/page-lay.mkxl +++ b/tex/context/base/mkxl/page-lay.mkxl @@ -154,7 +154,7 @@ \page_layouts_check_next \or % \setuplayout[name] \ifx\currentlayout\v!reset - \let\currentlayout\empty + \lettonothing\currentlayout \fi \letlayoutparameter\c!state\v!normal % global ? still needed ? \glet\currentlayout\currentlayout % global @@ -162,7 +162,7 @@ \page_layouts_check_next \or % \setuplayout (reverts to main layout) \letlayoutparameter\c!state\v!normal % global ? still needed ? - \glet\currentlayout\empty % global + \glettonothing\currentlayout % global \page_layouts_synchronize \page_layouts_check_next \fi @@ -334,8 +334,8 @@ \let\v_page_target_top_fill \relax \let\v_page_target_bottom_fill\relax -\let\papersize \empty -\let\printpapersize\empty +\lettonothing\papersize +\lettonothing\printpapersize \def\v_page_target_top {\namedlayouttargetparameter\papersize\c!top } \def\v_page_target_bottom {\namedlayouttargetparameter\papersize\c!bottom} @@ -430,7 +430,7 @@ \fi} \protected\def\page_paper_setup_size_settings[#1]% sometimes used to set paper/print size - {\let\currentlayouttarget\empty + {\lettonothing\currentlayouttarget \edef\m_layouttarget_paper_saved{\page_paper_the_paper_size{\layouttargetparameter\c!page }}% \edef\m_layouttarget_print_saved{\page_paper_the_print_size{\layouttargetparameter\c!paper}}% \setupcurrentlayouttarget[#1]% @@ -570,7 +570,7 @@ \page_paper_set_restore\m_page_asked_paper\m_page_asked_print % % locate page target - \let\currentlayouttarget\empty + \lettonothing\currentlayouttarget \page_paper_reset_paper \processcommacommand[\m_page_asked_paper]\page_paper_identify_target \ifempty\currentlayouttarget @@ -661,8 +661,8 @@ \let\synchronizegridsnapping\relax \fi -\let\p_page_layouts_width \empty -\let\p_page_layouts_height\empty +\lettonothing\p_page_layouts_width +\lettonothing\p_page_layouts_height \def\page_layouts_synchronize {\setups[\layoutparameter\c!preset]\relax @@ -879,8 +879,40 @@ \glet\v_page_layouts_pre_check\relax \page_layouts_synchronize} +% \def\page_layouts_check_default +% {\ifcsname\namedlayouthash\v_real_page_normal\c!state\endcsname +% \page_layouts_check_default_indeed\v_real_page_normal +% \orelse\ifcsname\namedlayouthash\v_real_page_reverse\c!state\endcsname +% \page_layouts_check_default_indeed\v_real_page_reverse +% \orelse\ifcsname\namedlayouthash\v_real_page_named\c!state\endcsname +% \page_layouts_check_default_indeed\v_real_page_named +% \orelse\ifcsname\namedlayouthash\v_real_page_current\c!state\endcsname +% \page_layouts_check_default_indeed\v_real_page_current +% \orelse\ifcsname\namedlayouthash\v_real_page_odd_or_even\c!state\endcsname +% \page_layouts_check_default_indeed\v_real_page_odd_or_even +% \orelse\ifrelax\v_page_layouts_pre_check +% % okay +% \else +% \page_layouts_check_revert +% \fi} + +% \showframe +% +% \setuplayout [width=100mm,height=200mm] +% \definelayout[shorta][height=80mm] +% \definelayout[shortb][height=130mm] +% +% \starttext +% \definelayout[2][shorta] \definelayout[4][shortb] +% \definelayout[7][shorta] \definelayout[8][shortb] % we need to check before +% \dorecurse{20}{#1: \samplefile{knuth}\par} +% \stoptext + \def\page_layouts_check_default - {\ifcsname\namedlayouthash\v_real_page_normal\c!state\endcsname + {\ifrelax\v_page_layouts_pre_check\else + \page_layouts_check_revert + \fi + \ifcsname\namedlayouthash\v_real_page_normal\c!state\endcsname \page_layouts_check_default_indeed\v_real_page_normal \orelse\ifcsname\namedlayouthash\v_real_page_reverse\c!state\endcsname \page_layouts_check_default_indeed\v_real_page_reverse @@ -890,10 +922,10 @@ \page_layouts_check_default_indeed\v_real_page_current \orelse\ifcsname\namedlayouthash\v_real_page_odd_or_even\c!state\endcsname \page_layouts_check_default_indeed\v_real_page_odd_or_even - \orelse\ifrelax\v_page_layouts_pre_check - % okay - \else - \page_layouts_check_revert + % \orelse\ifrelax\v_page_layouts_pre_check + % % okay + % \else + % \page_layouts_check_revert \fi} \permanent\protected\def\installlayoutmethod#1#2% diff --git a/tex/context/base/mkxl/page-lin.mklx b/tex/context/base/mkxl/page-lin.mklx index 5a1dc2e60..7383ab4ca 100644 --- a/tex/context/base/mkxl/page-lin.mklx +++ b/tex/context/base/mkxl/page-lin.mklx @@ -96,7 +96,8 @@ \def\page_lines_start_define {\setxvalue{\??linenumberinginstance\currentlinenumbering}% {\clf_registerlinenumbering - continue {\ifnum\c_page_lines_mode=\zerocount\v!yes\else\v!no\fi}% + % continue {\ifnum\c_page_lines_mode=\zerocount\v!yes\else\v!no\fi}% + continue {\ifzero\c_page_lines_mode\v!yes\else\v!no\fi}% start \linenumberingparameter\c!start step \linenumberingparameter\c!step method {\linenumberingparameter\c!method}% @@ -107,7 +108,8 @@ {\clf_setuplinenumbering \csname\??linenumberinginstance\currentlinenumbering\endcsname {% - continue {\ifnum\c_page_lines_mode=\zerocount\v!yes\else\v!no\fi}% + % continue {\ifnum\c_page_lines_mode=\zerocount\v!yes\else\v!no\fi}% + continue {\ifzero\c_page_lines_mode\v!yes\else\v!no\fi}% }% \relax} @@ -116,7 +118,8 @@ \clf_setuplinenumbering \lastnamedcs {% - continue {\ifnum\c_page_lines_mode=\zerocount\v!yes\else\v!no\fi}% + % continue {\ifnum\c_page_lines_mode=\zerocount\v!yes\else\v!no\fi}% + continue {\ifzero\c_page_lines_mode\v!yes\else\v!no\fi}% start \linenumberingparameter\c!start step \linenumberingparameter\c!step method {\linenumberingparameter\c!method}% @@ -222,17 +225,17 @@ {\edef\m_argument{#1}% \ifx\m_argument\v!continue \c_page_lines_mode\zerocount - \let\currentlinenumbering\empty + \lettonothing\currentlinenumbering \else \c_page_lines_mode\plusone \ifx\m_argument\v!empty - \let\currentlinenumbering\empty + \lettonothing\currentlinenumbering \orelse\ifhastok={#1}% - \let\currentlinenumbering\empty + \lettonothing\currentlinenumbering \setupcurrentlinenumbering[#1]% \else \doifelsenumber\m_argument - {\let\currentlinenumbering\empty + {\lettonothing\currentlinenumbering \letlinenumberingparameter\c!start\m_argument} {\let\currentlinenumbering\m_argument}% \fi @@ -574,8 +577,8 @@ \permanent\def\currentreferencelinenumber{\clf_filterreference{linenumber}} -\let\m_page_lines_from\empty -\let\m_page_lines_to \empty +\lettonothing\m_page_lines_from +\lettonothing\m_page_lines_to \permanent\protected\def\doifelsesamelinereference#1#2#3% {\doifelsereferencefound{lr:b:#1} diff --git a/tex/context/base/mkxl/page-mcl.mkxl b/tex/context/base/mkxl/page-mcl.mkxl index e88371da1..416d22348 100644 --- a/tex/context/base/mkxl/page-mcl.mkxl +++ b/tex/context/base/mkxl/page-mcl.mkxl @@ -465,7 +465,7 @@ % \reseteverypar % todo % - \ifdim\pagetotal=\zeropoint \else + \ifzeropt\pagetotal\else \verticalstrut \vskip-\struttotal \fi diff --git a/tex/context/base/mkxl/page-mix.mkxl b/tex/context/base/mkxl/page-mix.mkxl index 21e923864..0210d75b3 100644 --- a/tex/context/base/mkxl/page-mix.mkxl +++ b/tex/context/base/mkxl/page-mix.mkxl @@ -262,7 +262,7 @@ \global\setbox\b_page_mix_preceding\vbox % pack ? {\forgetall \page_otr_command_flush_top_insertions - \ifdim\htdp\b_page_mix_preceding=\zeropoint \else + \ifzeropt\htdp\b_page_mix_preceding\else \writestatus\m!columns{preceding error}% \unvbox\b_page_mix_preceding \fi @@ -401,7 +401,7 @@ %D \stopmixedcolumns %D \stoptyping -\mutable\let\currentmixedcolumnsmethod\empty +\mutable\lettonothing\currentmixedcolumnsmethod \installmacrostack\currentmixedcolumns \installmacrostack\currentmixedcolumnsmethod @@ -448,7 +448,7 @@ \def\page_mix_start_columns_b[#1][#2]% {\ifhastok={#1}% - \let\currentmixedcolumns\empty + \lettonothing\currentmixedcolumns \page_mix_error_b \page_mix_start_columns_checked\page_mix_start_columns_b_yes\page_mix_start_columns_b_nop[#1]% \else @@ -473,7 +473,7 @@ {\writestatus\m!columns{best use an instance of mixed columns}} \def\page_mix_start_columns_c[#1][#2]% - {\let\currentmixedcolumns\empty + {\lettonothing\currentmixedcolumns \page_mix_start_columns_checked \page_mix_start_columns_c_yes \page_mix_start_columns_c_nop} @@ -614,7 +614,7 @@ % \defcsname\??mixedcolumnsbefore\s!otr\endcsname % {\par -% \ifdim\pagetotal=\zeropoint \else +% \ifzeropt\pagetotal\else % \verticalstrut % probably no longer needed % \vskip-\struttotal % probably no longer needed % \fi} @@ -625,7 +625,7 @@ % {\par % \global\advance\c_page_mix_otr_nesting\plusone % \ifcase\c_page_mix_otr_nesting\or -% \ifdim\pagetotal=\zeropoint \else +% \ifzeropt\pagetotal\else % \obeydepth % we could handle this in pre material % \fi % \fi} @@ -634,7 +634,7 @@ {\par \global\advance\c_page_mix_otr_nesting\plusone \ifcase\c_page_mix_otr_nesting\or - \ifdim\pagetotal=\zeropoint \else + \ifzeropt\pagetotal\else % make sure that whitespace and blanks are done \strut \vskip-\lineheight @@ -871,7 +871,7 @@ \page_mix_construct_and_shipout\box\b_page_mix_collected\zerocount % three arguments \setbox\b_page_mix_collected\vpack{\clf_mixflushrest}% we could avoid this \clf_mixcleanup - \ifdim\ht\b_page_mix_collected=\zeropoint + \ifzeropt\ht\b_page_mix_collected \exitloop \fi \fi}% diff --git a/tex/context/base/mkxl/page-one.mkxl b/tex/context/base/mkxl/page-one.mkxl index c14173223..40d7d0af0 100644 --- a/tex/context/base/mkxl/page-one.mkxl +++ b/tex/context/base/mkxl/page-one.mkxl @@ -337,7 +337,7 @@ \newskip \s_page_one_between_top_insert \def\page_one_prepare_top_float - {\ifdim\d_page_floats_inserted_top=\zeropoint + {\ifzeropt\d_page_floats_inserted_top \settrue\c_page_one_top_of_insert \else \setfalse\c_page_one_top_of_insert @@ -558,7 +558,7 @@ \protected\def\page_one_command_flush_margin_blocks {\ifconditional\c_page_margin_blocks_present % \ifvoid\b_page_margin_blocks \else - \ifdim\pagetotal=\zeropoint + \ifzeropt\pagetotal \null % \fixedspace \fi \page_otr_command_next_page % \page diff --git a/tex/context/base/mkxl/page-pcl.mkxl b/tex/context/base/mkxl/page-pcl.mkxl index 02f98a543..f546a6119 100644 --- a/tex/context/base/mkxl/page-pcl.mkxl +++ b/tex/context/base/mkxl/page-pcl.mkxl @@ -788,7 +788,7 @@ {\begingroup \begingroup \doifelseassignment{#1}% - {\let\currentpagecolumns\empty + {\lettonothing\currentpagecolumns \setuppagecolumns[#1]}% {\edef\currentpagecolumns{#1}}% \edef\p_page{\pagecolumnsparameter\c!page}% diff --git a/tex/context/base/mkxl/page-pst.mkxl b/tex/context/base/mkxl/page-pst.mkxl index 16f71e0dc..79e3be29d 100644 --- a/tex/context/base/mkxl/page-pst.mkxl +++ b/tex/context/base/mkxl/page-pst.mkxl @@ -52,7 +52,7 @@ \newcount \c_page_postponed_blocks_next_page % set at the lua end \newconditional\c_page_postponed_busy -\mutable\let\currentpostponedpage\empty +\mutable\lettonothing\currentpostponedpage \permanent\protected\defcsname\e!start\v!postponing\endcsname {\bgroup diff --git a/tex/context/base/mkxl/page-sid.mkxl b/tex/context/base/mkxl/page-sid.mkxl index ec53a23a4..614945a9d 100644 --- a/tex/context/base/mkxl/page-sid.mkxl +++ b/tex/context/base/mkxl/page-sid.mkxl @@ -172,7 +172,7 @@ % cutspace \fi \fi - \ifdim\d_page_sides_shift=\zeropoint \relax + \ifzeropt\d_page_sides_shift \ifnum\c_page_sides_float_type=\plusfour \global\advance\d_page_sides_shift\d_page_sides_extrashift \global\d_page_sides_extrashift\zeropoint @@ -442,6 +442,9 @@ {\iftracesidefloats \enabletrackers[otr.forcestrutdepth]% \c_page_force_strut_depth_trace_mode\plusone \fi + % \unless\ifvmode + % \writestatus{side floats}{confusion} + % \fi % flush what we have and check \forcestrutdepth % trigger pagebuilder, \pageboundary gives nicer tracing @@ -449,10 +452,7 @@ \penalty\zerocount % works too \else %\tracingpages\plusone \tracingonline\plustwo - \begingroup - % \pageboundarypenalty\plustenthousand % is now: \pageboundary\plustenthousand % becomes a penalty (after triggering the callback) (experimental!) - \endgroup %\tracingpages\zerocount \fi \page_otr_command_set_vsize} % new, no longer really needed diff --git a/tex/context/base/mkxl/page-str.mkxl b/tex/context/base/mkxl/page-str.mkxl index 067283ee0..e883d8859 100644 --- a/tex/context/base/mkxl/page-str.mkxl +++ b/tex/context/base/mkxl/page-str.mkxl @@ -31,7 +31,7 @@ \unprotect -\mutable\let\currentoutputstream\empty +\mutable\lettonothing\currentoutputstream \newif \ifinoutputstream % will become a conditional or mode \newtoks \everyenableoutputstream diff --git a/tex/context/base/mkxl/page-txt.mklx b/tex/context/base/mkxl/page-txt.mklx index a66dc0829..f8daa0c47 100644 --- a/tex/context/base/mkxl/page-txt.mklx +++ b/tex/context/base/mkxl/page-txt.mklx @@ -90,8 +90,8 @@ \fi \to \everysetuplayoutelement -\mutable\let\currenttextstate \empty -\mutable\let\previoustextstate\empty +\mutable\lettonothing\currenttextstate +\mutable\lettonothing\previoustextstate \def\page_layouts_reset_element_status#vertical% {\gdefcsname\??layouttextsreset#vertical\endcsname{\page_layouts_set_element_status_normal#vertical}} @@ -175,7 +175,7 @@ \permanent\protected\def\setupfootertexts{\setuptexts[\v!footer]} \permanent\protected\def\setupbottomtexts{\setuptexts[\v!bottom]} -\mutable\let\currentlayoutelementstate\empty +\mutable\lettonothing\currentlayoutelementstate \permanent\tolerant\protected\def\setuptexts[#vertical]#spacer[#horizontal]#spacer[#a]#spacer[#b]#spacer[#c]#spacer[#d]% {\ifarguments @@ -221,7 +221,7 @@ \setvalue{\??layouttextstrut\v!yes}{\setstrut\strut} % maybe more variants -\let\m_page_layouts_element_content\empty +\lettonothing\m_page_layouts_element_content \protected\def\page_layouts_process_element_single#content% {\edef\m_page_layouts_element_content{\detokenize{#content}}% so no \v!xxx @@ -272,7 +272,7 @@ \newcount\c_page_layouts_element_state_n -\mutable\let\textlinestatus\empty +\mutable\lettonothing\textlinestatus \def\page_layouts_set_element_status#vertical% {\c_page_layouts_element_state_n=0\namedlayoutelementparameter#vertical\c!n\relax @@ -451,8 +451,8 @@ \box\b_page_layouts_element \vkern-#height\relax} -\let\page_layouts_place_extra_text_left \empty % historic -\let\page_layouts_place_extra_text_right\empty % historic +\lettonothing\page_layouts_place_extra_text_left % historic +\lettonothing\page_layouts_place_extra_text_right % historic \def\page_layouts_place_text_line_right {\hpack @@ -780,8 +780,8 @@ \let\page_layouts_place_extra_text_left \page_layouts_place_page_number_left \let\page_layouts_place_extra_text_right\page_layouts_place_page_number_right \else - \let\page_layouts_place_extra_text_left \empty - \let\page_layouts_place_extra_text_right\empty + \lettonothing\page_layouts_place_extra_text_left + \lettonothing\page_layouts_place_extra_text_right \fi} \def\page_layouts_identify_page_number_location diff --git a/tex/context/base/mkxl/publ-ini.mkxl b/tex/context/base/mkxl/publ-ini.mkxl index a9597d854..25b436f7b 100644 --- a/tex/context/base/mkxl/publ-ini.mkxl +++ b/tex/context/base/mkxl/publ-ini.mkxl @@ -112,8 +112,8 @@ %D to split between cite and list here as it only complicates matters (timing) and is %D not clear either. -\mutable\let\currentbtxspecification \empty -\mutable\let\currentbtxspecificationfallback\empty +\mutable\lettonothing\currentbtxspecification +\mutable\lettonothing\currentbtxspecificationfallback \installmacrostack\currentbtxspecification \installmacrostack\currentbtxspecificationfallback @@ -139,7 +139,7 @@ \edef\currentbtxspecification{#1}% \edef\currentbtxspecificationfallback{\namedbtxparameter\currentbtxspecification\c!default}% \ifx\currentbtxspecificationfallback\currentbtxspecification - \let\currentbtxspecificationfallback\empty + \lettonothing\currentbtxspecificationfallback \fi \clf_btxsetspecification{\currentbtxspecification}} @@ -152,7 +152,7 @@ {\edef\currentbtxspecification{#1}% \edef\currentbtxspecificationfallback{\namedbtxparameter\currentbtxspecification\c!default}% \ifx\currentbtxspecificationfallback\currentbtxspecification - \let\currentbtxspecificationfallback\empty + \lettonothing\currentbtxspecificationfallback \fi % has to be done explicitly: \loadbtxdefinitionfile[\currentbtxspecification]% \ifempty\currentbtxspecification @@ -367,8 +367,8 @@ % access -\let\currentbtxtag \empty -\let\currentbtxdataset\v!default +\lettonothing\currentbtxtag +\let \currentbtxdataset\v!default \permanent\protected\def\setbtxentry[#1]% or maybe btxsetentry {\edef\currentbtxtag{\clf_btxsetentry{\currentbtxdataset}{#1}}} @@ -441,30 +441,31 @@ %D Variables: -\mutable\let\currentbtxbacklink \empty \permanent\protected\def\btxsetbacklink {\def\currentbtxbacklink} -\mutable\let\currentbtxcategory \empty \permanent\protected\def\btxsetcategory {\def\currentbtxcategory} -\mutable\let\currentbtxcombis \empty \permanent\protected\def\btxsetcombis {\def\currentbtxcombis} -\mutable\let\currentbtxdataset \empty \permanent\protected\def\btxsetdataset {\def\currentbtxdataset} -\mutable\let\currentbtxfirst \empty \permanent\protected\def\btxsetfirst {\def\currentbtxfirst} -\mutable\let\currentbtxsecond \empty \permanent\protected\def\btxsetsecond {\def\currentbtxsecond} -\mutable\let\currentbtxsuffix \empty \permanent\protected\def\btxsetsuffix {\def\currentbtxsuffix} -\mutable\let\currentbtxinternal \empty \permanent\protected\def\btxsetinternal {\def\currentbtxinternal} -\mutable\let\currentbtxlefttext \empty \permanent\protected\def\btxsetlefttext {\def\currentbtxlefttext} -\mutable\let\currentbtxrighttext \empty \permanent\protected\def\btxsetrighttext {\def\currentbtxrighttext} -\mutable\let\currentbtxbefore \empty \permanent\protected\def\btxsetbefore {\def\currentbtxbefore} -\mutable\let\currentbtxafter \empty \permanent\protected\def\btxsetafter {\def\currentbtxafter} -\mutable\let\currentbtxlanguage \empty \permanent\protected\def\btxsetlanguage {\def\currentbtxlanguage} -\mutable\let\currentbtxtag \empty \permanent\protected\def\btxsettag {\def\currentbtxtag} -\mutable\let\currentbtxnumber \empty \permanent\protected\def\btxsetnumber {\def\currentbtxnumber} -\mutable\let\currentbtxfirstinternal\empty \permanent\protected\def\btxsetfirstinternal{\def\currentbtxfirstinternal} -\mutable\let\currentbtxlastinternal \empty \permanent\protected\def\btxsetlastinternal {\def\currentbtxlastinternal} +\mutable\lettonothing\currentbtxbacklink \permanent\protected\def\btxsetbacklink {\def\currentbtxbacklink} +\mutable\lettonothing\currentbtxcategory \permanent\protected\def\btxsetcategory {\def\currentbtxcategory} +\mutable\lettonothing\currentbtxcombis \permanent\protected\def\btxsetcombis {\def\currentbtxcombis} +\mutable\lettonothing\currentbtxdataset \permanent\protected\def\btxsetdataset {\def\currentbtxdataset} +\mutable\lettonothing\currentbtxfirst \permanent\protected\def\btxsetfirst {\def\currentbtxfirst} +\mutable\lettonothing\currentbtxsecond \permanent\protected\def\btxsetsecond {\def\currentbtxsecond} +\mutable\lettonothing\currentbtxsuffix \permanent\protected\def\btxsetsuffix {\def\currentbtxsuffix} +\mutable\lettonothing\currentbtxinternal \permanent\protected\def\btxsetinternal {\def\currentbtxinternal} +\mutable\lettonothing\currentbtxlefttext \permanent\protected\def\btxsetlefttext {\def\currentbtxlefttext} +\mutable\lettonothing\currentbtxrighttext \permanent\protected\def\btxsetrighttext {\def\currentbtxrighttext} +\mutable\lettonothing\currentbtxbefore \permanent\protected\def\btxsetbefore {\def\currentbtxbefore} +\mutable\lettonothing\currentbtxafter \permanent\protected\def\btxsetafter {\def\currentbtxafter} +\mutable\lettonothing\currentbtxlanguage \permanent\protected\def\btxsetlanguage {\def\currentbtxlanguage} +\mutable\lettonothing\currentbtxtag \permanent\protected\def\btxsettag {\def\currentbtxtag} +\mutable\lettonothing\currentbtxnumber \permanent\protected\def\btxsetnumber {\def\currentbtxnumber} +\mutable\lettonothing\currentbtxfirstinternal \permanent\protected\def\btxsetfirstinternal{\def\currentbtxfirstinternal} +\mutable\lettonothing\currentbtxlastinternal \permanent\protected\def\btxsetlastinternal {\def\currentbtxlastinternal} \mutable\let\currentbtxauthorvariant\v!normal \permanent\protected\def\btxsetauthorvariant{\def\currentbtxauthorvariant} -\mutable\let\currentbtxfirstnames \empty \permanent\protected\def\btxsetfirstnames {\let\currentbtxfirstnames\currentbtxfirstnames_indeed} -\mutable\let\currentbtxinitials \empty \permanent\protected\def\btxsetinitials {\let\currentbtxinitials \currentbtxinitials_indeed } -\mutable\let\currentbtxjuniors \empty \permanent\protected\def\btxsetjuniors {\let\currentbtxjuniors \currentbtxjuniors_indeed } -\mutable\let\currentbtxsurnames \empty \permanent\protected\def\btxsetsurnames {\let\currentbtxsurnames \currentbtxsurnames_indeed } -\mutable\let\currentbtxvons \empty \permanent\protected\def\btxsetvons {\let\currentbtxvons \currentbtxvons_indeed } + +\mutable\lettonothing\currentbtxfirstnames \permanent\protected\def\btxsetfirstnames {\let\currentbtxfirstnames\currentbtxfirstnames_indeed} +\mutable\lettonothing\currentbtxinitials \permanent\protected\def\btxsetinitials {\let\currentbtxinitials \currentbtxinitials_indeed } +\mutable\lettonothing\currentbtxjuniors \permanent\protected\def\btxsetjuniors {\let\currentbtxjuniors \currentbtxjuniors_indeed } +\mutable\lettonothing\currentbtxsurnames \permanent\protected\def\btxsetsurnames {\let\currentbtxsurnames \currentbtxsurnames_indeed } +\mutable\lettonothing\currentbtxvons \permanent\protected\def\btxsetvons {\let\currentbtxvons \currentbtxvons_indeed } \newconstant\currentbtxoverflow \permanent\protected\def\btxsetoverflow #1{\currentbtxoverflow #1\relax} \newconstant\currentbtxconcat \permanent\protected\def\btxsetconcat #1{\currentbtxconcat #1\relax} @@ -479,70 +480,70 @@ \protected\def\currentbtxsurnames_indeed {\clf_btxcurrentsurnames \numexpr\currentbtxauthorindex\relax} \protected\def\currentbtxvons_indeed {\clf_btxcurrentvons \numexpr\currentbtxauthorindex\relax} -\mutable\let\currentbtxfirstpage \empty \permanent\protected\def\btxsetfirstpage#1{\def\currentbtxfirstpage{\btx_page_number{#1}}} -\mutable\let\currentbtxlastpage \empty \permanent\protected\def\btxsetlastpage #1{\def\currentbtxlastpage {\btx_page_number{#1}}} - -\mutable\let\currentbtxfield \empty -\mutable\let\currentbtxfielddoi \empty -\mutable\let\currentbtxfieldmonth \empty -\mutable\let\currentbtxfieldyear \empty -\mutable\let\currentbtxfieldurl \empty -\mutable\let\currentbtxcriterium \empty -\mutable\let\currentbtxlist \empty -\mutable\let\currentbtxlistentry \empty -\mutable\let\currentbtxlistindex \empty -\mutable\let\currentbtxreference \empty -\mutable\let\currentbtxrenderingtitle \empty -\mutable\let\currentbtxcitetag \empty +\mutable\lettonothing\currentbtxfirstpage \permanent\protected\def\btxsetfirstpage#1{\def\currentbtxfirstpage{\btx_page_number{#1}}} +\mutable\lettonothing\currentbtxlastpage \permanent\protected\def\btxsetlastpage #1{\def\currentbtxlastpage {\btx_page_number{#1}}} + +\mutable\lettonothing\currentbtxfield +\mutable\lettonothing\currentbtxfielddoi +\mutable\lettonothing\currentbtxfieldmonth +\mutable\lettonothing\currentbtxfieldyear +\mutable\lettonothing\currentbtxfieldurl +\mutable\lettonothing\currentbtxcriterium +\mutable\lettonothing\currentbtxlist +\mutable\lettonothing\currentbtxlistentry +\mutable\lettonothing\currentbtxlistindex +\mutable\lettonothing\currentbtxreference +\mutable\lettonothing\currentbtxrenderingtitle +\mutable\lettonothing\currentbtxcitetag \mutable\def\currentbtxauthorvariant{normal} \protected\def\btx_reset_list % not needed as we're grouped - {\let\currentbtxcombis \empty - \let\currentbtxcategory \empty - \let\currentbtxinternal \empty - \let\currentbtxlefttext \empty - \let\currentbtxrighttext\empty - \let\currentbtxbefore \empty - \let\currentbtxafter \empty - \let\currentbtxbacklink \empty - \let\currentbtxlanguage \empty - \let\currentbtxsuffix \empty - %\let\currentbtxdataset \empty % will always be set - %\let\currentbtxtag \empty % will always be set - \let\currentbtxnumber \empty} + {\lettonothing\currentbtxcombis + \lettonothing\currentbtxcategory + \lettonothing\currentbtxinternal + \lettonothing\currentbtxlefttext + \lettonothing\currentbtxrighttext + \lettonothing\currentbtxbefore + \lettonothing\currentbtxafter + \lettonothing\currentbtxbacklink + \lettonothing\currentbtxlanguage + \lettonothing\currentbtxsuffix + %\lettonothing\currentbtxdataset % will always be set + %\lettonothing\currentbtxtag % will always be set + \lettonothing\currentbtxnumber} \protected\def\btx_reset_cite % check for less .. not all resets needed when we're grouped (only subcites) - {\let \currentbtxfirst \empty - \let \currentbtxsecond \empty - \let \currentbtxsuffix \empty - \let \currentbtxinternal \empty - \let \currentbtxlefttext \empty - \let \currentbtxrighttext \empty - \let \currentbtxbefore \empty - \let \currentbtxafter \empty - \let \currentbtxbacklink \empty - \let \currentbtxlanguage \empty - %\let \currentbtxdataset \empty % will always be set, beware of local reset ~ - %\let \currentbtxtag \empty % will always be set, beware of local reset ~ - \let \currentbtxnumber \empty - \setconstant\currentbtxoverflow \zerocount - \setconstant\currentbtxconcat \zerocount - \setconstant\currentbtxcount \zerocount} + {\lettonothing\currentbtxfirst + \lettonothing\currentbtxsecond + \lettonothing\currentbtxsuffix + \lettonothing\currentbtxinternal + \lettonothing\currentbtxlefttext + \lettonothing\currentbtxrighttext + \lettonothing\currentbtxbefore + \lettonothing\currentbtxafter + \lettonothing\currentbtxbacklink + \lettonothing\currentbtxlanguage + %\lettonothing\currentbtxdataset % will always be set, beware of local reset ~ + %\lettonothing\currentbtxtag % will always be set, beware of local reset ~ + \lettonothing\currentbtxnumber + \setconstant\currentbtxoverflow\zerocount + \setconstant\currentbtxconcat\zerocount + \setconstant\currentbtxcount\zerocount} \protected\def\btx_reset_page % probably not needed - {\let \currentbtxfirstpage \empty - \let \currentbtxlastpage \empty - \let \currentbtxfirstinternal\empty - \let \currentbtxlastinternal \empty - \setconstant\currentbtxoverflow \zerocount - \setconstant\currentbtxconcat \zerocount - \setconstant\currentbtxcount \zerocount} + {\lettonothing\currentbtxfirstpage + \lettonothing\currentbtxlastpage + \lettonothing\currentbtxfirstinternal + \lettonothing\currentbtxlastinternal + \setconstant\currentbtxoverflow\zerocount + \setconstant\currentbtxconcat\zerocount + \setconstant\currentbtxcount\zerocount} \protected\def\btx_reset_numbering % probably not needed - {\let \currentbtxfirst \empty - \let \currentbtxsecond\empty - \let \currentbtxsuffix\empty + {\lettonothing\currentbtxfirst + \lettonothing\currentbtxsecond + \lettonothing\currentbtxsuffix \setconstant\currentbtxconcat\zerocount} %D Pages: @@ -775,9 +776,9 @@ \fi % \iflocation - \letinteractionparameter\c!style\empty -% \letinteractionparameter\c!color\empty -% \letinteractionparameter\c!contrastcolor\empty + \resetinteractionparameter\c!style + %\resetinteractionparameter\c!color + %\resetinteractionparameter\c!contrastcolor \fi \to \everybtxlistrendering @@ -968,7 +969,7 @@ \newcount\c_btx_list_index -\let\m_btx_list_action\empty +\lettonothing\m_btx_list_action \def\publ_flush_list_step_command {\btxsetlisttag{\c_btx_list_index} @@ -1170,8 +1171,8 @@ \aliased\let\btxcitereference\btx_cite_reference_inject -\mutable\let\currentbtxnumbering \empty -\mutable\let\currentbtxcitealternative \empty +\mutable\lettonothing\currentbtxnumbering +\mutable\lettonothing\currentbtxcitealternative \appendtoks \edef\currentbtxnumbering{\btxrenderingparameter\c!numbering}% @@ -1181,7 +1182,7 @@ \letlistparameter\c!headnumber\v!always \orelse\ifx\currentbtxnumbering\v!no \letlistparameter\c!headnumber\v!no - \let\currentbtxnumbering\empty + \lettonothing\currentbtxnumbering % \letlistparameter\c!textcommand\outdented % needed? we can use titlealign \letlistparameter\c!symbol \v!none \letlistparameter\c!aligntitle \v!yes @@ -1303,7 +1304,7 @@ \newconditional\btxinteractivetext \newconditional\btxinteractivepage -\mutable\let\currentbtxinteraction\empty +\mutable\lettonothing\currentbtxinteraction \installcorenamespace{btxinteraction} @@ -1323,7 +1324,7 @@ \ifx\currentbtxinteraction\v!stop \setfalse\btxinteractive \else - \enforced\let\structurelistlocation\empty + \enforced\lettonothing\structurelistlocation \settrue\btxinteractive \begincsname\??btxinteraction\currentbtxinteraction\endcsname \fi @@ -1376,13 +1377,13 @@ % text : not to list, show in text % always : mark for list, show in text -\let\p_publ_cite_before \empty -\let\p_publ_cite_after \empty -\let\p_publ_cite_lefttext \empty -\let\p_publ_cite_righttext\empty +\lettonothing\p_publ_cite_before +\lettonothing\p_publ_cite_after +\lettonothing\p_publ_cite_lefttext +\lettonothing\p_publ_cite_righttext -\mutable\let\currentbtxciteuservariables\empty -\mutable\let\currentbtxcitealternative \empty +\mutable\lettonothing\currentbtxciteuservariables +\mutable\lettonothing\currentbtxcitealternative \permanent\protected\def\btxhybridcite % so one can alias the old {\dontleavehmode @@ -1393,7 +1394,7 @@ {\strictdoifelsenextoptional{\publ_cite_tags_options_indeed{#1}}{\publ_cite_tags_indeed{#1}}} \protected\def\publ_cite_tags_indeed#1% - {\letinteractionparameter\c!style\empty + {\resetinteractionparameter\c!style \setbtxparametersetroot\s!cite % we need to get the default \edef\currentbtxcitealternative{\btxparameter\c!alternative}% \setbtxparameterset\s!cite\currentbtxcitealternative @@ -1406,14 +1407,14 @@ {\doifelseassignment{#1}\publ_cite_tags_settings_indeed\publ_cite_tags_variants_indeed{#1}} \def\publ_cite_tags_settings_indeed#1[#2]% - {\letinteractionparameter\c!style\empty - %\letinteractionparameter\c!color\empty - \letdummyparameter\c!reference \empty - \letdummyparameter\c!alternative\empty - \letdummyparameter\c!before \empty - \letdummyparameter\c!after \empty - \letdummyparameter\c!lefttext \empty - \letdummyparameter\c!righttext \empty + {\resetinteractionparameter\c!style + %\resetinteractionparameter\c!color + \resetdummyparameter\c!reference + \resetdummyparameter\c!alternative + \resetdummyparameter\c!before + \resetdummyparameter\c!after + \resetdummyparameter\c!lefttext + \resetdummyparameter\c!righttext \getdummyparameters[#1]% \edef\p_reference{\dummyparameter\c!reference}% \ifempty\p_reference @@ -1447,7 +1448,7 @@ \endgroup} \def\publ_cite_tags_variants_indeed#1[#2]% - {\letinteractionparameter\c!style\empty + {\resetinteractionparameter\c!style \edef\currentbtxcitealternative{#1}% \edef\currentbtxcitetag{#2}% \setbtxparameterset\s!cite\currentbtxcitealternative @@ -1909,7 +1910,7 @@ % \btxusecommand[btx:apa:list:article:title]{foo} % \btxstopstyle -\mutable\let\m_btx_saved_current\empty +\mutable\lettonothing\m_btx_saved_current \permanent\protected\def\btxstartstyle[#1]% {\begingroup diff --git a/tex/context/base/mkxl/regi-ini.mkxl b/tex/context/base/mkxl/regi-ini.mkxl index 515b6afd6..8ba7edc42 100644 --- a/tex/context/base/mkxl/regi-ini.mkxl +++ b/tex/context/base/mkxl/regi-ini.mkxl @@ -23,7 +23,7 @@ %D Beware, the enable and disable commands are global switches, so best use the %D start|/|stop commands. -\mutable\let\currentregime\empty +\mutable\lettonothing\currentregime \permanent\protected\def\enableregime[#1]{\clf_enableregime{#1}} \permanent\protected\def\disableregime {\clf_disableregime} diff --git a/tex/context/base/mkxl/scrn-bar.mklx b/tex/context/base/mkxl/scrn-bar.mklx index 4cfcbde81..8d2f30d03 100644 --- a/tex/context/base/mkxl/scrn-bar.mklx +++ b/tex/context/base/mkxl/scrn-bar.mklx @@ -64,7 +64,7 @@ {\iflocation \begingroup \ifhastok={#tag}% - \let\currentinteractionbar\empty + \lettonothing\currentinteractionbar \setupcurrentinteractionbar[#tag]% \edef\currentinteractionbar{\interactionbarparameter\c!alternative}% \else @@ -112,7 +112,7 @@ \def\scrn_bar_buttons_indeed#settings#list% {\begingroup - %\let\currentinteractionbar\empty + %\lettonothing\currentinteractionbar \setupcurrentinteractionbar[#settings]% \d_scrn_bar_width \interactionbarparameter\c!width\relax \d_scrn_bar_distance\interactionbarparameter\c!distance\relax @@ -121,7 +121,7 @@ \fi \doifnothing{\interactionbarparameter\c!height}{\letinteractionbarparameter\c!height\v!broad}% \doifnothing{\interactionbarparameter\c!depth }{\letinteractionbarparameter\c!depth\zeropoint}%%% - \letinteractionbarparameter\c!background\empty + \resetinteractionbarparameter\c!background \setbox2\hbox{\inheritedinteractionbarframed{\symbol[\interactionparameter\c!symbolset][\v!previouspage]}}% \scratchheight\ht2 % needed because we default to nothing \letinteractionbarparameter\c!strut\v!no diff --git a/tex/context/base/mkxl/scrn-but.mklx b/tex/context/base/mkxl/scrn-but.mklx index 9832ffbbb..a3715c813 100644 --- a/tex/context/base/mkxl/scrn-but.mklx +++ b/tex/context/base/mkxl/scrn-but.mklx @@ -328,8 +328,8 @@ \aliased\let\setupinteractionmenus\setupinteractionmenu -\mutable\let\currentinteractionmenudistance\empty -\mutable\let\currentinteractionmenustate \empty +\mutable\lettonothing\currentinteractionmenudistance +\mutable\lettonothing\currentinteractionmenustate \let\scrn_menu_action\relax @@ -434,7 +434,7 @@ \newconditional\c_scrn_menu_zerodimensions -\mutable\let\currentinteractionmenulocation\empty +\mutable\lettonothing\currentinteractionmenulocation \def\scrn_menu_set_used {\d_scrn_menu_offset_left \ifchkdim\interactionmenuparameter\c!leftoffset \or\lastchkdim\else\zeropoint\fi @@ -729,7 +729,7 @@ \permanent\protected\def\scrn_menu_got_start[#action]#text\stopgot {\scrn_menu_action_start \letinteractionmenuparameter\c!frame\v!off - \letinteractionmenuparameter\c!background\empty + \resetinteractionmenuparameter\c!background \scrn_button_make \interactionmenuparameter \inheritedinteractionmenuframed @@ -742,7 +742,7 @@ \permanent\protected\def\scrn_menu_nop_start#text\stopnop {\scrn_menu_action_start \letinteractionmenuparameter\c!frame\v!off - \letinteractionmenuparameter\c!background\empty + \resetinteractionmenuparameter\c!background \letinteractionmenuparameter\c!empty\v!yes \inheritedinteractionmenuframed{\ignorespaces#text\removeunwantedspaces}% \scrn_menu_action_stop} @@ -750,7 +750,7 @@ \permanent\protected\def\scrn_menu_txt_start#text\stoptxt {\scrn_menu_action_start \letinteractionmenuparameter\c!frame\v!off - \letinteractionmenuparameter\c!background\empty + \resetinteractionmenuparameter\c!background \inheritedinteractionmenuframed{\ignorespaces#text\removeunwantedspaces}% \scrn_menu_action_stop} @@ -1005,7 +1005,7 @@ \def\scrn_menu_menu_button_b#settings#dummy#text#action% {\dontleavehmode \begingroup - \let\currentbutton\empty + \lettonothing\currentbutton \setupcurrentbutton[#settings]% \scrn_button_make \buttonparameter diff --git a/tex/context/base/mkxl/scrn-fld.mklx b/tex/context/base/mkxl/scrn-fld.mklx index 6c134268c..de448bf50 100644 --- a/tex/context/base/mkxl/scrn-fld.mklx +++ b/tex/context/base/mkxl/scrn-fld.mklx @@ -110,13 +110,13 @@ \setupforms [\c!method=XML] % no need for everyjob initialization as this is the default -\mutable\let\currentfieldbackgroundcolor \empty -\mutable\let\currentfieldbackgroundcolorvalue\empty -\mutable\let\currentfieldbodycategory \empty -\mutable\let\currentfieldframecolor \empty -\mutable\let\currentfieldframecolorvalue \empty -\mutable\let\currentfieldlabel \empty -\mutable\let\currentfieldstackname \empty +\mutable\lettonothing\currentfieldbackgroundcolor +\mutable\lettonothing\currentfieldbackgroundcolorvalue +\mutable\lettonothing\currentfieldbodycategory +\mutable\lettonothing\currentfieldframecolor +\mutable\lettonothing\currentfieldframecolorvalue +\mutable\lettonothing\currentfieldlabel +\mutable\lettonothing\currentfieldstackname \appendtoks \iflocation @@ -327,7 +327,7 @@ %D (implemented as properties). \appendtoks - \let\currentfieldcategory\empty + \lettonothing\currentfieldcategory \doifelse{\interactionparameter\c!fieldlayer}\v!auto {\setupcurrentfieldcategory[\c!fieldlayer=\currentviewerlayer]}% {\setupcurrentfieldcategory[\c!fieldlayer=]}% @@ -476,13 +476,13 @@ \newconditional\fieldisvertical \newconditional\fieldishorizontal -\mutable\let\currentfieldtotalframed \empty -\mutable\let\currentfieldlabelframed \empty -\mutable\let\currentfieldcontentframed\empty +\mutable\lettonothing\currentfieldtotalframed +\mutable\lettonothing\currentfieldlabelframed +\mutable\lettonothing\currentfieldcontentframed -\mutable\let\fieldtotalframedparameterhash \empty % weird that we have to flag this -\mutable\let\fieldlabelframedparameterhash \empty % idem -\mutable\let\fieldcontentframedparameterhash\empty % idem +\mutable\lettonothing\fieldtotalframedparameterhash % weird that we have to flag this +\mutable\lettonothing\fieldlabelframedparameterhash % idem +\mutable\lettonothing\fieldcontentframedparameterhash % idem \permanent\tolerant\protected\def\field[#tag]#spacer[#label]% can be sped up with \setupcurrentfieldtotalframed etc {\iflocation @@ -670,7 +670,7 @@ \tolerant\def\scrn_tooltip_ignore[#settings]#:#anchortext#tiptext% {#anchortext} -\mutable\let\currenttooltipname\empty +\mutable\lettonothing\currenttooltipname \tolerant\def\scrn_tooltip_indeed[#settings]#:#anchortext#tiptext% a more modern aproach (push buttons) {\dontleavehmode \hbox \bgroup @@ -683,7 +683,7 @@ {\setupcurrenttooltip[#settings]}% {\setupcurrenttooltip[\c!location=#settings]}% \setbox\b_scrn_tooltip_text\hbox - {\lettooltipparameter\c!location\empty + {\resettooltipparameter\c!location \inheritedtooltipframed{#tiptext}}% \definesymbol [\currenttooltipname:txt] @@ -986,7 +986,7 @@ \setupcurrentinteractionmenu[#settings]% \let\scrn_rollbutton_symbol\scrn_rollbutton_symbol_m \orelse\ifhastok={#tag}% - \let\currentbutton\empty + \lettonothing\currentbutton \setupcurrentbutton[#tag]% \let\scrn_rollbutton_symbol\scrn_rollbutton_symbol_b \else diff --git a/tex/context/base/mkxl/scrn-hlp.mklx b/tex/context/base/mkxl/scrn-hlp.mklx index da2afd0d0..f8476cb8f 100644 --- a/tex/context/base/mkxl/scrn-hlp.mklx +++ b/tex/context/base/mkxl/scrn-hlp.mklx @@ -74,8 +74,8 @@ \frozen\instance\protected\edefcsname\e!stop \currenthelp\endcsname{\scrn_help_stop }% \to \everydefinehelp -\mutable\let\currenthelpreference\empty -\mutable\let\currenthelpname \empty +\mutable\lettonothing\currenthelpreference +\mutable\lettonothing\currenthelpname \protected\def\scrn_help_argument#category% {\def\currenthelp{#category}% diff --git a/tex/context/base/mkxl/scrn-pag.mklx b/tex/context/base/mkxl/scrn-pag.mklx index 09c542678..be1b6ad8f 100644 --- a/tex/context/base/mkxl/scrn-pag.mklx +++ b/tex/context/base/mkxl/scrn-pag.mklx @@ -35,9 +35,9 @@ \newdimen\canvasbleedoffset \newdimen\canvasartoffset -\mutable\let\currentinteractionscreendelay \empty -\mutable\let\currentinteractionscreenheight\empty -\mutable\let\currentinteractionscreenwidth \empty +\mutable\lettonothing\currentinteractionscreendelay +\mutable\lettonothing\currentinteractionscreenheight +\mutable\lettonothing\currentinteractionscreenwidth \newconditional\c_scrn_canvas_tight_page @@ -210,7 +210,7 @@ } \appendtoks - \let\scrn_canvas_synchronize_common\empty + \lettonothing\scrn_canvas_synchronize_common \to \everyaftershipout \def\scrn_canvas_synchronize_only @@ -289,12 +289,12 @@ %D Page transitions: -\let\scrn_transitions_list\empty +\lettonothing\scrn_transitions_list \permanent\tolerant\protected\def\setuppagetransitions[#list]% {\edef\scrn_transitions_list{#list}% \ifx\scrn_transitions_list\v!reset - \let\scrn_transitions_list\empty + \lettonothing\scrn_transitions_list \fi} \def\scrn_transitions_set diff --git a/tex/context/base/mkxl/scrn-ref.mklx b/tex/context/base/mkxl/scrn-ref.mklx index ffe1fab16..b86677ab2 100644 --- a/tex/context/base/mkxl/scrn-ref.mklx +++ b/tex/context/base/mkxl/scrn-ref.mklx @@ -51,10 +51,10 @@ \enabledirectives[destinations.offset=\the\dimexpr\interactionparameter\c!focusoffset\relax]% \to \everysetupinteraction -\mutable\let\currentinteractioncloseaction \empty -\mutable\let\currentinteractionclosepageaction\empty -\mutable\let\currentinteractionopenaction \empty -\mutable\let\currentinteractionopenpageaction \empty +\mutable\lettonothing\currentinteractioncloseaction +\mutable\lettonothing\currentinteractionclosepageaction +\mutable\lettonothing\currentinteractionopenaction +\mutable\lettonothing\currentinteractionopenpageaction %D We have to make sure of some settings: diff --git a/tex/context/base/mkxl/scrn-wid.mklx b/tex/context/base/mkxl/scrn-wid.mklx index 8bc3a3a1b..2361bbf3e 100644 --- a/tex/context/base/mkxl/scrn-wid.mklx +++ b/tex/context/base/mkxl/scrn-wid.mklx @@ -94,11 +94,11 @@ \c!depth=\v!fit, \c!location=\v!high] -\mutable\let\currentattachmentdepth \empty -\mutable\let\currentattachmentheight \empty -\mutable\let\currentattachmentregistered\empty -\mutable\let\currentattachmentsymbol \empty -\mutable\let\currentattachmentwidth \empty +\mutable\lettonothing\currentattachmentdepth +\mutable\lettonothing\currentattachmentheight +\mutable\lettonothing\currentattachmentregistered +\mutable\lettonothing\currentattachmentsymbol +\mutable\lettonothing\currentattachmentwidth \permanent\tolerant\protected\def\registerattachment[#tag]#spacer[#settings]% we save (globally) at the lua end {\ifarguments\else @@ -403,10 +403,10 @@ \c!buffer=\v!comment, \c!location=\v!high] -\mutable\let\currentcommentdepth \empty -\mutable\let\currentcommentheight\empty -\mutable\let\currentcommentsymbol\empty -\mutable\let\currentcommentwidth \empty +\mutable\lettonothing\currentcommentdepth +\mutable\lettonothing\currentcommentheight +\mutable\lettonothing\currentcommentsymbol +\mutable\lettonothing\currentcommentwidth \appendtoks \frozen\protected\instance\edefcsname \currentcomment\endcsname{\scrn_comment_argument[\currentcomment]}% @@ -586,8 +586,8 @@ %D \stoptext %D \stoptyping -\mutable\let\currentrendering \empty -\mutable\let\currentrenderingwindow\empty +\mutable\lettonothing\currentrendering +\mutable\lettonothing\currentrenderingwindow \permanent\tolerant\protected\def\userendering[#tag]#spacer[#mime]#spacer[#file]#spacer[#option]% {\clf_registerrendering @@ -617,11 +617,11 @@ \installframedcommandhandler \??renderingwindow {renderingwindow} \??renderingwindow \appendtoks - \letrenderingwindowparameter\c!openpageaction \empty - \letrenderingwindowparameter\c!closepageaction\empty - \setrenderingwindowparameter\c!width {\d_scrn_rendering_width }% - \setrenderingwindowparameter\c!height {\d_scrn_rendering_height}% - \letrenderingwindowparameter\c!align \v!flushleft + \resetrenderingwindowparameter\c!openpageaction + \resetrenderingwindowparameter\c!closepageaction + \setrenderingwindowparameter \c!width {\d_scrn_rendering_width }% + \setrenderingwindowparameter \c!height {\d_scrn_rendering_height}% + \letrenderingwindowparameter \c!align \v!flushleft \to \everypresetrenderingwindow \permanent\tolerant\protected\def\placerenderingwindow[#window]#spacer[#rendering]% do all in lua diff --git a/tex/context/base/mkxl/spac-hor.mkxl b/tex/context/base/mkxl/spac-hor.mkxl index 111bdc94c..ea43b2635 100644 --- a/tex/context/base/mkxl/spac-hor.mkxl +++ b/tex/context/base/mkxl/spac-hor.mkxl @@ -29,7 +29,7 @@ \bitwiseflip \normalizeparmode \normalizeparnormalizeparcode \bitwiseflip \normalizeparmode \flattenvleadersnormalizeparcode -\let\v_spac_indentation_current\empty % amount/keyword +\lettonothing\v_spac_indentation_current % amount/keyword \newdimen \d_spac_indentation_par \parindent\d_spac_indentation_par % for the show @@ -54,7 +54,7 @@ \aliased\let\synchronizeindenting\spac_indentation_setup_size -\let\m_spac_indentation_options\empty +\lettonothing\m_spac_indentation_options \def\spac_indentation_setup_options[#1]% {\edef\m_spac_indentation_options{#1}% comma separated list @@ -762,7 +762,7 @@ \permanent\tolerant\protected\def\startnarrower[#1]% {\begingroup - \let\currentnarrower\empty + \lettonothing\currentnarrower \ifparameter#1\or \spac_narrower_start_apply{#1}% \else @@ -870,12 +870,12 @@ \installcorenamespace{tolerancemethods} -\mutable\let\bottomtolerance\empty % why not zero (not used annyway, but for now we keep it) +\mutable\lettonothing\bottomtolerance % why not zero (not used annyway, but for now we keep it) \permanent\protected\def\installtolerancemethod#1#2#3% {\defcsname\??tolerancemethods#1:#2\endcsname{#3}} -\installtolerancemethod \v!vertical \v!verystrict {\let\bottomtolerance\empty} % why not zero +\installtolerancemethod \v!vertical \v!verystrict {\lettonothing\bottomtolerance} % why not zero \installtolerancemethod \v!vertical \v!strict {\def\bottomtolerance{.050}} \installtolerancemethod \v!vertical \v!tolerant {\def\bottomtolerance{.075}} \installtolerancemethod \v!vertical \v!verytolerant {\def\bottomtolerance{.100}} diff --git a/tex/context/base/mkxl/spac-lin.mkxl b/tex/context/base/mkxl/spac-lin.mkxl index 53da64923..f4473d2ea 100644 --- a/tex/context/base/mkxl/spac-lin.mkxl +++ b/tex/context/base/mkxl/spac-lin.mkxl @@ -63,7 +63,7 @@ \frozen\instance\letvalue {\e!stop \currentlines }\spac_lines_stop \to \everydefinelines -\let\p_lines_option\empty +\lettonothing\p_lines_option \let\spac_lines_break \relax \let\spac_after_first_obeyed_line\relax @@ -96,7 +96,7 @@ \else \scratchdimen\dimexpr\commalistelement\relax \hskip - \ifdim\scratchdimen=\zeropoint + \ifzeropt\scratchdimen \zeropoint \else \scratchdimen diff --git a/tex/context/base/mkxl/spac-pag.mkxl b/tex/context/base/mkxl/spac-pag.mkxl index 32b3b8d79..ff85007b8 100644 --- a/tex/context/base/mkxl/spac-pag.mkxl +++ b/tex/context/base/mkxl/spac-pag.mkxl @@ -30,7 +30,7 @@ \setpagestate[#1][\number#2]% \fi} -\let\m_spac_pagestates_realpage\empty +\lettonothing\m_spac_pagestates_realpage \newconditional\c_spac_pagestates_found @@ -145,7 +145,7 @@ \installcorenamespace{pagechanges} -\newif\ifpagechanged \mutable\let\lastchangedpage\empty +\newif\ifpagechanged \mutable\lettonothing\lastchangedpage \def\spac_pagechanges_check#1#2#3% {\pagechangedfalse diff --git a/tex/context/base/mkxl/spac-par.mkxl b/tex/context/base/mkxl/spac-par.mkxl index 098595dfe..654f195f6 100644 --- a/tex/context/base/mkxl/spac-par.mkxl +++ b/tex/context/base/mkxl/spac-par.mkxl @@ -227,7 +227,7 @@ %D indentation as set (by the output routine) inside the group are forgotten %D afterwards. (I must not forget its existence). -\mutable\let\currentparagraphproperties\empty % visible for tracing +\mutable\lettonothing\currentparagraphproperties % visible for tracing \permanent\def\carryoverpar#1% #1 can be \endgroup or \egroup or ... expandable ! {\normalexpanded diff --git a/tex/context/base/mkxl/spac-ver.mkxl b/tex/context/base/mkxl/spac-ver.mkxl index 755460ac2..bb12b5f5d 100644 --- a/tex/context/base/mkxl/spac-ver.mkxl +++ b/tex/context/base/mkxl/spac-ver.mkxl @@ -81,7 +81,7 @@ \relax} \ifdefined\bodyfontinterlinespace \else - \let\bodyfontinterlinespace\empty + \lettonothing\bodyfontinterlinespace \fi \permanent\protected\def\presetnormallineheight % each bodyfont @@ -118,12 +118,13 @@ \installcorenamespace{interlinespacerelative} -\aliased\let\setrelativeinterlinespace \relax % used elsewhere -\mutable\let\currentrelativeinterlinespace\empty +\aliased\let\setrelativeinterlinespace\relax % used elsewhere + +\mutable\lettonothing\currentrelativeinterlinespace \defcsname\??interlinespacerelative\v!on \endcsname{\oninterlineskip} \defcsname\??interlinespacerelative\v!off \endcsname{\offinterlineskip} -\defcsname\??interlinespacerelative\v!reset\endcsname{\enforced\let\currentrelativeinterlinespace\empty +\defcsname\??interlinespacerelative\v!reset\endcsname{\enforced\lettonothing\currentrelativeinterlinespace \enforced\let\setrelativeinterlinespace\relax \setfontparameters} \defcsname\??interlinespacerelative\v!auto \endcsname{\enforced\let\setrelativeinterlinespace\spac_linespacing_set_relative_interlinespace} @@ -501,7 +502,8 @@ {\enforced\let\spac_lines_vbox\vbox} \let\v_spac_lines_around_action_set\relax -\let\m_spac_lines_around \empty + +\lettonothing\m_spac_lines_around \newconstant\c_spac_lines_correction_mode @@ -1074,9 +1076,9 @@ \appendtoks % \setbox\strutbox\copy\nostrutbox - \enforced\let\strut \empty - \enforced\let\endstrut\empty - \enforced\let\begstrut\empty + \enforced\lettonothing\strut + \enforced\lettonothing\endstrut + \enforced\lettonothing\begstrut \to \everysetnostrut %D When enabled, sigstruts will remove themselves if nothing goes inbetween. For @@ -1429,7 +1431,7 @@ \ifcsname\??gridsnappersets#1\endcsname\lastnamedcs\else#1\fi}} \permanent\protected\def\installsnapvalues#1#2% - {\let\m_spac_snapper\empty + {\lettonothing\m_spac_snapper \rawprocesscommacommand[#2]\spac_grids_expand_snapper \edef\p_spac_snapper{#1:\m_spac_snapper}% \ifcsname\??gridsnapperattributes\p_spac_snapper\endcsname @@ -1649,14 +1651,15 @@ \permanent\protected\def\setupgridsnapping[#1]% less overhead than setuplayout (needs testing) {\setlayoutparameter\c!grid{#1}\synchronizegridsnapping} -\mutable\let\checkedgridmethod\empty % these can become private -\mutable\let\checkedgridscope \v!local % these can become private +\mutable\lettonothing\checkedgridmethod % this can become private + +\mutable\let\checkedgridscope\v!local % this can become private \permanent\protected\def\checkgridmethod#1% {\edef\p_grid{#1}% \ifempty\p_grid - \let\checkedgridmethod\empty - \let\checkedgridscope \v!local + \lettonothing\checkedgridmethod + \let\checkedgridscope\v!local \else \splitatcolon\p_grid\checkedgridscope\checkedgridmethod \ifempty\checkedgridmethod @@ -2179,12 +2182,12 @@ \c!location=\v!left, \c!n=\zerocount] -\let\m_spac_hanging_location\empty +\lettonothing\m_spac_hanging_location \permanent\tolerant\protected\def\starthanging[#1]% {\dontleavehmode\bgroup \ifhastok={#1}% - \let\m_spac_hanging_location\empty + \lettonothing\m_spac_hanging_location \setupcurrenthanging[#1]% \else \edef\m_spac_hanging_location{#1}% diff --git a/tex/context/base/mkxl/strc-bkm.mkxl b/tex/context/base/mkxl/strc-bkm.mkxl index c5bd87324..8e5e7e4b1 100644 --- a/tex/context/base/mkxl/strc-bkm.mkxl +++ b/tex/context/base/mkxl/strc-bkm.mkxl @@ -90,8 +90,8 @@ \expandafter\gobblethreeoptionals \fi} -\let\m_bookmarks_names \empty -\let\m_bookmarks_opened\empty +\lettonothing\m_bookmarks_names +\lettonothing\m_bookmarks_opened \tolerant\def\strc_bookmarks_place_yes[#1]#*[#2]#*[#3]% {\begingroup @@ -104,7 +104,7 @@ \let\m_bookmarks_names\v!all \fi \ifparameters\or\or - \doifelseassignment{#2}{\let\m_bookmarks_opened\empty\setupcurrentbookmark[#2]}\donothing + \doifelseassignment{#2}{\lettonothing\m_bookmarks_opened\setupcurrentbookmark[#2]}\donothing \or \setupcurrentbookmark[#3]% no every so not all possible \fi diff --git a/tex/context/base/mkxl/strc-blk.mkxl b/tex/context/base/mkxl/strc-blk.mkxl index 97ae671f1..c81739530 100644 --- a/tex/context/base/mkxl/strc-blk.mkxl +++ b/tex/context/base/mkxl/strc-blk.mkxl @@ -43,12 +43,12 @@ % maybe: systemmode "block:" -\let\m_block \empty -\let\m_subblock\empty +\lettonothing\m_block +\lettonothing\m_subblock \protected\def\strc_blocks_begin#1% - {\edef\m_block {#1}% - \let \m_subblock\empty + {\edef\m_block{#1}% + \lettonothing\m_subblock \doifelsenextoptionalcs\strc_blocks_begin_yes\strc_blocks_begin_nop} \protected\def\strc_blocks_begin_yes[#1]% @@ -75,7 +75,7 @@ % \tolerant\protected\def\strc_blocks_begin#1#*[#2]#*[#3]% #:#/% get rid of spaces and pars % {\edef\m_block{#1}% -% \let\m_subblock\empty +% \lettonothing\m_subblock % \ifhastok={#2}% % \expandafter\strc_blocks_begin_a % [settings] % \orelse\ifparameter#2\or diff --git a/tex/context/base/mkxl/strc-con.mklx b/tex/context/base/mkxl/strc-con.mklx index 55ddb8edf..d931bc779 100644 --- a/tex/context/base/mkxl/strc-con.mklx +++ b/tex/context/base/mkxl/strc-con.mklx @@ -105,28 +105,27 @@ %aliased\let\currentconstructionhash \??construction -\mutable\let\currentconstructionmain \empty -\mutable\let\currentconstructionlevel \empty -\mutable\let\currentconstructionhandler \empty - -\mutable\let\currentconstructionattribute \empty -\mutable\let\currentconstructionbookmark \empty -\mutable\let\currentconstructioncatcodes \empty -\mutable\let\currentconstructioncoding \empty -\mutable\let\currentconstructionexpansion \empty -\mutable\let\currentconstructionincrementnumber\empty -\mutable\let\currentconstructionlabel \empty -\mutable\let\currentconstructionlist \empty -\mutable\let\currentconstructionlistentry \empty -\mutable\let\currentconstructionlistnumber \empty -\mutable\let\currentconstructionmarking \empty -\mutable\let\currentconstructionnumber \empty -\mutable\let\currentconstructionreference \empty -\mutable\let\currentconstructionreferencetext \empty -\mutable\let\currentconstructionreferenceprefix\empty -\mutable\let\currentconstructionsynchronize \empty -\mutable\let\currentconstructiontitle \empty -\mutable\let\currentconstructionxmlsetup \empty +\mutable\lettonothing\currentconstructionmain +\mutable\lettonothing\currentconstructionlevel +\mutable\lettonothing\currentconstructionhandler +\mutable\lettonothing\currentconstructionattribute +\mutable\lettonothing\currentconstructionbookmark +\mutable\lettonothing\currentconstructioncatcodes +\mutable\lettonothing\currentconstructioncoding +\mutable\lettonothing\currentconstructionexpansion +\mutable\lettonothing\currentconstructionincrementnumber +\mutable\lettonothing\currentconstructionlabel +\mutable\lettonothing\currentconstructionlist +\mutable\lettonothing\currentconstructionlistentry +\mutable\lettonothing\currentconstructionlistnumber +\mutable\lettonothing\currentconstructionmarking +\mutable\lettonothing\currentconstructionnumber +\mutable\lettonothing\currentconstructionreference +\mutable\lettonothing\currentconstructionreferencetext +\mutable\lettonothing\currentconstructionreferenceprefix +\mutable\lettonothing\currentconstructionsynchronize +\mutable\lettonothing\currentconstructiontitle +\mutable\lettonothing\currentconstructionxmlsetup \settrue\c_strc_constructions_define_commands % use with care, might become a proper key @@ -296,17 +295,17 @@ \protected\defcsname\??constructioncommandhandler\v!construction\endcsname {\endgroup} -\let\p_strc_constructions_sample \empty -\let\p_strc_constructions_align \empty -\let\p_strc_constructions_indenting \empty -\let\p_strc_constructions_width \empty -\let\p_strc_constructions_aligntitle \empty -\let\p_strc_constructions_renderingsetup\empty -\let\p_strc_constructions_headalign \empty -\let\p_strc_constructions_hang \empty -\let\p_strc_constructions_inbetween \empty -\let\p_strc_constructions_closesymbol \empty -\let\p_strc_constructions_distance \empty +\lettonothing\p_strc_constructions_sample +\lettonothing\p_strc_constructions_align +\lettonothing\p_strc_constructions_indenting +\lettonothing\p_strc_constructions_width +\lettonothing\p_strc_constructions_aligntitle +\lettonothing\p_strc_constructions_renderingsetup +\lettonothing\p_strc_constructions_headalign +\lettonothing\p_strc_constructions_hang +\lettonothing\p_strc_constructions_inbetween +\lettonothing\p_strc_constructions_closesymbol +\lettonothing\p_strc_constructions_distance \newconditional\c_strc_constructions_distance_none diff --git a/tex/context/base/mkxl/strc-des.mklx b/tex/context/base/mkxl/strc-des.mklx index 9f9119466..6c04c9ac1 100644 --- a/tex/context/base/mkxl/strc-des.mklx +++ b/tex/context/base/mkxl/strc-des.mklx @@ -75,7 +75,7 @@ \fi \to \everydefinedescription -\let\p_strc_constructions_title \empty +\lettonothing\p_strc_constructions_title \protected\defcsname\??constructioninitializer\v!description\endcsname {\let \currentdescription \currentconstruction diff --git a/tex/context/base/mkxl/strc-doc.mkxl b/tex/context/base/mkxl/strc-doc.mkxl index 50b71d9d2..11c96f9c1 100644 --- a/tex/context/base/mkxl/strc-doc.mkxl +++ b/tex/context/base/mkxl/strc-doc.mkxl @@ -19,45 +19,45 @@ %D This will move: -\mutable\let\currentstructureattribute \empty -\mutable\let\currentstructurebackreference \empty -\mutable\let\currentstructurebookmark \empty -\mutable\let\currentstructurecatcodes \empty -\mutable\let\currentstructurecoding \empty -\mutable\let\currentstructurecoupling \empty -\mutable\let\currentstructureexpansion \empty -\mutable\let\currentstructureincrementnumber \empty -\mutable\let\currentstructurelabel \empty -\mutable\let\currentstructurelevel \empty -\mutable\let\currentstructurelist \empty -\mutable\let\currentstructurelistattribute \empty -\mutable\let\currentstructuremarking \empty -\mutable\let\currentstructurename \empty -\mutable\let\currentstructureownnumber \empty -\mutable\let\currentstructureplaceholder \empty -\mutable\let\currentstructurereference \empty -\mutable\let\currentstructurereferenceattribute \empty -\mutable\let\currentstructurereferenceprefix \empty -\mutable\let\currentstructuresaveinlist \empty -\mutable\let\currentstructureshownumber \empty -\mutable\let\currentstructuretitle \empty -\mutable\let\currentstructurexmlsetup \empty +\mutable\lettonothing\currentstructureattribute +\mutable\lettonothing\currentstructurebackreference +\mutable\lettonothing\currentstructurebookmark +\mutable\lettonothing\currentstructurecatcodes +\mutable\lettonothing\currentstructurecoding +\mutable\lettonothing\currentstructurecoupling +\mutable\lettonothing\currentstructureexpansion +\mutable\lettonothing\currentstructureincrementnumber +\mutable\lettonothing\currentstructurelabel +\mutable\lettonothing\currentstructurelevel +\mutable\lettonothing\currentstructurelist +\mutable\lettonothing\currentstructurelistattribute +\mutable\lettonothing\currentstructuremarking +\mutable\lettonothing\currentstructurename +\mutable\lettonothing\currentstructureownnumber +\mutable\lettonothing\currentstructureplaceholder +\mutable\lettonothing\currentstructurereference +\mutable\lettonothing\currentstructurereferenceattribute +\mutable\lettonothing\currentstructurereferenceprefix +\mutable\lettonothing\currentstructuresaveinlist +\mutable\lettonothing\currentstructureshownumber +\mutable\lettonothing\currentstructuretitle +\mutable\lettonothing\currentstructurexmlsetup -\mutable\let\currentstructurecomponentattribute \empty -\mutable\let\currentstructurecomponentbookmark \empty -\mutable\let\currentstructurecomponentcatcodes \empty -\mutable\let\currentstructurecomponentcoding \empty -\mutable\let\currentstructurecomponentexpansion \empty -\mutable\let\currentstructurecomponentlabel \empty -\mutable\let\currentstructurecomponentlevel \empty -\mutable\let\currentstructurecomponentlist \empty -\mutable\let\currentstructurecomponentmarking \empty -\mutable\let\currentstructurecomponentname \empty -\mutable\let\currentstructurecomponentreference \empty -\mutable\let\currentstructurecomponentreferenceprefix\empty -\mutable\let\currentstructurecomponentsynchronize \empty -\mutable\let\currentstructurecomponenttitle \empty -\mutable\let\currentstructurecomponentxmlsetup \empty +\mutable\lettonothing\currentstructurecomponentattribute +\mutable\lettonothing\currentstructurecomponentbookmark +\mutable\lettonothing\currentstructurecomponentcatcodes +\mutable\lettonothing\currentstructurecomponentcoding +\mutable\lettonothing\currentstructurecomponentexpansion +\mutable\lettonothing\currentstructurecomponentlabel +\mutable\lettonothing\currentstructurecomponentlevel +\mutable\lettonothing\currentstructurecomponentlist +\mutable\lettonothing\currentstructurecomponentmarking +\mutable\lettonothing\currentstructurecomponentname +\mutable\lettonothing\currentstructurecomponentreference +\mutable\lettonothing\currentstructurecomponentreferenceprefix +\mutable\lettonothing\currentstructurecomponentsynchronize +\mutable\lettonothing\currentstructurecomponenttitle +\mutable\lettonothing\currentstructurecomponentxmlsetup \permanent\protected\def\setstructuresynchronization#1% todo: use ctxcontext {\clf_setinternalreference diff --git a/tex/context/base/mkxl/strc-enu.mklx b/tex/context/base/mkxl/strc-enu.mklx index 89e1b307a..d3cf165de 100644 --- a/tex/context/base/mkxl/strc-enu.mklx +++ b/tex/context/base/mkxl/strc-enu.mklx @@ -146,10 +146,10 @@ \frozen\protected\instance \defcsname\e!stop #tag\endcsname{\stopnamedenumeration}% \fi} -\let\m_strc_enumeration_sub\empty +\lettonothing\m_strc_enumeration_sub \appendtoks - \let\m_strc_enumeration_sub\empty + \lettonothing\m_strc_enumeration_sub \ifempty\currentenumerationparent % clone => parent | subclone => clone | subsubclone => subclone \strc_define_commands_enumeration @@ -182,8 +182,8 @@ %\strc_enumerations_setup_counter\currentenumeration \to \everydefineenumeration -\let\p_strc_constructions_title \empty -\let\p_strc_constructions_number\empty +\lettonothing\p_strc_constructions_title +\lettonothing\p_strc_constructions_number \protected\defcsname\??constructioninitializer\v!enumeration\endcsname {\let \currentenumeration \currentconstruction diff --git a/tex/context/base/mkxl/strc-flt.mklx b/tex/context/base/mkxl/strc-flt.mklx index 192fd137a..f444a9b1c 100644 --- a/tex/context/base/mkxl/strc-flt.mklx +++ b/tex/context/base/mkxl/strc-flt.mklx @@ -187,13 +187,13 @@ \d_page_floats_compress_distance\floatparameter\c!compressdistance\relax \to \everysetupfloat -\mutable\let\currentfloatattribute \empty -\mutable\let\currentfloatcounter \empty -\mutable\let\currentfloatgroup \empty -\mutable\let\currentfloatnumber \empty -\mutable\let\currentfloatsynchronize\empty +\mutable\lettonothing\currentfloatattribute +\mutable\lettonothing\currentfloatcounter +\mutable\lettonothing\currentfloatgroup +\mutable\lettonothing\currentfloatnumber +\mutable\lettonothing\currentfloatsynchronize -\let\m_strc_floats_previous_number \empty % we can also just push/pop +\lettonothing\m_strc_floats_previous_number % we can also just push/pop %D We need to do it again here: @@ -323,12 +323,12 @@ %D Captions. -\mutable\let\floatcaptionarrangement\empty -\mutable\let\floatcaptionattribute \empty -\mutable\let\floatcaptiondirectives \empty -\mutable\let\floatcaptionlocation \empty -\mutable\let\floatcaptionnumber \empty -\mutable\let\floatcaptionsuffix \empty +\mutable\lettonothing\floatcaptionarrangement +\mutable\lettonothing\floatcaptionattribute +\mutable\lettonothing\floatcaptiondirectives +\mutable\lettonothing\floatcaptionlocation +\mutable\lettonothing\floatcaptionnumber +\mutable\lettonothing\floatcaptionsuffix % For a while these were placeholders: % @@ -419,7 +419,7 @@ \newdimen\d_strc_floats_caption_height \newdimen\d_strc_floats_caption_depth -\let\m_strc_floats_last_caption_tag\empty +\lettonothing\m_strc_floats_last_caption_tag \def\strc_floats_make_complete_caption {\doifsomething{\floatcaptionparameter\c!spacebefore}{\blank[\floatcaptionparameter\c!spacebefore]}% @@ -588,7 +588,7 @@ % before we're really dealing with the float. Some day I'll root out the global % settings. -\aliased\let\lastplacedfloat\empty +\aliased\lettonothing\lastplacedfloat \def\strc_floats_set_current_tag#tag% {\edef\currentfloat{#tag}% @@ -600,32 +600,33 @@ {\writestatus\m!floatblocks{unknown float type '\currentfloat'}% \let\currentfloat\v!figure}% also a hack \enforced\glet\lastplacedfloat\currentfloat - \let\m_strc_floats_saved_userdata\empty + \lettonothing\m_strc_floats_saved_userdata \let\currentfloatcaption\currentfloat} -\mutable\let\askedfloatmethod \empty -\mutable\let\askedfloatoptions\empty +\mutable\lettonothing\askedfloatmethod +\mutable\lettonothing\askedfloatoptions \def\strc_floats_reset_variables {\global\emptyfloatcaptionfalse \global\nofloatcaptionfalse \global\nofloatnumberfalse - \glet\askedfloatmethod \empty - \glet\askedfloatoptions\empty} + \glettonothing\askedfloatmethod + \glettonothing\askedfloatoptions} % place -\mutable\let\floatlabel \empty -\mutable\let\floatcolumn \empty -\mutable\let\floatrow \empty -\mutable\let\floatlocation \empty -\mutable\let\floatlocationmethod\empty +\mutable\lettonothing\floatlabel +\mutable\lettonothing\floatcolumn +\mutable\lettonothing\floatrow +\mutable\lettonothing\floatlocation +\mutable\lettonothing\floatlocationmethod +\mutable\lettonothing\floatlocationdefault \def\strc_floats_analyze_location {% more will be moved here - \let\floatlabel \empty - \let\floatcolumn\empty - \let\floatrow \empty + \lettonothing\floatlabel + \lettonothing\floatcolumn + \lettonothing\floatrow % \edef\floatcaptionlocation{\floatcaptionparameter\c!location}% % @@ -644,9 +645,10 @@ {\strc_floats_set_current_tag{#tag}% \strc_floats_reset_variables \xdef\askedfloatoptions{#location}% + \edef\floatlocationdefault{\floatparameter\c!default}% \edef\floatlocation{#location}% \ifempty\floatlocation - \edef\floatlocation{\floatparameter\c!default}% beware of a clash between alignment locations + \let\floatlocation\floatlocationdefault % beware of a clash between alignment locations \fi \ifintable \the\c_floats_every_table_float @@ -672,7 +674,7 @@ \installsetuponlycommandhandler \??floatuserdata {floatuserdata} -\let\m_strc_floats_saved_userdata\empty % todo: reset this in non start|stop cases +\lettonothing\m_strc_floats_saved_userdata % todo: reset this in non start|stop cases %D We abuse the settings to pick up some float parameters too which makes it %D messy. @@ -707,12 +709,13 @@ \setupcurrentfloatuserdata[#userdata]% \def\m_strc_floats_saved_userdata{#userdata}% \else - \let\m_strc_floats_saved_userdata\empty + \lettonothing\m_strc_floats_saved_userdata \fi - % check + % check (see elsewhere + \edef\floatlocationdefault{\floatparameter\c!default}% \edef\floatlocation{\floatcaptionparameter\c!location}% \ifempty\floatlocation - \edef\floatlocation{\floatparameter\c!default}% + \let\floatlocation\floatlocationdefault % beware of a clash between alignment locations \fi % inherit \setexpandedfloatparameter\c!topoffset {\floatcaptionparameter\c!topoffset}% @@ -860,8 +863,9 @@ \ifempty\forcedfloatmethod \else \doifelsecommandhandler\??float\forcedfloatmethod {\let\currentfloat\forcedfloatmethod - \edef\floatlocation{\floatparameter\c!default}% - \let\forcedfloatmethod\floatlocation} + \edef\floatlocationdefault{\floatparameter\c!default}% + \let\floatlocation\floatlocationdefault + \let\forcedfloatmethod\floatlocationdefault} \donothing \fi \ifempty\forcedfloatmethod @@ -1114,14 +1118,14 @@ %D \stopplacefigure %D \stoptyping -\glet\currentsubfloatcounter\empty +\glettonothing\currentsubfloatcounter \permanent\protected\def\startsubfloatnumbering {\glet\currentsubfloatcounter\s!unknown} \permanent\protected\def\stopsubfloatnumbering {\strc_counters_reset_sub\currentsubfloatcounter\plustwo - \glet\currentsubfloatcounter\empty} + \glettonothing\currentsubfloatcounter} \defineconversionset[subfloats][number,characters] @@ -1135,8 +1139,8 @@ \def\strc_floats_place_packaged_boxes_indeed#userdata% {\bgroup \ifconditional\usesamefloatnumber - \glet\currentfloatnumber \m_strc_floats_previous_number - \glet\currentfloatattribute \empty + \glet\currentfloatnumber\m_strc_floats_previous_number + \glettonothing\currentfloatattribute \glet\currentfloatsynchronize\relax \else \edef\currentfloatcounter{\namedcounterparameter\currentfloat\s!name}% @@ -1327,7 +1331,7 @@ \permanent\protected\def\hangsidefloat[#number]% {\global\c_page_sides_n_of_lines#number\relax} -\mutable\let\extrafloatlocation\empty +\mutable\lettonothing\extrafloatlocation \def\strc_floats_set_extra_action#rightpagelocation#leftpagelocation% {\rightorleftpageaction @@ -1353,7 +1357,7 @@ \def\strc_floats_check_extra_actions % less tracingthis way .... {\doifnotinset\v!text\floatlocation % fuzzy, text overloads left, since then it's a directive - {\let\extrafloatlocation\empty + {\lettonothing\extrafloatlocation % \d_page_sides_downshift will be reset afterwards, and can % already be set at this point \processcommacommand[\floatlocation]\strc_floats_check_extra_actions_step @@ -2075,13 +2079,13 @@ \def\strc_floats_build_box_top_stack_normal {\doifelseinset\v!overlay{\floatcaptionparameter\c!location} - \strc_floats_build_box_top_stack_normal_overlay - \strc_floats_build_box_top_stack_normal_content} + \strc_floats_build_box_top_stack_normal_overlay + \strc_floats_build_box_top_stack_normal_content} \def\strc_floats_build_box_bottom_stack_normal {\doifinset\v!overlay{\floatcaptionparameter\c!location} - \strc_floats_build_box_bottom_stack_normal_overlay - \strc_floats_build_box_bottom_stack_normal_content} + \strc_floats_build_box_bottom_stack_normal_overlay + \strc_floats_build_box_bottom_stack_normal_content} \def\strc_floats_build_box_top_stack_grid {\dp\b_strc_floats_caption\strutdepth @@ -2504,13 +2508,12 @@ \installcorenamespace{floatmethods} -\mutable\let\floatmethod \empty % set by lua -\mutable\let\floatlabel \empty % set by lua -\mutable\let\floatcolumn \empty % set by lua -\mutable\let\floatrow \empty % set by lua -\mutable\let\floatspecification\empty - -\mutable\let\forcedfloatmethod \empty % set by lua and floatcombinations +\mutable\lettonothing\floatmethod % set by lua +\mutable\lettonothing\floatlabel % set by lua +\mutable\lettonothing\floatcolumn % set by lua +\mutable\lettonothing\floatrow % set by lua +\mutable\lettonothing\floatspecification +\mutable\lettonothing\forcedfloatmethod % set by lua and floatcombinations \permanent\protected\def\setfloatmethodvariables#1% \floatmethod \floatlabel \floatrow \floatcolumn {\clf_analysefloatmethod{#1}} % move definition to lua end @@ -2521,7 +2524,10 @@ \def\strc_floats_get_box {\ifvisible \ifcsname\??floatmethods\currentoutputroutine:\floatmethod\endcsname \else - \let\floatmethod\v!here + \let\floatmethod\floatlocationdefault + \ifcsname\??floatmethods\currentoutputroutine:\floatmethod\endcsname \else + \let\floatmethod\v!here + \fi \fi \ifempty\forcedfloatmethod \else \let\floatmethod\forcedfloatmethod @@ -2539,7 +2545,7 @@ \installcorenamespace{floatsettings} \permanent\protected\def\installfloatmethod#1#2#3% routine keyword handler - {\setvalue{\??floatmethods#1:#2}{#3}} + {\defcsname\??floatmethods#1:#2\endcsname{#3}} \permanent\protected\def\handlefloatmethod#1% {\csname\??floatmethods\currentoutputroutine:#1\endcsname} diff --git a/tex/context/base/mkxl/strc-itm.mklx b/tex/context/base/mkxl/strc-itm.mklx index db6bdadf3..a4a0b283a 100644 --- a/tex/context/base/mkxl/strc-itm.mklx +++ b/tex/context/base/mkxl/strc-itm.mklx @@ -224,10 +224,10 @@ \newcount \c_strc_itemgroups_column_depth \def \v_strc_itemgroups_counter {itemgroup:\currentparentitemgroup} -\let \m_strc_itemgroups_repeat_start \empty +\lettonothing \m_strc_itemgroups_repeat_start \def \v_strc_itemgroups_unknown_symbol {?} -\let \m_strc_itemgroups_indenting \empty -\let \m_strc_itemgroups_destination \empty +\lettonothing \m_strc_itemgroups_indenting +\lettonothing \m_strc_itemgroups_destination \mutable\let \currentitemlevel \!!zerocount % public \mutable\def \currentnofitems {\the\c_strc_itemgroups_max_items} @@ -235,9 +235,9 @@ \newtoks \itemgroupcommands % maybe public -\mutable\def \currentitemgroupsymbol {n} % here we cannot use a _ in the name -\mutable\let \currentitemgroupconversionset \empty % here we cannot use a _ in the name -\mutable\let \currentitemgroupsegments \empty +\mutable\def \currentitemgroupsymbol {n} % here we cannot use a _ in the name +\mutable\lettonothing \currentitemgroupconversionset % here we cannot use a _ in the name +\mutable\lettonothing \currentitemgroupsegments \def\strc_itemgroups_register_status {\clf_registeritemgroup{\currentparentitemgroup}\c_strc_itemgroups_nesting\c_strc_itemgroups_n_of_items\dimexpr\itemgroupparameter\c!maxwidth\relax} @@ -393,8 +393,8 @@ % \protected\def\strc_itemgroups_process_options#options% % {\normalexpanded{\strc_itemgroups_process_option_list[#options]}} % expansion of options is handy for xml -\mutable\let\itemgroupfirst \empty -\mutable\let\itemgroupsecond\empty +\mutable\lettonothing\itemgroupfirst +\mutable\lettonothing\itemgroupsecond \def\strc_itemgroups_process_option#option% {\edef\scratchstringone{#option}% @@ -474,8 +474,8 @@ %\letitemgroupparameter\c!factor \!!zerocount \letitemgroupparameter\c!factor {\zerocount}% \setitemgroupparameter\c!packcriterium{\zerocount}% - \letitemgroupparameter\c!inner \empty - \letitemgroupparameter\c!beforehead \empty + \resetitemgroupparameter\c!inner + \resetitemgroupparameter\c!beforehead \letitemgroupparameter\c!afterhead \blank \letitemgroupparameter\c!before \blank \letitemgroupparameter\c!inbetween \blank @@ -503,23 +503,30 @@ \setfalse\c_strc_itemgroups_symbol \setfalse\c_strc_itemgroups_columns % to be checked - \let\m_strc_itemgroups_destination\empty - \let\strc_itemgroups_used_symbol \empty % ** start value - \let\strc_itemgroups_margin_symbol\empty - \let\strc_itemgroups_extra_symbol \empty + \lettonothing\m_strc_itemgroups_destination + \lettonothing\strc_itemgroups_used_symbol % ** start value + \lettonothing\strc_itemgroups_margin_symbol + \lettonothing\strc_itemgroups_extra_symbol % \global\letitemgroupparameter\c!maxwidth\!!zeropoint } -\setvalue{\??itemgroupfirst\v!intro }{\settrue\c_strc_itemgroups_intro} -\setvalue{\??itemgroupfirst\v!continue }{\settrue\c_strc_itemgroups_continue} -\setvalue{\??itemgroupfirst\v!random }{\settrue\c_strc_itemgroups_randomize - \settrue\c_strc_itemgroups_collecting} -\setvalue{\??itemgroupkeyword\v!horizontal}{\settrue\c_strc_itemgroups_horizontal - \settrue\c_strc_itemgroups_collecting - \settrue\c_strc_itemgroups_inline - \settrue\c_strc_itemgroups_joined - \strc_itemgroups_process_set_option_pack} +\defcsname\??itemgroupfirst\v!intro\endcsname + {\settrue\c_strc_itemgroups_intro} + +\defcsname\??itemgroupfirst\v!continue\endcsname + {\settrue\c_strc_itemgroups_continue} + +\defcsname\??itemgroupfirst\v!random\endcsname + {\settrue\c_strc_itemgroups_randomize + \settrue\c_strc_itemgroups_collecting} + +\defcsname\??itemgroupkeyword\v!horizontal\endcsname + {\settrue\c_strc_itemgroups_horizontal + \settrue\c_strc_itemgroups_collecting + \settrue\c_strc_itemgroups_inline + \settrue\c_strc_itemgroups_joined + \strc_itemgroups_process_set_option_pack} \def\strc_itemgroups_preset_stage_one#options% {\processcommacommand[#options]\strc_itemgroups_preset_stage_one_indeed} @@ -741,11 +748,11 @@ % \strc_itemgroups_insert_reference % \endgroup} -\let\strc_itemgroups_temp_symbol \empty -\let\strc_itemgroups_used_symbol \empty -\let\strc_itemgroups_asked_symbol \empty -\let\strc_itemgroups_margin_symbol\empty -\let\strc_itemgroups_extra_symbol \empty +\lettonothing\strc_itemgroups_temp_symbol +\lettonothing\strc_itemgroups_used_symbol +\lettonothing\strc_itemgroups_asked_symbol +\lettonothing\strc_itemgroups_margin_symbol +\lettonothing\strc_itemgroups_extra_symbol \def\strc_itemgroups_set_symbol#symbol% {\edef\strc_itemgroups_temp_symbol{#symbol}% @@ -762,14 +769,14 @@ \strc_itemgroups_store_global_symbol\currentitemgroupsymbol \strc_itemgroups_store_local_symbol\v_strc_itemgroups_unknown_symbol \let\strc_itemgroups_used_symbol\strc_itemgroups_set_symbol_symbol_item - \let\strc_itemgroups_asked_symbol\empty} + \lettonothing\strc_itemgroups_asked_symbol} \def\strc_itemgroups_set_symbol_conversion {\let\currentitemgroupsymbol\strc_itemgroups_temp_symbol \strc_itemgroups_store_global_symbol\currentitemgroupsymbol \strc_itemgroups_store_local_symbol\strc_itemgroups_insert_item_counter \let\strc_itemgroups_used_symbol\strc_itemgroups_set_symbol_conversion_item - \let\strc_itemgroups_asked_symbol\empty} + \lettonothing\strc_itemgroups_asked_symbol} \def\strc_itemgroups_set_symbol_symbol_item {\symbol[\currentitemgroupsymbol]} @@ -802,8 +809,8 @@ \advance\d_strc_itemgroups_list_width\itemgroupparameter\c!distance\relax \let\currentitemgroup\m_strc_itemgroups_saved} -\let\p_itemgroups_options \empty -\let\p_itemgroups_extra_options\empty +\lettonothing\p_itemgroups_options +\lettonothing\p_itemgroups_extra_options \permanent\tolerant\protected\def\startitemgroup[#category]#spacer[#options]#spacer[#settings]% {\begingroup % (1) @@ -816,7 +823,7 @@ \edef\currentitemgroup{\currentparentitemgroup:\currentitemlevel}% % \edef\p_itemgroups_options{\itemgroupparameter\c!option}% - \let\p_itemgroups_extra_options\empty + \lettonothing\p_itemgroups_extra_options \ifcase\nofarguments \strc_itemgroups_start_indeed{}% \or @@ -937,11 +944,11 @@ \fi\fi \ifconditional\c_strc_itemgroups_paragraph \ifnum\c_strc_itemgroups_nesting>\plusone - \letitemgroupparameter\c!inbetween\empty + \resetitemgroupparameter\c!inbetween \fi \fi \ifconditional\c_strc_itemgroups_pack - \letitemgroupparameter\c!inbetween\empty + \resetitemgroupparameter\c!inbetween \fi \ifconditional\c_strc_itemgroups_columns \ifinsidecolumns\orelse\ifcase\c_strc_itemgroups_column_depth @@ -1159,7 +1166,7 @@ % \stopitemize % \stopitemize -\mutable\let\currentitemreference\empty +\mutable\lettonothing\currentitemreference \tolerant\permanent\protected\def\startitemgroupitem[#reference]% we can reuse more {\def\currentitemreference{#reference}% @@ -1270,7 +1277,7 @@ {\startitemgroupitem} \protected\def\strc_itemgroups_start_no_item - {\let\currentitemreference\empty + {\lettonothing\currentitemreference \strc_itemgroups_increment_item_counter %\advance\c_strc_itemgroups_n_of_items\plusone \setbox\b_strc_itemgroups\emptyhbox @@ -1462,7 +1469,7 @@ \strc_itemgroups_used_symbol \fi \fi}% - \let\strc_itemgroups_extra_symbol\empty + \lettonothing\strc_itemgroups_extra_symbol \setfalse\c_strc_itemgroups_symbol} \def\strc_itemgroups_make_fitting_box @@ -1504,7 +1511,7 @@ \edef\m_strc_itemgroups_repeat_start{\currentitemlevel}% \fi \else - \let\m_strc_itemgroups_repeat_start\empty + \lettonothing\m_strc_itemgroups_repeat_start \fi} \def\strc_itemgroups_insert_item @@ -1527,7 +1534,7 @@ \orelse\ifdim\d_strc_itemgroups_asked_width>\zeropoint \strc_itemgroups_make_aligned_box \fi - \let\m_strc_itemgroups_destination\empty + \lettonothing\m_strc_itemgroups_destination \ht\b_strc_itemgroups\strutheight % just in case a symbols is not yet available in \dp\b_strc_itemgroups\strutdepth % the current run (more a mkii mp side artifact) \strc_itemgroups_check_for_repeated @@ -1557,7 +1564,7 @@ \ignorepars} % \ignorespaces \def\strc_itemgroups_start_item_nop - {\let\currentitemreference\empty + {\lettonothing\currentitemreference \strc_itemgroups_increment_item_counter \advance\c_strc_itemgroups_n_of_items\plusone \setbox\b_strc_itemgroups\hbox @@ -1713,7 +1720,7 @@ \let\strc_itemgroups_collected_store\relax -\let\m_strc_itemgroups_collected\empty +\lettonothing\m_strc_itemgroups_collected \normalexpanded{\def\strc_itemgroups_collected_store#1\csname\e!stop\v!item\endcsname}% {\advance\c_strc_itemgroups_collected_stored\plusone @@ -1844,7 +1851,7 @@ %letitemgroupparameter\c!width\zeropoint \strc_itemgroups_make_symbol_box \strc_itemgroups_make_destination_box - \let\m_strc_itemgroups_destination\empty + \lettonothing\m_strc_itemgroups_destination \ht\b_strc_itemgroups\strutheight \dp\b_strc_itemgroups\strutdepth \box\b_strc_itemgroups diff --git a/tex/context/base/mkxl/strc-lab.mkxl b/tex/context/base/mkxl/strc-lab.mkxl index 368a412a7..98bd390f9 100644 --- a/tex/context/base/mkxl/strc-lab.mkxl +++ b/tex/context/base/mkxl/strc-lab.mkxl @@ -71,10 +71,10 @@ % todo: \strc_labels_command for user -\let\m_strc_labels_sub\empty +\lettonothing\m_strc_labels_sub \appendtoks - \let\m_strc_labels_sub\empty + \lettonothing\m_strc_labels_sub \ifempty\currentlabelparent % clone => parent | subclone => clone | subsubclone => subclone \strc_define_commands_label @@ -106,8 +106,8 @@ \letlabelparameter\s!counter\p_counter \to \everydefinelabel -\let\p_strc_constructions_title \empty -\let\p_strc_constructions_number\empty +\lettonothing\p_strc_constructions_title +\lettonothing\p_strc_constructions_number \newconditional\c_strc_constructions_number_keep diff --git a/tex/context/base/mkxl/strc-lnt.mklx b/tex/context/base/mkxl/strc-lnt.mklx index d88227bc5..31a558a06 100644 --- a/tex/context/base/mkxl/strc-lnt.mklx +++ b/tex/context/base/mkxl/strc-lnt.mklx @@ -87,7 +87,7 @@ % maybe do this in lua -\mutable\let\currentlinenotereference\empty +\mutable\lettonothing\currentlinenotereference \def\page_lines_in_from{\in[lr:b:\currentlinenotereference]} \def\page_lines_in_to {\in[lr:e:\currentlinenotereference]} @@ -136,7 +136,7 @@ \fi \fi} -\let\currentlinenotereference\empty +\lettonothing\currentlinenotereference \mutable\let\linenotelinenumber\relax diff --git a/tex/context/base/mkxl/strc-lst.mklx b/tex/context/base/mkxl/strc-lst.mklx index c04d68fa7..e14f0c735 100644 --- a/tex/context/base/mkxl/strc-lst.mklx +++ b/tex/context/base/mkxl/strc-lst.mklx @@ -258,7 +258,7 @@ % use settings of first \else % use settings of root - \let\m_first\empty + \lettonothing\m_first \fi \strc_lists_place_indeed\m_first\m_list{#settings}% \stoppacked @@ -271,7 +271,7 @@ \def\strc_lists_place_indeed#tag#list#settings% {\begingroup - \the\t_lists_every_renderingcleanup % \let\currentlistentrylocation\empty + \the\t_lists_every_renderingcleanup % \lettonothing\currentlistentrylocation \edef\currentlist{#tag}% \setupcurrentlist[#settings]% \the\everystructurelist @@ -523,7 +523,7 @@ \permanent\protected\def\strclistsentryprocess#tag#method#index#extra% This one is called at the lua end! {\clf_pushlist#index\relax - %\let\currentlistentrylocation\empty + %\lettonothing\currentlistentrylocation \edef\currentlist {#tag}% \edef\currentlistmethod{#method}% \edef\currentlistindex {#index}% @@ -627,7 +627,8 @@ \rightlabeltext\currentlistlabel} \mutable\let\currentlistnumber\!!zerocount -\mutable\let\currentlistlabel \empty + +\mutable\lettonothing\currentlistlabel \protected\def\strc_lists_symbol_default {\dontleavehmode @@ -852,10 +853,10 @@ \newconditional\c_lists_show_number \newconditional\c_lists_show_page -\mutable\let\currentlistentrylocation \empty % watch the 'entry' in the name -\mutable\let\currentlistentrynumber \empty % watch the 'entry' in the name -\mutable\let\currentlistentrytitle \empty % watch the 'entry' in the name -\mutable\let\currentlistentrypagenumber\empty % watch the 'entry' in the name +\mutable\lettonothing\currentlistentrylocation % watch the 'entry' in the name +\mutable\lettonothing\currentlistentrynumber % watch the 'entry' in the name +\mutable\lettonothing\currentlistentrytitle % watch the 'entry' in the name +\mutable\lettonothing\currentlistentrypagenumber % watch the 'entry' in the name \appendtoks \dontcomplain @@ -918,10 +919,10 @@ \appendtoks % as we don't want any interference we clear some variables % afterwards - \let\currentlistentrylocation \empty - \let\currentlistentrynumber \empty - \let\currentlistentrytitle \empty - \let\currentlistentrypagenumber\empty + \lettonothing\currentlistentrylocation + \lettonothing\currentlistentrynumber + \lettonothing\currentlistentrytitle + \lettonothing\currentlistentrypagenumber \setfalse\c_lists_has_page \setfalse\c_lists_has_number \setfalse\c_lists_show_page @@ -929,7 +930,7 @@ \setfalse\c_lists_show_number \to \t_lists_every_renderingcleanup -\let\m_strc_list_alternative\empty % combined +\lettonothing\m_strc_list_alternative % combined \protected\def\strc_lists_apply_renderingsetup {\the\t_lists_every_renderingsetup @@ -1247,8 +1248,8 @@ \noindent % otherwise annotations are mirrored up \typo_injectors_mark_list \hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute { - \letlistparameter\c!depth\zeropoint - \letlistparameter\c!color\empty + \letlistparameter \c!depth\zeropoint + \resettlistparameter\c!color \inheritedlistframed { \letinteractionparameter\c!strut\v!no % still needed? \strc_lists_set_style_color\c!style\c!color\v!all @@ -1475,8 +1476,8 @@ \a_strc_lists_destination\attributeunsetvalue \fi \ifnum\a_strc_lists_destination=\attributeunsetvalue - \let\strc_lists_get_destination_attribute\empty - \let\strc_lists_set_destination_attribute\empty + \lettonothing\strc_lists_get_destination_attribute + \lettonothing\strc_lists_set_destination_attribute \else \let\strc_lists_get_destination_attribute\strc_lists_get_destination_attribute_indeed \let\strc_lists_set_destination_attribute\strc_lists_set_destination_attribute_indeed @@ -1487,8 +1488,8 @@ \a_strc_lists_destination\attributeunsetvalue \let\strc_lists_get_reference_attribute\gobbleoneargument \let\strc_lists_set_reference_attribute\gobbleoneargument - \let\strc_lists_get_destination_attribute\empty - \let\strc_lists_set_destination_attribute\empty + \lettonothing\strc_lists_get_destination_attribute + \lettonothing\strc_lists_set_destination_attribute \let\strc_lists_set_style_color\strc_lists_set_style_color_normal} \def\strc_lists_interaction_check_yes @@ -1503,8 +1504,8 @@ \def\strc_lists_interaction_check_nop {\let\strc_lists_get_reference_attribute \gobbleoneargument \let\strc_lists_set_reference_attribute \gobbleoneargument - \let\strc_lists_get_destination_attribute\empty - \let\strc_lists_set_destination_attribute\empty + \lettonothing\strc_lists_get_destination_attribute + \lettonothing\strc_lists_set_destination_attribute \let\strc_lists_set_style_color \strc_lists_set_style_color_normal} \strc_lists_interaction_check_nop diff --git a/tex/context/base/mkxl/strc-mat.mkxl b/tex/context/base/mkxl/strc-mat.mkxl index 90321a627..bac25c520 100644 --- a/tex/context/base/mkxl/strc-mat.mkxl +++ b/tex/context/base/mkxl/strc-mat.mkxl @@ -181,7 +181,7 @@ \newtoks\everyresetformulas \appendtoks - \let\currentformula\empty % to be checked: + \lettonothing\currentformula % to be checked: \to \everyresetformulas % implementation @@ -199,7 +199,7 @@ \c!list=\currentplaceformulalist, \c!bookmark=\currentplaceformulabookmark]% [#2]% - \glet\namedformulaentry\empty % \relax + \glettonothing\namedformulaentry % \relax \glet#3\m_strc_counters_last_registered_index \glet#4\m_strc_counters_last_registered_synchronize \glet#5\m_strc_counters_last_registered_attribute} @@ -388,30 +388,30 @@ \mutable\let\currentsubformulanumber \relax \mutable\let\currentformulasnumber \relax -\mutable\let\currentformulasreference \empty -\mutable\let\currentformulareference \empty -\mutable\let\currentsubformulareference \empty -\mutable\let\currentnestedformulanumber \empty -\mutable\let\currentnestedformulareference\empty -\mutable\let\currentnestedformulaattribute\empty +\mutable\lettonothing\currentformulasreference +\mutable\lettonothing\currentformulareference +\mutable\lettonothing\currentsubformulareference +\mutable\lettonothing\currentnestedformulanumber +\mutable\lettonothing\currentnestedformulareference +\mutable\lettonothing\currentnestedformulaattribute \appendtoks - \glet\currentformulasreference \empty - \glet\currentformulareference \empty - \glet\currentsubformulareference \empty - \glet\currentnestedformulareference\empty + \glettonothing\currentformulasreference + \glettonothing\currentformulareference + \glettonothing\currentsubformulareference + \glettonothing\currentnestedformulareference \to \everyresetformulas -\mutable\let\currentformulassuffix \empty -\mutable\let\currentformulasuffix \empty -\mutable\let\currentsubformulasuffix \empty -\mutable\let\currentnestedformulasuffix\empty +\mutable\lettonothing\currentformulassuffix +\mutable\lettonothing\currentformulasuffix +\mutable\lettonothing\currentsubformulasuffix +\mutable\lettonothing\currentnestedformulasuffix \appendtoks - \glet\currentformulassuffix \empty - \glet\currentformulasuffix \empty - \glet\currentsubformulasuffix \empty - \glet\currentnestedformulasuffix\empty + \glettonothing\currentformulassuffix + \glettonothing\currentformulasuffix + \glettonothing\currentsubformulasuffix + \glettonothing\currentnestedformulasuffix \to \everyresetformulas \mutable\let\currentplaceformulasynchronize \relax @@ -426,10 +426,10 @@ \glet\currentnestedformulasynchronize\relax \to \everyresetformulas -\mutable\let\currentsubformulasattribute \empty -\mutable\let\currentsubformulasnumber \empty -\mutable\let\currentsubformulasreference \empty -\mutable\let\currentsubformulassynchronize\empty +\mutable\lettonothing\currentsubformulasattribute +\mutable\lettonothing\currentsubformulasnumber +\mutable\lettonothing\currentsubformulasreference +\mutable\lettonothing\currentsubformulassynchronize \def\strc_formulas_handle_current_references {\strc_formulas_reference_show @@ -494,8 +494,8 @@ % \fi % \strc_counters_increment\v!formula}% % \fi -% \glet\currentplaceformulasuffix\empty -% \glet\currentnestedformulasuffix\empty +% \glettonothing\currentplaceformulasuffix +% \glettonothing\currentnestedformulasuffix % \placecurrentformulanumber} \def\strc_formulas_handle_numbering_indeed @@ -517,8 +517,8 @@ \fi \strc_counters_increment\v!formula}% \fi - \glet\currentplaceformulasuffix\empty - \glet\currentnestedformulasuffix\empty + \glettonothing\currentplaceformulasuffix + \glettonothing\currentnestedformulasuffix \placecurrentformulanumber} \def\strc_formulas_handle_numbering @@ -535,8 +535,8 @@ \doifelsetext\currentnestedformulasuffix {\strc_counters_setown_sub\v!formula\plustwo\currentnestedformulasuffix}% {\strc_counters_increment_sub\v!formula\plustwo}% - \glet\currentplaceformulasuffix\empty - \glet\currentnestedformulasuffix\empty + \glettonothing\currentplaceformulasuffix + \glettonothing\currentnestedformulasuffix \placecurrentformulanumber} \def\strc_formulas_handle_sub_numbering @@ -684,7 +684,7 @@ \newconstant\c_strc_math_split_mode -\mutable\let\m_strc_math_split\empty +\mutable\lettonothing\m_strc_math_split \aliased\let\c_strc_math_line_mode\zerocount \aliased\let\c_strc_math_flow_mode\plusone @@ -698,7 +698,7 @@ \def\strc_formulas_display_space_before_normal {% not ok, try \stopformula\par\startformula vs \stopformula\startformula - \let\m_spacebefore\empty + \lettonothing\m_spacebefore \ifvmode \ifdim\lastskip>\zeropoint\else \ifdim\prevdepth<\zeropoint\else @@ -797,7 +797,7 @@ \fi \ifvmode \ifconditional\c_strc_formulas_packed - \let\p_spacebefore\empty + \lettonothing\p_spacebefore \else \edef\p_spacebefore{\formulaparameter\c!spacebefore}% \fi @@ -815,7 +815,7 @@ \fi \ifvmode \ifconditional\c_strc_formulas_packed - \let\p_spaceafter\empty + \lettonothing\p_spaceafter \else \edef\p_spaceafter{\formulaparameter\c!spaceafter}% \fi @@ -1672,8 +1672,8 @@ % already defined % -% \let\startinnermath\empty -% \let\stopinnermath \empty +% \lettonothing\startinnermath +% \lettonothing\stopinnermath % \defineformulaalternative[multi][\begindmath][\enddmath] % @@ -1758,7 +1758,7 @@ \global\settrue\c_strc_formulas_inside_formulas \edef\currentformulasreference{#1}% \strc_formulas_handle_number - \let\currentformula\empty + \lettonothing\currentformula % \strc_formulas_forget_display_skips \enforced\protected\def\startformula {\advance\scratchcounter\plusone @@ -1808,8 +1808,8 @@ \tolerant\protected\def\strc_formulas_place[#1]% {\xdef\currentplaceformulareference{#1}% - \glet\currentplaceformulasuffix\empty - \glet\currentnestedformulasuffix\empty + \glettonothing\currentplaceformulasuffix + \glettonothing\currentnestedformulasuffix \global\setfalse\c_strc_formulas_incremented \global\setfalse\c_strc_formulas_referenced \global\settrue\c_strc_formulas_inside_place @@ -1839,9 +1839,9 @@ % \startplaceformula[title=whatever] \startformula e=mc^2 \stopformula \stopplaceformula % \startplaceformula[suffix=x] \startformula e=mc^2 \stopformula \stopplaceformula -\mutable\let\currentplaceformulatitle \empty -\mutable\let\currentplaceformulareference\empty -\mutable\let\currentplaceformulasuffix \empty +\mutable\lettonothing\currentplaceformulatitle +\mutable\lettonothing\currentplaceformulareference +\mutable\lettonothing\currentplaceformulasuffix \permanent\tolerant\protected\def\startplaceformula[#1]% {\begingroup @@ -1858,25 +1858,25 @@ {\doifassignmentelse{#1}\strc_formulas_start_place_parameters\strc_formulas_start_place_reference[#1]} \def\strc_formulas_start_place_nop[#1]% - {\glet\currentplaceformulareference\empty - \glet\currentplaceformulasuffix \empty + {\glettonothing\currentplaceformulareference + \glettonothing\currentplaceformulasuffix \strc_formulas_place_nop} \def\strc_formulas_start_place_reference[#1]% {\xdef\currentplaceformulareference{#1}% - \glet\currentplaceformulasuffix\empty + \glettonothing\currentplaceformulasuffix %\doifelsenextbgroup\strc_formulas_place_yes\strc_formulas_place_nop} % [ref]{} \strc_formulas_place_nop} -\mutable\let\currentplaceformulabookmark\empty -\mutable\let\currentplaceformulalist \empty +\mutable\lettonothing\currentplaceformulabookmark +\mutable\lettonothing\currentplaceformulalist \def\strc_formulas_start_place_parameters[#1]% maybe a dedicated setup handler - {\letdummyparameter\c!title \empty - \letdummyparameter\c!reference\empty - \letdummyparameter\c!bookmark \empty - \letdummyparameter\c!list \empty - \letdummyparameter\c!suffix \empty + {\resetdummyparameter\c!title + \resetdummyparameter\c!reference + \resetdummyparameter\c!bookmark + \resetdummyparameter\c!list + \resetdummyparameter\c!suffix \getdummyparameters[#1]% \edef\currentplaceformulatitle {\dummyparameter\c!title}% \edef\currentplaceformulareference{\dummyparameter\c!reference}% @@ -1904,13 +1904,13 @@ \xdef\currentnestedformulasuffix {\mathalignmentparameter\c!suffix}% \global\d_math_eqalign_number_threshold\mathalignmentparameter\c!numberthreshold\relax \orelse\ifhastok+{#1}% - \glet\currentnestedformulareference\empty + \glettonothing\currentnestedformulareference \xdef\currentnestedformulasuffix {+}% \orelse\ifempty\currentplaceformulareference \xdef\currentnestedformulareference{#1}% \xdef\currentnestedformulasuffix {#2}% \else - \glet\currentnestedformulareference\empty + \glettonothing\currentnestedformulareference \xdef\currentnestedformulasuffix {#1}% \fi \strc_formulas_place_number_nested_check} @@ -1991,7 +1991,7 @@ \hskip-\leftskip % bah \box\b_strc_math_display} -\mutable\let\namedformulaentry\empty % \relax % this will become a key/value so that we can do bookmarks +\mutable\lettonothing\namedformulaentry % \relax % this will become a key/value so that we can do bookmarks \permanent\protected\def\setformulalistentry#1% {\xdef\namedformulaentry{#1}} diff --git a/tex/context/base/mkxl/strc-not.mklx b/tex/context/base/mkxl/strc-not.mklx index fbe45b2e8..76c95ab18 100644 --- a/tex/context/base/mkxl/strc-not.mklx +++ b/tex/context/base/mkxl/strc-not.mklx @@ -146,10 +146,10 @@ \instance\protected\edefcsname\e!start#tag\endcsname{\strc_notations_start[#tag]}% \instance\protected\edefcsname\e!stop #tag\endcsname{\strc_notations_stop}} -\let\m_strc_notation_sub\empty +\lettonothing\m_strc_notation_sub \appendtoks - \let\m_strc_notation_sub\empty + \lettonothing\m_strc_notation_sub \ifempty\currentnotationparent % clone => parent | subclone => clone | subsubclone => subclone \strc_define_commands_notation @@ -184,8 +184,8 @@ %\strc_notes_setup_counter\currentnotation \to \everydefinenotation -\let\p_strc_constructions_title \empty -\let\p_strc_constructions_number\empty +\lettonothing\p_strc_constructions_title +\lettonothing\p_strc_constructions_number \protected\defcsname\??constructioninitializer\v!notation\endcsname {\let \currentnotation \currentconstruction @@ -544,8 +544,8 @@ \newconstant\a_strc_notes_text_reference \newconstant\a_strc_notes_text_destination -\let\strc_notes_get_reference_attribute_symbol \empty -\let\strc_notes_get_destination_attribute_symbol\empty +\lettonothing\strc_notes_get_reference_attribute_symbol +\lettonothing\strc_notes_get_destination_attribute_symbol \def\strc_notes_interaction_check_inline {\edef\p_interaction{\noteparameter\c!interaction}% @@ -561,8 +561,8 @@ \mutable\let\currentnotenumber\!!zerocount -\let\strc_notes_get_reference_attribute_symbol \empty -\let\strc_notes_get_destination_attribute_symbol\empty +\lettonothing\strc_notes_get_reference_attribute_symbol +\lettonothing\strc_notes_get_destination_attribute_symbol \let\strc_notes_set_reference_attribute_number\donothing \let\strc_notes_set_reference_attribute_text \donothing @@ -576,8 +576,8 @@ \let\m_strc_notes_internal\relax \def\strc_notes_prepare_inline_references_nop - {\let\strc_notes_get_reference_attribute_symbol\empty - \let\strc_notes_get_destination_attribute_symbol\empty + {\lettonothing\strc_notes_get_reference_attribute_symbol + \lettonothing\strc_notes_get_destination_attribute_symbol \let\strc_notes_set_style_color_inline\strc_notes_set_style_color_inline_nop} \def\strc_notes_prepare_inline_references_yes @@ -727,7 +727,7 @@ \dostoptagged \egroup \endgroup - \glet\lastnotesymbol\empty} + \glettonothing\lastnotesymbol} \protected\def\strc_notes_inject_dummy % temp hack {\removeunwantedspaces @@ -739,7 +739,7 @@ \fi \nobreak \hpack to .5\emwidth{}% - \glet\lastnotesymbol\empty} + \glettonothing\lastnotesymbol} \protected\def\strc_notes_inject_separator % patch by WS due to request on list {\edef\p_textseparator{\noteparameter\c!textseparator}% @@ -1630,7 +1630,7 @@ \newconditional\inlocalnotes -\mutable\let\localnoteslist\empty +\mutable\lettonothing\localnoteslist \permanent\tolerant\protected\def\startlocalnotes[#list]% grouping ? (we used to have a second argument ... settings) {\settrue\inlocalnotes @@ -1641,7 +1641,7 @@ {\processcommacommand[\localnoteslist]\strc_notes_local_stop_step \setfalse\inlocalnotes} -\let\p_strc_notes_continue\empty +\lettonothing\p_strc_notes_continue \def\strc_notes_local_start_step#tag% {\p_strc_notes_continue{\noteparameter\c!continue}% @@ -1974,7 +1974,7 @@ \installcorenamespace{notesymbol} -\mutable\let\lastnotesymbol\empty % todo: per class +\mutable\lettonothing\lastnotesymbol % todo: per class \permanent\tolerant\protected\def\notesymbol[#tag]#keepspacer[#reference]% {\ifnotesenabled diff --git a/tex/context/base/mkxl/strc-num.mkxl b/tex/context/base/mkxl/strc-num.mkxl index f0735b0e5..3f3bd2143 100644 --- a/tex/context/base/mkxl/strc-num.mkxl +++ b/tex/context/base/mkxl/strc-num.mkxl @@ -70,7 +70,7 @@ \edef\p_number{\counterparameter\c!number}% \ifempty\p_number \else \clf_setcounter{\counterparameter\s!name}\numexpr\p_number\relax - \letcounterparameter\c!number\empty + \resetcounterparameter\c!number \fi \edef\p_start{\counterparameter\c!start}% \setexpandedcounterparameter\c!start{\ifempty\p_start0\else\number\p_start\fi}% @@ -378,8 +378,8 @@ % currentstructurecomponent => \strc_current_ or just \m_strc_ -\mutable\let\currentname \empty -\mutable\let\currentcounter\empty +\mutable\lettonothing\currentname +\mutable\lettonothing\currentcounter \protected\def\strc_counters_register_component#1#2#3#4#5#6#7[#8][#9]% maybe also nolist {\begingroup @@ -426,7 +426,7 @@ \let\currentstructurecomponentreferenceprefix\referenceprefix \fi \ifdefined\currentstructurecomponentreferenceprefix\else - \let\currentstructurecomponentreferenceprefix\empty + \lettonothing\currentstructurecomponentreferenceprefix \fi} \def\strc_counters_register_component_page#1% @@ -666,7 +666,7 @@ % \ifempty#2% % \the#5% % \else -% \let\currentcounter\empty +% \lettonothing\currentcounter % \the\everysetupcounter % \fi % \strc_counter_setup_pop}% @@ -688,7 +688,7 @@ % \edef\p_number{\counterparameter\c!number}% % \ifempty\p_number \else % \strc_counters_set\currentcounter\p_number -% \letcounterparameter\c!number\empty +% \resetcounterparameter\c!number % \fi % \fi % \to \everysetupcounter diff --git a/tex/context/base/mkxl/strc-ref.mklx b/tex/context/base/mkxl/strc-ref.mklx index 012d9d92d..c55509f54 100644 --- a/tex/context/base/mkxl/strc-ref.mklx +++ b/tex/context/base/mkxl/strc-ref.mklx @@ -70,28 +70,28 @@ \installdirectcommandhandler \??referencing {referencing} % \??referencing -\mutable\let\referenceprefix \empty - -\mutable\let\currentdestinationattribute \empty - -\mutable\let\currentreferenceattribute \empty -\mutable\let\currentreferencecoding \empty -\mutable\let\currentreferencecontent \empty -\mutable\let\currentreferencedata \empty -\mutable\let\currentreferenceexpansion \empty -\mutable\let\currentreferenceformatautocase\empty -\mutable\let\currentreferenceformatlabel \empty -\mutable\let\currentreferenceformatsetups \empty -\mutable\let\currentreferenceformattype \empty -\mutable\let\currentreferencekind \empty -\mutable\let\currentreferencelabels \empty -%mutable\let\currentreferencenumber \empty -%mutable\let\currentreferenceorder \empty -%mutable\let\currentreferencepage \empty -%mutable\let\currentreferencerealpage \empty -%mutable\let\currentreferencetext \empty -%mutable\let\currentreferencetitle \empty -\mutable\let\currentreferenceuserdata \empty +\mutable\lettonothing\referenceprefix + +\mutable\lettonothing\currentdestinationattribute + +\mutable\lettonothing\currentreferenceattribute +\mutable\lettonothing\currentreferencecoding +\mutable\lettonothing\currentreferencecontent +\mutable\lettonothing\currentreferencedata +\mutable\lettonothing\currentreferenceexpansion +\mutable\lettonothing\currentreferenceformatautocase +\mutable\lettonothing\currentreferenceformatlabel +\mutable\lettonothing\currentreferenceformatsetups +\mutable\lettonothing\currentreferenceformattype +\mutable\lettonothing\currentreferencekind +\mutable\lettonothing\currentreferencelabels +%mutable\lettonothing\currentreferencenumber +%mutable\lettonothing\currentreferenceorder +%mutable\lettonothing\currentreferencepage +%mutable\lettonothing\currentreferencerealpage +%mutable\lettonothing\currentreferencetext +%mutable\lettonothing\currentreferencetitle +\mutable\lettonothing\currentreferenceuserdata \newif\ifreferencing \referencingtrue @@ -375,7 +375,7 @@ \ifnum\lastdestinationattribute>\zerocount \edef#cs{attr \destinationattribute\number\lastdestinationattribute}% \else - \let#cs\empty + \lettonothing#cs% \fi} %D It's about time to clean up references .. stable enough now. @@ -542,7 +542,7 @@ %D one keeps references local, but the global ones in view. To enable this feature, %D we explictly split the prefix from the reference. -\let\referenceprefix\empty +\lettonothing\referenceprefix %D For a long time the only way to access an external file was to use the file %D prefix (\type {somefile::}. However, when you split up a document, redefining the @@ -580,11 +580,11 @@ %D %D We also use the odd/even characteristic to determine the page state. -\mutable\let\currentrealreference \empty -\mutable\let\currentpagereference \empty -\mutable\let\currenttextreference \empty -\mutable\let\currentsubtextreference \empty -\mutable\let\currentsubsubtextreference\empty +\mutable\lettonothing\currentrealreference +\mutable\lettonothing\currentpagereference +\mutable\lettonothing\currenttextreference +\mutable\lettonothing\currentsubtextreference +\mutable\lettonothing\currentsubsubtextreference % referencepagestate: % @@ -923,14 +923,14 @@ \permanent\protected\def\setupreferenceprefix[#prefix]% {\edef\p_prefix{#prefix}% \ifempty\p_prefix - \let\referenceprefix\empty + \lettonothing\referenceprefix \orelse\ifx\p_prefix\m_strc_references_prefix_yes \letreferencingparameter\c!prefix\s!unknown \global\advance\prefixcounter\plusone \edef\referenceprefix{\the\prefixcounter}% \orelse\ifx\p_prefix\m_strc_references_prefix_nop \letreferencingparameter\c!prefix\s!unknown - \let\referenceprefix\empty + \lettonothing\referenceprefix \orelse\ifx\p_prefix\s!unknown % forget about it \else @@ -1217,9 +1217,9 @@ \newtoks\defaultleftreferencetoks \newtoks\defaultrightreferencetoks -\permanent\let\rightofreferencecontent\empty -\permanent\let\leftofreference \empty -\permanent\let\rightofreference \empty +\permanent\lettonothing\rightofreferencecontent +\permanent\lettonothing\leftofreference +\permanent\lettonothing\rightofreference \permanent\protected\def\leftofreferencecontent {\removeunwantedspaces @@ -1284,14 +1284,14 @@ {#1}% \else \defaultleftreferencetoks - \enforced\let\leftofreferencecontent\empty + \enforced\lettonothing\leftofreferencecontent \fi \rightreferencetoks \ifparameter#2\or {#2}% \else \defaultrightreferencetoks - \enforced\let\rightofreferencecontent\empty + \enforced\lettonothing\rightofreferencecontent \fi % inefficient: double resolve \doifelsereferencefound{#3} % we need to resolve the text @@ -1411,8 +1411,8 @@ \def\currentreferencecontent{\directsetup\currentreferenceformatsetups}% \fi % - \enforced\let\leftofreferencecontent \empty - \enforced\let\rightofreferencecontent\empty + \enforced\lettonothing\leftofreferencecontent + \enforced\lettonothing\rightofreferencecontent \strc_references_pickup_goto} \permanent\protected\def\autoreferencelabeltext diff --git a/tex/context/base/mkxl/strc-reg.mkxl b/tex/context/base/mkxl/strc-reg.mkxl index b0f50ecfd..3af07f0a4 100644 --- a/tex/context/base/mkxl/strc-reg.mkxl +++ b/tex/context/base/mkxl/strc-reg.mkxl @@ -138,33 +138,33 @@ %D test \index{test+one} test \index{test+two} more \index{more} %D \stoptyping -\mutable\let\currentregistercharacter \empty -\mutable\let\currentregistercoding \empty -\mutable\let\currentregisterentries \empty -\mutable\let\currentregisterentriesa \empty -\mutable\let\currentregisterentriesb \empty -\mutable\let\currentregisterentriesc \empty -\mutable\let\currentregisterexpansion \empty -\mutable\let\currentregisterkeys \empty -\mutable\let\currentregisterkeysa \empty -\mutable\let\currentregisterkeysb \empty -\mutable\let\currentregisterkeysc \empty -\mutable\let\currentregisterlabel \empty -\mutable\let\currentregistermaxwidth \empty -\mutable\let\currentregistername \empty -\mutable\let\currentregisternumber \empty -\mutable\let\currentregisterownnumber \empty -\mutable\let\currentregisterpageindex \empty -\mutable\let\currentregisterpagesymbol \empty -\mutable\let\currentregistersectionindex\empty -\mutable\let\currentregisterseeindex \empty -\mutable\let\currentregisterseeword \empty -\mutable\let\currentregistersynchronize \empty -\mutable\let\currentregisterxmlsetup \empty -\mutable\let\currentregisterprocessors \empty -\mutable\let\currentregisterprocessorsa \empty -\mutable\let\currentregisterprocessorsb \empty -\mutable\let\currentregisterprocessorsc \empty +\mutable\lettonothing\currentregistercharacter +\mutable\lettonothing\currentregistercoding +\mutable\lettonothing\currentregisterentries +\mutable\lettonothing\currentregisterentriesa +\mutable\lettonothing\currentregisterentriesb +\mutable\lettonothing\currentregisterentriesc +\mutable\lettonothing\currentregisterexpansion +\mutable\lettonothing\currentregisterkeys +\mutable\lettonothing\currentregisterkeysa +\mutable\lettonothing\currentregisterkeysb +\mutable\lettonothing\currentregisterkeysc +\mutable\lettonothing\currentregisterlabel +\mutable\lettonothing\currentregistermaxwidth +\mutable\lettonothing\currentregistername +\mutable\lettonothing\currentregisternumber +\mutable\lettonothing\currentregisterownnumber +\mutable\lettonothing\currentregisterpageindex +\mutable\lettonothing\currentregisterpagesymbol +\mutable\lettonothing\currentregistersectionindex +\mutable\lettonothing\currentregisterseeindex +\mutable\lettonothing\currentregisterseeword +\mutable\lettonothing\currentregistersynchronize +\mutable\lettonothing\currentregisterxmlsetup +\mutable\lettonothing\currentregisterprocessors +\mutable\lettonothing\currentregisterprocessorsa +\mutable\lettonothing\currentregisterprocessorsb +\mutable\lettonothing\currentregisterprocessorsc \newconditional\c_strc_registers_defining \setnewconstant\c_strc_registers_maxlevel \plusfive @@ -188,8 +188,8 @@ \dorecurse\c_strc_registers_maxlevel{% weird, expanded should not be needed \normalexpanded{\defineregister[\currentregister:\recurselevel][\currentregister]}% %\defineregister[\currentregister:\recurselevel][\currentregister]% - \letregisterparameter{\c!entries:\recurselevel}\empty % needed as we use detokenize (ok, we can - \letregisterparameter{\c!keys :\recurselevel}\empty % avoid it, but it's faster too) + \resetregisterparameter{\c!entries:\recurselevel}% needed as we use detokenize (ok, we can + \resetregisterparameter{\c!keys :\recurselevel}% avoid it, but it's faster too) }% % \setfalse\c_strc_registers_defining @@ -202,8 +202,8 @@ %D Registering: -\glet\currentregistername \empty -\glet\currentregisternumber\!!zerocount +\glettonothing\currentregistername +\glet \currentregisternumber\!!zerocount \def\strc_registers_register_page_entry {\iftrialtypesetting @@ -1083,7 +1083,7 @@ \fi \fi} -\let\m_current_register\empty +\lettonothing\m_current_register \permanent\protected\def\pushcurrentregister#1% {\let\m_current_register\currentregister @@ -1156,7 +1156,7 @@ \doapplyregisterentrycommand{#2}{#5}% \fi \else - \let\currentregisterseeindex\empty + \lettonothing\currentregisterseeindex \doapplyregisterentrycommand{#2}{#5}% \fi \popcurrentregister} @@ -1191,7 +1191,7 @@ \iflocation \def\currentregisterseeindex{#6}% \else - \let\currentregisterseeindex\empty + \lettonothing\currentregisterseeindex \fi \ifnum#2=\plusone \labeltexts\v!see{\doapplyregisterseecommand{#4}{#7}}% @@ -1224,7 +1224,7 @@ \iflocation \def\currentregistersectionindex{#6}% \else - \let\currentregistersectionindex\empty + \lettonothing\currentregistersectionindex \fi \ifnum#2=\plusone\else ,\space @@ -1284,7 +1284,7 @@ % not yet ok : new internal handler names -\aliased\let\registerpageseparatorsymbol\empty +\lettonothing\registerpageseparatorsymbol \permanent\protected\def\registerpagebuttonsymbol {\vrule\s!width\emwidth\s!height\exheight\s!depth\zeropoint\relax} @@ -1298,7 +1298,7 @@ {\enforced\frozen\def\registerpageseparatorsymbol{,\space}} % now done via conversion \defcsname\??registersymbol\v!none\endcsname - {\enforced\frozen\let\registerpageseparatorsymbol\empty + {\enforced\frozen\lettonothing\registerpageseparatorsymbol \enforced\frozen\let\registeronepage\gobblefivearguments \enforced\frozen\let\registerpagerange\gobbleeightarguments} diff --git a/tex/context/base/mkxl/strc-ren.mkxl b/tex/context/base/mkxl/strc-ren.mkxl index 012722f6e..1c9c23ac0 100644 --- a/tex/context/base/mkxl/strc-ren.mkxl +++ b/tex/context/base/mkxl/strc-ren.mkxl @@ -435,9 +435,10 @@ \c!renderingsetup=\??headrenderings:\currentheadalternative] \let\currentheadalternative \v!normal -\let\currentheadrenderingsetup \empty \let\currentheadrenderingalternative\v!vertical +\lettonothing\currentheadrenderingsetup + \permanent\tolerant\protected\def\defineheadplacement[#1]#*[#2]% {\doifelsenextbgroup {\strc_rendering_define_placement_yes[#1][#2]}% @@ -465,8 +466,8 @@ % \headshownumber % \headisdisplay -\let\headnumbercontent\empty -\let\headtextcontent \empty +\lettonothing\headnumbercontent +\lettonothing\headtextcontent \newdimen\headwidth \newdimen\headtextwidth diff --git a/tex/context/base/mkxl/strc-sbe.mkxl b/tex/context/base/mkxl/strc-sbe.mkxl index f301583ec..5ece81a43 100644 --- a/tex/context/base/mkxl/strc-sbe.mkxl +++ b/tex/context/base/mkxl/strc-sbe.mkxl @@ -79,7 +79,7 @@ bookmark {\sectionblockparameter\c!bookmark}% \relax} -\mutable\let\currentsectionblock\empty % was \s!unknown +\mutable\lettonothing\currentsectionblock % was \s!unknown \permanent\tolerant\protected\def\startsectionblock[#1]#*[#2]% {%\ctxlua{structures.counters.check(0)}% we assume sane usage of \page, as this is the only workable place (in push) diff --git a/tex/context/base/mkxl/strc-sec.mkxl b/tex/context/base/mkxl/strc-sec.mkxl index 3973d0834..9ac35ee15 100644 --- a/tex/context/base/mkxl/strc-sec.mkxl +++ b/tex/context/base/mkxl/strc-sec.mkxl @@ -55,8 +55,8 @@ \def\m_strc_references_prefix_yes{+} \def\m_strc_references_prefix_nop{-} -\mutable\let\currentstructurereferenceprefix\empty -\mutable\let\currentstructurereferencetext \empty +\mutable\lettonothing\currentstructurereferenceprefix +\mutable\lettonothing\currentstructurereferencetext \installglobalmacrostack\currentstructurereferenceprefix @@ -105,15 +105,16 @@ \permanent\def\namedstructureheadlocation#1% expandable, maybe [#1] {\csname\??savedinternalreference\ifcsname\??savedinternalreference#1\endcsname#1\else\s!default\fi\endcsname} -\mutable\let\currentheadbackreference \empty -\mutable\let\currentheaddefault \empty -\mutable\let\currentheadincrement \empty -\mutable\let\currentheadinteraction \empty -\mutable\let\currentheadlabeltag \empty -\mutable\let\currentheadnumber \!!zerocount -\mutable\let\currentheadrenderingalternative\empty -\mutable\let\currentheadrenderingsetup \empty -\mutable\let\currentheadtext \empty +\mutable\lettonothing\currentheadbackreference +\mutable\lettonothing\currentheaddefault +\mutable\lettonothing\currentheadincrement +\mutable\lettonothing\currentheadinteraction +\mutable\lettonothing\currentheadlabeltag +\mutable\lettonothing\currentheadrenderingalternative +\mutable\lettonothing\currentheadrenderingsetup +\mutable\lettonothing\currentheadtext + +\mutable\let\currentheadnumber\!!zerocount % zeros: % @@ -457,9 +458,9 @@ \setstructurelevel\currenthead{\thenamedheadlevel\currenthead}% \to \everyredefinehead -\mutable\let\currentsectionheadcoupling\empty -\mutable\let\currentsectionheadsection \empty -\mutable\let\currentsectionlevel \empty +\mutable\lettonothing\currentsectionheadcoupling +\mutable\lettonothing\currentsectionheadsection +\mutable\lettonothing\currentsectionlevel \appendtoks % beware, this is a global register @@ -502,14 +503,14 @@ \pop_macro_currentheadparent \pop_macro_currenthead} -\mutable\let\currentnamedsection\empty +\mutable\lettonothing\currentnamedsection \installmacrostack\currentnamedsection % structure sections (the parents of chapter etc) -\aliased\let\firstsectionname\empty -\aliased\let\lastsectionname \empty +\mutable\lettonothing\firstsectionname +\mutable\lettonothing\lastsectionname %aliased\let\resetallstructuremarks \relax %aliased\let\resetcurrentstructuremarks \relax @@ -554,7 +555,7 @@ \newtoks\everydefinesection -\mutable\let\currentsection\empty % historic alias +\mutable\lettonothing\currentsection % historic alias \permanent\protected\def\definesection[#1]% {\ifcsname\??headlevel#1\endcsname \else @@ -819,9 +820,10 @@ \fi \dostoptagged} -\mutable\let\currenthead \empty -\mutable\let\currentheadcoupling\empty -\mutable\let\currentheadsection \empty +\mutable\lettonothing\currenthead +\mutable\lettonothing\currentheadcoupling +\mutable\lettonothing\currentheadsection + \mutable\let\currentheadlevel \!!zerocount \mutable\let\currentheadcounter \!!zerocount @@ -876,9 +878,9 @@ \newtoks\everybeforesectionheadhandle \newtoks\everyaftersectionheadhandle -\mutable\let\getheadnumber\empty -\mutable\let\getheadtitle \empty -\mutable\let\getheadsyncs \empty +\mutable\lettonothing\getheadnumber +\mutable\lettonothing\getheadtitle +\mutable\lettonothing\getheadsyncs \def\strc_sectioning_handle#1#2#3% name data userdata (we can move #1 to the caller) {\xdef\currenthead {#1}% @@ -905,9 +907,9 @@ % % \currentstructuresynchronize % will move % - \let\getheadnumber\empty - \let\getheadtitle \empty - \let\getheadsyncs \empty + \lettonothing\getheadnumber + \lettonothing\getheadtitle + \lettonothing\getheadsyncs \ifconditional\c_strc_sectioning_increment \ifconditional\c_strc_sectioning_place \strc_sectioning_before_yes @@ -1214,7 +1216,7 @@ %permanent\def\previoussectioncountervalue{\clf_depthnumber\numexpr\thenamedheadlevel\currenthead+\minusone\relax} \permanent\def\previoussectioncountervalue{\clf_depthnumber\numexpr\thenamedheadlevel\previoushead\relax} -\mutable\let\previoushead\empty +\mutable\lettonothing\previoushead \def\strc_sectioning_handle_page_nop {\edef\p_continue{\headparameter\c!continue}% diff --git a/tex/context/base/mkxl/strc-syn.mkxl b/tex/context/base/mkxl/strc-syn.mkxl index e6081d0d9..af6d0c6e2 100644 --- a/tex/context/base/mkxl/strc-syn.mkxl +++ b/tex/context/base/mkxl/strc-syn.mkxl @@ -260,12 +260,12 @@ % these might become private -\mutable\let\currentsynonymoption \empty -\mutable\let\currentsynonymcoding \empty -\mutable\let\currentsynonymexpansion\empty -\mutable\let\currentsynonym \empty -\mutable\let\currentsynonymtag \empty -\mutable\let\currentsynonymtext \empty +\mutable\lettonothing\currentsynonymoption +\mutable\lettonothing\currentsynonymcoding +\mutable\lettonothing\currentsynonymexpansion +\mutable\lettonothing\currentsynonym +\mutable\lettonothing\currentsynonymtag +\mutable\lettonothing\currentsynonymtext \permanent\tolerant\protected\def\definesynonyms[#1]#*[#2]#*[#3]#*[#4]% name plural \meaning \use {\ifnum\lastarguments=\plusfour @@ -498,7 +498,7 @@ {}% todo: message that invalid \endgroup} -\mutable\let\currentsimplelistentry\empty +\mutable\lettonothing\currentsimplelistentry \protected\def\strc_synonym_normal#1#2#3#4% {\begingroup @@ -527,12 +527,12 @@ % these might become private -\mutable\let\currentsortingoption \empty -\mutable\let\currentsortingcoding \empty -\mutable\let\currentsortingexpansion\empty -\mutable\let\currentsorting \empty -\mutable\let\currentsortingtag \empty -\mutable\let\currentsortingtext \empty +\mutable\lettonothing\currentsortingoption +\mutable\lettonothing\currentsortingcoding +\mutable\lettonothing\currentsortingexpansion +\mutable\lettonothing\currentsorting +\mutable\lettonothing\currentsortingtag +\mutable\lettonothing\currentsortingtext \permanent\tolerant\protected\def\definesorting[#1]#*[#2]#*[#3]% {\ifnum\lastarguments=\plusthree diff --git a/tex/context/base/mkxl/strc-tag.mkxl b/tex/context/base/mkxl/strc-tag.mkxl index 55f8125f8..3c00acb65 100644 --- a/tex/context/base/mkxl/strc-tag.mkxl +++ b/tex/context/base/mkxl/strc-tag.mkxl @@ -280,7 +280,7 @@ \newconditional\c_strc_tags_enabled -\aliased\let\dotaggedplaceholder\empty +\lettonothing\dotaggedplaceholder \immutable\chardef\strc_tags_placeholder_char\zerocount % "FFFC @@ -309,7 +309,7 @@ \enforced\let\dostoptagged \donothing \else % initial - \enforced\let\dotaggedplaceholder \empty + \enforced\lettonothing\dotaggedplaceholder \enforced\let\dostarttagged \gobbletwoarguments \enforced\let\dostarttaggednodetail\gobbleoneargument \enforced\let\dostarttaggedchained \gobblethreearguments @@ -388,10 +388,10 @@ {\endgraf % we end before the group \begingroup \ifarguments - \let\currentparagraph\empty + \lettonothing\currentparagraph \or \ifhastok={#1}% - \let\currentparagraph\empty + \lettonothing\currentparagraph \setupcurrentparagraph[#1] \else \edef\currentparagraph{#1}% diff --git a/tex/context/base/mkxl/strc-usr.mkxl b/tex/context/base/mkxl/strc-usr.mkxl index 9ecb80ebd..cd1f97dec 100644 --- a/tex/context/base/mkxl/strc-usr.mkxl +++ b/tex/context/base/mkxl/strc-usr.mkxl @@ -98,7 +98,7 @@ \permanent\protected\def\startuserdata {\begingroup - \let\currentuserdata\empty + \lettonothing\currentuserdata \doifelsenextoptionalcs\userdata_start_delayed\userdata_start_indeed} \def\userdata_start_delayed[#1]% diff --git a/tex/context/base/mkxl/supp-box.mkxl b/tex/context/base/mkxl/supp-box.mkxl index 5a45396d1..cc934fe04 100644 --- a/tex/context/base/mkxl/supp-box.mkxl +++ b/tex/context/base/mkxl/supp-box.mkxl @@ -1081,7 +1081,7 @@ %D This can be done in a more modern way but for nostalgic reasons we keep it. -\mutable\let\nextprocessedtoken\empty +\mutable\lettonothing\nextprocessedtoken \mutable\let\before \relax % for now mutable %mutable\let\between\relax % is a math character @@ -1180,8 +1180,8 @@ %D See \MKIV\ file for the older implementation. -\let\m_syst_boxes_left \empty -\let\m_syst_boxes_right\empty +\lettonothing\m_syst_boxes_left +\lettonothing\m_syst_boxes_right \permanent\protected\def\limitatetext#1#2#3% {% we could also split in \LUA diff --git a/tex/context/base/mkxl/symb-ini.mkxl b/tex/context/base/mkxl/symb-ini.mkxl index e26892e4d..cf61ddb1f 100644 --- a/tex/context/base/mkxl/symb-ini.mkxl +++ b/tex/context/base/mkxl/symb-ini.mkxl @@ -58,12 +58,12 @@ \setupsymbols [\c!stylealternative=\v!text] -\mutable\let\currentsymbol \empty -\mutable\let\currentsymbolset\empty +\mutable\lettonothing\currentsymbol +\mutable\lettonothing\currentsymbolset \newtoks\t_symb_setups -\let\m_symb_current_set\empty +\lettonothing\m_symb_current_set \newconditional\c_symb_found @@ -88,7 +88,7 @@ \aliased\let\doifinsymbolsetelse\doifelseinsymbolset \aliased\let\doifsymbolsetelse \doifelsesymbolset -\letvalue{\??symbolset}\empty +\letvalue\??symbolset\empty %def\symbolset#1{\csname\??symbolset\ifcsname\??symbolset#1\endcsname#1\fi\endcsname} % no [#1], to be used in commalists etc diff --git a/tex/context/base/mkxl/syst-aux.mkxl b/tex/context/base/mkxl/syst-aux.mkxl index a507218c1..410d959bf 100644 --- a/tex/context/base/mkxl/syst-aux.mkxl +++ b/tex/context/base/mkxl/syst-aux.mkxl @@ -163,7 +163,7 @@ %D alternatives to this command. Beware, only the simple one has \type {\noexpand} %D before its argument. -\let\m_syst_helpers_expanded\empty +\lettonothing\m_syst_helpers_expanded \pushoverloadmode @@ -224,17 +224,17 @@ %D Maybe even nicer is a let that aliases but keeps the name. -% \aliased\let\donothing\empty + % \lettonothing\donothing \immutable\def\donothing {} % better in tracing %untraced\immutable\def\untraceddonothing{} -\let\m_syst_string_one \empty -\let\m_syst_string_two \empty -\let\m_syst_string_three\empty -\let\m_syst_string_four \empty +\lettonothing\m_syst_string_one +\lettonothing\m_syst_string_two +\lettonothing\m_syst_string_three +\lettonothing\m_syst_string_four -\let\m_syst_action_yes \empty -\let\m_syst_action_nop \empty +\lettonothing\m_syst_action_yes +\lettonothing\m_syst_action_nop %D \macros %D {doifnextcharelse} @@ -806,7 +806,7 @@ %D arguments state. Again it permits leaner and meaner macro definitions with a bit %D less clutter in tracing. -\mutable\let\commalistcommand\empty +\mutable\lettonothing\commalistcommand \protected\def\syst_helpers_process_comma_item#+,% {\ifarguments @@ -931,7 +931,7 @@ \let\syst_helpers_comma_list_step\relax -\mutable\let\currentcommalistitem\empty +\mutable\lettonothing\currentcommalistitem \permanent\protected\def\startprocesscommalist[#1]#2\stopprocesscommalist {\def\syst_helpers_comma_list_step##1{\def\currentcommalistitem{##1}#2}% @@ -987,17 +987,17 @@ %D this more hip and a bit faster now but \unknown\ it's seldom used nowadays as we %D have better ways now. -\mutable\let\commalistelement\empty +\mutable\lettonothing\commalistelement -\let\m_syst_string_one\empty -\let\m_syst_string_two\empty +\lettonothing\m_syst_string_one +\lettonothing\m_syst_string_two \let\syst_helpers_do_compare_process_action\relax \protected\def\syst_helpers_do_compare_process_action_a[#1=>#2][#3]% {\edef\m_syst_string_two{#1}% \ifx\m_syst_string_two\s!default - \let\commalistelement\empty + \lettonothing\commalistelement #2% \fi} @@ -1115,8 +1115,8 @@ %D A two step expansion is used to prevent problems with complicated arguments, for %D instance arguments that consist of two or more expandable tokens. -\mutable\let\firstcharacter \empty -\mutable\let\remainingcharacters\empty +\mutable\lettonothing\firstcharacter +\mutable\lettonothing\remainingcharacters \permanent\protected\def\getfirstcharacter #1{\clf_getfirstcharacter{#1}} \permanent\protected\def\doifelsefirstchar #1#2{\clf_doifelsefirstchar{#1}{#2}} @@ -1160,7 +1160,7 @@ % \let\syst_helpers_do_do_if_in_string \relax % \let\syst_helpers_do_do_if_not_in_string \relax % -% \let\m_syst_sub_string \empty +% \lettonothing\m_syst_sub_string % % \protected\def\doifelseinstring#1% % {\edef\m_syst_sub_string{#1}% expand #1 here @@ -1586,7 +1586,7 @@ %D funny to see that this alternative saw the light so lately --- can be used to do %D expanded assigments. -% \mutable\let\currentvalue\empty % only mkii +% \mutable\lettonothing\currentvalue % only mkii \permanent\protected\def\getparameters {\dogetparameters\dosetvalue} \permanent\protected\def\geteparameters {\dogetparameters\dosetevalue} @@ -1661,8 +1661,9 @@ %D trouble and tokens. \mutable\let\currentassignmentlistcommand\gobbletwoarguments -\mutable\let\currentassignmentlistkey \empty -\mutable\let\currentassignmentlistvalue \empty + +\mutable\lettonothing\currentassignmentlistkey +\mutable\lettonothing\currentassignmentlistvalue \let\syst_helpers_process_assign_entry\gobbleoneargument @@ -1838,7 +1839,7 @@ {\expandafterspaces\syst_helpers_get_from_comma_list} \permanent\protected\def\getfromcommalist[#1]#*[#2]% - {\let\commalistelement\empty + {\lettonothing\commalistelement \commalistcounter#2\relax \expandafterspaces\syst_helpers_get_from_comma_list#1\ignorearguments\ignorearguments} @@ -2819,8 +2820,8 @@ %D %D Trivial: -\permanent\protected\def\letempty #1{\let #1\empty} -\permanent\protected\def\globalletempty#1{\glet#1\empty} +\permanent\protected\def\letempty #1{\lettonothing #1} +\permanent\protected\def\globalletempty#1{\glettonothing#1} \permanent\protected\def\letvalueempty #1{\letcsname #1\endcsname\empty} \permanent\protected\def\letgvalueempty#1{\gletcsname#1\endcsname\empty} @@ -3195,7 +3196,8 @@ \mutable\def\recurselevel{0} \mutable\let\recurseaction\relax -\mutable\let\recursestring\empty + +\mutable\lettonothing\recursestring %% \protected\def\syst_helpers_stepwise_recurse#1#2#3% from to step %% {\ifnum#1>#2\relax @@ -3472,12 +3474,12 @@ %D Here are the more modern implementations: \permanent\protected\def\installmacrostack#1% - {\ifdefined#1\else\mutable\let#1\empty\fi + {\ifdefined#1\else\mutable\lettonothing#1\fi \protected\gdefcsname push_macro_\csstring#1\endcsname{\localpushmacro#1}% \protected\gdefcsname pop_macro_\csstring#1\endcsname{\localpopmacro #1}} \permanent\protected\def\installglobalmacrostack#1% - {\ifdefined#1\else\mutable\glet#1\empty\fi + {\ifdefined#1\else\mutable\glettonothing#1\fi \protected\gdefcsname push_macro_\csstring#1\endcsname{\globalpushmacro#1}% \protected\gdefcsname pop_macro_\csstring#1\endcsname{\globalpopmacro #1}} @@ -4493,7 +4495,8 @@ %D These macros are clones of the ones implemented in page~378 of Knuth's \TEX book. \newtoks\t_syst_helpers_scratch -\let \m_syst_helpers_scratch\empty + +\lettonothing\m_syst_helpers_scratch \permanent\protected\def\appendtoks#1\to#2% {\ifrelax\dodoglobal @@ -4629,9 +4632,9 @@ \permanent\protected\def\beforesplitstring#1\at#2\to#3% {\def\syst_helpers_split_string##1#2##0^^^^0004% no #- as we need to count {\ifarguments - \let#3\empty + \lettonothing#3% \or - \let#3\empty + \lettonothing#3% \else \def#3{##1}% \fi}% @@ -4640,7 +4643,7 @@ \permanent\protected\def\aftersplitstring#1\at#2\to#3% {\def\syst_helpers_split_string##0#2##2^^^^0004% no #- as we need to count {\ifarguments - \let#3\empty + \lettonothing#3% \or \def#3{#1}% \else @@ -4656,11 +4659,11 @@ \permanent\protected\def\splitstring#1\at#2\to#3\and#4% {\def\syst_helpers_split_string##1#2##2^^^^0004% {\ifarguments - \let#3\empty - \let#4\empty + \lettonothing#3* + \lettonothing#4* \or \def#3{#1}% - \let#4\empty + \lettonothing#4% \else \def#3{##1}% \def#4{##2}% @@ -4670,11 +4673,11 @@ \permanent\protected\def\greedysplitstring#1\at#2\to#3\and#4% {\def\syst_helpers_split_string##1#2##2^^^^0004% {\ifarguments - \let#3\empty - \let#4\empty + \lettonothing#3% + \lettonothing#4% \or \def#3{#1}% - \let#4\empty + \lettonothing#4% \else \def#3{##1}% \def#4{##2}% @@ -4700,9 +4703,9 @@ \permanent\protected\def\aftertestandsplitstring#1\at#2\to#3% {\def\syst_helpers_split_string##0#2##2^^^^0004% no #- as we need to count {\ifarguments - \let#3\empty + \lettonothing#3% \or - \let#3\empty + \lettonothing#3% \else \def#3{##2}% \fi}% @@ -4711,11 +4714,11 @@ \permanent\protected\def\testandsplitstring#1\at#2\to#3\and#4% {\def\syst_helpers_split_string##1#2##2^^^^0004% {\ifarguments - \let#3\empty - \let#4\empty + \lettonothing#3% + \lettonothing#4% \or - \let#3\empty - \let#4\empty + \lettonothing#3% + \lettonothing#4% \else \def#3{##1}% \def#4{##2}% @@ -4876,7 +4879,7 @@ \permanent\protected\def\substituteincommalist#1#2#3% old, new, list (slooow) {\edef\m_syst_string_one{#1}% \edef\m_syst_string_two{#2}% - \let\m_syst_string_four\empty + \lettonothing\m_syst_string_four \normalexpanded{\rawprocesscommacommand[#3]}\syst_helpers_substitute_in_comma_list_step \let#3\m_syst_string_four} @@ -4903,9 +4906,10 @@ %D This macro was used in the bibtex code (and is probably no longer needed). \newcount\c_syst_helpers_comma_list_index -\let \m_syst_helpers_comma_list_target\empty -\mutable\let\newcommalistelement\empty +\lettonothing\m_syst_helpers_comma_list_target + +\mutable\lettonothing\newcommalistelement \def\syst_helpers_replace_in_comma_list_step#1% we can use #+ here too {\ifnum\commalistcounter=\c_syst_helpers_comma_list_index\relax @@ -4938,8 +4942,8 @@ \permanent\protected\def\replaceincommalist#1#2% #1 = commalistelement #2 = position starts at 1 {\c_syst_helpers_comma_list_index#2\relax - \let\m_syst_helpers_comma_list_target\empty - \let\commalistelement\empty + \lettonothing\m_syst_helpers_comma_list_target + \lettonothing\commalistelement \commalistcounter\plusone \expandafter\processcommalist\expandafter[#1]\syst_helpers_replace_in_comma_list_step \dodoglobal\let#1\m_syst_helpers_comma_list_target} @@ -4952,7 +4956,7 @@ %D kind of useless for handling comma lists in alignments. In these situations the %D next macro can be of use. -\let\m_syst_helpers_comma_list_command_global\empty +\lettonothing\m_syst_helpers_comma_list_command_global \def\syst_helpers_comma_list_command_global_step#1,% {\if]#1\else @@ -5361,14 +5365,15 @@ %D As we can see below, spaces following a control sequence are to enclosed in \type %D {{}}. -\let\syst_helpers_strip_character \relax -\let\m_syst_helpers_strip_character\empty +\let\syst_helpers_strip_character\relax + +\lettonothing\m_syst_helpers_strip_character \permanent\protected\def\stripcharacter#1\from#2\to#3% {\def\syst_helpers_strip_character##1#1##2\end {\edef\m_syst_helpers_strip_character{\m_syst_helpers_strip_character##1}% \doifnotempty{##2}{\syst_helpers_strip_character##2\end}}% - \let\m_syst_helpers_strip_character\empty + \lettonothing\m_syst_helpers_strip_character \edef\m_syst_string_one{#2}% \expandafter\syst_helpers_strip_character\m_syst_string_one#1\end \dodoglobal\let#3\m_syst_helpers_strip_character} @@ -5599,7 +5604,7 @@ %D %D They remove braces and backslashes and give us something to sort. -\let\m_syst_helpers_untexed\empty +\lettonothing\m_syst_helpers_untexed \permanent\protected\def\untexsomething {\begingroup @@ -5785,7 +5790,7 @@ \advance\privatescratchcounter \minusone \edef#3{#3##1}% \fi}% - % \let#3\empty % #3 can be #2, so: + % \lettonothing#3% #3 can be #2, so: \expandafter\let\expandafter#3\expandafter\empty \expandafter\handletokens#2\with\syst_helpers_split_off_tokens \else @@ -5821,7 +5826,7 @@ %D assignment, this time by using \type {\futurelet}, and grabbing an argument as %D well. That way we can handle the sentinal, a blank space and grouped tokens. -\mutable\let\nexthandledtoken\empty % part of public interface +\mutable\lettonothing\nexthandledtoken % part of public interface \let\syst_helpers_handle_tokens_command\relax @@ -6051,13 +6056,13 @@ \let\syst_helpers_serialize_comma_list_step\relax -\mutable\let\serializedcommalist\empty +\mutable\lettonothing\serializedcommalist \def\syst_helpers_serialize_comma_list_step#1% {\edef\serializedcommalist{\serializedcommalist#1}} \permanent\protected\def\serializecommalist[#1]% - {\let\serializedcommalist\empty + {\lettonothing\serializedcommalist \processcommacommand[#1]\syst_helpers_serialize_comma_list_step} %D \macros @@ -6647,18 +6652,32 @@ \or \plusten \else {\number#1}\fi} -\permanent\def\constantdimen#1% - {\ifdim#1=\zeropoint +% \permanent\def\constantdimen#1% takes register +% {\ifdim#1=\zeropoint +% \zeropoint +% \else +% \the#1\relax +% \fi} + +\permanent\def\constantdimen#1% takes register + {\ifzeropt#1\norelax \zeropoint \else - \the#1\relax + \todimension#1\norelax \fi} +% \permanent\def\constantdimenargument#1% takes register +% {\ifdim#1=\zeropoint +% \zeropoint +% \else +% {\the#1}% +% \fi} + \permanent\def\constantdimenargument#1% - {\ifdim#1=\zeropoint + {\ifzeropt#1%\norelax \zeropoint \else - {\the#1}% + {\todimension#1}% \fi} \permanent\def\constantemptyargument#1% diff --git a/tex/context/base/mkxl/syst-ini.mkxl b/tex/context/base/mkxl/syst-ini.mkxl index 96bdde764..b529c04bc 100644 --- a/tex/context/base/mkxl/syst-ini.mkxl +++ b/tex/context/base/mkxl/syst-ini.mkxl @@ -494,11 +494,11 @@ %D \macros %D {tempstring, scratchstring*} -\mutable\let\tempstring \empty +\mutable\lettonothing\tempstring -\mutable\let\scratchstring \empty -\mutable\let\scratchstringone\empty -\mutable\let\scratchstringtwo\empty +\mutable\lettonothing\scratchstring +\mutable\lettonothing\scratchstringone +\mutable\lettonothing\scratchstringtwo %D \macros %D {scratchwidth, scratchheight, scratchdepth, scratchoffset, scratchdistance} @@ -968,7 +968,7 @@ %D {\let} (the only advantage is that we often give them names with some %D prefix. -\permanent\protected\def\newmacro #1{\mutable\let#1\empty} +\permanent\protected\def\newmacro #1{\mutable\lettonothing#1} \permanent\protected\def\setnewmacro#1{\mutable\let#1} \permanent\protected\def\newfraction#1{\mutable\let#1\!!plusone} @@ -1234,7 +1234,7 @@ \immediate\write\statuswrite{fatal error: duplicate system namespace '#1'}% \else \global\advance\c_syst_helpers_n_of_namespaces\plusone - \immutable\edefcsname ??#1\endcsname{\v_interfaces_prefix_template_system}% + \immutable\cdefcsname ??#1\endcsname{\v_interfaces_prefix_template_system}% \fi} %D It makes more sense to have these here: @@ -1281,8 +1281,9 @@ \mutable\let\of \relax % \empty \mutable\let\and \relax % \empty \mutable\let\with\relax % \empty -\mutable\let\nop \empty % used often -\mutable\let\yes \empty % used often + +\mutable\lettonothing\nop % used often +\mutable\lettonothing\yes % used often %D Another experiment: diff --git a/tex/context/base/mkxl/tabl-frm.mkxl b/tex/context/base/mkxl/tabl-frm.mkxl index 4caa287f7..d3112d9c2 100644 --- a/tex/context/base/mkxl/tabl-frm.mkxl +++ b/tex/context/base/mkxl/tabl-frm.mkxl @@ -102,13 +102,13 @@ \setupframed[\??framedtablecolumn#1:#2][#3]% \fi} -\mutable\let\currentframedtable\empty +\mutable\lettonothing\currentframedtable \permanent\tolerant\protected\def\startframedtable[#1]#*[#2]% {\begingroup \forgetall \ifhastok={#1}% - \let\currentframedtable\empty + \lettonothing\currentframedtable \setupframed[\??framedtable][#1]% \else \edef\currentframedtable{#1}% @@ -218,7 +218,7 @@ \fi}% \ifcase\c_tabl_framed_pass \or - \letframedparameter\c!background\empty + \resetframedparameter\c!background \letframedparameter\c!frame\v!off \or \letframedparameter\c!height\d_tabl_framed_h diff --git a/tex/context/base/mkxl/tabl-ltb.mkxl b/tex/context/base/mkxl/tabl-ltb.mkxl index 3376b30c6..54bce7d94 100644 --- a/tex/context/base/mkxl/tabl-ltb.mkxl +++ b/tex/context/base/mkxl/tabl-ltb.mkxl @@ -140,7 +140,8 @@ \permanent\def\linetablerparameter#1% faster, leaner and meaner {\begincsname \??linetable - \ifnum\c_tabl_lines_row=\zerocount % geen ifcase + % \ifnum\c_tabl_lines_row=\zerocount % geen ifcase + \ifzero\c_tabl_lines_row \ifcsname\??linetable r:\v!header#1\endcsname r:\v!header \orelse\ifcsname\??linetable r:0#1\endcsname @@ -348,7 +349,7 @@ \dp\b_tabl_lines_current\c_tabl_lines_part\strutdepth % noindent en endgraf needed else whitespace mess-up! \whitespace % here not after verticalstrut - \ifdim\topskipgap=\zeropoint\else + \ifzeropt\topskipgap\else \verticalstrut \nobreak \kern-\struttotal diff --git a/tex/context/base/mkxl/tabl-ntb.mkxl b/tex/context/base/mkxl/tabl-ntb.mkxl index dc644270d..59777fb9b 100644 --- a/tex/context/base/mkxl/tabl-ntb.mkxl +++ b/tex/context/base/mkxl/tabl-ntb.mkxl @@ -213,7 +213,7 @@ \let\tabl_ntb_anchor_stop \relax \let\tabl_ntb_anchor_process\gobbleoneargument -\let\m_tabl_ntb_anchor_background\empty +\lettonothing\m_tabl_ntb_anchor_background \let\xanchor\!!zerocount \let\yanchor\!!zerocount @@ -239,17 +239,17 @@ \def\tabl_ntb_anchor_setup {\ifcstok{\naturaltablelocalparameter\c!synchronize}\v!background - \let\tabl_ntb_anchor_start \tabl_ntb_anchor_start_indeed - \let\tabl_ntb_anchor_stop \tabl_ntb_anchor_stop_indeed - \let\tabl_ntb_anchor_process \tabl_ntb_anchor_process_indeed + \let\tabl_ntb_anchor_start\tabl_ntb_anchor_start_indeed + \let\tabl_ntb_anchor_stop\tabl_ntb_anchor_stop_indeed + \let\tabl_ntb_anchor_process\tabl_ntb_anchor_process_indeed \edef\m_tabl_ntb_anchor_background{\naturaltablelocalparameter\c!background}% \resetnaturaltablelocalparameter\c!background \setlocalanchoring \else - \let\m_tabl_ntb_anchor_background\empty - \let\tabl_ntb_anchor_start \gobbletwoarguments - \let\tabl_ntb_anchor_stop \relax - \let\tabl_ntb_anchor_process \gobbleoneargument + \lettonothing\m_tabl_ntb_anchor_background + \let\tabl_ntb_anchor_start\gobbletwoarguments + \let\tabl_ntb_anchor_stop\relax + \let\tabl_ntb_anchor_process\gobbleoneargument \fi \resetnaturaltablelocalparameter\c!synchronize} @@ -721,9 +721,9 @@ % \dorecurse{10}{\bTR \dorecurse{6}{\bTD xxx \eTD} \eTR} % \eTABLE -\let\m_tabl_ntb_before_split\empty -\let\m_tabl_ntb_after_split \empty -\let\m_tabl_ntb_same_page \empty +\lettonothing\m_tabl_ntb_before_split +\lettonothing\m_tabl_ntb_after_split +\lettonothing\m_tabl_ntb_same_page % split + page: % @@ -758,13 +758,13 @@ \fi[#1]} \def\tabl_ntb_td_yes[#1]#2\eTD - {\letnaturaltableparameter\c!ny \m_tabl_ntb_default_nr - \letnaturaltableparameter\c!nx \m_tabl_ntb_default_nc - \letnaturaltableparameter\c!nc \plusone - \letnaturaltableparameter\c!nr \plusone - \letnaturaltableparameter\c!n \c_tabl_ntb_running_col - \letnaturaltableparameter\c!m \empty - \letnaturaltableparameter\c!action\empty % not that important + {\letnaturaltableparameter \c!ny \m_tabl_ntb_default_nr + \letnaturaltableparameter \c!nx \m_tabl_ntb_default_nc + \letnaturaltableparameter \c!nc \plusone + \letnaturaltableparameter \c!nr \plusone + \letnaturaltableparameter \c!n \c_tabl_ntb_running_col + \resetnaturaltableparameter\c!m + \resetnaturaltableparameter\c!action% not that important \setupcurrentnaturaltable[#1]% % \c_tabl_ntb_nx\naturaltableparameter\c!nx\relax @@ -850,8 +850,8 @@ \letnaturaltableparameter\c!nc\plusone \letnaturaltableparameter\c!nr\plusone \setupcurrentnaturaltable[#1]% - \letnaturaltableparameter\c!n \empty - \letnaturaltableparameter\c!m \empty} + \resetnaturaltableparameter\c!n + \resetnaturaltableparameter\c!m} \def\tabl_ntb_td_pass_m#1% {\scratchcounter\numexpr\m_tabl_ntb_m-\c_tabl_ntb_running_col+\minusone-\c_tabl_ntb_spn\relax @@ -862,8 +862,8 @@ \letnaturaltableparameter\c!nc\plusone \letnaturaltableparameter\c!nr\plusone \setupcurrentnaturaltable[#1]% - \letnaturaltableparameter\c!n \empty - \letnaturaltableparameter\c!m \empty} + \resetnaturaltableparameter\c!n + \resetnaturaltableparameter\c!m} \def\tabl_ntb_cell_preset {\c_tabl_ntb_current_row\c_tabl_ntb_maximum_row @@ -1291,9 +1291,9 @@ \xdef\m_tabl_ntb_same_page {#3}} \protected\def\tabl_ntb_row_align_reset - {\glet\m_tabl_ntb_before_split\empty - \glet\m_tabl_ntb_after_split \empty - \glet\m_tabl_ntb_same_page \empty} + {\glettonothing\m_tabl_ntb_before_split + \glettonothing\m_tabl_ntb_after_split + \glettonothing\m_tabl_ntb_same_page } \def\tabl_ntb_prelocate_error {\writestatus\m!TABLE{fatal error: use \string\prelocateTBLrows\space to increase table memory (now: \the\c_tabl_prelocated_rows)}} @@ -1397,7 +1397,7 @@ \protected\def\tabl_ntb_after_page {\ifnum\c_tabl_ntb_row>\c_tabl_ntb_n_of_head_lines - \ifnum\tabl_ntb_get_nob\c_tabl_ntb_row=\zerocount + \ifnum\tabl_ntb_get_nob\c_tabl_ntb_row=\zerocount % no \ifzero \ifx\m_tabl_ntb_same_page\v!after % \blank[\v!samepage,\v!strong]% \nobreak @@ -1632,9 +1632,9 @@ \def\tabl_ntb_table_stop {\forgetall % new, here see narrower-004.tex %\setbox\scratchbox\hbox - % {\letnaturaltablelocalparameter\c!frame\v!off - % \letnaturaltablelocalparameter\c!background\empty - % \letnaturaltablelocalparameter\c!align\v!no + % {\letnaturaltablelocalparameter \c!frame \v!off + % \resetnaturaltablelocalparameter\c!background + % \letnaturaltablelocalparameter \c!align \v!no % \inheritednaturaltablelocalframed{\strut}}% %\edef\minimalcellheight{\the\ht\scratchbox}% not used \localcontrolledloop\plusone\c_tabl_ntb_maximum_col\plusone @@ -2010,10 +2010,10 @@ \protected\def\tabl_ntb_cell_process_a#1#2[#3]#4% grouping added ! ! ! {\begingroup - \letnaturaltablelocalparameter\c!option\empty + \resetnaturaltablelocalparameter\c!option\empty \tabl_ntb_setup_cell{#1}{#2}% \setupcurrentnaturaltablelocal[#3]% - \letnaturaltablelocalparameter\c!background\empty + \resetnaturaltablelocalparameter\c!background \letnaturaltablelocalparameter\c!frame\v!off \scratchcounter\tabl_ntb_get_col{#1}{#2}\relax \setbox\scratchbox\hbox @@ -2073,7 +2073,7 @@ \setbox\scratchbox\hbox {\tabl_ntb_setup_cell{#2}{#3}% \setupcurrentnaturaltablelocal[#4,#1]% - \letnaturaltablelocalparameter\c!background\empty + \resetnaturaltablelocalparameter\c!background \letnaturaltablelocalparameter\c!frame\v!off \inheritednaturaltablelocalframed{\tabl_ntb_cell_start#5\tabl_ntb_cell_stop}}% \setbox\scratchboxone\emptyhbox @@ -2115,9 +2115,9 @@ {\tabl_ntb_setup_cell{#1}{#2}% \bgroup \setupcurrentnaturaltablelocal[#3]% - \letnaturaltablelocalparameter\c!background\empty - \letnaturaltablelocalparameter\c!frame\v!off - \setnaturaltablelocalparameter\c!width{\d_tabl_ntb_width}% + \resetnaturaltablelocalparameter\c!background + \letnaturaltablelocalparameter \c!frame \v!off + \setnaturaltablelocalparameter \c!width {\d_tabl_ntb_width}% \inheritednaturaltablelocalframed{\tabl_ntb_cell_start\tabl_ntb_char_align{#1}{#2}#4\tabl_ntb_cell_stop}% \egroup} @@ -2126,8 +2126,8 @@ \tabl_ntb_setup_cell{#1}{#2}% \setupcurrentnaturaltablelocal[#3]% to get the color right, the way we \directcolor[\naturaltablelocalparameter\c!color]% - \letnaturaltablelocalparameter\c!color\empty - \setnaturaltablelocalparameter\c!width{\d_tabl_ntb_width}% + \resetnaturaltablelocalparameter\c!color + \setnaturaltablelocalparameter \c!width{\d_tabl_ntb_width}% \ifzeropt\d_tabl_ntb_height % case: nc=maxcolumns \else \setnaturaltablelocalparameter\c!height{\d_tabl_ntb_height}% diff --git a/tex/context/base/mkxl/tabl-tab.mkxl b/tex/context/base/mkxl/tabl-tab.mkxl index 815767e18..8bd1d052a 100644 --- a/tex/context/base/mkxl/tabl-tab.mkxl +++ b/tex/context/base/mkxl/tabl-tab.mkxl @@ -129,7 +129,7 @@ \!taLastRegularTabskip\scratchskip \!taOnceOnlyTabskipfalse \!taBeginFormattrue - \let\!tfRowOfWidths\empty + \lettonothing\!tfRowOfWidths \doreadtableformatkeys} \def\!tfSetWidth @@ -170,7 +170,7 @@ \else \!tgValue \fi - \let\!tfWidthText\empty % Override possible prior `w[sample entry]' + \lettonothing\!tfWidthText % Override possible prior `w[sample entry]' \doreadtableformatkeys} \def\!tfSetTabskip @@ -181,7 +181,7 @@ \scratchskip\!tgValue \fi \divide\scratchskip\plustwo - \ifnum\!taColumnNumber=\zerocount + \ifzero\!taColumnNumber %\!thToksEdef\!taRuleColumnTemplate{\the\!taRuleColumnTemplate\tabskip\the\scratchskip}% \normalexpanded{\!taRuleColumnTemplate{\the\!taRuleColumnTemplate\tabskip\the\scratchskip}}% \else @@ -221,7 +221,7 @@ \!tfAdjoinPriorColumn} \def\!tfAdjoinPriorColumn - {\ifnum\!taColumnNumber=\zerocount + {\ifzero\!taColumnNumber \!taPreamble=\!taRuleColumnTemplate % New \tabskip may have been added \else \ifempty\!tfRowOfWidths\else % no "w" keys specified yet, not even this col @@ -240,7 +240,7 @@ \!taLeftGlue{\hfil}% \!taRightGlue{\hfil}% \!taMinimumColumnWidth\zeropoint - \let\!tfWidthText\empty + \lettonothing\!tfWidthText \!taOnceOnlyTabskipfalse \doreadtableformatkeys} @@ -325,7 +325,7 @@ \def\!tgCheckForSpace {\def\!tgCode{1}% - \let\!tgValue\empty + \lettonothing\!tgValue \ifx\tempstring\!thSpaceToken \expandafter\!tgReturn \else @@ -682,7 +682,7 @@ % extensions \newtableformatkey q% - {\let\!tqStyle\empty + {\lettonothing\!tqStyle \futurelet\!tnext\!tqTestForBracket} \newtableformatkey Q% @@ -759,7 +759,7 @@ % #2=extra depth \!taDimenA=#1\relax \!taDimenB=#2\relax - \let\!TsSpaceFactor\empty + \lettonothing\!TsSpaceFactor \ifmmode \expandafter\mathpalette % (*) the only place where still use this \expandafter\!TsEnlargeMath @@ -896,8 +896,8 @@ \newcount\c_tabl_table_n_of_vrules \c_tabl_table_n_of_vrules\plusone -\let\m_tabl_table_vrule_color\empty -\let\m_tabl_table_hrule_color\empty +\lettonothing\m_tabl_table_vrule_color +\lettonothing\m_tabl_table_hrule_color \def\tabl_table_insert_vrule {\vrule\s!width @@ -930,7 +930,7 @@ \global\c_tabl_table_n_of_vrules\plusone \unskip \fi - \glet\m_tabl_table_vrule_color\empty + \glettonothing\m_tabl_table_vrule_color \hfil \aligntab} @@ -1381,8 +1381,8 @@ {\tabl_tables_chuck_auto_row % before the tail, else noalign problem \tabl_table_insert_tail \noalign\bgroup - \glet\tabl_table_head\empty - \glet\tabl_table_tail\empty + \glettonothing\tabl_table_head + \glettonothing\tabl_table_tail \egroup \tabl_table_finish \ifempty\p_tabl_table_frame @@ -1540,7 +1540,7 @@ \newtoks\localtabledefinitions -\mutable\let\currenttableformat\empty +\mutable\lettonothing\currenttableformat \def\tabl_table_third_stage#1% {\global\settrue\tableactionstatepermitted @@ -1612,8 +1612,8 @@ \egroup \dontcomplain \tabl_table_split_box\tablecontentbox - \glet\tabl_table_head\empty % new here - \glet\tabl_table_tail\empty % new here + \glettonothing\tabl_table_head % new here + \glettonothing\tabl_table_tail % new here \flushnotes \egroup} @@ -1663,8 +1663,8 @@ %D This is so old ... adapting it to use tolerant might break something: -\let\tabl_table_head\empty % needs checking -\let\tabl_table_tail\empty % needs checking +\lettonothing\tabl_table_head % needs checking +\lettonothing\tabl_table_tail % needs checking \letcsname\e!start\v!tablehead\endcsname\relax % todo: frozen, but we use a grabber \letcsname\e!stop \v!tablehead\endcsname\relax % todo: frozen, but we use a grabber @@ -1711,8 +1711,8 @@ \noalign\bgroup \nobreak \tabl_table_set_action\tableunknownstate - \glet\tabl_tables_check_auto_row\empty - \glet\tabl_tables_chuck_auto_row\empty + \glettonothing\tabl_tables_check_auto_row + \glettonothing\tabl_tables_chuck_auto_row \global\currenttablecolumn\zerocount \egroup} @@ -1841,18 +1841,18 @@ {\glet\tabl_tables_check_auto_row\tabl_tables_check_auto_row_indeed \glet\tabl_tables_chuck_auto_row\tabl_tables_chuck_auto_row_indeed} -\let\tabl_tables_check_auto_row\empty -\let\tabl_tables_chuck_auto_row\empty +\lettonothing\tabl_tables_check_auto_row +\lettonothing\tabl_tables_chuck_auto_row \def\tabl_tables_check_auto_row_indeed - {\glet\tabl_tables_check_auto_row\empty + {\glettonothing\tabl_tables_check_auto_row \ifnum\tableactionstate=\tablerulestate \FR\orelse \ifnum\tableactionstate=\tableunknownstate\FR\else \MR\fi} \def\tabl_tables_chuck_auto_row_indeed - {\glet\tabl_tables_check_auto_row\empty - \glet\tabl_tables_chuck_auto_row\empty + {\glettonothing\tabl_tables_check_auto_row + \glettonothing\tabl_tables_chuck_auto_row \ifnum\tableactionstate=\tablerulestate \SR\orelse \ifnum\tableactionstate=\tableunknownstate\SR\else \LR\fi} @@ -1908,8 +1908,8 @@ \newcount\c_tabl_table_hrule_thickness_factor \newcount\c_tabl_table_drule_span -\let\m_tabl_table_vrule_color\empty -\let\m_tabl_table_hrule_color\empty +\lettonothing\m_tabl_table_vrule_color +\lettonothing\m_tabl_table_hrule_color \appendtoks \enforced\let\VL\tabl_table_VL @@ -1934,7 +1934,7 @@ \permanent\tolerant\protected\def\tabl_table_VL[#1]% {\tabl_tables_check_auto_row \global\advance\currenttablecolumn\plusone - \glet\m_tabl_table_vrule_color\empty + \glettonothing\m_tabl_table_vrule_color \global\c_tabl_table_vrule_thickness_factor\m_tabl_table_VLwidth\relax \iftok{#1}\emptytoks\else \rawprocesscommalist[#1]\tabl_table_vrulecommand @@ -1978,7 +1978,7 @@ \bgroup \global\c_tabl_table_hrule_thickness_factor\m_tabl_table_HLheight\relax \ifparameter#1\or - \glet\m_tabl_table_hrule_color\empty + \glettonothing\m_tabl_table_hrule_color \rawprocesscommalist[#1]\tabl_table_hrulecommand \ifempty\m_tabl_table_hrule_color\else \switchtocolor[\m_tabl_table_hrule_color]% @@ -2094,7 +2094,7 @@ \global\c_tabl_table_hrule_thickness_factor\m_tabl_table_HLheight\relax \global\c_tabl_table_drule_span\zerocount \iftok{#1}\emptytoks\else - \glet\m_tabl_table_hrule_color\empty + \glettonothing\m_tabl_table_hrule_color \rawprocesscommalist[#1]\tabl_table_drulecommand % \ifempty\m_tabl_table_hrule_color\else % \switchtocolor[\m_tabl_table_hrule_color]% see *DL* diff --git a/tex/context/base/mkxl/tabl-tbl.mkxl b/tex/context/base/mkxl/tabl-tbl.mkxl index 91ee0262a..ad18daef4 100644 --- a/tex/context/base/mkxl/tabl-tbl.mkxl +++ b/tex/context/base/mkxl/tabl-tbl.mkxl @@ -233,7 +233,7 @@ %newconditional \c_tabl_pre_is_set \newconditional \c_tabl_post_is_set -\let \m_tabl_tabulate_separator_factor \empty % fraction +\lettonothing \m_tabl_tabulate_separator_factor % fraction \aliased\let\tabulatesplitlinemode\c_tabl_tabulate_splitlinemode % temp hack, we need an interface @@ -292,7 +292,7 @@ \tabl_tabulate_initialize_box_nop#1% \fi} -\def\tabl_tabulate_initialize_box_yes {\global \setbox\lastnamedcs\emptybox} +\def\tabl_tabulate_initialize_box_yes {\global\setbox\lastnamedcs\emptybox} \def\tabl_tabulate_initialize_box_nop#1{\expandafter\newbox\csname\??tabulatebox\number#1\endcsname} \tabl_tabulate_initialize_boxes{16} % not really needed @@ -361,7 +361,7 @@ \xdef\m_tabl_tabulate_color{#1}% \else \glet\m_tabl_tabulate_color\m_tabl_tabulate_color_local - \glet\m_tabl_tabulate_color_local\empty + \glettonothing\m_tabl_tabulate_color_local \fi \ifcase\c_tabl_tabulate_localcolorspan \global\c_tabl_tabulate_colorspan#2\relax @@ -388,7 +388,7 @@ \xdef\m_tabl_tabulate_vrule_color{#1}% \else \glet\m_tabl_tabulate_vrule_color\m_tabl_tabulate_vrule_color_local - \glet\m_tabl_tabulate_vrule_color_local\empty + \glettonothing\m_tabl_tabulate_vrule_color_local \fi} \let\tabl_tabulate_check_local_color \gobbletwoarguments @@ -408,7 +408,7 @@ \def\tabl_tabulate_inject_pre_skip#1% {\ifdim#1>\zeropoint \kern#1\relax % hskip - \orelse\ifnum\c_tabl_tabulate_column=\zerocount + \orelse\ifzero\c_tabl_tabulate_column \ifconditional\c_tabl_tabulate_autorulespacing \ifcase\c_tabl_tabulate_has_rule_spec_first\else \kern\s_tabl_tabulate_first\relax % hskip @@ -841,10 +841,10 @@ \t_tabl_tabulate_emath\emptytoks \t_tabl_tabulate_font\emptytoks \t_tabl_tabulate_settings\emptytoks - \glet\m_tabl_tabulate_alignment\empty - \glet\m_tabl_tabulate_color\empty - \glet\m_tabl_tabulate_text_color\empty - \glet\m_tabl_tabulate_vrule_color\empty + \glettonothing\m_tabl_tabulate_alignment + \glettonothing\m_tabl_tabulate_color + \glettonothing\m_tabl_tabulate_text_color + \glettonothing\m_tabl_tabulate_vrule_color \global\c_tabl_tabulate_colorspan\zerocount \global\setfalse\c_tabl_auto_align_mode \global\setfalse\c_tabl_auto_align_mode_new @@ -871,8 +871,8 @@ \fi} \permanent\protected\def\tabl_tabulate_set_last_entry#1% rulespec - {\glet\m_tabl_tabulate_color\empty - \glet\m_tabl_tabulate_vrule_color\empty + {\glettonothing\m_tabl_tabulate_color + \glettonothing\m_tabl_tabulate_vrule_color \iftok{#1}\emptytoks \global\d_tabl_tabulate_vrulethickness\zeropoint \else @@ -1115,9 +1115,9 @@ % Here begins the implementation. -\let\tabl_tabulate_insert_head\empty -\let\tabl_tabulate_insert_body\empty -\let\tabl_tabulate_insert_foot\empty +\lettonothing\tabl_tabulate_insert_head +\lettonothing\tabl_tabulate_insert_body +\lettonothing\tabl_tabulate_insert_foot \def\tabl_tabulate_insert_head_content {\noalign{\global\settrue\c_tabl_tabulate_someamble}% @@ -1134,23 +1134,23 @@ %\expandafter\ifempty\csname\??tabulatehead\currenttabulation\endcsname %\expandafter\ifempty\lastnamedcs \ifempty\lastnamedcs - \let\tabl_tabulate_insert_head\empty + \lettonothing\tabl_tabulate_insert_head \else \let\tabl_tabulate_insert_head\tabl_tabulate_insert_head_content \fi \else - \let\tabl_tabulate_insert_head\empty + \lettonothing\tabl_tabulate_insert_head \fi \ifcsname\??tabulatefoot\currenttabulation\endcsname %\expandafter\ifempty\csname\??tabulatefoot\currenttabulation\endcsname %\expandafter\ifempty\lastnamedcs \ifempty\lastnamedcs - \let\tabl_tabulate_insert_foot\empty + \lettonothing\tabl_tabulate_insert_foot \else \let\tabl_tabulate_insert_foot\tabl_tabulate_insert_foot_content \fi \else - \let\tabl_tabulate_insert_foot\empty + \lettonothing\tabl_tabulate_insert_foot \fi} \def\tabl_tabulate_insert_content @@ -1173,7 +1173,7 @@ \permanent\protected\defcsname\e!start\v!tabulatehead\endcsname{\doifelsenextoptionalcs\tabl_tabulate_start_head_yes\tabl_tabulate_start_head_nop} \permanent\protected\defcsname\e!start\v!tabulatetail\endcsname{\doifelsenextoptionalcs\tabl_tabulate_start_foot_yes\tabl_tabulate_start_foot_nop} -\let\m_tabl_tabulate_data\empty +\lettonothing\m_tabl_tabulate_data \def\tabl_tabulate_start_head_yes[#1]% {\processcontent{\e!stop\v!tabulatehead}\m_tabl_tabulate_data{\letcsname\??tabulatehead#1\endcsname\m_tabl_tabulate_data}} @@ -1216,7 +1216,7 @@ \permanent\protected\defcsname\e!start\v!tabulate\endcsname {\bgroup % whole thing - \let\currenttabulationparent\empty + \lettonothing\currenttabulationparent \tabl_start_regular} \tolerant\protected\def\tabl_start_regular[#1]#*[#2]% [format] | [settings] | [format] [settings] | [settings] [format] @@ -1411,30 +1411,30 @@ % color columns -\let\m_tabl_tabulate_color_previous \empty -\let\m_tabl_tabulate_color \empty -\let\m_tabl_tabulate_text_color \empty -\let\m_tabl_tabulate_color_local \empty -\let\m_tabl_tabulate_vrule_color \empty -\let\m_tabl_tabulate_vrule_color_local \empty -\let\m_tabl_tabulate_vrule_color_default\empty % used local -\let\m_tabl_tabulate_hrule_color_default\empty % used local -\let\m_tabl_tabulate_blank_default \empty +\lettonothing\m_tabl_tabulate_color_previous +\lettonothing\m_tabl_tabulate_color +\lettonothing\m_tabl_tabulate_text_color +\lettonothing\m_tabl_tabulate_color_local +\lettonothing\m_tabl_tabulate_vrule_color +\lettonothing\m_tabl_tabulate_vrule_color_local +\lettonothing\m_tabl_tabulate_vrule_color_default % used local +\lettonothing\m_tabl_tabulate_hrule_color_default % used local +\lettonothing\m_tabl_tabulate_blank_default \appendtoks - \glet \m_tabl_tabulate_color_previous \empty - \glet \m_tabl_tabulate_color \empty - \glet \m_tabl_tabulate_text_color \empty - \glet \m_tabl_tabulate_color_local \empty - \glet \m_tabl_tabulate_vrule_color \empty - \glet \m_tabl_tabulate_vrule_color_local \empty + \glettonothing\m_tabl_tabulate_color_previous + \glettonothing\m_tabl_tabulate_color + \glettonothing\m_tabl_tabulate_text_color + \glettonothing\m_tabl_tabulate_color_local + \glettonothing\m_tabl_tabulate_vrule_color + \glettonothing\m_tabl_tabulate_vrule_color_local \global\d_tabl_tabulate_vrulethickness_local\zeropoint \to \t_tabl_tabulate_every_row \protected\def\tabl_tabulate_color_side_right_second {\ifempty\m_tabl_tabulate_color_previous \else \tabl_tabulate_color_set\m_tabl_tabulate_color_previous - \glet\m_tabl_tabulate_color_previous\empty + \glettonothing\m_tabl_tabulate_color_previous \fi} \protected\def\tabl_tabulate_color_side_left_second @@ -1451,9 +1451,9 @@ {\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 + %\glettonothing\m_tabl_tabulate_color_previous \or - \glet\m_tabl_tabulate_color_previous\empty + \glettonothing\m_tabl_tabulate_color_previous \or \glet\m_tabl_tabulate_color_previous\m_tabl_tabulate_color \or @@ -1635,7 +1635,7 @@ \directvskip\s_tabl_tabulate_separator \egroup} -\let\m_tabl_tabulate_hrule_color\empty +\lettonothing\m_tabl_tabulate_hrule_color \def\tabl_tabulate_hrule_preset_step#1% {\doifelsenumber{#1}% @@ -1756,10 +1756,10 @@ % \registerparoptions % \ifinsidefloat % % that is, an unbreakable one -% \glet\tabl_tabulate_register_par_options\empty +% \glettonothing\tabl_tabulate_register_par_options % \else % % unsafe in crossing pages, at each b... -% % \glet\tabl_tabulate_register_par_options\empty +% % \glettonothing\tabl_tabulate_register_par_options % \fi % \fi} % @@ -1774,10 +1774,10 @@ {\registerparoptions \ifinsidefloat % that is, an unbreakable one - \glet\tabl_tabulate_register_par_options\empty + \glettonothing\tabl_tabulate_register_par_options \else % unsafe in crossing pages, at each b... - % \glet\tabl_tabulate_register_par_options\empty + % \glettonothing\tabl_tabulate_register_par_options \fi} \let\tabl_tabulate_register_par_options\relax @@ -1806,7 +1806,7 @@ \hss}} \def\tabl_tabulate_flush_indent - {\ifnum\c_tabl_tabulate_column=\zerocount + {\ifzero\c_tabl_tabulate_column \tabl_tabulate_flush_indent_indeed \fi} @@ -2037,7 +2037,7 @@ \expandafter\ignorepars % \ignorespaces \else % successive lines - \let\tabl_tabulate_eskip\empty + \lettonothing\tabl_tabulate_eskip \dontcomplain \glet\tabl_tabulate_hook\tabl_tabulate_hook_yes \expandafter\tabl_tabulate_splitoff_box @@ -2047,7 +2047,7 @@ \protected\def\tabl_tabulate_xeskip_second{\tabl_tabulate_eskip} \protected\def\tabl_tabulate_flush_second_indeed - {\glet\tabl_tabulate_flush_collected_indeed\empty + {\glettonothing\tabl_tabulate_flush_collected_indeed \global\c_tabl_tabulate_column\zerocount \tabl_tabulate_pbreak_check \dofastloopcs\c_tabl_tabulate_columns\tabl_tabulate_flush_second_step @@ -2156,6 +2156,7 @@ \permanent\def\tabl_tabulate_HL_second {\csname \ifnum\c_tabl_tabulate_noflines=\zerocount F\orelse + % \ifzeroc_tabl_tabulate_noflines F\orelse \ifnum\c_tabl_tabulate_noflines=\c_tabl_tabulate_totalnoflines L\else M\fi L\endcsname} @@ -2213,8 +2214,8 @@ %D places where we can use \LUA\ code (for instance in alignment of numbers. The %D repeat parser is replace at the \LUA\ end as well. -\let\tabl_tabulate_flush_collected \empty -\let\tabl_tabulate_flush_collected_indeed\empty +\lettonothing\tabl_tabulate_flush_collected +\lettonothing\tabl_tabulate_flush_collected_indeed \let\v_tabl_tabulate_align\!!zerocount @@ -2266,8 +2267,8 @@ \ifx\p_synchronize\v!background \edef\currentframedcontent{\tabulationparameter\c!frame}% \ifx\currentframedcontent\v!off - \lettabulationparameter\c!frame\empty - \let\currentframedcontent\empty + \resettabulationparameter\c!frame + \lettonothing\currentframedcontent \letframedcontentparameter\c!frame\v!off \fi \letframedcontentparameter\c!synchronize\p_synchronize @@ -2318,7 +2319,7 @@ % \the\t_tabl_tabulate_initializers_first % collect more here % - \glet\tabl_tabulate_flush_collected\empty + \glettonothing\tabl_tabulate_flush_collected \ifdim\d_tabl_tabulate_margin>\zeropoint \t_tabl_tabulate_preamble {\aligntab @@ -2398,7 +2399,7 @@ \setbox\scratchbox\emptybox % free memory \ifconditional\c_tabl_tabulate_split \splittopskip\strutht - \glet\tabl_tabulate_flush_collected_indeed\empty + \glettonothing\tabl_tabulate_flush_collected_indeed \glet\tabl_tabulate_flush_collected\tabl_tabulate_flush_second \fi \c_tabl_tabulate_totalnoflines\c_tabl_tabulate_noflines @@ -2714,7 +2715,7 @@ \permanent\protected\defcsname starttabulate\endcsname {\bgroup % whole thing \settrue\c_tabl_generic - \let\currenttabulationparent\empty + \lettonothing\currenttabulationparent \tabl_start_regular} \permanent\letcsname stoptabulate\endcsname\relax % testcase cvs-002.tex @@ -2829,11 +2830,11 @@ % \c!foregroundcolor=, % \c!foregroundstyle=] -\let\m_table_current_row_background \empty -\let\m_table_current_row_background_default \empty -\let\m_table_current_row_background_filler \empty -\let\m_table_current_row_background_defaultfiller\empty -\let\m_table_current_row_background_auto \empty +\lettonothing\m_table_current_row_background +\lettonothing\m_table_current_row_background_default +\lettonothing\m_table_current_row_background_filler +\lettonothing\m_table_current_row_background_defaultfiller +\lettonothing\m_table_current_row_background_auto \protected\def\tabl_register_row_background#1% {\xdef\m_table_current_row_background{#1}} @@ -2886,16 +2887,16 @@ \fi} \appendtoks - \glet\m_table_current_row_background\empty - \glet\m_table_current_row_background_filler\empty + \glettonothing\m_table_current_row_background + \glettonothing\m_table_current_row_background_filler \global\c_tabl_tabulate_nofrealrows\zerocount \global\c_tabl_tabulate_autocolor\zerocount \clf_resetbackgroundrowdata \to \t_tabl_tabulate_initializers_first \appendtoks - \glet\m_table_current_row_background\empty - \glet\m_table_current_row_background_filler\empty + \glettonothing\m_table_current_row_background + \glettonothing\m_table_current_row_background_filler \global\c_tabl_tabulate_nofrealrows\zerocount \global\c_tabl_tabulate_autocolor\zerocount \clf_resetbackgroundrowdata @@ -2906,8 +2907,8 @@ \to \t_tabl_tabulate_every_real_row \appendtoks - \glet\m_table_current_row_background\empty - \glet\m_table_current_row_background_filler\empty + \glettonothing\m_table_current_row_background + \glettonothing\m_table_current_row_background_filler \to \t_tabl_tabulate_every_after_row \permanent\protected\def\tabl_tabulate_NL_first[#1]% @@ -3003,7 +3004,7 @@ \edef\m_table_current_row_background_auto{\tabulateparameter{\c!backgroundcolor:\number\c_tabl_tabulate_autocolor}}% \fi \ifempty\m_table_current_row_background_auto - \let\m_table_current_row_background_auto\empty % \m_table_current_row_background_default + \lettonothing\m_table_current_row_background_auto % \m_table_current_row_background_default \fi \tabl_register_row_background{\m_table_current_row_background_auto}} @@ -3036,9 +3037,9 @@ \to \t_tabl_tabulate_initializers_first \appendtoks - \edef\m_table_current_row_background_default {\tabulateparameter\c!backgroundcolor}% + \edef\m_table_current_row_background_default{\tabulateparameter\c!backgroundcolor}% \edef\m_table_current_row_background_default_filler{\tabulateparameter\c!background}% - \let \m_table_current_row_background_auto \empty + \lettonothing\m_table_current_row_background_auto \to \everytabulate \setuptabulate diff --git a/tex/context/base/mkxl/tabl-tsp.mkxl b/tex/context/base/mkxl/tabl-tsp.mkxl index 5f01e7eb4..51069b75f 100644 --- a/tex/context/base/mkxl/tabl-tsp.mkxl +++ b/tex/context/base/mkxl/tabl-tsp.mkxl @@ -69,16 +69,15 @@ \newconditional\splitfloatdone \newconditional\onlyonesplitofffloat \settrue\onlyonesplitofffloat -\newif \ifinsidesplitfloat % will become conditional +\newif \ifinsidesplitfloat % will become conditional +\newcount\noffloatssplits +\newtoks \everysplitfloatsetup -\newcount \noffloatssplits -\newtoks \everysplitfloatsetup +\mutable\let\extrasplitfloatlines \!!zerocount +\mutable\let\splitfloatfinalizer \relax -\mutable\let \extrasplitfloatlines \!!zerocount -\mutable\let \splitfloatfinalizer \relax -\mutable\let \splitfloatcommand \empty - -\mutable\let \floatcaptionsuffix \empty +\mutable\lettonothing\splitfloatcommand +\mutable\lettonothing\floatcaptionsuffix \permanent\tolerant\protected\def\splitfloat[#1]#:#2% nog dubbele refs {\bgroup @@ -134,7 +133,7 @@ \global\advance\noffloatssplits\plusone \ifcase\noffloatssplits\relax \or \ifconditional\onlyonesplitofffloat - \let\floatcaptionsuffix\empty + \lettonothing\floatcaptionsuffix \fi \fi \bgroup diff --git a/tex/context/base/mkxl/tabl-xtb.mklx b/tex/context/base/mkxl/tabl-xtb.mklx index ceea878da..4f3d1683c 100644 --- a/tex/context/base/mkxl/tabl-xtb.mklx +++ b/tex/context/base/mkxl/tabl-xtb.mklx @@ -98,7 +98,7 @@ \newcount\c_tabl_x_swapped \newcount\c_tabl_x_swapped_max -\let\m_tabl_x_swapped_settings\empty +\lettonothing\m_tabl_x_swapped_settings \aliased\let\currentxtablerow \clf_x_table_r \aliased\let\currentxtablecolumn\clf_x_table_c @@ -156,8 +156,8 @@ \c!rightmargindistance=\zeropoint,% whole table ] -\def\tabl_x_default_buffer{x_table_\number\c_tabl_x_nesting} -\let\tabl_x_current_buffer\empty +\def \tabl_x_default_buffer{x_table_\number\c_tabl_x_nesting} +\lettonothing\tabl_x_current_buffer \permanent\protected\def\startxtable{\tabl_x_start_table} @@ -280,7 +280,7 @@ footer {\xtableparameter\c!footer}% \relax % - \letxtableparameter\c!option\empty + \resetxtableparameter\c!option % not so nice but needed as we use this in the setup \linewidth\xtableparameter\c!rulethickness\relax % so we freeze it diff --git a/tex/context/base/mkxl/toks-aux.lmt b/tex/context/base/mkxl/toks-aux.lmt index c152afb36..83e714d77 100644 --- a/tex/context/base/mkxl/toks-aux.lmt +++ b/tex/context/base/mkxl/toks-aux.lmt @@ -44,6 +44,7 @@ local function flags(t) if t.instance then r[#r+1] = "instance" end if t.tolerant then r[#r+1] = "tolerant" end if t.protected then r[#r+1] = "protected" end + if t.constant then r[#r+1] = "constant" end return r end @@ -119,6 +120,7 @@ interfaces.implement { elseif cn == "letter" or cn == "other char" then wr(f3(id,cd,ix,cn,ix)) elseif cn == "match" then + -- needs checking for additions local s if ix == 32 then s = "optional spacer" -- space elseif ix == 42 then s = "skip spaces" -- * diff --git a/tex/context/base/mkxl/trac-tex.mkxl b/tex/context/base/mkxl/trac-tex.mkxl index 13c1a047f..5e1c9e5bc 100644 --- a/tex/context/base/mkxl/trac-tex.mkxl +++ b/tex/context/base/mkxl/trac-tex.mkxl @@ -24,7 +24,7 @@ % \def\enabletextracerwhatever {...} % \def\disabletextracerwhatever{...} -\mutable\let\alltextracers\empty % so that we can report available tracers +\mutable\lettonothing\alltextracers % so that we can report available tracers \permanent\protected\def\installtextracer#1% {\addtocommalist{#1}\alltextracers} diff --git a/tex/context/base/mkxl/type-ini.mklx b/tex/context/base/mkxl/type-ini.mklx index bba2d433b..d750260e2 100644 --- a/tex/context/base/mkxl/type-ini.mklx +++ b/tex/context/base/mkxl/type-ini.mklx @@ -39,29 +39,29 @@ \newtoks \everybeforedefinetypeface \newtoks \everyafterdefinetypeface -\mutable\let\typescriptfiles \empty -\mutable\let\currenttypescripts\empty -\mutable\let\currenttypefile \empty +\mutable\lettonothing\typescriptfiles +\mutable\lettonothing\currenttypescripts +\mutable\lettonothing\currenttypefile \installmacrostack\currenttypefile -\mutable\let\typescriptone \empty % public, used in typescripts -\mutable\let\typescripttwo \empty % public, used in typescripts -\mutable\let\typescriptthree\empty % public, used in typescripts +\mutable\lettonothing\typescriptone % public, used in typescripts +\mutable\lettonothing\typescripttwo % public, used in typescripts +\mutable\lettonothing\typescriptthree % public, used in typescripts \installmacrostack\typescriptone \installmacrostack\typescripttwo \installmacrostack\typescriptthree -\mutable\let\fontclassstyle \empty +\mutable\lettonothing\fontclassstyle \installmacrostack\fontclassstyle -\let\m_font_typescripts_one \empty -\let\m_font_typescripts_two \empty -\let\m_font_typescripts_three\empty -\let\m_font_typescripts_check\empty -\let\m_font_typescripts_match\empty +\lettonothing\m_font_typescripts_one +\lettonothing\m_font_typescripts_two +\lettonothing\m_font_typescripts_three +\lettonothing\m_font_typescripts_check +\lettonothing\m_font_typescripts_match \installmacrostack\m_font_typescripts_one \installmacrostack\m_font_typescripts_two @@ -105,7 +105,7 @@ \permanent\protected\def\usetypescriptfile[#filename]% {\ifcstok{#filename}\v!reset - \let\typescriptfiles\empty + \lettonothing\typescriptfiles \else \splitfilename{#filename}% \addtocommalist\splitoffbase\typescriptfiles @@ -296,7 +296,7 @@ {\let\typescriptone \m_font_typescripts_one \let\typescripttwo \m_font_typescripts_two \let\typescriptthree\m_font_typescripts_three - \let\m_font_typescripts_match\empty + \lettonothing\m_font_typescripts_match \doifelsenextoptionalcs\font_typescripts_start_process_one\font_typescripts_start_process_all} \def\font_typescripts_start_process_all % could be a \let @@ -496,11 +496,11 @@ \def\font_typefaces_defining_start#name#style#settings% {\let\m_ts_rscale \!!plusone % as we push/pop - \let\m_ts_features \empty - \let\m_ts_fallbacks \empty - \let\m_ts_goodies \empty - \let\m_ts_direction \empty - \let\m_ts_designsize\empty + \lettonothing\m_ts_features + \lettonothing\m_ts_fallbacks + \lettonothing\m_ts_goodies + \lettonothing\m_ts_direction + \lettonothing\m_ts_designsize \geteparameters[m_ts_][#settings]% todo raw ... no need for key interpretation \push_macro_fontclass \push_macro_fontclassstyle diff --git a/tex/context/base/mkxl/typo-ada.mkxl b/tex/context/base/mkxl/typo-ada.mkxl index e8b37997b..beb03e264 100644 --- a/tex/context/base/mkxl/typo-ada.mkxl +++ b/tex/context/base/mkxl/typo-ada.mkxl @@ -27,7 +27,7 @@ \newdimen\d_adaptive_line \newdimen\d_adaptive_hsize -\mutable\let\m_adaptive_color\empty +\mutable\lettonothing\m_adaptive_color \newbox\b_adaptive_box @@ -70,7 +70,7 @@ {\ifcase#1\dontleavehmode\fi \begingroup \ifhastok={#2}% - \let\currentadaptive\empty + \lettonothing\currentadaptive \setupcurrentadaptive[#2]% \else \edef\currentadaptive{#2}% diff --git a/tex/context/base/mkxl/typo-del.mkxl b/tex/context/base/mkxl/typo-del.mkxl index 5b8431070..f790f9907 100644 --- a/tex/context/base/mkxl/typo-del.mkxl +++ b/tex/context/base/mkxl/typo-del.mkxl @@ -314,9 +314,9 @@ %D \NC [fr:en] \NC {\tttf fr} \quotation[fr:en]{{\tttf } something french} \NC \NR %D \stoptabulate -\mutable\let\currentdelimitedlanguage\empty -\mutable\let\innerdelimitedlanguage \empty -\mutable\let\outerdelimitedlanguage \empty +\mutable\lettonothing\currentdelimitedlanguage +\mutable\lettonothing\innerdelimitedlanguage +\mutable\lettonothing\outerdelimitedlanguage \installglobalmacrostack\currentdelimitedlanguage @@ -344,11 +344,11 @@ {\let\currentdelimitedlanguage\innerdelimitedlanguage}% \donothing \fi - \let\m_delimited_argument\empty} + \lettonothing\m_delimited_argument} \def\typo_delimited_set_language_yes_a {\let\currentdelimitedlanguage\m_delimited_argument - \let\m_delimited_argument\empty} + \lettonothing\m_delimited_argument} \def\typo_delimited_push#1#2% {\push_macro_currentdelimitedtext % can we combine these two diff --git a/tex/context/base/mkxl/typo-dir.mkxl b/tex/context/base/mkxl/typo-dir.mkxl index af680282c..a5a4bc568 100644 --- a/tex/context/base/mkxl/typo-dir.mkxl +++ b/tex/context/base/mkxl/typo-dir.mkxl @@ -51,8 +51,8 @@ % maybe use chardefs -\mutable\let\currentbidimode\empty -\mutable\let\currentbidistamp\empty +\mutable\lettonothing\currentbidimode +\mutable\lettonothing\currentbidistamp \def\typo_dir_get_mode {\def\currentbidimode{\clf_getbidimode % test edef diff --git a/tex/context/base/mkxl/typo-itm.mkxl b/tex/context/base/mkxl/typo-itm.mkxl index 7ae1b732f..1622866ce 100644 --- a/tex/context/base/mkxl/typo-itm.mkxl +++ b/tex/context/base/mkxl/typo-itm.mkxl @@ -103,7 +103,7 @@ \ifempty\p_typo_items_symbol \let\m_typo_items_symbol\firstofoneargument \orelse\ifx\p_typo_items_symbol\v!none - \let\p_typo_items_symbol\empty + \lettonothing\p_typo_items_symbol \let\m_typo_items_symbol\firstofoneargument \else \doifelseconversiondefined\p_typo_items_symbol diff --git a/tex/context/base/mkxl/typo-mar.mkxl b/tex/context/base/mkxl/typo-mar.mkxl index 242797a5d..c49f8824f 100644 --- a/tex/context/base/mkxl/typo-mar.mkxl +++ b/tex/context/base/mkxl/typo-mar.mkxl @@ -142,10 +142,10 @@ \newconditional\inhibitmargindata % This one is used at the Lua end! \newtoks \everymargindatacontent % Later on we will set this one. -\mutable\let\currentmargindatastrut \empty -\mutable\let\currentmargindatawidth \empty -\mutable\let\currentmarginfirstheight\empty -\mutable\let\currentmarginreference \empty +\mutable\lettonothing\currentmargindatastrut +\mutable\lettonothing\currentmargindatawidth +\mutable\lettonothing\currentmarginfirstheight +\mutable\lettonothing\currentmarginreference \appendtoks \settrue\inhibitmargindata @@ -239,7 +239,7 @@ \margindataparameter\c!command{#content}% \endstrut \egroup - \let\currentmarginfirstheight\empty + \lettonothing\currentmarginfirstheight \else \setbox\nextbox\naturalhbox \currentmarginreference \bgroup \typo_margins_data_synchronize diff --git a/tex/context/base/mkxl/typo-shp.mkxl b/tex/context/base/mkxl/typo-shp.mkxl index 3f1d3f3d8..64cacef09 100644 --- a/tex/context/base/mkxl/typo-shp.mkxl +++ b/tex/context/base/mkxl/typo-shp.mkxl @@ -77,7 +77,7 @@ % \permanent\protected\tolerant\def\startshapedparagraph[#1]% no grouping % {\begingroup -% \let\currentshapedparagraph\empty +% \lettonothing\currentshapedparagraph % \setupshapedparagraph[#1]% % \edef\p_mp {\shapedparagraphparameter\c!mp}% % \edef\p_repeat{\shapedparagraphparameter\c!repeat}% @@ -154,7 +154,7 @@ \permanent\protected\tolerant\def\startshapedparagraph[#1]% no grouping {\begingroup - \let\currentshapedparagraph\empty + \lettonothing\currentshapedparagraph \setupshapedparagraph[#1]% \setlocalhsize \doifsomething{\shapedparagraphparameter\c!text} diff --git a/tex/context/base/mkxl/typo-wrp.mkxl b/tex/context/base/mkxl/typo-wrp.mkxl index 850d42e78..71559a8a3 100644 --- a/tex/context/base/mkxl/typo-wrp.mkxl +++ b/tex/context/base/mkxl/typo-wrp.mkxl @@ -52,7 +52,7 @@ {\wordboundary\strut} \appendtoks - \let\spac_crlf_placeholder\empty + \lettonothing\spac_crlf_placeholder \to \everysetnostrut \appendtoks diff --git a/tex/context/modules/mkxl/s-publications-show.mkxl b/tex/context/modules/mkxl/s-publications-show.mkxl index 9f4098489..f4967f7e4 100644 --- a/tex/context/modules/mkxl/s-publications-show.mkxl +++ b/tex/context/modules/mkxl/s-publications-show.mkxl @@ -26,9 +26,9 @@ \tolerant\gdef\publ_show_dataset_whatever#1[#2]% {\begingroup - \letdummyparameter\c!specification\currentbtxspecification - \setdummyparameter\c!dataset {\currentbtxdataset}% - \letdummyparameter\c!field \empty + \letdummyparameter \c!specification\currentbtxspecification + \setdummyparameter \c!dataset {\currentbtxdataset}% + \resetdummyparameter\c!field \ifparameter#2\or \ifhastok={#2}% \getdummyparameters[#2]% diff --git a/tex/context/modules/mkxl/x-mathml.mkxl b/tex/context/modules/mkxl/x-mathml.mkxl index 12ddf2586..ea3052d2d 100644 --- a/tex/context/modules/mkxl/x-mathml.mkxl +++ b/tex/context/modules/mkxl/x-mathml.mkxl @@ -283,7 +283,7 @@ \newcount\@MMLlevel \def\MMLcreset{\@MMLlevel\zerocount} -\let\MMLctempresetlist\empty \def\setMMLcreset{\edef\MMLctempresetlist} +\lettonothing\MMLctempresetlist \def\setMMLcreset{\edef\MMLctempresetlist} \let\MMLdoL\donothing \let\MMLdoR\donothing @@ -311,7 +311,7 @@ \edef\MMLdoL{\noexpand\left \mmlapplyopentoken } \edef\MMLdoR{\noexpand\right\mmlapplyclosetoken} \fi - \let\MMLctempresetlist\empty + \lettonothing\MMLctempresetlist \xmldoifelse {#1} {/mml:apply} { % % ... .. % \xmldoifelse {#1} {/mml:apply(mml:plus|mml:minus)} {% [a] @@ -571,7 +571,7 @@ \startxmlsetups mml:cn:integer \mathatom class \mathdigitcode \bgroup \edef\mmlintegerbase{\xmlattdef{#1}{base}{}} - \ifx\mmlintegerbase\empty + \ifempty\mmlintegerbase \xmlflush{#1} \else \mtext { @@ -976,7 +976,7 @@ \setupMMLappearance[power][\c!reduction=\v!yes] -\let\MMLpowerelement\empty +\lettonothing\MMLpowerelement \startxmlsetups mml:power \xmldoifelse {#1} {/mml:apply} { @@ -1479,12 +1479,12 @@ } } } { - \let\mmlsumprodlower\empty + \lettonothing\mmlsumprodlower } \xmldoifelse {#1} {/mml:uplimit} { \def\mmlsumprodupper{\normalsuperscript{\xmlfirst{#1}{/mml:uplimit}}} } { - \let\mmlsumprodupper\empty + \lettonothing\mmlsumprodupper } \xmldoif {#1} {/mml:interval} { % open math converter gives this \edef\mmlintervalfrom{\xmlindex{#1}{/mml:interval}{1}} @@ -1754,7 +1754,7 @@ \else \normalsuperscript{\ifconditional\xmlinversefunction-\fi\MMLpowerelement} \setfalse\xmlinversefunction - \glet\MMLpowerelement\empty + \glettonothing\MMLpowerelement \fi \xmlsetup{#1}{mml:function:argument} \stopxmlsetups @@ -2364,14 +2364,14 @@ \scratchwidth \xmlattdef{#1}{width} \!!zeropoint % must be string \scratchheight\xmlattdef{#1}{height}\!!zeropoint \scratchdepth \xmlattdef{#1}{depth} \!!zeropoint - \ifdim\scratchheight=\zeropoint - \ifdim\scratchdepth=\zeropoint\else + \ifzeropt\scratchheight + \ifzeropt\scratchdepth\else \novrule\s!depth\scratchdepth\s!height\zeropoint\s!width\zeropoint \fi \else \novrule\s!depth\zeropoint\s!height\scratchheight\s!width\zeropoint \fi - \ifdim\scratchwidth=\zeropoint + \ifzeropt\scratchwidth % maybe we need to do it anyway \orelse\ifx\MMLmspaceoption\v!test \hbox to \scratchwidth{\showstruts\strut\hss\lower2\exheight\hbox{\infofont\xmlattdef{#1}{width}}\hss\strut} -- cgit v1.2.3