summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/anch-bck.mkvi170
-rw-r--r--tex/context/base/anch-pgr.mkiv100
-rw-r--r--tex/context/base/anch-pos.mkiv72
-rw-r--r--tex/context/base/attr-ini.mkiv12
-rw-r--r--tex/context/base/back-exp.mkiv12
-rw-r--r--tex/context/base/back-ini.mkiv4
-rw-r--r--tex/context/base/back-pdf.mkiv42
-rw-r--r--tex/context/base/buff-ini.mkiv84
-rw-r--r--tex/context/base/buff-ver.mkiv5
-rw-r--r--tex/context/base/catc-act.mkiv42
-rw-r--r--tex/context/base/catc-ini.mkiv152
-rw-r--r--tex/context/base/colo-ext.mkiv24
-rw-r--r--tex/context/base/colo-grp.mkiv26
-rw-r--r--tex/context/base/colo-ini.mkiv336
-rw-r--r--tex/context/base/colo-run.mkiv98
-rw-r--r--tex/context/base/cont-log.mkiv38
-rw-r--r--tex/context/base/context-version.pdfbin4076 -> 4073 bytes
-rw-r--r--tex/context/base/context-version.pngbin101565 -> 104054 bytes
-rw-r--r--tex/context/base/context.mkiv4
-rw-r--r--tex/context/base/core-con.mkiv34
-rw-r--r--tex/context/base/core-env.mkiv236
-rw-r--r--tex/context/base/core-mis.mkiv20
-rw-r--r--tex/context/base/core-sys.mkiv20
-rw-r--r--tex/context/base/core-two.mkiv16
-rw-r--r--tex/context/base/file-job.mkvi76
-rw-r--r--tex/context/base/file-res.mkvi20
-rw-r--r--tex/context/base/file-syn.mkvi8
-rw-r--r--tex/context/base/font-ini.mkiv120
-rw-r--r--tex/context/base/grph-epd.mkiv4
-rw-r--r--tex/context/base/grph-trf.mkiv764
-rw-r--r--tex/context/base/hand-ini.mkiv20
-rw-r--r--tex/context/base/java-ini.mkiv12
-rw-r--r--tex/context/base/lang-ini.mkiv72
-rw-r--r--tex/context/base/lang-lab.mkiv80
-rw-r--r--tex/context/base/lang-mis.mkiv114
-rw-r--r--tex/context/base/lang-url.mkiv43
-rw-r--r--tex/context/base/lang-wrd.mkiv4
-rw-r--r--tex/context/base/luat-ini.mkiv28
-rw-r--r--tex/context/base/lxml-ini.mkiv34
-rw-r--r--tex/context/base/m-chart.mkvi60
-rw-r--r--tex/context/base/m-steps.mkvi78
-rw-r--r--tex/context/base/math-ini.mkiv20
-rw-r--r--tex/context/base/math-pln.mkiv2
-rw-r--r--tex/context/base/meta-fig.mkiv2
-rw-r--r--tex/context/base/meta-ini.mkiv360
-rw-r--r--tex/context/base/meta-tex.mkiv28
-rw-r--r--tex/context/base/mlib-pdf.mkiv12
-rw-r--r--tex/context/base/mult-aux.mkiv155
-rw-r--r--tex/context/base/mult-chk.mkiv24
-rw-r--r--tex/context/base/mult-dim.mkvi2
-rw-r--r--tex/context/base/mult-ini.mkiv6
-rw-r--r--tex/context/base/mult-low.lua15
-rw-r--r--tex/context/base/mult-sys.mkiv3
-rw-r--r--tex/context/base/node-bck.mkiv20
-rw-r--r--tex/context/base/node-ini.mkiv10
-rw-r--r--tex/context/base/node-par.mkiv24
-rw-r--r--tex/context/base/node-res.lua2
-rw-r--r--tex/context/base/node-rul.mkiv111
-rw-r--r--tex/context/base/pack-bck.mkvi44
-rw-r--r--tex/context/base/pack-box.mkiv110
-rw-r--r--tex/context/base/pack-fen.mkiv4
-rw-r--r--tex/context/base/pack-lyr.mkiv434
-rw-r--r--tex/context/base/pack-rul.mkiv524
-rw-r--r--tex/context/base/page-app.mkiv72
-rw-r--r--tex/context/base/page-box.mkvi16
-rw-r--r--tex/context/base/page-inf.mkiv4
-rw-r--r--tex/context/base/page-ini.mkiv12
-rw-r--r--tex/context/base/page-lay.mkiv77
-rw-r--r--tex/context/base/page-lin.mkiv2
-rw-r--r--tex/context/base/page-mak.mkvi20
-rw-r--r--tex/context/base/page-mbk.mkvi102
-rw-r--r--tex/context/base/page-mis.lua2
-rw-r--r--tex/context/base/page-mis.mkiv10
-rw-r--r--tex/context/base/page-mul.mkiv40
-rw-r--r--tex/context/base/page-one.mkiv2
-rw-r--r--tex/context/base/page-plg.mkiv4
-rw-r--r--tex/context/base/page-txt.mkvi412
-rw-r--r--tex/context/base/phys-dim.mkiv278
-rw-r--r--tex/context/base/ppchtex.mkiv2
-rw-r--r--tex/context/base/scrn-bar.mkvi118
-rw-r--r--tex/context/base/scrn-but.mkvi186
-rw-r--r--tex/context/base/scrn-fld.mkvi134
-rw-r--r--tex/context/base/scrn-hlp.mkvi36
-rw-r--r--tex/context/base/scrn-pag.mkvi10
-rw-r--r--tex/context/base/scrn-wid.mkvi78
-rw-r--r--tex/context/base/spac-adj.mkiv8
-rw-r--r--tex/context/base/spac-ali.mkiv559
-rw-r--r--tex/context/base/spac-def.mkiv9
-rw-r--r--tex/context/base/spac-hor.mkiv113
-rw-r--r--tex/context/base/spac-pag.mkiv32
-rw-r--r--tex/context/base/spac-par.mkiv126
-rw-r--r--tex/context/base/spac-ver.mkiv82
-rw-r--r--tex/context/base/status-files.pdfbin24509 -> 24170 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin170107 -> 170106 bytes
-rw-r--r--tex/context/base/status-mkiv.lua1
-rw-r--r--tex/context/base/status-mkiv.tex56
-rw-r--r--tex/context/base/strc-blk.mkiv2
-rw-r--r--tex/context/base/strc-des.mkiv49
-rw-r--r--tex/context/base/strc-flt.mkvi633
-rw-r--r--tex/context/base/strc-itm.mkvi1148
-rw-r--r--tex/context/base/strc-mar.mkiv26
-rw-r--r--tex/context/base/strc-mat.mkiv4
-rw-r--r--tex/context/base/strc-not.mkiv6
-rw-r--r--tex/context/base/strc-ref.mkvi134
-rw-r--r--tex/context/base/strc-ren.mkiv2
-rw-r--r--tex/context/base/strc-sec.mkiv18
-rw-r--r--tex/context/base/supp-box.mkiv362
-rw-r--r--tex/context/base/supp-vis.mkiv82
-rw-r--r--tex/context/base/symb-ini.mkiv106
-rw-r--r--tex/context/base/syst-aux.mkiv488
-rw-r--r--tex/context/base/syst-ini.mkiv302
-rw-r--r--tex/context/base/tabl-xnt.mkvi98
-rw-r--r--tex/context/base/tabl-xtb.mkvi376
-rw-r--r--tex/context/base/toks-ini.mkiv12
-rw-r--r--tex/context/base/trac-tex.mkiv8
-rw-r--r--tex/context/base/typo-mar.mkiv4
-rw-r--r--tex/context/base/typo-par.mkiv8
-rw-r--r--tex/context/base/typo-prc.mkvi8
-rw-r--r--tex/context/base/typo-txt.mkvi28
-rw-r--r--tex/context/base/x-mathml.mkiv4
-rw-r--r--tex/context/base/xtag-ext.mkii4
-rw-r--r--tex/context/base/xtag-ini.mkii124
-rw-r--r--tex/context/base/xtag-map.mkii8
-rw-r--r--tex/context/base/xtag-run.mkii62
-rw-r--r--tex/context/base/xtag-xsl.mkii2
-rw-r--r--tex/context/bib/backup/sample.bib38
126 files changed, 5857 insertions, 5888 deletions
diff --git a/tex/context/base/anch-bck.mkvi b/tex/context/base/anch-bck.mkvi
index cf5b82967..af29668f8 100644
--- a/tex/context/base/anch-bck.mkvi
+++ b/tex/context/base/anch-bck.mkvi
@@ -29,23 +29,23 @@
% Paragraph positions:
-\newcount\backgrounds_text_n
+\newcount\c_anch_backgrounds_text_n
-\def\v_backgrounds_text_current {pbg:0}
-\def\v_backgrounds_text_next {pbg:1}
+\def\v_anch_backgrounds_text_current {pbg:0}
+\def\v_anch_backgrounds_text_next {pbg:1}
-\def\v_backgrounds_anchor_current_b{b:\v_backgrounds_text_current}
-\def\v_backgrounds_anchor_current_e{e:\v_backgrounds_text_current}
+\def\v_anch_backgrounds_anchor_current_b{b:\v_anch_backgrounds_text_current}
+\def\v_anch_backgrounds_anchor_current_e{e:\v_anch_backgrounds_text_current}
-\def\v_backgrounds_anchor_next_b {b:\v_backgrounds_text_next}
-\def\v_backgrounds_anchor_next_e {e:\v_backgrounds_text_next}
+\def\v_anch_backgrounds_anchor_next_b {b:\v_anch_backgrounds_text_next}
+\def\v_anch_backgrounds_anchor_next_e {e:\v_anch_backgrounds_text_next}
-\def\backgrounds_text_initialize_next
- {\global\advance\backgrounds_text_n\plusone
- \edef\v_backgrounds_text_current{pbg:\number\backgrounds_text_n}%
- \xdef\v_backgrounds_text_next {pbg:\number\numexpr\backgrounds_text_n+\plusone\relax}} % x ?
+\def\anch_backgrounds_text_initialize_next
+ {\global\advance\c_anch_backgrounds_text_n\plusone
+ \edef\v_anch_backgrounds_text_current{pbg:\number\c_anch_backgrounds_text_n}%
+ \xdef\v_anch_backgrounds_text_next {pbg:\number\numexpr\c_anch_backgrounds_text_n+\plusone\relax}} % x ?
-% todo : \synchonizepositionpage{b:\v_backgrounds_text_current}{s:\v_backgrounds_text_current}%
+% todo : \synchonizepositionpage{b:\v_anch_backgrounds_text_current}{s:\v_anch_backgrounds_text_current}%
\ifdefined\totalnoftextbackgrounds
% set in tuc
@@ -54,12 +54,12 @@
\fi
\appendtoks
- \savecurrentvalue\totalnoftextbackgrounds{\number\backgrounds_text_n}%
+ \savecurrentvalue\totalnoftextbackgrounds{\number\c_anch_backgrounds_text_n}%
\to \everybye
% actually we can just ask lua to give us the nofpositions (or a least n<>0)
-\def\backgrounds_text_initialize
+\def\anch_backgrounds_text_initialize
{\ifcase\totalnoftextbackgrounds\else
\enableparpositions
\fi}
@@ -67,7 +67,7 @@
\appendtoks
% a position can be mid paragraph in which case we're behind
% this will change when we move positions to lua
- \backgrounds_text_initialize
+ \anch_backgrounds_text_initialize
\to \everystarttext
%D Some MP
@@ -110,7 +110,7 @@
% \readfile{ward}{}{}
% \stoptextbackground
-\newcount\c_backgrounds_text_level
+\newcount\c_anch_backgrounds_text_level
\installcorenamespace{textbackground}
\installcorenamespace{textbackgroundlevel}
@@ -130,81 +130,81 @@
\unexpanded\def\starttextbackground
{\begingroup
- \advance\c_backgrounds_text_level\plusone
- \dodoubleempty\backgrounds_text_start}
+ \advance\c_anch_backgrounds_text_level\plusone
+ \dodoubleempty\anch_backgrounds_text_start}
-\def\backgrounds_text_start[#tag][#settings]%
+\def\anch_backgrounds_text_start[#tag][#settings]%
{\checktextbackgrounds
\def\currenttextbackground{#tag}%
- \backgrounds_text_initialize_next
+ \anch_backgrounds_text_initialize_next
\ifsecondargument
\setupcurrenttextbackground[#settings]%
\fi
\doifelse{\textbackgroundparameter\c!state}\v!start
- \backgrounds_text_preset_yes
- \backgrounds_text_preset_nop
- \backgrounds_text_start_indeed}
+ \anch_backgrounds_text_preset_yes
+ \anch_backgrounds_text_preset_nop
+ \anch_backgrounds_text_start_indeed}
% todo \backgroundvariable\c!variant
-\let\backgrounds_text_start_indeed\relax
-\let\backgrounds_text_stop_indeed \relax
+\let\anch_backgrounds_text_start_indeed\relax
+\let\anch_backgrounds_text_stop_indeed \relax
\setvalue{\??textbackgroundlevel\v!text}%
- {\let\backgrounds_text_start_indeed\backgrounds_text_start_txt
- \let\backgrounds_text_stop_indeed \dostoptextbackgroundtxt}
+ {\let\anch_backgrounds_text_start_indeed\anch_backgrounds_text_start_txt
+ \let\anch_backgrounds_text_stop_indeed \dostoptextbackgroundtxt}
\setvalue{\??textbackgroundlevel\v!paragraph}%
- {\ifnum\c_backgrounds_text_level>\plusone
- \let\backgrounds_text_start_indeed\backgrounds_text_start_txt
- \let\backgrounds_text_stop_indeed \dostoptextbackgroundtxt
+ {\ifnum\c_anch_backgrounds_text_level>\plusone
+ \let\anch_backgrounds_text_start_indeed\anch_backgrounds_text_start_txt
+ \let\anch_backgrounds_text_stop_indeed \dostoptextbackgroundtxt
\else
- \let\backgrounds_text_start_indeed\backgrounds_text_start_par
- \let\backgrounds_text_stop_indeed \dostoptextbackgroundpar
+ \let\anch_backgrounds_text_start_indeed\anch_backgrounds_text_start_par
+ \let\anch_backgrounds_text_stop_indeed \dostoptextbackgroundpar
\fi}
\setvalue{\??textbackgroundlevel\v!none}%
- {\backgrounds_text_preset_nop}
+ {\anch_backgrounds_text_preset_nop}
-\def\backgrounds_text_preset_nop
- {\let\backgrounds_text_start_indeed\relax
- \let\backgrounds_text_stop_indeed \relax}
+\def\anch_backgrounds_text_preset_nop
+ {\let\anch_backgrounds_text_start_indeed\relax
+ \let\anch_backgrounds_text_stop_indeed \relax}
-\def\backgrounds_text_preset_yes
- {\backgrounds_text_preset_nop
+\def\anch_backgrounds_text_preset_yes
+ {\anch_backgrounds_text_preset_nop
\csname\??textbackgroundlevel\textbackgroundparameter\c!location\endcsname
- \edef\m_backgrounds_text_frame {\textbackgroundparameter\c!frame}%
- \edef\m_backgrounds_text_corner {\textbackgroundparameter\c!corner}%
- \edef\m_backgrounds_text_background{\textbackgroundparameter\c!background}%
- \ifx\m_backgrounds_text_frame\v!on
- \ifx\m_backgrounds_text_corner\v!round
- \let\m_backgrounds_text_frame\!!plustwo
+ \edef\m_anch_backgrounds_text_frame {\textbackgroundparameter\c!frame}%
+ \edef\m_anch_backgrounds_text_corner {\textbackgroundparameter\c!corner}%
+ \edef\m_anch_backgrounds_text_background{\textbackgroundparameter\c!background}%
+ \ifx\m_anch_backgrounds_text_frame\v!on
+ \ifx\m_anch_backgrounds_text_corner\v!round
+ \let\m_anch_backgrounds_text_frame\!!plustwo
\else
- \let\m_backgrounds_text_frame\!!plusone
+ \let\m_anch_backgrounds_text_frame\!!plusone
\fi
\else
- \let\m_backgrounds_text_frame\!!zerocount
+ \let\m_anch_backgrounds_text_frame\!!zerocount
\fi
- \ifx\m_backgrounds_text_background\v!color
- \let\m_backgrounds_text_background\!!plusone
+ \ifx\m_anch_backgrounds_text_background\v!color
+ \let\m_anch_backgrounds_text_background\!!plusone
\else
- \let\m_backgrounds_text_background\!!zerocount
+ \let\m_anch_backgrounds_text_background\!!zerocount
\fi
\startpositionoverlay{\textbackgroundoverlay{\textbackgroundparameter\c!level}}%
- \backgrounds_text_mp_graphic % gets expanded directly
+ \anch_backgrounds_text_mp_graphic % gets expanded directly
\stoppositionoverlay}
-\def\backgrounds_text_mp_graphic
+\def\anch_backgrounds_text_mp_graphic
{\normalexpanded
{\setMPpositiongraphicrange % needs to be optimized
- {\v_backgrounds_anchor_current_b}%
- {\v_backgrounds_anchor_current_e}%
+ {\v_anch_backgrounds_anchor_current_b}%
+ {\v_anch_backgrounds_anchor_current_e}%
{\textbackgroundparameter\c!method}%
- {self=\v_backgrounds_text_current,
+ {self=\v_anch_backgrounds_text_current,
mp=\textbackgroundparameter\c!mp,
gridtype=\textbackgroundparameter\c!alternative,
- filltype=\m_backgrounds_text_background,
- linetype=\m_backgrounds_text_frame,
+ filltype=\m_anch_backgrounds_text_background,
+ linetype=\m_anch_backgrounds_text_frame,
dashtype=\textbackgroundparameter\c!dash,
gridcolor=\textbackgroundparameter\c!framecolor,
linecolor=\textbackgroundparameter\c!framecolor,
@@ -217,31 +217,31 @@
lineradius=\textbackgroundparameter\c!radius}}}
\unexpanded\def\stoptextbackground
- {\backgrounds_text_stop_indeed
+ {\anch_backgrounds_text_stop_indeed
\carryoverpar\endgroup}
\unexpanded\def\starttextbackgroundmanual
{\begingroup
\usetextbackgroundstyleandcolor\c!style\c!color
- \fpos\v_backgrounds_text_current\ignorespaces}
+ \fpos\v_anch_backgrounds_text_current\ignorespaces}
\unexpanded\def\stoptextbackgroundmanual
- {\tpos\v_backgrounds_text_current
+ {\tpos\v_anch_backgrounds_text_current
\endgroup}
-\def\backgrounds_text_start_txt
+\def\anch_backgrounds_text_start_txt
{\ifvmode \dontleavehmode \fi
\begingroup
\usetextbackgroundstyleandcolor\c!style\c!color
- \fpos\v_backgrounds_text_current\ignorespaces}
+ \fpos\v_anch_backgrounds_text_current\ignorespaces}
\def\dostoptextbackgroundtxt
- {\tpos\v_backgrounds_text_current
+ {\tpos\v_anch_backgrounds_text_current
\endgroup}
\newskip\textbackgroundskip
-\def\backgrounds_text_start_par
+\def\anch_backgrounds_text_start_par
{\endgraf % new
\textbackgroundparameter\c!before
\begingroup
@@ -251,12 +251,12 @@
\ifgridsnapping
\doassignsomeskip\textbackgroundparameter\c!topoffset\to\textbackgroundskip
\ifdim\textbackgroundskip>\zeropoint
- \struttedbox{\hbox{\raise\textbackgroundskip\hbox{\fpos\v_backgrounds_text_current}}}%
+ \struttedbox{\hbox{\raise\textbackgroundskip\hbox{\fpos\v_anch_backgrounds_text_current}}}%
\else
- \fpos\v_backgrounds_text_current
+ \fpos\v_anch_backgrounds_text_current
\fi
\else
- \fpos\v_backgrounds_text_current
+ \fpos\v_anch_backgrounds_text_current
\fi
\endgraf % we need a vertical nobreak - 29/06/2004
\endgroup
@@ -305,42 +305,42 @@
\doassignsomeskip\textbackgroundparameter\c!bottomoffset\to\textbackgroundskip
\ifgridsnapping % experimental, pascal (todo: topoffset in same way)
\ifdim\textbackgroundskip>\zeropoint
- \struttedbox\plusone{\hbox{\lower\textbackgroundskip\hbox{\tpos\v_backgrounds_text_current}}}%
+ \struttedbox\plusone{\hbox{\lower\textbackgroundskip\hbox{\tpos\v_anch_backgrounds_text_current}}}%
\else
- \tpos\v_backgrounds_text_current
+ \tpos\v_anch_backgrounds_text_current
\fi
\else
- \tpos\v_backgrounds_text_current
+ \tpos\v_anch_backgrounds_text_current
\fi
\endgraf
\endgroup
\endgraf % new
\textbackgroundparameter\c!after}
-\newcount\backgrounds_text_par_pages
-\newdimen\backgrounds_text_par_height
-\newdimen\backgrounds_text_par_width
+\newcount\c_anch_backgrounds_text_par_pages
+\newdimen\d_anch_backgrounds_text_par_height
+\newdimen\d_anch_backgrounds_text_par_width
\def\calculatetextpardimensions
- {\docalculatetextpardimensions\v_backgrounds_anchor_current_b\v_backgrounds_anchor_current_e\MPparanchor}
+ {\docalculatetextpardimensions\v_anch_backgrounds_anchor_current_b\v_anch_backgrounds_anchor_current_e\MPparanchor}
\def\calculatenexttextpardimensions
- {\docalculatetextpardimensions\v_backgrounds_anchor_next_b\v_backgrounds_anchor_next_e\relax}
+ {\docalculatetextpardimensions\v_anch_backgrounds_anchor_next_b\v_anch_backgrounds_anchor_next_e\relax}
\def\docalculatetextpardimensions#begin#end#par%
- {\backgrounds_text_par_pages\numexpr
+ {\c_anch_backgrounds_text_par_pages\numexpr
\MPp#end-\MPp#begin%
\relax
- \backgrounds_text_par_height\dimexpr
- \ifcase\backgrounds_text_par_pages
+ \d_anch_backgrounds_text_par_height\dimexpr
+ \ifcase\c_anch_backgrounds_text_par_pages
% one page
\MPy#begin-\MPy#end%
\else
% two or more pages
- \ifnum\backgrounds_text_par_pages>\plustwo
- \ifnum\backgrounds_text_par_pages<\plusfive
+ \ifnum\c_anch_backgrounds_text_par_pages>\plustwo
+ \ifnum\c_anch_backgrounds_text_par_pages<\plusfive
% more pages
- \textheight*\numexpr\backgrounds_text_par_pages+\minusone
+ \textheight*\numexpr\c_anch_backgrounds_text_par_pages+\minusone
\else
% keep'm small
\plusfive\textheight % weird value
@@ -350,8 +350,8 @@
\fi
\fi
\relax
- \backgrounds_text_par_width\dimexpr
- \ifcase\backgrounds_text_par_pages
+ \d_anch_backgrounds_text_par_width\dimexpr
+ \ifcase\c_anch_backgrounds_text_par_pages
% one page
\MPx#end-\MPx#begin%
\else
@@ -371,13 +371,13 @@
\ifdim\pagegoal=\maxdimen \else
\calculatenexttextpardimensions
% too tricky
- % \scratchdimen=\backgrounds_text_par_height
+ % \scratchdimen=\d_anch_backgrounds_text_par_height
% \advance\scratchdimen\pagetotal\relax
% \ifdim\scratchdimen>\pagegoal
% \page
% \fi
- \ifdim\backgrounds_text_par_height>\zeropoint
- \ifdim\backgrounds_text_par_height>\mintextparheight\else
+ \ifdim\d_anch_backgrounds_text_par_height>\zeropoint
+ \ifdim\d_anch_backgrounds_text_par_height>\mintextparheight\else
\page % option
\fi
\fi
diff --git a/tex/context/base/anch-pgr.mkiv b/tex/context/base/anch-pgr.mkiv
index c7acc0b32..ebfbb7d1f 100644
--- a/tex/context/base/anch-pgr.mkiv
+++ b/tex/context/base/anch-pgr.mkiv
@@ -61,10 +61,10 @@
\def\dopositionaction#1% test saves hash entry in etex
{\ifcsname\??positionaction#1\endcsname
- \positions_action_indeed{#1}%
+ \anch_positions_action_indeed{#1}%
\fi}
-\def\positions_action_indeed#1%
+\def\anch_positions_action_indeed#1%
{\ifcase\MPp{#1}\relax
\traceposstring\clap\cyan{<#1>}% shouldn't happen too often
\else
@@ -74,7 +74,7 @@
\the\everyinsertpositionaction
\the\everypositionaction
\csname\??positionaction#1\endcsname
- \positions_cleanup_action{#1}}%
+ \anch_positions_cleanup_action{#1}}%
\smashedbox\scratchbox % smashing is really needed else we get problems with too big overlays
\endgroup
\fi}
@@ -87,7 +87,7 @@
% this can probably be done better
-% \def\positions_cleanup_action#1% not in trialtypesetting
+% \def\anch_positions_cleanup_action#1% not in trialtypesetting
% {\ifcsname\??positioncleanup#1\endcsname
% \the\everycleanpositionaction
% \iflocalpositioning
@@ -97,7 +97,7 @@
% \fi
% \fi}
-\def\positions_cleanup_action#1% not in trialtypesetting
+\def\anch_positions_cleanup_action#1% not in trialtypesetting
{\ifcsname\??positioncleanup#1\endcsname
\the\everycleanpositionaction
\iflocalpositioning
@@ -136,10 +136,10 @@
%
% \def\presetpositionanchors % is this still needed?
% {\ifpositioning
-% \positions_preset_anchors
+% \anch_positions_preset_anchors
% \fi}
%
-% \def\positions_preset_anchors
+% \def\anch_positions_preset_anchors
% {\begingroup
% \!!dimena\ifdim\topskip>\strutht\topskip\else\strutht\fi
% \!!dimenb\dimexpr\MPy\textanchor+\MPh\textanchor-\!!dimena\relax
@@ -157,32 +157,32 @@
% as some values are the same .. this one can (at some point) be used
% to provide correction for imposition
-\unexpanded\def\positions_register_page#1% this one is flushed first ! ... can't we avoid this one
+\unexpanded\def\anch_positions_register_page#1% this one is flushed first ! ... can't we avoid this one
{\ifpositioning\ifcase\realpageno\or
\ifdim\printpaperheight=\paperheight
\ifdim\printpaperwidth=\paperwidth
% not needed,
\else
- \positions_register_page_indeed{#1}%
+ \anch_positions_register_page_indeed{#1}%
\fi
\else
- \positions_register_page_indeed{#1}%
+ \anch_positions_register_page_indeed{#1}%
\fi
\fi\fi}
-\def\positions_register_page_indeed#1%
+\def\anch_positions_register_page_indeed#1%
{\setbox#1\hbox{\hpos\pageanchor{\box#1}}}
-\unexpanded\def\positions_place_anchors
+\unexpanded\def\anch_positions_place_anchors
{\ifpositioning
- \positions_place_anchors_yes
+ \anch_positions_place_anchors_yes
\else
- \positions_place_anchors_nop
+ \anch_positions_place_anchors_nop
\fi}
% FOR THE MOMENT DISABLED
%
-% \def\positions_place_anchors_yes % todo : depth pagebox
+% \def\anch_positions_place_anchors_yes % todo : depth pagebox
% {\begingroup
% \setbox\scratchbox\vbox to \textheight
% {\simpletopskipcorrection
@@ -194,7 +194,7 @@
% \hpos\textanchor{\box\scratchbox}%
% \endgroup}
-\def\positions_place_anchors_yes % todo : depth pagebox
+\def\anch_positions_place_anchors_yes % todo : depth pagebox
{\begingroup
\setbox\scratchbox\emptyvbox
\ht\scratchbox\textheight
@@ -203,7 +203,7 @@
\hpos\textanchor{\box\scratchbox}%
\endgroup}
-\def\positions_place_anchors_nop
+\def\anch_positions_place_anchors_nop
{\vskip\textheight}
%D \macros
@@ -271,14 +271,14 @@
\def\positionoverlay % the test prevents too many redundant positions
{\ifpositioning % in (not used) text* position layers
- \expandafter\positions_overlay_indeed
+ \expandafter\anch_positions_overlay_indeed
\else % also \iftrialtypesetting test here?
\expandafter\gobbleoneargument
\fi}
% keep this for a while
%
-% \def\positions_overlay_indeed#1% the test prevents too many redundant positions
+% \def\anch_positions_overlay_indeed#1% the test prevents too many redundant positions
% {\vbox to \overlayheight
% {\doifpositionactionelse{#1::\MPanchoridentifier}%
% {\edef\MPanchorid{#1::\MPanchoridentifier:\MPanchornumber}%
@@ -298,11 +298,11 @@
% {\hbox to \overlaywidth{\hss}}%
% \vfill}}
-\def\positions_overlay_indeed#1%
+\def\anch_positions_overlay_indeed#1%
{\doifpositionactionelse{#1::\MPanchoridentifier}%
- \positions_overlay_yes\positions_overlay_nop{#1}}
+ \anch_positions_overlay_yes\anch_positions_overlay_nop{#1}}
-\def\positions_overlay_yes#1%
+\def\anch_positions_overlay_yes#1%
{\vbox to \overlayheight
{\edef\MPanchorid{#1::\MPanchoridentifier:\MPanchornumber}%
\edef\MPanchor##1{\MPpos\MPanchorid}%
@@ -316,25 +316,25 @@
\box\scratchbox}%
\vfill}}
-% \def\\positions_overlay_nop#1%
+% \def\anch_positions_overlay_nop#1%
% {\setbox\scratchbox\emptyvbox
% \ht\scratchbox\overlayheight
% \wd\scratchbox\overlaywidth
% \box\scratchbox}
-\let\positions_overlay_nop\gobbleoneargument
+\let\anch_positions_overlay_nop\gobbleoneargument
\unexpanded\def\startpositionoverlay
{\iftrialtypesetting
- \expandafter\positions_overlay_start_nop
+ \expandafter\anch_positions_overlay_start_nop
\else
- \expandafter\positions_overlay_start_yes
+ \expandafter\anch_positions_overlay_start_yes
\fi}
-\def\positions_overlay_start_nop#1\stoppositionoverlay
+\def\anch_positions_overlay_start_nop#1\stoppositionoverlay
{}
-\def\positions_overlay_start_yes#1%
+\def\anch_positions_overlay_start_yes#1%
{\def\currentpositionoverlay{#1}}
\unexpanded\def\stoppositionoverlay
@@ -375,14 +375,14 @@
\newbox\positiongraphicbox
\def\startMPpositiongraphic % id setups
- {\dodoublegroupempty\positions_mp_graphic_start}
+ {\dodoublegroupempty\anch_positions_mp_graphic_start}
-\def\positions_mp_graphic_start#1#2#3\stopMPpositiongraphic % tag list mpcode
- {\setgvalue{\??positiongraphic#1}{\positions_mp_graphic_use{#1}{#2}{#3}}}
+\def\anch_positions_mp_graphic_start#1#2#3\stopMPpositiongraphic % tag list mpcode
+ {\setgvalue{\??positiongraphic#1}{\anch_positions_mp_graphic_use{#1}{#2}{#3}}}
\let\stopMPpositiongraphic\relax
-\def\positions_mp_graphic_prepare
+\def\anch_positions_mp_graphic_prepare
{\ifcsname\??gv\currentmpvariableclass:self\endcsname \else
\letvalue{\??gv\currentmpvariableclass:self}\currentposition
\fi
@@ -390,51 +390,51 @@
\letvalue{\??gv\currentmpvariableclass:from}\currentposition
\fi}
-\def\positions_mp_graphic_use#1#2#3%
+\def\anch_positions_mp_graphic_use#1#2#3%
{\begingroup
- \mp_prepare_variables{#2}%
- \positions_mp_graphic_prepare
+ \meta_prepare_variables{#2}%
+ \anch_positions_mp_graphic_prepare
\startMPcode#3\stopMPcode
\endgroup}
\def\MPpositiongraphic
- {\dodoublegroupempty\positions_mp_graphic_direct}
+ {\dodoublegroupempty\anch_positions_mp_graphic_direct}
-\def\positions_mp_graphic_direct#1% tag setups
+\def\anch_positions_mp_graphic_direct#1% tag setups
{\ifcsname\??positionmethod#1\endcsname % method
- \expandafter\positions_mp_graphic_direct_indeed_method
+ \expandafter\anch_positions_mp_graphic_direct_indeed_method
\else\ifcsname\??positiongraphic#1\endcsname
- \doubleexpandafter\positions_mp_graphic_direct_indeed_normal
+ \doubleexpandafter\anch_positions_mp_graphic_direct_indeed_normal
\else
- \doubleexpandafter\positions_mp_graphic_direct_indeed_unknown
+ \doubleexpandafter\anch_positions_mp_graphic_direct_indeed_unknown
\fi\fi{#1}}
-\let\positions_mp_graphic_direct_indeed_unknown\gobbletwoarguments
+\let\anch_positions_mp_graphic_direct_indeed_unknown\gobbletwoarguments
-\def\positions_mp_graphic_direct_indeed_method
- {\positions_mp_graphic_direct_indeed\??positionmethod}
+\def\anch_positions_mp_graphic_direct_indeed_method
+ {\anch_positions_mp_graphic_direct_indeed\??positionmethod}
-\def\positions_mp_graphic_direct_indeed_normal
- {\positions_mp_graphic_direct_indeed\??positiongraphic}
+\def\anch_positions_mp_graphic_direct_indeed_normal
+ {\anch_positions_mp_graphic_direct_indeed\??positiongraphic}
-\def\positions_mp_graphic_direct_indeed#1#2#3% what tag setups
+\def\anch_positions_mp_graphic_direct_indeed#1#2#3% what tag setups
{\begingroup
\setupMPvariables[#2][#3]%
\edef\currentmpvariableclass{#2}%
- \positions_mp_graphic_prepare
+ \anch_positions_mp_graphic_prepare
\ignoreMPboxdepth
- \def\positions_mp_graphic_direct{\positions_mp_graphic_nested{#3}}% takes two extra arguments
+ \def\anch_positions_mp_graphic_direct{\anch_positions_mp_graphic_nested{#3}}% takes two extra arguments
\setbox\positiongraphicbox\hbox
{\ignorespaces\csname#1#2\endcsname\removelastspace}%
\smashbox\positiongraphicbox
\box\positiongraphicbox
\endgroup}
-\def\positions_mp_graphic_nested#1#2#3% nesting used in prikkels / pascal (might go away)
+\def\anch_positions_mp_graphic_nested#1#2#3% nesting used in prikkels / pascal (might go away)
{\begingroup
\setupMPvariables[#2][#1,#3]%
\edef\currentmpvariableclass{#2}%
- \positions_mp_graphic_prepare
+ \anch_positions_mp_graphic_prepare
\getvalue{\??positiongraphic#2}%
\endgroup}%
diff --git a/tex/context/base/anch-pos.mkiv b/tex/context/base/anch-pos.mkiv
index 01a662ae2..42347ada1 100644
--- a/tex/context/base/anch-pos.mkiv
+++ b/tex/context/base/anch-pos.mkiv
@@ -210,7 +210,7 @@
\let\dopositionaction\gobbleoneargument % implemented later
-\def\positions_initialize
+\def\anch_positions_initialize
{\ifpositioning \else
\global\positioningtrue
\dosetpositionpapersize\printpaperwidth\printpaperheight
@@ -220,11 +220,11 @@
{\iftrialtypesetting
\expandafter\gobbleoneargument
\else
- \expandafter\positions_set_only_indeed
+ \expandafter\anch_positions_set_only_indeed
\fi}
-\def\positions_set_only_indeed#1%
- {\positions_initialize
+\def\anch_positions_set_only_indeed#1%
+ {\anch_positions_initialize
\edef\currentposition{#1}%
\dosetposition\currentposition}
@@ -232,11 +232,11 @@
{\iftrialtypesetting
\expandafter\gobbleoneargument
\else
- \expandafter\positions_set_indeed
+ \expandafter\anch_positions_set_indeed
\fi}
-\def\positions_set_indeed#1%
- {\positions_initialize
+\def\anch_positions_set_indeed#1%
+ {\anch_positions_initialize
\edef\currentposition{#1}%
\dosetposition\currentposition
\traceposstring\llap\green{\currentposition>}%
@@ -246,11 +246,11 @@
{\iftrialtypesetting
\expandafter\gobblefourarguments
\else
- \expandafter\positions_set_data_indeed
+ \expandafter\anch_positions_set_data_indeed
\fi}
-\def\positions_set_data_indeed#1#2#3#4%
- {\positions_initialize
+\def\anch_positions_set_data_indeed#1#2#3#4%
+ {\anch_positions_initialize
\hbox
{\edef\currentposition{#1}%
\dosetpositionwhd\currentposition{#2}{#3}{#4}% already \the\dimexpr
@@ -260,19 +260,19 @@
\unexpanded\def\setpositionbox
{\iftrialtypesetting
- \expandafter\positions_set_box_nop
+ \expandafter\anch_positions_set_box_nop
\else
- \expandafter\positions_set_box_yes
+ \expandafter\anch_positions_set_box_yes
\fi}
-\def\positions_set_box_nop#1%
+\def\anch_positions_set_box_nop#1%
{\dowithnextboxcs\flushnextbox}
-\def\positions_set_box_yes#1%
- {\dowithnextbox{\positions_set_box_finish{#1}}}
+\def\anch_positions_set_box_yes#1%
+ {\dowithnextbox{\anch_positions_set_box_finish{#1}}}
-\def\positions_set_box_finish#1%
- {\positions_initialize
+\def\anch_positions_set_box_finish#1%
+ {\anch_positions_initialize
\hbox to \wd\nextbox
{\edef\currentposition{#1}%
\dosetpositionwhd\currentposition{\wd\nextbox}{\ht\nextbox}{\dp\nextbox}% already \the\dimexpr
@@ -286,11 +286,11 @@
{\iftrialtypesetting
\expandafter\gobblefivearguments
\else
- \expandafter\positions_set_plus_indeed
+ \expandafter\anch_positions_set_plus_indeed
\fi}
-\def\positions_set_plus_indeed#1#2#3#4#5%
- {\positions_initialize
+\def\anch_positions_set_plus_indeed#1#2#3#4#5%
+ {\anch_positions_initialize
\hbox % just package
{\edef\currentposition{#1}%
\dosetpositionplus\currentposition{#2}{#3}{#4}{#5}% already \the\dimexpr
@@ -300,19 +300,19 @@
\def\setpositionplus
{\iftrialtypesetting
- \expandafter\positions_set_plus_nop
+ \expandafter\anch_positions_set_plus_nop
\else
- \expandafter\positions_set_plus_yes
+ \expandafter\anch_positions_set_plus_yes
\fi}
-\def\positions_set_plus_nop#1#2%
+\def\anch_positions_set_plus_nop#1#2%
{\dowithnextboxcs\flushnextbox}
-\def\positions_set_plus_yes#1#2%
- {\dowithnextbox{\positions_set_plus_yes_finish{#1}{#2}}}
+\def\anch_positions_set_plus_yes#1#2%
+ {\dowithnextbox{\anch_positions_set_plus_yes_finish{#1}{#2}}}
-\def\positions_set_plus_yes_finish#1#2%
- {\positions_initialize
+\def\anch_positions_set_plus_yes_finish#1#2%
+ {\anch_positions_initialize
\hbox to \nextboxwd
{\edef\currentposition{#1}%
\dosetpositionplus\currentposition{\wd\nextbox}{\ht\nextbox}{\dp\nextbox}{#2}%
@@ -366,7 +366,7 @@
%D Each macro takes an identifier as argument, and the \type
%D {\hpos} and \type {\vpos} also expect box content.
-% \def\xypos{\positions_initialize\dosetposition}
+% \def\xypos{\anch_positions_initialize\dosetposition}
\let\xypos\setpositiononly
@@ -449,11 +449,11 @@
\unexpanded\def\doregisterparoptions
{\iftrialtypesetting \else
\ifinpagebody \else \ifmmode \else \ifinformula \else
- \positions_register_par_options
+ \anch_positions_register_par_options
\fi \fi \fi
\fi}
-\def\positions_register_par_options
+\def\anch_positions_register_par_options
{\global\advance\parposcounter\plusone
\setpositiondataplus
{p:\number\parposcounter}\zeropoint\strutht\strutdp
@@ -525,10 +525,10 @@
\def\analyzenodelocation#1%
{\ifcsname\@@noden#1\endcsname
- \positions_node_location_analyze{#1}{\getnodelocationn{#1}}\zerocount
+ \anch_positions_node_location_analyze{#1}{\getnodelocationn{#1}}\zerocount
\fi}
-\def\positions_node_location_analyze#1#2#3% class n default
+\def\anch_positions_node_location_analyze#1#2#3% class n default
{\begingroup
\donefalse
\ifcase\nodelocationmode
@@ -550,10 +550,10 @@
% \exitloop
\or
% ok for single column
- \positions_node_location_analyze_one
+ \anch_positions_node_location_analyze_one
\or
% acceptable for double column
- \positions_node_location_analyze_two
+ \anch_positions_node_location_analyze_two
\else
\exitloop
\fi
@@ -565,7 +565,7 @@
\setxvalue{\@@nodeo#1}{\the\scratchcounter}%
\endgroup}
-\def\positions_node_location_analyze_one
+\def\anch_positions_node_location_analyze_one
{\ifcase\nodelocationotherp\relax
\exitloop
\else\ifnum\nodelocationotherp<\nodelocationselfp\relax
@@ -580,7 +580,7 @@
\donetrue \advance\scratchcounter\plusone
\fi\fi\fi\fi\fi\fi}
-\def\positions_node_location_analyze_two
+\def\anch_positions_node_location_analyze_two
{\ifcase\nodelocationotherp\relax
\exitloop
\else\ifnum\nodelocationotherp<\nodelocationselfp\relax
diff --git a/tex/context/base/attr-ini.mkiv b/tex/context/base/attr-ini.mkiv
index fb98b903e..842a25a4f 100644
--- a/tex/context/base/attr-ini.mkiv
+++ b/tex/context/base/attr-ini.mkiv
@@ -38,20 +38,20 @@
\ifdefined \s!public \else \def\s!public{public} \fi % for metatex % or hard check later
\unexpanded\def\defineattribute
- {\dodoubleempty\attributes_define}
+ {\dodoubleempty\attr_basics_define}
-\def\attributes_define[#1][#2]% alternatively we can let lua do the housekeeping
+\def\attr_basics_define[#1][#2]% alternatively we can let lua do the housekeeping
{\expandafter\newattribute\csname\??ae:a:#1\endcsname
\expandafter\newconstant \csname\??ae:c:#1\endcsname
- \csname\??ae:c:#1\endcsname\last_allocated_attribute
- \ctxcommand{defineattribute("#1",\number\last_allocated_attribute)}%
+ \csname\??ae:c:#1\endcsname\c_syst_last_allocated_attribute
+ \ctxcommand{defineattribute("#1",\number\c_syst_last_allocated_attribute)}%
\doifnotinset\s!global{#2}{\appendetoks\csname\??ae:a:#1\endcsname\attributeunsetvalue\to\attributesresetlist}%
\doifinset \s!public{#2}{\expandafter\let\csname#1attribute\expandafter\endcsname\csname\??ae:c:#1\endcsname}}
\unexpanded\def\definesystemattribute
- {\dodoubleempty\attributes_define_system}
+ {\dodoubleempty\attr_basics_define_system}
-\def\attributes_define_system[#1][#2]% alternatively we can let lua do the housekeeping
+\def\attr_basics_define_system[#1][#2]% alternatively we can let lua do the housekeeping
{\scratchcounter\ctxcommand{getprivateattribute("#1")}\relax
\expandafter\attributedef\csname\??ae:a:#1\endcsname\scratchcounter
\expandafter\newconstant \csname\??ae:c:#1\endcsname
diff --git a/tex/context/base/back-exp.mkiv b/tex/context/base/back-exp.mkiv
index 7fcb27ff2..b70533e02 100644
--- a/tex/context/base/back-exp.mkiv
+++ b/tex/context/base/back-exp.mkiv
@@ -29,17 +29,17 @@
\definesystemattribute[taggedpar][public]
\unexpanded\def\setelementexporttag
- {\dotripleargument\backend_set_element_export_tag}
+ {\dotripleargument\back_export_set_element_tag}
-\def\back_set_element_export_tag
+\def\back_export_set_element_tag
{\ifthirdargument
- \expandafter \backend_set_element_export_tag_a
+ \expandafter \back_export_set_element_tag_a
\else\ifsecondargument
- \doubleexpandafter\backend_set_element_export_tag_b
+ \doubleexpandafter\back_export_set_element_tag_b
\fi\fi}
-\def\backend_set_element_export_tag_a[#1][#2][#3]{\taggedctxcommand{settagproperty("#1","#2","#3")}}
-\def\backend_set_element_export_tag_a[#1][#2][#3]{\taggedctxcommand{settagproperty("#1","export","#2")}}
+\def\back_export_set_element_tag_a[#1][#2][#3]{\taggedctxcommand{settagproperty("#1","#2","#3")}}
+\def\back_export_set_element_tag_b[#1][#2][#3]{\taggedctxcommand{settagproperty("#1","export","#2")}}
% todo: no need for calls when trialtypesetting
diff --git a/tex/context/base/back-ini.mkiv b/tex/context/base/back-ini.mkiv
index 4324a9eb5..df6a76fcd 100644
--- a/tex/context/base/back-ini.mkiv
+++ b/tex/context/base/back-ini.mkiv
@@ -146,11 +146,11 @@
\let\jobsuffix\empty
-\unexpanded\def\backend_set_job_suffix#1% % checking could happen in mode
+\unexpanded\def\back_job_set_suffix#1% % checking could happen in mode
{\ifx\jobsuffix\empty\else\resetsystemmode\jobsuffix\fi
\edef\jobsuffix{#1}%
\ifx\jobsuffix\empty\else\setsystemmode \jobsuffix\fi}
-\backend_set_job_suffix{pdf} % default
+\back_job_set_suffix{pdf} % default
\protect \endinput
diff --git a/tex/context/base/back-pdf.mkiv b/tex/context/base/back-pdf.mkiv
index 8d4f0d6c7..184294120 100644
--- a/tex/context/base/back-pdf.mkiv
+++ b/tex/context/base/back-pdf.mkiv
@@ -56,7 +56,7 @@
%D This one can be consulted by users although the suffix is also
%D a system mode.
-\backend_set_job_suffix{pdf}
+\back_job_set_suffix{pdf}
%D PDF/X (maybe combine the two lua calls)
@@ -197,7 +197,7 @@
\unexpanded\def\dostartclipping#1#2#3%
{\PointsToBigPoints{#2}\width
\PointsToBigPoints{#3}\height
- \mp_grab_clip_path{#1}\width\height{0 0 m \width\space 0 l \width \height l 0 \height l}%
+ \meta_grab_clip_path{#1}\width\height{0 0 m \width\space 0 l \width \height l 0 \height l}%
\pdfliteral{q 0 w \MPclippath\space W n}}
\unexpanded\def\dostopclipping
@@ -222,13 +222,13 @@
\def\dostartobject#1#2#3#4#5%
{\bgroup
\setbox\objectbox\vbox\bgroup
- \def\backend_stop_object{\egroup\backend_register_object{#1}{#2}}}
+ \def\back_object_stop{\egroup\back_object_register{#1}{#2}}}
\def\dostopobject
- {\backend_stop_object
+ {\back_object_stop
\egroup}
-\def\backend_register_object#1#2%
+\def\back_object_register#1#2%
{\the\pdfbackendeveryxform
\finalizeobjectbox\objectbox
\immediate\pdfxform resources {\pdfbackendcurrentresources}\objectbox
@@ -237,11 +237,13 @@
\def\doresetobjects
{}
+\let\m_back_object_reference\empty
+
\def\doinsertobject#1#2%
{\begingroup
\doifobjectreferencefoundelse{#1}{#2}
- {\dogetobjectreference{#1}{#2}\m_backend_object_reference
- \pdfrefxform\m_backend_object_reference}%
+ {\dogetobjectreference{#1}{#2}\m_back_object_reference
+ \pdfrefxform\m_back_object_reference}%
\donothing
\endgroup}
@@ -251,8 +253,8 @@
{\begingroup
\xdef\lastpredefinedsymbol{#1}%
\settightobject{SYM}{#1}\hbox{\symbol[#1]}% to be checked ... maybe only fitting
- \dogetobjectreference{SYM}{#1}\m_backend_object_reference
- \ctxlua{backends.codeinjections.registersymbol("#1",\m_backend_object_reference)}%
+ \dogetobjectreference{SYM}{#1}\m_back_object_reference
+ \ctxlua{backends.codeinjections.registersymbol("#1",\m_back_object_reference)}%
\endgroup}
% for the moment here
@@ -268,7 +270,7 @@
%D implemented in the \POSTSCRIPT\ driver. This code is
%D somewhat obsolete as we now have metapost embedded.
-% \def\backend_oval_calc#1#2#3%
+% \def\back_oval_calculate#1#2#3%
% {\PointsToBigPoints{\dimexpr#2+#3\relax}#1}
\unexpanded\def\doovalbox#1#2#3#4#5#6#7#8%
@@ -276,17 +278,17 @@
\bgroup
% \scratchdimen#4%
% \divide\scratchdimen\plustwo
-% \backend_oval_calc\xmin \zeropoint\scratchdimen
-% \backend_oval_calc\xmax {#1}{-\scratchdimen}%
-% \backend_oval_calc\ymax {#2}{-\scratchdimen}%
-% \backend_oval_calc\ymin {-#3}\scratchdimen
+% \back_oval_calculate\xmin \zeropoint\scratchdimen
+% \back_oval_calculate\xmax {#1}{-\scratchdimen}%
+% \back_oval_calculate\ymax {#2}{-\scratchdimen}%
+% \back_oval_calculate\ymin {-#3}\scratchdimen
% \advance\scratchdimen by #5%
-% \backend_oval_calc\xxmin \zeropoint\scratchdimen
-% \backend_oval_calc\xxmax {#1}{-\scratchdimen}%
-% \backend_oval_calc\yymax {#2}{-\scratchdimen}%
-% \backend_oval_calc\yymin {-#3}\scratchdimen
-% \backend_oval_calc\stroke{#4}\zeropoint
-% \backend_oval_calc\radius{#5}\zeropoint
+% \back_oval_calculate\xxmin \zeropoint\scratchdimen
+% \back_oval_calculate\xxmax {#1}{-\scratchdimen}%
+% \back_oval_calculate\yymax {#2}{-\scratchdimen}%
+% \back_oval_calculate\yymin {-#3}\scratchdimen
+% \back_oval_calculate\stroke{#4}\zeropoint
+% \back_oval_calculate\radius{#5}\zeropoint
%
\PointsToBigPoints{#4} \stroke
\PointsToBigPoints{#5} \radius
diff --git a/tex/context/base/buff-ini.mkiv b/tex/context/base/buff-ini.mkiv
index 3fe9f18dd..aa8ac8d1f 100644
--- a/tex/context/base/buff-ini.mkiv
+++ b/tex/context/base/buff-ini.mkiv
@@ -28,66 +28,66 @@
{\ctxcommand{doifelsebuffer("#1")}}
\unexpanded\def\resetbuffer
- {\dosingleempty\buffers_reset}
+ {\dosingleempty\buff_reset}
-\def\buffers_reset[#1]%
+\def\buff_reset[#1]%
{\ctxcommand{erasebuffer("#1")}}
\setuvalue{\e!start\v!buffer}%
{\bgroup
\obeylines
- \dosingleempty\buffers_start}
+ \dosingleempty\buff_start}
-\def\buffers_start[#1]%
- {\buffers_start_indeed{}{#1}{\e!start\v!buffer}{\e!stop\v!buffer}}
+\def\buff_start[#1]%
+ {\buff_start_indeed{}{#1}{\e!start\v!buffer}{\e!stop\v!buffer}}
-\def\buffers_start_indeed#1#2#3#4% \donothing needed !
- {\normalexpanded{\buffers_pickup{#2}{#3}{#4}{}{\buffers_stop{#4}}}}
+\def\buff_start_indeed#1#2#3#4% \donothing needed !
+ {\normalexpanded{\buff_pickup{#2}{#3}{#4}{}{\buff_stop{#4}}}}
\unexpanded\def\grabbufferdata % was: \dostartbuffer
{\bgroup
\obeylines
- \doquadrupleempty\buffers_grab_direct_indeed}
+ \doquadrupleempty\buff_grab_direct_indeed}
\unexpanded\def\grabbufferdatadirect % name start stop
- {\buffers_start_indeed\empty}
+ {\buff_start_indeed\empty}
-\def\buffers_grab_direct_indeed % [category] [name] [start] [stop]
+\def\buff_grab_direct_indeed % [category] [name] [start] [stop]
{\iffourthargument
- \expandafter\buffers_grab_direct_indeed_a
+ \expandafter\buff_grab_direct_indeed_a
\else
- \expandafter\buffers_grab_direct_indeed_b
+ \expandafter\buff_grab_direct_indeed_b
\fi}
-\def\buffers_grab_direct_indeed_a[#1][#2][#3][#4]{\buffers_start_indeed{#1}{#2}{#3}{#4}}
-\def\buffers_grab_direct_indeed_b[#1][#2][#3][#4]{\buffers_start_indeed\empty{#1}{#2}{#3}}
+\def\buff_grab_direct_indeed_a[#1][#2][#3][#4]{\buff_start_indeed{#1}{#2}{#3}{#4}}
+\def\buff_grab_direct_indeed_b[#1][#2][#3][#4]{\buff_start_indeed\empty{#1}{#2}{#3}}
-\unexpanded\def\buffers_pickup#1#2#3#4#5% name, startsequence, stopsequence, before, after
+\unexpanded\def\buff_pickup#1#2#3#4#5% name, startsequence, stopsequence, before, after
{#4%
\bgroup
\edef\catcodetableofbuffer{\number\catcodetable}%
\ctxcommand{erasebuffer("#1")}%
\setcatcodetable\vrbcatcodes
- \def\buffers_finish
+ \def\buff_finish
{\egroup
#5}%
- \def\buffers_gobble##1#3% is detokenize needed? TEST
+ \def\buff_gobble##1#3% is detokenize needed? TEST
%{\ctxcommand{grabbuffer("#1","#2","#3",\!!bs\detokenize{##1}\!!es)} % space ?
{\ctxcommand{grabbuffer("#1","#2","#3",\!!bs>##1\!!es,\catcodetableofbuffer)}% space ?
- \buffers_gobble
- \buffers_finish}%
- \buffers_gobble}
+ \buff_gobble
+ \buff_finish}%
+ \buff_gobble}
-\unexpanded\def\buffers_stop#1%
+\unexpanded\def\buff_stop#1%
{\egroup
\getvalue{#1}}
\unexpanded\def\setbuffer
- {\dosingleempty\buffers_set}
+ {\dosingleempty\buff_set}
\let\endbuffer\relax
-\def\buffers_set[#1]#2\endbuffer % seldom used so we just pass #2
+\def\buff_set[#1]#2\endbuffer % seldom used so we just pass #2
{\ctxcommand{assignbuffer("#1",\!!bs\detokenize{#2}\!!es,\number\catcodetable)}}
% beware, never adapt the global buffer settings, actually we might introduce
@@ -105,9 +105,9 @@
\appendtoks
\global\advance\nofdefinedbuffers\plusone
\setexpandedbufferparameter\c!number{\number\nofdefinedbuffers}%
- \setuevalue{\e!start\currentbuffer}{\buffers_start_indeed
+ \setuevalue{\e!start\currentbuffer}{\buff_start_indeed
{\currentbuffer}{def-\number\nofdefinedbuffers}{\e!start\currentbuffer}{\e!stop\currentbuffer}}%
- \setuevalue{\e!get\currentbuffer}{\buffers_get_stored
+ \setuevalue{\e!get\currentbuffer}{\buff_get_stored
{\currentbuffer}{def-\number\nofdefinedbuffers}}%
\to \everydefinebuffer
@@ -115,21 +115,21 @@
\def\thedefinedbuffer#1{def-\namedbufferparameter{#1}\c!number}
\unexpanded\def\getbuffer % no [settings yet]
- {\dosingleempty\buffers_get}
+ {\dosingleempty\buff_get}
-\unexpanded\def\buffers_get[#1]% [name]
+\unexpanded\def\buff_get[#1]% [name]
{\namedbufferparameter\empty\c!before
\doifelsenothing{#1}
- {\buffers_get_stored_indeed\empty}
- {\processcommalist[#1]\buffers_get_stored_indeed}%
+ {\buff_get_stored_indeed\empty}
+ {\processcommalist[#1]\buff_get_stored_indeed}%
\namedbufferparameter\empty\c!after}
-\unexpanded\def\buffers_get_stored#1#2%
+\unexpanded\def\buff_get_stored#1#2%
{\namedbufferparameter{#1}\c!before
- \buffers_get_stored_indeed{#2}%
+ \buff_get_stored_indeed{#2}%
\namedbufferparameter{#1}\c!after}
-\unexpanded\def\buffers_get_stored_indeed#1%
+\unexpanded\def\buff_get_stored_indeed#1%
{\ctxcommand{getbuffer("#1")}}
\definebuffer
@@ -141,12 +141,12 @@
\c!after=]
\unexpanded\def\processTEXbuffer
- {\dosingleempty\buffers_process_tex}
+ {\dosingleempty\buff_process_tex}
-\def\buffers_process_tex[#1]%
+\def\buff_process_tex[#1]%
{\pushcatcodetable
\catcodetable\ctxcatcodes % \setcatcodetable
- \buffers_get_stored_indeed{#1}%
+ \buff_get_stored_indeed{#1}%
\popcatcodetable}
% only mkiv:
@@ -158,9 +158,9 @@
% \savebuffer[x][temp.log]
\unexpanded\def\savebuffer
- {\dodoubleempty\buffers_save}
+ {\dodoubleempty\buff_save}
-\def\buffers_save[#1][#2]%
+\def\buff_save[#1][#2]%
{\ctxcommand{savebuffer("#1","#2")}}
%D Experimental: no expansion of commands in buffer!
@@ -174,16 +174,16 @@
%
% \ctxluabuffer[what] \ctxluabuffer
-\unexpanded\def\ctxluabuffer {\dosingleempty\buffers_ctxlua}
-\unexpanded\def\mkvibuffer {\dosingleempty\buffers_mkvi}
+\unexpanded\def\ctxluabuffer {\dosingleempty\buff_ctxlua}
+\unexpanded\def\mkvibuffer {\dosingleempty\buff_mkvi}
% what was: \mkvibufferraw
-\def\buffers_ctxlua[#1]{\ctxcommand{getbufferctxlua("#1")}}
-\def\buffers_mkvi [#1]{\ctxcommand{getbuffermkvi("#1")}}
+\def\buff_ctxlua[#1]{\ctxcommand{getbufferctxlua("#1")}}
+\def\buff_mkvi [#1]{\ctxcommand{getbuffermkvi("#1")}}
% used elsewhere
-\unexpanded\def\doprocesstexbuffer#1{\buffers_process_tex[#1]} % still used?
+\unexpanded\def\doprocesstexbuffer#1{\buff_process_tex[#1]} % still used?
\let\dostartbuffer\grabbufferdata % for old times sake
diff --git a/tex/context/base/buff-ver.mkiv b/tex/context/base/buff-ver.mkiv
index 9f767be32..67ee200d5 100644
--- a/tex/context/base/buff-ver.mkiv
+++ b/tex/context/base/buff-ver.mkiv
@@ -428,7 +428,7 @@
\normalexpanded{\dotypeblockverbatim{\e!start\currenttyping}{\e!stop\currenttyping}}}
\unexpanded\def\dotypeblockverbatim#1#2%
- {\buffers_pickup{_typing_}{#1}{#2}{}{\dodotypeblockverbatim{#1}{#2}}} % was dowithbuffer
+ {\buff_pickup{_typing_}{#1}{#2}{}{\dodotypeblockverbatim{#1}{#2}}} % was dowithbuffer
\def\dodotypeblockverbatim#1#2%
{\secondstageinitializetyping
@@ -452,7 +452,8 @@
\unexpanded\def\dostoptyping#1% hm, currenttyping
{\stoppacked
\typingparameter\c!after
- \normalexpanded{\egroup\checknextindentation[\typingparameter\c!indentnext]}%
+ \useindentnextparameter\typingparameter
+ \egroup
\dorechecknextindentation}
%D Line numbering for files is combined with filtering, while
diff --git a/tex/context/base/catc-act.mkiv b/tex/context/base/catc-act.mkiv
index 91940ad4f..df228c203 100644
--- a/tex/context/base/catc-act.mkiv
+++ b/tex/context/base/catc-act.mkiv
@@ -19,17 +19,17 @@
%D \macros
%D {installactivecharacter}
-\let\m_system_catcodes_temp\empty
+\let\m_syst_catcodes_temp\empty
\normalprotected\def\installactivecharacter#1 %
- {\edef\m_system_catcodes_temp{\detokenize{#1}}%
- \c_system_catcodes_c\expandafter`\m_system_catcodes_temp\relax % relax needed
+ {\edef\m_syst_catcodes_temp{\detokenize{#1}}%
+ \c_syst_catcodes_c\expandafter`\m_syst_catcodes_temp\relax % relax needed
\expandafter\startextendcatcodetable
- \expandafter\ctxcatcodes\expandafter\catcode\the\c_system_catcodes_c\activecatcode
+ \expandafter\ctxcatcodes\expandafter\catcode\the\c_syst_catcodes_c\activecatcode
\stopextendcatcodetable
- \letcatcodecommand \ctxcatcodes \c_system_catcodes_c \m_system_catcodes_temp \relax
+ \letcatcodecommand \ctxcatcodes \c_syst_catcodes_c \m_syst_catcodes_temp \relax
\ifnum\currentcatcodetable=\ctxcatcodes \setcatcodetable\ctxcatcodes \fi
- \let\m_system_catcodes_temp\empty}
+ \let\m_syst_catcodes_temp\empty}
%D \macros
%D {defineactivecharacter}
@@ -37,30 +37,30 @@
%D Use this one with care, esp in combination with catcode
%D vectors. There are better ways now.
-\setnewconstant\c_system_catcodes_hack\tildeasciicode % also defined in catc-ini.mkiv
+\setnewconstant\c_syst_catcodes_hack\tildeasciicode % also defined in catc-ini.mkiv
\normalprotected\def\defineactivecharacter #1#2 #3% uses \doifnumberelse which is not yet defined
- {\c_system_catcodes_c\uccode\c_system_catcodes_hack
- \if#1"\uccode\c_system_catcodes_hack\expandafter\doifnumberelse\expandafter{\string#1#2}\empty #1#2\else
- \uccode\c_system_catcodes_hack\expandafter\doifnumberelse\expandafter{\string#1#2}\empty`#1#2\fi
- \catcode\uccode\c_system_catcodes_hack\activecatcode
- \uppercase{\def\m_system_catcodes_temp{~}}% brrr
- \uccode\c_system_catcodes_hack\c_system_catcodes_c
- \expandafter\expandafter\expandafter\def\expandafter\m_system_catcodes_temp\expandafter
- {\expandafter\system_catcodes_handle\m_system_catcodes_temp{#3}}%
- \let\m_system_catcodes_temp\empty}
+ {\c_syst_catcodes_c\uccode\c_syst_catcodes_hack
+ \if#1"\uccode\c_syst_catcodes_hack\expandafter\doifnumberelse\expandafter{\string#1#2}\empty #1#2\else
+ \uccode\c_syst_catcodes_hack\expandafter\doifnumberelse\expandafter{\string#1#2}\empty`#1#2\fi
+ \catcode\uccode\c_syst_catcodes_hack\activecatcode
+ \uppercase{\def\m_syst_catcodes_temp{~}}% brrr
+ \uccode\c_syst_catcodes_hack\c_syst_catcodes_c
+ \expandafter\expandafter\expandafter\def\expandafter\m_syst_catcodes_temp\expandafter
+ {\expandafter\syst_catcodes_handle\m_syst_catcodes_temp{#3}}%
+ \let\m_syst_catcodes_temp\empty}
\chardef\activecharactermode\plusone % overloading still backward compatible
-\def\system_catcodes_handle
+\def\syst_catcodes_handle
{\ifcase\activecharactermode
- \expandafter\system_catcodes_handle_nop
+ \expandafter\syst_catcodes_handle_nop
\else
- \expandafter\system_catcodes_handle_yes
+ \expandafter\syst_catcodes_handle_yes
\fi}
-\def\system_catcodes_handle_yes#1#2{#2}
-\def\system_catcodes_handle_nop#1#2{\noexpand#1}
+\def\syst_catcodes_handle_yes#1#2{#2}
+\def\syst_catcodes_handle_nop#1#2{\noexpand#1}
\normalprotected\def\makecharacteractive #1 %
{\catcode`#1\activecatcode}
diff --git a/tex/context/base/catc-ini.mkiv b/tex/context/base/catc-ini.mkiv
index 0bf9c81c8..2fd0917b8 100644
--- a/tex/context/base/catc-ini.mkiv
+++ b/tex/context/base/catc-ini.mkiv
@@ -35,8 +35,8 @@
\setnewconstant\ignorecatcode 9
\setnewconstant\spacecatcode 10
\setnewconstant\lettercatcode 11
-\setnewconstant\othercatcode 12 \let\other \othercatcode % the short names are to be avoided
-\setnewconstant\activecatcode 13 \let\active\activecatcode % the short names are to be avoided
+\setnewconstant\othercatcode 12 % finally obsolete: \let\other \othercatcode
+\setnewconstant\activecatcode 13 % finally obsolete: \let\active\activecatcode
\setnewconstant\commentcatcode 14
\setnewconstant\invalidcatcode 15
@@ -86,16 +86,16 @@
\xdef\outputnewlinechar{^^J}%
\endgroup}
-\newcount\c_system_catcodes_n \c_system_catcodes_n\zerocount % 0 = signal, so advance before allocate
-\newcount\c_system_catcodes_a
-\newcount\c_system_catcodes_b
-\newcount\c_system_catcodes_c
+\newcount\c_syst_catcodes_n \c_syst_catcodes_n\zerocount % 0 = signal, so advance before allocate
+\newcount\c_syst_catcodes_a
+\newcount\c_syst_catcodes_b
+\newcount\c_syst_catcodes_c
\normalprotected\def\newcatcodetable#1% we could move the cctdefcounter to lua
- {\global\advance\c_system_catcodes_n\plusone
- \expandafter\xdef\csname\??qm:n:\number\c_system_catcodes_n\endcsname{\string#1}% logging
+ {\global\advance\c_syst_catcodes_n\plusone
+ \expandafter\xdef\csname\??qm:n:\number\c_syst_catcodes_n\endcsname{\string#1}% logging
\newconstant#1%
- #1\c_system_catcodes_n
+ #1\c_syst_catcodes_n
\ctxlua{catcodes.register("\expandafter\gobbleoneargument\string#1",\number#1)}}
\newtoks \everysetdefaultcatcodes
@@ -147,7 +147,7 @@
%D mechanism? Future versions of \MKIV\ might only use
%D active characters for very special cases.
-\setnewconstant\c_system_catcodes_hack\tildeasciicode
+\setnewconstant\c_syst_catcodes_hack\tildeasciicode
%D Once a catcode is assigned, the next assignments will happen
%D faster. We predefine some prefixes ahead of mult-sys.
@@ -157,70 +157,70 @@
\def\??qu{@@qu} % ued : \unexpanded\def
\def\??qm{@@qm} % \meaning
-\def\letcatcodecommand{\afterassignment\system_catcodes_let_a\c_system_catcodes_a}
-\def\defcatcodecommand{\afterassignment\system_catcodes_def_a\c_system_catcodes_a}
-\def\uedcatcodecommand{\afterassignment\system_catcodes_ued_a\c_system_catcodes_a}
+\def\letcatcodecommand{\afterassignment\syst_catcodes_let_a\c_syst_catcodes_a}
+\def\defcatcodecommand{\afterassignment\syst_catcodes_def_a\c_syst_catcodes_a}
+\def\uedcatcodecommand{\afterassignment\syst_catcodes_ued_a\c_syst_catcodes_a}
-\def\system_catcodes_let_a{\afterassignment\system_catcodes_let_b\c_system_catcodes_b}
-\def\system_catcodes_def_a{\afterassignment\system_catcodes_def_b\c_system_catcodes_b}
-\def\system_catcodes_ued_a{\afterassignment\system_catcodes_ued_b\c_system_catcodes_b}
+\def\syst_catcodes_let_a{\afterassignment\syst_catcodes_let_b\c_syst_catcodes_b}
+\def\syst_catcodes_def_a{\afterassignment\syst_catcodes_def_b\c_syst_catcodes_b}
+\def\syst_catcodes_ued_a{\afterassignment\syst_catcodes_ued_b\c_syst_catcodes_b}
-\def\system_catcodes_let_b % each time
- {\ifcsname\??ql:\number\c_system_catcodes_a:\number\c_system_catcodes_b\endcsname
- \csname\??ql:\number\c_system_catcodes_a:\number\c_system_catcodes_b\expandafter\endcsname
+\def\syst_catcodes_let_b % each time
+ {\ifcsname\??ql:\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname
+ \csname\??ql:\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\expandafter\endcsname
\else
- \expandafter\system_catcodes_let_c
+ \expandafter\syst_catcodes_let_c
\fi}
-\def\system_catcodes_def_b % each time
- {\ifcsname\??qd:\number\c_system_catcodes_a:\number\c_system_catcodes_b\endcsname
- \csname\??qd:\number\c_system_catcodes_a:\number\c_system_catcodes_b\expandafter\endcsname
+\def\syst_catcodes_def_b % each time
+ {\ifcsname\??qd:\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname
+ \csname\??qd:\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\expandafter\endcsname
\else
- \expandafter\system_catcodes_def_c
+ \expandafter\syst_catcodes_def_c
\fi}
-\def\system_catcodes_ued_b % each time
- {\ifcsname\??qu:\number\c_system_catcodes_a:\number\c_system_catcodes_b\endcsname
- \csname\??qu:\number\c_system_catcodes_a:\number\c_system_catcodes_b\expandafter\endcsname
+\def\syst_catcodes_ued_b % each time
+ {\ifcsname\??qu:\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname
+ \csname\??qu:\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\expandafter\endcsname
\else
- \expandafter\system_catcodes_ued_c
+ \expandafter\syst_catcodes_ued_c
\fi}
-\def\system_catcodes_let_c % only first time
- {\expandafter\gdef\csname\??ql:\number\c_system_catcodes_a:\number\c_system_catcodes_b\expandafter\endcsname\expandafter
- {\expandafter\let\csname\??qm:\number\c_system_catcodes_a:\number\c_system_catcodes_b\endcsname}%
- \system_catcodes_reinstate_unexpanded
- \csname\??ql:\number\c_system_catcodes_a:\number\c_system_catcodes_b\endcsname}
+\def\syst_catcodes_let_c % only first time
+ {\expandafter\gdef\csname\??ql:\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\expandafter\endcsname\expandafter
+ {\expandafter\let\csname\??qm:\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname}%
+ \syst_catcodes_reinstate_unexpanded
+ \csname\??ql:\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname}
-\def\system_catcodes_def_c % only first time (we could use \normalexpanded here)
- {\expandafter\gdef\csname\??qd:\number\c_system_catcodes_a:\number\c_system_catcodes_b\expandafter\endcsname
+\def\syst_catcodes_def_c % only first time (we could use \normalexpanded here)
+ {\expandafter\gdef\csname\??qd:\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\expandafter\endcsname
\expandafter##\expandafter1\expandafter
- {\expandafter\def\csname\??qm:\number\c_system_catcodes_a:\number\c_system_catcodes_b\endcsname{##1}}%
- \system_catcodes_reinstate_normal
- \csname\??qd:\number\c_system_catcodes_a:\number\c_system_catcodes_b\endcsname}
+ {\expandafter\def\csname\??qm:\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname{##1}}%
+ \syst_catcodes_reinstate_normal
+ \csname\??qd:\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname}
-\def\system_catcodes_ued_c % only first time
- {\expandafter\gdef\csname\??qu:\number\c_system_catcodes_a:\number\c_system_catcodes_b\expandafter\endcsname
+\def\syst_catcodes_ued_c % only first time
+ {\expandafter\gdef\csname\??qu:\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\expandafter\endcsname
\expandafter##\expandafter1\expandafter
- {\expandafter\normalprotected\expandafter\def\csname\??qm:\number\c_system_catcodes_a:\number\c_system_catcodes_b\endcsname{##1}}%
- \system_catcodes_reinstate_unexpanded
- \csname\??qu:\number\c_system_catcodes_a:\number\c_system_catcodes_b\endcsname}
+ {\expandafter\normalprotected\expandafter\def\csname\??qm:\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname{##1}}%
+ \syst_catcodes_reinstate_unexpanded
+ \csname\??qu:\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname}
-\def\reinstatecatcodecommand{\afterassignment\system_catcodes_reinstate_normal\c_system_catcodes_b}
+\def\reinstatecatcodecommand{\afterassignment\syst_catcodes_reinstate_normal\c_syst_catcodes_b}
-\def\system_catcodes_reinstate_normal % can be used when a direct definition has been done
+\def\syst_catcodes_reinstate_normal % can be used when a direct definition has been done
{\begingroup % and the selector has been lost
- \uccode\c_system_catcodes_hack\c_system_catcodes_b
- \catcode\uccode\c_system_catcodes_hack\activecatcode
- \uppercase{\xdef~{\noexpand\catcodecommand{\number\c_system_catcodes_b}}}%
+ \uccode\c_syst_catcodes_hack\c_syst_catcodes_b
+ \catcode\uccode\c_syst_catcodes_hack\activecatcode
+ \uppercase{\xdef~{\noexpand\catcodecommand{\number\c_syst_catcodes_b}}}%
\endgroup}
-\def\system_catcodes_reinstate_unexpanded % can be used when a direct definition has been done
+\def\syst_catcodes_reinstate_unexpanded % can be used when a direct definition has been done
{\begingroup % and the selector has been lost
- \uccode\c_system_catcodes_hack\c_system_catcodes_b
- \catcode\uccode\c_system_catcodes_hack\activecatcode
- \uppercase{\normalprotected\xdef~{\noexpand\catcodecommand{\number\c_system_catcodes_b}}}%
+ \uccode\c_syst_catcodes_hack\c_syst_catcodes_b
+ \catcode\uccode\c_syst_catcodes_hack\activecatcode
+ \uppercase{\normalprotected\xdef~{\noexpand\catcodecommand{\number\c_syst_catcodes_b}}}%
\endgroup}
\newconstant\defaultcatcodetable
@@ -245,30 +245,30 @@
%D what the next macros do. Saving the catcodes can be
%D disabled by saying \type{\localcatcodestrue}.
-\newcount\c_system_catcodes_level
+\newcount\c_syst_catcodes_level
\normalprotected\def\pushcatcodetable
- {\advance\c_system_catcodes_level\plusone
- \system_catcodes_trace_push
- \expandafter\chardef\csname\??qm:t:\number\c_system_catcodes_level\endcsname\currentcatcodetable}
+ {\advance\c_syst_catcodes_level\plusone
+ \syst_catcodes_trace_push
+ \expandafter\chardef\csname\??qm:t:\number\c_syst_catcodes_level\endcsname\currentcatcodetable}
\normalprotected\def\popcatcodetable
- {\ifcase\c_system_catcodes_level
- \system_catcodes_trace_nesting_error
+ {\ifcase\c_syst_catcodes_level
+ \syst_catcodes_trace_nesting_error
\else
- \expandafter\catcodetable\csname\??qm:t:\number\c_system_catcodes_level\endcsname
- \system_catcodes_trace_pop
- \advance\c_system_catcodes_level\minusone
+ \expandafter\catcodetable\csname\??qm:t:\number\c_syst_catcodes_level\endcsname
+ \syst_catcodes_trace_pop
+ \advance\c_syst_catcodes_level\minusone
\fi}
-\normalprotected\def\system_catcodes_trace_nesting_error
+\normalprotected\def\syst_catcodes_trace_nesting_error
{\immediate\write16{}%
- \immediate\write16{Fatal error: catcode push/pop mismatch. Fix this! (restore level: \number\c_system_catcodes_level)}\wait\end
+ \immediate\write16{Fatal error: catcode push/pop mismatch. Fix this! (restore level: \number\c_syst_catcodes_level)}\wait\end
\immediate\write16{}}
\normalprotected\def\restorecatcodes % takes previous level
- {\ifnum\c_system_catcodes_level>\plusone
- \expandafter\catcodetable\csname\??qm:t:\number\numexpr\c_system_catcodes_level-1\relax\endcsname
+ {\ifnum\c_syst_catcodes_level>\plusone
+ \expandafter\catcodetable\csname\??qm:t:\number\numexpr\c_syst_catcodes_level-1\relax\endcsname
\fi}
% \newtoks\everycatcodetable
@@ -276,7 +276,7 @@
\normalprotected\def\setcatcodetable#1%
{\catcodetable#1%
% \the\everycatcodetable
- \system_catcodes_trace_set}
+ \syst_catcodes_trace_set}
%D Handy for debugging:
%D
@@ -285,15 +285,15 @@
%D \stoptyping
\normalprotected\def\tracecatcodetables
- {\def\system_catcodes_trace_set {\system_catcodes_trace{set \catcodetablename\space at \number\c_system_catcodes_level}}%
- \def\system_catcodes_trace_push{\system_catcodes_trace{push \catcodetablename\space from \system_catcodes_prev\space at \number\c_system_catcodes_level}}%
- \def\system_catcodes_trace_pop {\system_catcodes_trace{pop \catcodetablename\space to \system_catcodes_prev\space at \number\c_system_catcodes_level}}}
+ {\def\syst_catcodes_trace_set {\syst_catcodes_trace{set \catcodetablename\space at \number\c_syst_catcodes_level}}%
+ \def\syst_catcodes_trace_push{\syst_catcodes_trace{push \catcodetablename\space from \syst_catcodes_prev\space at \number\c_syst_catcodes_level}}%
+ \def\syst_catcodes_trace_pop {\syst_catcodes_trace{pop \catcodetablename\space to \syst_catcodes_prev\space at \number\c_syst_catcodes_level}}}
-\def\system_catcodes_trace#1{\immediate\write16{[#1]}}
+\def\syst_catcodes_trace#1{\immediate\write16{[#1]}}
-\def\system_catcodes_prev
- {\ifnum\numexpr\c_system_catcodes_level-1\relax>\zerocount
- \csname\??qm:n:\number\csname\??qm:t:\number\numexpr\c_system_catcodes_level-1\relax\endcsname\endcsname
+\def\syst_catcodes_prev
+ {\ifnum\numexpr\c_syst_catcodes_level-1\relax>\zerocount
+ \csname\??qm:n:\number\csname\??qm:t:\number\numexpr\c_syst_catcodes_level-1\relax\endcsname\endcsname
\else
-%
\fi}
@@ -305,9 +305,9 @@
-%
\fi}
-\let\system_catcodes_trace_set \empty
-\let\system_catcodes_trace_push\empty
-\let\system_catcodes_trace_pop \empty
+\let\syst_catcodes_trace_set \empty
+\let\syst_catcodes_trace_push\empty
+\let\syst_catcodes_trace_pop \empty
\protect
diff --git a/tex/context/base/colo-ext.mkiv b/tex/context/base/colo-ext.mkiv
index 12af6798a..c95c919aa 100644
--- a/tex/context/base/colo-ext.mkiv
+++ b/tex/context/base/colo-ext.mkiv
@@ -48,10 +48,10 @@
\unexpanded\def\registercolorintent#1#2%
{\setevalue{\??colorintent#1}{\attribute\colorintentattribute\ctxcommand{registercolorintent('#2')} }}
-\unexpanded\def\colors_trigger_intent
+\unexpanded\def\colo_intents_set
{\ctxcommand{enablecolorintents()}%
- \unexpanded\gdef\colors_trigger_intent##1{\csname\??colorintent##1\endcsname}%
- \colors_trigger_intent}
+ \unexpanded\gdef\colo_intents_set##1{\csname\??colorintent##1\endcsname}%
+ \colo_intents_set}
\registercolorintent{knockout} {knockout}
\registercolorintent{overprint}{overprint}
@@ -62,7 +62,7 @@
\unexpanded\def\startcolorintent[#1]%
{\pushattribute\colorintentattribute
- \colors_trigger_intent{#1}}
+ \colo_intents_set{#1}}
\unexpanded\def\stopcolorintent
{\popattribute\colorintentattribute}
@@ -77,17 +77,17 @@
\let\stoptextcolorintent \relax
\appendtoks
- \colors_set_text_intent
+ \colo_intents_set_text
\to \everysetupcolors
-\let\p_colors_intent\empty
+\let\p_colo_intent\empty
-\def\colors_set_text_intent
- {\edef\p_colors_intent{\colorsparameter\c!intent}%
- \ifx\p_colors_intent\v!none \else
- \unexpanded\xdef\starttextcolorintent{\colors_trigger_intent{\p_colors_intent}}%
- \glet\colors_set_text_intent\relax
- \colors_trigger_intent\p_colors_intent
+\def\colo_intents_set_text
+ {\edef\p_colo_intent{\colorsparameter\c!intent}%
+ \ifx\p_colo_intent\v!none \else
+ \unexpanded\xdef\starttextcolorintent{\colo_intents_set{\p_colo_intent}}%
+ \glet\colo_intents_set_text\relax
+ \colo_intents_set\p_colo_intent
\fi}
\appendtoks \starttextcolorintent \to \everystarttextproperties
diff --git a/tex/context/base/colo-grp.mkiv b/tex/context/base/colo-grp.mkiv
index a6cf0fbf3..8c6d4df6b 100644
--- a/tex/context/base/colo-grp.mkiv
+++ b/tex/context/base/colo-grp.mkiv
@@ -48,25 +48,25 @@
\installcorenamespace{colorgroup}
\installcorenamespace{colorgroupsetter}
-\newcount\c_colors_group_n % scratch counter
+\newcount\c_colo_groups_n % scratch counter
\unexpanded\def\definecolorgroup % sort of obsolete, just use palets directly
- {\dotripleempty\colors_define_color_group}
+ {\dotripleempty\colo_groups_define}
-\def\colors_define_color_group
+\def\colo_groups_define
{\ifthirdargument
- \expandafter\colors_define_color_group_normal
+ \expandafter\colo_groups_define_normal
\else
- \expandafter\colors_define_color_group_checked
+ \expandafter\colo_groups_define_checked
\fi}
-\def\colors_define_color_group_normal[#1][#2][#3]%
- {\c_colors_group_n\zerocount
- \processcommalist[#3]{\colors_define_color_group_entry{#1}{#2}}}
+\def\colo_groups_define_normal[#1][#2][#3]%
+ {\c_colo_groups_n\zerocount
+ \processcommalist[#3]{\colo_groups_define_entry{#1}{#2}}}
-\def\colors_define_color_group_checked[#1][#2][#3]%
+\def\colo_groups_define_checked[#1][#2][#3]%
{\doifinstringelse{:}{#2}
- {\colors_define_color_group_normal[#1][\v!rgb][#2]}
+ {\colo_groups_define_normal[#1][\v!rgb][#2]}
{\doloop % inherited
{\ifcsname\??colorgroup#2:\recurselevel\endcsname
\setevalue{\??colorgroup#1:\recurselevel}{\csname\??colorgroup#2:\recurselevel\endcsname}%
@@ -74,9 +74,9 @@
\exitloop
\fi}}}
-\def\colors_define_color_group_entry#1#2#3% name mode specification
- {\advance\c_colors_group_n\plusone
- \csname\??colorgroupsetter\ifcsname\??colorgroupssetter#2\endcsname#2\else\s!rgb\fi\endcsname[#1:\the\c_colors_group_n][#3:0:0:0:0]}
+\def\colo_groups_define_entry#1#2#3% name mode specification
+ {\advance\c_colo_groups_n\plusone
+ \csname\??colorgroupsetter\ifcsname\??colorgroupssetter#2\endcsname#2\else\s!rgb\fi\endcsname[#1:\the\c_colo_groups_n][#3:0:0:0:0]}
\setvalue{\??colorgroupsetter\s!gray}[#1][#2:#3]{\definecolor[#1][s=#2]}
\setvalue{\??colorgroupsetter\s!rgb }[#1][#2:#3:#4:#5]{\definecolor[#1][r=#2,g=#3,b=#4]}
diff --git a/tex/context/base/colo-ini.mkiv b/tex/context/base/colo-ini.mkiv
index 1e75c29a2..00181f722 100644
--- a/tex/context/base/colo-ini.mkiv
+++ b/tex/context/base/colo-ini.mkiv
@@ -43,13 +43,13 @@
%D
%D These options are communicated by means of:
-\newconditional\c_colors_rgb_supported
-\newconditional\c_colors_cmyk_supported
-\newconditional\c_colors_spot_supported % backend driven
-\newconditional\c_colors_weight_gray \settrue\c_colors_weight_gray
-\newconditional\c_colors_convert_gray \settrue\c_colors_convert_gray
-\newconditional\c_colors_enabled
-\newconditional\c_colors_expanded
+\newconditional\c_colo_rgb_supported
+\newconditional\c_colo_cmyk_supported
+\newconditional\c_colo_spot_supported % backend driven
+\newconditional\c_colo_weight_gray \settrue\c_colo_weight_gray
+\newconditional\c_colo_convert_gray \settrue\c_colo_convert_gray
+\newconditional\c_colo_enabled
+\newconditional\c_colo_expanded
\let\currentcolormodel \empty
\let\currentcolorname \empty
@@ -64,6 +64,7 @@
\installcorenamespace{colorpaletspecification}
\installcorenamespace{colorpalet}
\installcorenamespace{colorstack}
+\installcorenamespace{colorconversions}
%D \macros
%D {definecolor,defineglobalcolor,definenamedcolor,definespotcolor,definemultitonecolor,
@@ -90,12 +91,12 @@
%D
%D \getbuffer \typebuffer
-\unexpanded\def\definecolor {\dodoubleargument\colors_define}
-\unexpanded\def\defineglobalcolor {\dodoubleargument\colors_define_global}
-\unexpanded\def\definenamedcolor {\dodoubleargument\colors_define_named}
-\unexpanded\def\definespotcolor {\dotripleargument\colors_define_spot}
-\unexpanded\def\definemultitonecolor{\doquadrupleempty\colors_define_multitone}
-\unexpanded\def\definetransparency {\dodoubleargument\colors_define_transpancy}
+\unexpanded\def\definecolor {\dodoubleargument\colo_basics_define}
+\unexpanded\def\defineglobalcolor {\dodoubleargument\colo_basics_define_global}
+\unexpanded\def\definenamedcolor {\dodoubleargument\colo_basics_define_named}
+\unexpanded\def\definespotcolor {\dotripleargument\colo_basics_define_spot}
+\unexpanded\def\definemultitonecolor{\doquadrupleempty\colo_basics_define_multitone}
+\unexpanded\def\definetransparency {\dodoubleargument\colo_basics_define_transpancy}
%D \macros
%D {startcolor,stopcolor,color,graycolor}
@@ -119,35 +120,35 @@
\unexpanded\def\switchtocolor[#1]{\csname#1\endcsname}
-%unexpanded\def\color [#1]{\groupedcommand{\colors_activate{#1}}{}}
+%unexpanded\def\color [#1]{\groupedcommand{\colo_helpers_activate{#1}}{}}
\unexpanded\def\color [#1]{\bgroup
- \def\g_color{\colors_activate{#1}}%
+ \def\g_color{\colo_helpers_activate{#1}}%
\afterassignment\g_color
\let\nexttoken}
-%unexpanded\def\graycolor [#1]{\groupedcommand{\colors_set_model\s!gray\colors_activate{#1}}{}} % special, all embeded also gray
+%unexpanded\def\graycolor [#1]{\groupedcommand{\colo_helpers_set_model\s!gray\colo_helpers_activate{#1}}{}} % special, all embeded also gray
\unexpanded\def\graycolor [#1]{\bgroup
- \def\g_color{\colors_set_model\s!gray\colors_activate{#1}}%
+ \def\g_color{\colo_helpers_set_model\s!gray\colo_helpers_activate{#1}}%
\afterassignment\g_color
\let\nexttoken}
\unexpanded\def\startcolor [#1]{\begingroup
- \colors_activate{#1}}
+ \colo_helpers_activate{#1}}
\unexpanded\def\stopcolor {\endgroup}
-%unexpanded\def\colored [#1]{\groupedcommand{\colors_define[\@colored@][#1]\colors_activate\@colored@}{}}
+%unexpanded\def\colored [#1]{\groupedcommand{\colo_basics_define[\@colored@][#1]\colo_helpers_activate\@colored@}{}}
\unexpanded\def\colored [#1]{\bgroup
- \def\g_color{\colors_define[\@colored@][#1]\colors_activate\@colored@}%
+ \def\g_color{\colo_basics_define[\@colored@][#1]\colo_helpers_activate\@colored@}%
\afterassignment\g_color
\let\nexttoken}
\unexpanded\def\fastcolored[#1]#2{\begingroup % is this command still needed?
\dodefinefastcolor[\@colored@][#1]%
- \colors_activate\@colored@
+ \colo_helpers_activate\@colored@
#2%
\endgroup}
@@ -159,7 +160,7 @@
\def\getcolorattributevalue#1#2% obsolete, use \thecolorattribute instead ...
{\begingroup
- \colors_activate{#1}%
+ \colo_helpers_activate{#1}%
\normalexpanded{\endgroup\edef\noexpand#2%
{\ifnum\attribute\colorattribute=\attributeunsetvalue\else\number\attribute\colorattribute\fi}}}
@@ -202,70 +203,73 @@
\installdirectcommandhandler \??color {colors}
-\let\colors_show_message\gobblethreearguments
+\let\colo_helpers_show_message\gobblethreearguments
% \newtoks\everysetupcolors
-\let\v_colors_freeze_state\s!false
-\let\v_colors_weight_state\s!false
+\let\v_colo_freeze_state\s!false
+\let\v_colo_weight_state\s!false
-\appendtoks % we could use \directcolorsparameter here
+\setvalue{\??colorconversions\v!yes}%
+ {\settrue \c_colo_convert_gray}
+
+\setvalue{\??colorconversions\v!always}%
+ {\settrue \c_colo_convert_gray
+ \setfalse\c_colo_rgb_supported
+ \setfalse\c_colo_cmyk_supported}
+
+\appendtoks
%
- \doifelse{\colorsparameter\c!spot }\v!yes \settrue \setfalse\c_colors_spot_supported
- \doifelse{\colorsparameter\c!expansion}\v!yes \settrue \setfalse\c_colors_expanded
- \doifelse{\colorsparameter\c!factor }\v!no \setfalse\settrue \c_colors_weight_gray
- \doifelse{\colorsparameter\c!rgb }\v!yes \settrue \setfalse\c_colors_rgb_supported
- \doifelse{\colorsparameter\c!cmyk }\v!yes \settrue \setfalse\c_colors_cmyk_supported
- \doifelse{\colorsparameter\c!state }\v!start\settrue \setfalse\c_colors_enabled
+ \doifelse{\directcolorsparameter\c!spot }\v!yes \settrue \setfalse\c_colo_spot_supported
+ \doifelse{\directcolorsparameter\c!expansion}\v!yes \settrue \setfalse\c_colo_expanded
+ \doifelse{\directcolorsparameter\c!factor }\v!no \setfalse\settrue \c_colo_weight_gray
+ \doifelse{\directcolorsparameter\c!rgb }\v!yes \settrue \setfalse\c_colo_rgb_supported
+ \doifelse{\directcolorsparameter\c!cmyk }\v!yes \settrue \setfalse\c_colo_cmyk_supported
+ \doifelse{\directcolorsparameter\c!state }\v!start\settrue \setfalse\c_colo_enabled
%
- \ifconditional\c_colors_weight_gray
- \let\v_colors_weight_state\s!true
+ \ifconditional\c_colo_weight_gray
+ \let\v_colo_weight_state\s!true
\else
- \let\v_colors_weight_state\s!false
+ \let\v_colo_weight_state\s!false
\fi
%
- \ifconditional\c_colors_expanded
- \let\v_colors_freeze_state\s!true
+ \ifconditional\c_colo_expanded
+ \let\v_colo_freeze_state\s!true
\else
- \let\v_colors_freeze_state\s!false
+ \let\v_colo_freeze_state\s!false
\fi
%
- \setfalse\c_colors_convert_gray
- \processaction
- [\colorsparameter\c!conversion] % no == never (was different in mkii)
- [ \v!yes=>\settrue \c_colors_convert_gray,
- \v!always=>\settrue \c_colors_convert_gray
- \setfalse\c_colors_rgb_supported
- \setfalse\c_colors_cmyk_supported]%
- \ifconditional\c_colors_rgb_supported \colors_show_message\m!colors9\v!rgb \fi
- \ifconditional\c_colors_cmyk_supported\colors_show_message\m!colors9\v!cmyk\fi
- \colors_setup_current_model
+ \setfalse\c_colo_convert_gray
+ \getvalue{\??colorconversions\directcolorsparameter\c!conversion}% could be a nice \ifcsname
+ %
+ \ifconditional\c_colo_rgb_supported \colo_helpers_show_message\m!colors9\v!rgb \fi
+ \ifconditional\c_colo_cmyk_supported\colo_helpers_show_message\m!colors9\v!cmyk\fi
+ \colo_helpers_set_current_model
\to \everysetupcolors
\appendtoks
\setupcolors[\c!state=\v!start]%
\ctxcommand{enablecolor()}% % this can as well happen when
\ctxcommand{enabletransparency()}% % the handler is defined in lua
- \let\colors_show_message\showmessage
+ \let\colo_helpers_show_message\showmessage
\to \everyjob
%D We provide stacking independent of grouping.
-\newcount\c_colors_nesting
-
+\newcount\c_colo_nesting
\unexpanded\def\pushcolor[#1]%
- {\global\advance\c_colors_nesting\plusone
- \expandafter\edef\csname\??colorstack\number\c_colors_nesting\endcsname
+ {\global\advance\c_colo_nesting\plusone
+ \expandafter\edef\csname\??colorstack\number\c_colo_nesting\endcsname
{\attribute\colormodelattribute \the\attribute\colormodelattribute
\attribute\colorattribute \the\attribute\colorattribute
\attribute\transparencyattribute\the\attribute\transparencyattribute
\relax}% stack
- \colors_activate{#1}}
+ \colo_helpers_activate{#1}}
\unexpanded\def\popcolor
- {\csname\??colorstack\number\c_colors_nesting\endcsname
- \global\advance\c_colors_nesting\minusone}
+ {\csname\??colorstack\number\c_colo_nesting\endcsname
+ \global\advance\c_colo_nesting\minusone}
%D In this documentation we will not go into too much details
%D on palets. Curious users can find more information on this
@@ -332,29 +336,29 @@
%D This saves us some typing in for instance the modules that
%D deal with pretty verbatim typesetting.
-\let\m_colors_palet_tmp\empty
+\let\m_colo_palets_tmp\empty
\unexpanded\def\definepalet
- {\dodoubleargument\colors_define_palet}
+ {\dodoubleargument\colo_palets_define}
-\unexpanded\def\colors_define_palet[#1][#2]% todo
+\unexpanded\def\colo_palets_define[#1][#2]% todo
{\doifassignmentelse{#2}
- {%\colors_show_message\m!colors6{#1}%
- \let\m_colors_palet_tmp\empty
+ {%\colo_helpers_show_message\m!colors6{#1}%
+ \let\m_colo_palets_tmp\empty
\setevalue{\??colorpaletspecification#1}{#2}%
- \processcommalist[#2]{\colors_define_palet_one{#1}}%
- \letvalue{\??colorpalet#1}\m_colors_palet_tmp
- \let\m_colors_palet_tmp\empty}
+ \processcommalist[#2]{\colo_palets_define_one{#1}}%
+ \letvalue{\??colorpalet#1}\m_colo_palets_tmp
+ \let\m_colo_palets_tmp\empty}
{\ifcsname\??colorpaletspecification#2\endcsname
- \normalexpanded{\colors_define_palet[#1][\csname\??colorpaletspecification#2\endcsname]}%
+ \normalexpanded{\colo_palets_define[#1][\csname\??colorpaletspecification#2\endcsname]}%
\fi}}
-\def\colors_define_palet_one#1#2% get rid of { } in #2
- {\colors_define_palet_two{#1}[#2]}%
+\def\colo_palets_define_one#1#2% get rid of { } in #2
+ {\colo_palets_define_two{#1}[#2]}%
-\def\colors_define_palet_two#1[#2=#3]%
- {\edef\m_colors_palet_tmp{\ifx\m_colors_palet_tmp\empty\else\m_colors_palet_tmp,\fi#2}%
- \colors_define_palet_set{#1}{#2}{#3}}%
+\def\colo_palets_define_two#1[#2=#3]%
+ {\edef\m_colo_palets_tmp{\ifx\m_colo_palets_tmp\empty\else\m_colo_palets_tmp,\fi#2}%
+ \colo_palets_define_set{#1}{#2}{#3}}%
\let\paletsize\!!zerocount
@@ -381,9 +385,9 @@
\newtoks\everysetuppalet
\unexpanded\def\setuppalet
- {\dosingleempty\colors_setup_palet}
+ {\dosingleempty\colo_palets_setup}
-\def\colors_setup_palet[#1]%
+\def\colo_palets_setup[#1]%
{\edef\currentcolorpalet{#1}%
\ifx\currentcolorpalet\empty
% seems to be a reset
@@ -391,12 +395,12 @@
\else\ifcsname\??colorpalet\currentcolorpalet\endcsname
\edef\currentcolorprefix{#1:}%
\else
- \colors_show_message\m!colors7\currentcolorpalet
+ \colo_helpers_show_message\m!colors7\currentcolorpalet
\let\currentcolorpalet\empty
\let\currentcolorprefix\empty
\fi\fi
\the\everysetuppalet
- \color_initialize_maintextcolor}
+ \colo_helpers_initialize_maintextcolor}
%D \macros
%D {showpalet}
@@ -519,39 +523,39 @@
% draw btex test etex withprescript \mptexcolor{blue} ;
% \stopMPpage
-\unexpanded\def\setcolormodel[#1]% % beware, \setupcolors will overload this, so this one is
- {\colors_set_model{#1}} % only for local usage
+\unexpanded\def\setcolormodel[#1]% % beware, \setupcolors will overload this, so this one is
+ {\colo_helpers_set_model{#1}} % only for local usage
-\def\colors_set_model#1% direct
+\def\colo_helpers_set_model#1% direct
{\edef\currentcolormodel{#1}%
- \ctxcommand{setcolormodel('\currentcolormodel',\v_colors_weight_state)}} % sets attribute at lua end
+ \ctxcommand{setcolormodel('\currentcolormodel',\v_colo_weight_state)}} % sets attribute at lua end
-\colors_set_model\s!all
+\colo_helpers_set_model\s!all
-\def\colors_setup_current_model
- {\ifconditional\c_colors_enabled
- \ifconditional\c_colors_rgb_supported
- \ifconditional\c_colors_cmyk_supported
- \colors_set_model\s!all
+\def\colo_helpers_set_current_model
+ {\ifconditional\c_colo_enabled
+ \ifconditional\c_colo_rgb_supported
+ \ifconditional\c_colo_cmyk_supported
+ \colo_helpers_set_model\s!all
\else
- \colors_set_model\s!rgb
+ \colo_helpers_set_model\s!rgb
\fi
\else
- \ifconditional\c_colors_cmyk_supported
- \colors_set_model\s!cmyk
+ \ifconditional\c_colo_cmyk_supported
+ \colo_helpers_set_model\s!cmyk
\else
- \ifconditional\c_colors_convert_gray
- \colors_set_model\s!gray
+ \ifconditional\c_colo_convert_gray
+ \colo_helpers_set_model\s!gray
\else
- \colors_set_model\s!none
+ \colo_helpers_set_model\s!none
\fi
\fi
\fi
\else
- \ifconditional\c_colors_convert_gray
- \colors_set_model\s!gray
+ \ifconditional\c_colo_convert_gray
+ \colo_helpers_set_model\s!gray
\else
- \colors_set_model\s!none
+ \colo_helpers_set_model\s!none
\fi
\fi}
@@ -567,14 +571,14 @@
\letvalue{\??colorsetter-}\empty % used?
\letvalue{\??transparencysetter-}\empty % used?
-\def\colors_activate % two-step is not that much faster but less tracing
+\def\colo_helpers_activate % two-step is not that much faster but less tracing
{\ifx\currentcolorprefix\empty
- \expandafter\colors_activate_nop
+ \expandafter\colo_helpers_activate_nop
\else
- \expandafter\colors_activate_yes
+ \expandafter\colo_helpers_activate_yes
\fi}
-\def\colors_activate_yes#1%
+\def\colo_helpers_activate_yes#1%
{\edef\currentcolorname{#1}%
\ifcsname\??colorsetter\currentcolorprefix\currentcolorname\endcsname
\csname\??colorsetter\currentcolorprefix\currentcolorname\endcsname
@@ -584,14 +588,14 @@
\csname\??transparencysetter\currentcolorname\endcsname
\fi\fi}
-\def\colors_activate_nop#1%
+\def\colo_helpers_activate_nop#1%
{\edef\currentcolorname{#1}%
\ifcsname\??colorsetter\currentcolorname\endcsname
\csname\??colorsetter\currentcolorname\endcsname
\csname\??transparencysetter\currentcolorname\endcsname
\fi}
-\let\dousecolorparameter\colors_activate
+\let\dousecolorparameter\colo_helpers_activate
\unexpanded\def\dousecolorhashparameter#1#2%
{\ifcsname#1#2\endcsname
@@ -610,43 +614,43 @@
\let\dosetcolorattribute\dousecolorhashparameter % for a while
-\unexpanded\def\deactivatecolor
+\unexpanded\def\deactivatecolor % sort of public but a bad name
{\let\currentcolorname\s!black
\attribute\colorattribute\attributeunsetvalue
\attribute\transparencyattribute\attributeunsetvalue}
-\def\colors_define[#1][#2]%
- {\ctxcommand{defineprocesscolor("#1","#2",false,\v_colors_freeze_state)}%
- \unexpanded\setvalue{#1}{\colors_activate{#1}}}
+\def\colo_basics_define[#1][#2]%
+ {\ctxcommand{defineprocesscolor("#1","#2",false,\v_colo_freeze_state)}%
+ \unexpanded\setvalue{#1}{\colo_helpers_activate{#1}}}
-\def\colors_define_global[#1][#2]%
- {\ctxcommand{defineprocesscolor("#1","#2",true,\v_colors_freeze_state)}%
- \unexpanded\setgvalue{#1}{\colors_activate{#1}}}
+\def\colo_basics_define_global[#1][#2]%
+ {\ctxcommand{defineprocesscolor("#1","#2",true,\v_colo_freeze_state)}%
+ \unexpanded\setgvalue{#1}{\colo_helpers_activate{#1}}}
-\def\colors_define_named[#1][#2]%
- {\ctxcommand{defineprocesscolor("#1","#2",false,\v_colors_freeze_state)}%
- \unexpanded\setvalue{#1}{\colors_activate{#1}}}
+\def\colo_basics_define_named[#1][#2]%
+ {\ctxcommand{defineprocesscolor("#1","#2",false,\v_colo_freeze_state)}%
+ \unexpanded\setvalue{#1}{\colo_helpers_activate{#1}}}
\def\dodefinefastcolor[#1][#2]% still not fast but ok (might change)
- {\ctxcommand{defineprocesscolor("#1","#2",false,\v_colors_freeze_state)}%
- \unexpanded\setvalue{#1}{\colors_activate{#1}}}
+ {\ctxcommand{defineprocesscolor("#1","#2",false,\v_colo_freeze_state)}%
+ \unexpanded\setvalue{#1}{\colo_helpers_activate{#1}}}
% Spotcolors used setxvalue but that messes up currentcolor
% and probably no global is needed either but they are global
% at the lua end (true argument) so we keep that if only because
% spot colors often are a document wide property
-\def\colors_define_spot[#1][#2][#3]%
+\def\colo_basics_define_spot[#1][#2][#3]%
{\ctxcommand{definespotcolor("#1","#2","#3",true)}%
- \unexpanded\setgvalue{#1}{\colors_activate{#1}}}
+ \unexpanded\setgvalue{#1}{\colo_helpers_activate{#1}}}
-\def\colors_define_multitone[#1][#2][#3][#4]%
+\def\colo_basics_define_multitone[#1][#2][#3][#4]%
{\ctxcommand{definemultitonecolor("#1","#2","#3","#4",true)}%
- \unexpanded\setgvalue{#1}{\colors_activate{#1}}}
+ \unexpanded\setgvalue{#1}{\colo_helpers_activate{#1}}}
%D Transparencies (only):
-\def\colors_define_transpancy[#1][#2]%
+\def\colo_basics_define_transpancy[#1][#2]%
{\ctxcommand{definetransparency("#1",#2)}}
% A goodie that replaces the startMPcolor hackery
@@ -672,17 +676,17 @@
% \stoptext
\unexpanded\def\defineintermediatecolor
- {\dotripleempty\colors_define_intermediate}
+ {\dotripleempty\colo_basics_define_intermediate}
-\def\colors_define_intermediate[#1][#2][#3]% \dotripleempty adds {} inside []
- {\colors_define_intermediate_indeed[#1][#2][#3]}
+\def\colo_basics_define_intermediate[#1][#2][#3]% \dotripleempty adds {} inside []
+ {\colo_basics_define_intermediate_indeed[#1][#2][#3]}
-\def\colors_define_intermediate_indeed[#1][#2,#3,#4][#5]%
+\def\colo_basics_define_intermediate_indeed[#1][#2,#3,#4][#5]%
{\ctxcommand{defineintermediatecolor("#1","#2",
\thecolorattribute{#3},\thecolorattribute{#4},
\thetransparencyattribute{#3},\thetransparencyattribute{#4},
"#5",false,\iffreezecolors true\else false\fi)}% not global
- \unexpanded\setvalue{#1}{\colors_activate{#1}}}
+ \unexpanded\setvalue{#1}{\colo_helpers_activate{#1}}}
%D \macros
%D {doifcolorelse, doifcolor}
@@ -740,67 +744,67 @@
\def\s!themaintextcolor{themaintextcolor}
\appendtoks
- \deactivatecolor
- \ifx\maintextcolor\empty\else\colors_activate\maintextcolor\fi
+ \deactivatecolor % public?
+ \ifx\maintextcolor\empty\else\colo_helpers_activate\maintextcolor\fi
\to \everybeforeoutput
-\def\colors_switch_to_maintextcolor#1%
+\def\colo_helpers_switch_to_maintextcolor#1%
{\let\maintextcolor\s!themaintextcolor
- \definecolor[\maintextcolor][#1]%
- \colors_activate\maintextcolor
+ \definecolor[\maintextcolor][#1]% can be fast one
+ \colo_helpers_activate\maintextcolor
\ctxcommand{registermaintextcolor(\thecolorattribute\maintextcolor)}}
\unexpanded\def\starttextcolor[#1]%
{\doifsomething{#1}
- {\colors_switch_to_maintextcolor{#1}}}
+ {\colo_helpers_switch_to_maintextcolor{#1}}}
\let\stoptextcolor\relax
-\let\p_colors_textcolor\empty
+\let\p_colo_textcolor\empty
-\def\color_initialize_maintextcolor
- {\edef\p_colors_textcolor{\colorsparameter\c!textcolor}%
- \ifx\p_colors_textcolor\empty
- \colors_switch_to_maintextcolor\defaulttextcolor
+\def\colo_helpers_initialize_maintextcolor
+ {\edef\p_colo_textcolor{\directcolorsparameter\c!textcolor}%
+ \ifx\p_colo_textcolor\empty
+ \colo_helpers_switch_to_maintextcolor\defaulttextcolor
\else
- \colors_switch_to_maintextcolor\p_colors_textcolor
+ \colo_helpers_switch_to_maintextcolor\p_colo_textcolor
\fi}
-\appendtoks \color_initialize_maintextcolor \to \everyjob
-\appendtoks \color_initialize_maintextcolor \to \everysetupcolors
+\appendtoks \colo_helpers_initialize_maintextcolor \to \everyjob
+\appendtoks \colo_helpers_initialize_maintextcolor \to \everysetupcolors
-\def\colors_inherited_direct_cs#1{\csname\??colorsetter \ifcsname\??colorsetter #1\endcsname#1\fi\endcsname}
-\def\colors_inherited_direct_ca#1{\csname\??colorattribute \ifcsname\??colorattribute #1\endcsname#1\fi\endcsname}
-\def\colors_inherited_direct_ts#1{\csname\??transparencysetter \ifcsname\??transparencysetter #1\endcsname#1\fi\endcsname}
-\def\colors_inherited_direct_ta#1{\csname\??transparencyattribute\ifcsname\??transparencyattribute#1\endcsname#1\fi\endcsname}
+\def\colo_helpers_inherited_direct_cs#1{\csname\??colorsetter \ifcsname\??colorsetter #1\endcsname#1\fi\endcsname}
+\def\colo_helpers_inherited_direct_ca#1{\csname\??colorattribute \ifcsname\??colorattribute #1\endcsname#1\fi\endcsname}
+\def\colo_helpers_inherited_direct_ts#1{\csname\??transparencysetter \ifcsname\??transparencysetter #1\endcsname#1\fi\endcsname}
+\def\colo_helpers_inherited_direct_ta#1{\csname\??transparencyattribute\ifcsname\??transparencyattribute#1\endcsname#1\fi\endcsname}
-\def\colors_inherited_palet_ca#1#2{\csname\??colorattribute \ifcsname\??colorattribute \??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
-\def\colors_inherited_palet_cs#1#2{\csname\??colorsetter \ifcsname\??colorsetter \??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
-\def\colors_inherited_palet_ta#1#2{\csname\??transparencyattribute\ifcsname\??transparencyattribute\??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
-\def\colors_inherited_palet_ts#1#2{\csname\??transparencysetter \ifcsname\??transparencysetter \??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
+\def\colo_helpers_inherited_palet_ca#1#2{\csname\??colorattribute \ifcsname\??colorattribute \??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
+\def\colo_helpers_inherited_palet_cs#1#2{\csname\??colorsetter \ifcsname\??colorsetter \??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
+\def\colo_helpers_inherited_palet_ta#1#2{\csname\??transparencyattribute\ifcsname\??transparencyattribute\??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
+\def\colo_helpers_inherited_palet_ts#1#2{\csname\??transparencysetter \ifcsname\??transparencysetter \??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
-\let\colors_set_value\setvalue
+\let\colo_helpers_set_value\setvalue
\appendtoks
- \ifconditional\c_colors_expanded
- \let\colors_set_value\setevalue
+ \ifconditional\c_colo_expanded
+ \let\colo_helpers_set_value\setevalue
\else
- \let\colors_set_value\setvalue
+ \let\colo_helpers_set_value\setvalue
\fi
\to \everysetupcolors
-\def\colors_define_palet_set#1#2#3%
+\def\colo_palets_define_set#1#2#3%
{\doifassignmentelse{#3}% \definepalet[test][xx={y=.4}]
{\definecolor[\??colorpalet#1:#2][#3]%
- \colors_set_value{\??colorsetter #1:#2}{\colors_inherited_palet_ca{#1}{#2}}%
- \colors_set_value{\??colorattribute #1:#2}{\colors_inherited_palet_cs{#1}{#2}}%
- \colors_set_value{\??transparencysetter #1:#2}{\colors_inherited_palet_ta{#1}{#2}}%
- \colors_set_value{\??transparencyattribute#1:#2}{\colors_inherited_palet_ts{#1}{#2}}}
+ \colo_helpers_set_value{\??colorsetter #1:#2}{\colo_helpers_inherited_palet_ca{#1}{#2}}%
+ \colo_helpers_set_value{\??colorattribute #1:#2}{\colo_helpers_inherited_palet_cs{#1}{#2}}%
+ \colo_helpers_set_value{\??transparencysetter #1:#2}{\colo_helpers_inherited_palet_ta{#1}{#2}}%
+ \colo_helpers_set_value{\??transparencyattribute#1:#2}{\colo_helpers_inherited_palet_ts{#1}{#2}}}
{\ifcsname\??colorsetter#3\endcsname % \definepalet[test][xx=green]
- \colors_set_value{\??colorsetter #1:#2}{\colors_inherited_direct_cs{#3}}%
- \colors_set_value{\??colorattribute #1:#2}{\colors_inherited_direct_ca{#3}}%
- \colors_set_value{\??transparencysetter #1:#2}{\colors_inherited_direct_ts{#3}}%
- \colors_set_value{\??transparencyattribute#1:#2}{\colors_inherited_direct_ta{#3}}%
+ \colo_helpers_set_value{\??colorsetter #1:#2}{\colo_helpers_inherited_direct_cs{#3}}%
+ \colo_helpers_set_value{\??colorattribute #1:#2}{\colo_helpers_inherited_direct_ca{#3}}%
+ \colo_helpers_set_value{\??transparencysetter #1:#2}{\colo_helpers_inherited_direct_ts{#3}}%
+ \colo_helpers_set_value{\??transparencyattribute#1:#2}{\colo_helpers_inherited_direct_ta{#3}}%
\else
% not entered when making format
\localundefine{\??colorsetter #1:#2}%
@@ -815,10 +819,10 @@
\setvalue{\??colorattribute currentcolor}{\the\attribute\colorattribute} % for mpcolor
\setvalue{\??transparencyattribute currentcolor}{\the\attribute\transparencyattribute} % for mpcolor
-\def\colors_inherited_ca#1{\csname\??colorattribute \ifcsname\??colorattribute \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorattribute #1\endcsname#1\fi\fi\endcsname}
-\def\colors_inherited_cs#1{\csname\??colorsetter \ifcsname\??colorsetter \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorsetter #1\endcsname#1\fi\fi\endcsname}
-\def\colors_inherited_ta#1{\csname\??transparencyattribute\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencyattribute#1\endcsname#1\fi\fi\endcsname}
-\def\colors_inherited_ts#1{\csname\??transparencysetter \ifcsname\??transparencysetter \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencysetter #1\endcsname#1\fi\fi\endcsname}
+\def\colo_helpers_inherited_current_ca#1{\csname\??colorattribute \ifcsname\??colorattribute \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorattribute #1\endcsname#1\fi\fi\endcsname}
+\def\colo_helpers_inherited_current_cs#1{\csname\??colorsetter \ifcsname\??colorsetter \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorsetter #1\endcsname#1\fi\fi\endcsname}
+\def\colo_helpers_inherited_current_ta#1{\csname\??transparencyattribute\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencyattribute#1\endcsname#1\fi\fi\endcsname}
+\def\colo_helpers_inherited_current_ts#1{\csname\??transparencysetter \ifcsname\??transparencysetter \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencysetter #1\endcsname#1\fi\fi\endcsname}
%D Low level defs:
@@ -827,10 +831,10 @@
\unexpanded\def\colordefalt#1#2{\setevalue{\??transparencyattribute#1}{#2}\setvalue {\??transparencysetter#1}{\attribute\transparencyattribute#2 }}
\unexpanded\def\colordefagt#1#2{\setxvalue{\??transparencyattribute#1}{#2}\setgvalue{\??transparencysetter#1}{\attribute\transparencyattribute#2 }}
-\unexpanded\def\colordefflc#1#2{\setvalue {\??colorattribute #1}{\colors_inherited_ca{#2}}\setvalue {\??colorsetter #1}{\colors_inherited_cs{#2}}}
-\unexpanded\def\colordeffgc#1#2{\setgvalue{\??colorattribute #1}{\colors_inherited_ca{#2}}\setvalue {\??colorsetter #1}{\colors_inherited_cs{#2}}}
-\unexpanded\def\colordefflt#1#2{\setvalue {\??transparencyattribute#1}{\colors_inherited_ta{#2}}\setvalue {\??transparencysetter#1}{\colors_inherited_ts{#2}}}
-\unexpanded\def\colordeffgt#1#2{\setgvalue{\??transparencyattribute#1}{\colors_inherited_ta{#2}}\setgvalue{\??transparencysetter#1}{\colors_inherited_ts{#2}}}
+\unexpanded\def\colordefflc#1#2{\setvalue {\??colorattribute #1}{\colo_helpers_inherited_current_ca{#2}}\setvalue {\??colorsetter #1}{\colo_helpers_inherited_current_cs{#2}}}
+\unexpanded\def\colordeffgc#1#2{\setgvalue{\??colorattribute #1}{\colo_helpers_inherited_current_ca{#2}}\setvalue {\??colorsetter #1}{\colo_helpers_inherited_current_cs{#2}}}
+\unexpanded\def\colordefflt#1#2{\setvalue {\??transparencyattribute#1}{\colo_helpers_inherited_current_ta{#2}}\setvalue {\??transparencysetter#1}{\colo_helpers_inherited_current_ts{#2}}}
+\unexpanded\def\colordeffgt#1#2{\setgvalue{\??transparencyattribute#1}{\colo_helpers_inherited_current_ta{#2}}\setgvalue{\??transparencysetter#1}{\colo_helpers_inherited_current_ts{#2}}}
\unexpanded\def\colordefrlc #1{\localundefine {\??colorattribute #1}\localundefine {\??colorsetter #1}}
\unexpanded\def\colordefrgc #1{\globalundefine{\??colorattribute #1}\globalundefine{\??colorsetter #1}}
@@ -861,8 +865,8 @@
\let\colorformatseparator\space
-\def\MPcolor #1{\ctxcommand{mpcolor(\number\attribute\colormodelattribute,\number\colors_inherited_ca{#1},\number\colors_inherited_ta{#1})}}
-\def\MPoptions #1{\ctxcommand{mpoptions(\number\attribute\colormodelattribute,\number\colors_inherited_ca{#1},\number\colors_inherited_ta{#1})}}
+\def\MPcolor #1{\ctxcommand{mpcolor(\number\attribute\colormodelattribute,\number\colo_helpers_inherited_current_ca{#1},\number\colo_helpers_inherited_current_ta{#1})}}
+\def\MPoptions #1{\ctxcommand{mpoptions(\number\attribute\colormodelattribute,\number\colo_helpers_inherited_current_ca{#1},\number\colo_helpers_inherited_current_ta{#1})}}
\def\thecolorattribute #1{\number\csname\??colorattribute \ifcsname\??colorattribute \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorattribute #1\endcsname#1\fi\fi\endcsname}
\def\thetransparencyattribute#1{\number\csname\??transparencyattribute\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencyattribute#1\endcsname#1\fi\fi\endcsname}
diff --git a/tex/context/base/colo-run.mkiv b/tex/context/base/colo-run.mkiv
index 1adb87f63..c330accf3 100644
--- a/tex/context/base/colo-run.mkiv
+++ b/tex/context/base/colo-run.mkiv
@@ -23,14 +23,14 @@
\unexpanded\gdef\showcolorbar[#1]%
{\backgroundline[#1]{\strut\enspace\color[white]{white}\enspace\color[black]{black}\enspace}}
-\unexpanded\gdef\showcolor {\dosingleempty\colors_show}
-\unexpanded\gdef\showcolorset {\dosingleempty\colors_show_set}
-\unexpanded\gdef\showcolorcomponents{\dosingleempty\colors_show_components}
+\unexpanded\gdef\showcolor {\dosingleempty\colo_basics_show}
+\unexpanded\gdef\showcolorset {\dosingleempty\colo_basics_show_set}
+\unexpanded\gdef\showcolorcomponents{\dosingleempty\colo_basics_show_components}
-\gdef\colors_show_set [#1]{\ctxcommand{showcolorset("#1")}}
-\gdef\colors_show_components[#1]{\ctxcommand{showcolorcomponents("#1")}}
+\gdef\colo_basics_show_set [#1]{\ctxcommand{showcolorset("#1")}}
+\gdef\colo_basics_show_components[#1]{\ctxcommand{showcolorcomponents("#1")}}
-\gdef\colors_show[#1]% % we do this at the tex end as loading happens
+\gdef\colo_basics_show[#1]% % we do this at the tex end as loading happens
{\usecolors [#1]% % delayed and we can only ask for the set if
\showcolorset[#1]} % loading has happened
@@ -46,10 +46,10 @@
\gdef\doshowpalet[#1][#2]%
{\ifcsname\??colorpalet#1\endcsname
- \doifinsetelse\v!vertical{#2} \colors_show_palet_vertical \colors_show_palet_horizontal [#1][#2]%
+ \doifinsetelse\v!vertical{#2} \colo_palets_show_vertical \colo_palets_show_horizontal [#1][#2]%
\fi}
-\gdef\colors_show_palet_vertical[#1][#2]%
+\gdef\colo_palets_show_vertical[#1][#2]%
{\vbox
{\forgetall
\setlocalhsize
@@ -57,7 +57,7 @@
\offinterlineskip
\setuppalet[#1]
\tabskip\zeropoint
- \def\show_palet##1%
+ \def\colo_palets_show_palet##1%
{\doifinsetelse\v!number{#2}{##1\hskip.5em}{}&
\color[##1]{\vrule\!!width3em\!!height\strutht\!!depth\strutdp}%
\graycolor[##1]{\vrule\!!width3em\!!height\strutht\!!depth\strutdp}&
@@ -65,9 +65,9 @@
\halign
{\hss##&\hss##\hss&##\cr
&\doifinset\v!name{#2}{\strut#1}&\cr%
- \colors_process_palet[#1]\show_palet\crcr}}}
+ \colo_palets_process[#1]\colo_palets_show_palet\crcr}}}
-\gdef\colors_show_palet_horizontal[#1][#2]% todo: bTABLE etc
+\gdef\colo_palets_show_horizontal[#1][#2]% todo: bTABLE etc
{\vbox
{\forgetall
\setlocalhsize
@@ -77,10 +77,10 @@
\tabskip\zeropoint
\!!widtha\zeropoint
\doifinset\v!number{#2}
- {\def\show_palet##1%
+ {\def\colo_palets_show_palet##1%
{\setbox0\hbox{##1}%
\ifdim\!!widtha<\wd0\!!widtha\wd0\fi}%
- \colors_process_palet[#1]\show_palet}%
+ \colo_palets_process[#1]\colo_palets_show_palet}%
\advance\!!widtha 1em
\ifdim\!!widtha<5em
\!!widtha5em
@@ -88,18 +88,18 @@
\halign
{##&&\hbox to \!!widtha{\hss##\hss}\cr
\doifinset\v!number{#2}
- {\def\show_palet##1{&\strut##1}%
- \colors_process_palet[#1]\show_palet}\cr
+ {\def\colo_palets_show_palet##1{&\strut##1}%
+ \colo_palets_process[#1]\colo_palets_show_palet}\cr
\doifinset\v!name{#2}{#1\hskip.5em}%
- \def\show_palet##1%
+ \def\colo_palets_show_palet##1%
{&\strut\color[##1]{\vrule\!!width\!!widtha\!!height\strutht\!!depth\zeropoint}}%
- \colors_process_palet[#1]\show_palet\crcr
+ \colo_palets_process[#1]\colo_palets_show_palet\crcr
\noalign{\vskip-\strutdepth}%
- \def\show_palet##1%
+ \def\colo_palets_show_palet##1%
{&\graycolor[##1]{\vrule\!!width\!!widtha\!!height\zeropoint\!!depth\strutdp}}%
- \colors_process_palet[#1]\show_palet\crcr
+ \colo_palets_process[#1]\colo_palets_show_palet\crcr
\doifinset\v!value{#2}
- {\def\show_palet##1%
+ {\def\colo_palets_show_palet##1%
{&\vbox
{\hsize\!!widtha
\vskip.25ex
@@ -107,24 +107,24 @@
\veryraggedcenter
\let\colorformatseparator\endgraf
\colorvalue{##1}}}%
- \colors_process_palet[#1]\show_palet}%
+ \colo_palets_process[#1]\colo_palets_show_palet}%
\crcr}}}
-\gdef\colors_process_palet[#1]%
+\gdef\colo_palets_process[#1]%
{\expanded{\globalprocesscommalist[\getvalue{\??colorpalet#1}]}}
\unexpanded\gdef\comparepalet
- {\dosingleargument\colors_compare_palet}
+ {\dosingleargument\colo_palets_compare}
-\gdef\colors_compare_palet[#1]%
+\gdef\colo_palets_compare[#1]%
{\ifcsname\??colorpalet#1\endcsname
\hbox
- {\colors_compare_palet_indeed\color[#1]%
+ {\colo_palets_compare_indeed\color[#1]%
\quad
- \colors_compare_palet_indeed\graycolor[#1]}%
+ \colo_palets_compare_indeed\graycolor[#1]}%
\fi}
-\gdef\colors_compare_palet_indeed#1[#2]%
+\gdef\colo_palets_compare_indeed#1[#2]%
{\vbox
{\forgetall
\setlocalhsize
@@ -134,30 +134,30 @@
\getcommacommandsize[\getvalue{\??colorpalet#2}]
\!!widtha2em\relax
\hsize\commalistsize\!!widtha
- \def\compare_palet##1%
+ \def\colo_palets_compare##1%
{\hbox
{\setbox0\hbox
{#1[##1]{\vrule\!!width\hsize\!!height3ex}}%
\wd0\zeropoint
\box0
\hbox to \hsize
- {\def\compare_palet####1%
+ {\def\colo_palets_compare####1%
{\hbox to \!!widtha
{\hss#1[####1]{\vrule\!!width.5\!!widtha\!!height2.25ex\!!depth-.75ex}\hss}}%
- \processcommacommand[\getvalue{\??colorpalet#2}]\compare_palet}}
+ \processcommacommand[\getvalue{\??colorpalet#2}]\colo_palets_compare}}
\endgraf}
- \processcommacommand[\getvalue{\??colorpalet#2}]\compare_palet}}
+ \processcommacommand[\getvalue{\??colorpalet#2}]\colo_palets_compare}}
%D Groups
\unexpanded\gdef\showcolorgroup
- {\dodoubleargument\colors_show_group}
+ {\dodoubleargument\colo_groups_show}
-\gdef\colors_show_group[#1][#2]%
+\gdef\colo_groups_show[#1][#2]%
{\doifcolor{#1:1}
- {\doifinsetelse\v!vertical{#2} \colors_show_group_vertical \colors_show_group_horizontal [#1][#2]}}
+ {\doifinsetelse\v!vertical{#2} \colo_groups_show_vertical \colo_groups_show_horizontal [#1][#2]}}
-\gdef\colors_show_group_horizontal[#1][#2]%
+\gdef\colo_groups_show_horizontal[#1][#2]%
{\vbox
{\forgetall
\setlocalhsize
@@ -166,7 +166,7 @@
\setuppalet
\tabskip\zeropoint
\def\colorformatseparator{\strut\cr}
- \def\show_group##1%
+ \def\colo_groups_show_group##1%
{\doifcolor{#1:##1}{\vbox
{\halign
{\hss####\hss\cr
@@ -181,10 +181,10 @@
{\raise3\lineheight\hbox{#1\hskip.5em}}
{#1}%
\hskip.5em}%
- \show_group1\show_group2\show_group3\show_group4%
- \show_group5\show_group6\show_group7\show_group8}}}
+ \colo_groups_show_group1\colo_groups_show_group2\colo_groups_show_group3\colo_groups_show_group4%
+ \colo_groups_show_group5\colo_groups_show_group6\colo_groups_show_group7\colo_groups_show_group8}}}
-\gdef\colors_show_group_vertical[#1][#2]%
+\gdef\colo_groups_show_vertical[#1][#2]%
{\vbox
{\forgetall
\setlocalhsize
@@ -192,7 +192,7 @@
\offinterlineskip
\setuppalet
\tabskip\zeropoint
- \def\show_group##1%
+ \def\colo_groups_show_group##1%
{\doifcolor{#1:##1}
{\doifinset\v!number{#2}{##1\hskip.5em}&
\color[#1:##1]{\vrule\!!width2.5em\!!height\strutht\!!depth\strutdp}%
@@ -201,20 +201,20 @@
\halign
{\hss##&\hss##\hss&##\hss\cr
&\doifinset\v!name{#2}{\strut#1}&\crcr
- \show_group1\show_group2\show_group3\show_group4%
- \show_group5\show_group6\show_group7\show_group8}}}
+ \colo_groups_show_group1\colo_groups_show_group2\colo_groups_show_group3\colo_groups_show_group4%
+ \colo_groups_show_group5\colo_groups_show_group6\colo_groups_show_group7\colo_groups_show_group8}}}
\unexpanded\gdef\comparecolorgroup
- {\dosingleargument\colors_compare_group}
+ {\dosingleargument\colo_groups_compare}
-\gdef\colors_compare_group[#1]%
+\gdef\colo_groups_compare[#1]%
{\doifcolor{#1:1}
{\hbox
- {\colors_compare_group_indeed\color[#1]%
+ {\colo_groups_compare_indeed\color[#1]%
\quad
- \colors_compare_group_indeed\graycolor[#1]}}}
+ \colo_groups_compare_indeed\graycolor[#1]}}}
-\gdef\colors_compare_group_indeed#1[#2]%
+\gdef\colo_groups_compare_indeed#1[#2]%
{\vbox
{\forgetall
\setlocalhsize
@@ -223,9 +223,9 @@
\dorecurse{15}{\doifcolor{#2:\recurselevel}{\advance\!!counta\plusone}}
\!!widtha2em\relax
\hsize\!!counta\!!widtha
- \dorecurse\!!counta{\colors_compare_group_step{#1}{#2}\recurselevel}}}
+ \dorecurse\!!counta{\colo_groups_compare_step{#1}{#2}\recurselevel}}}
-\def\colors_compare_group_step#1#2#3%
+\def\colo_groups_compare_step#1#2#3%
{\hbox to \hsize
{\setbox0\hbox
{#1[#2:#3]{\vrule\!!width\hsize\!!height3ex}}%
diff --git a/tex/context/base/cont-log.mkiv b/tex/context/base/cont-log.mkiv
index 16f94a495..29e571a44 100644
--- a/tex/context/base/cont-log.mkiv
+++ b/tex/context/base/cont-log.mkiv
@@ -59,27 +59,27 @@
\kern-.075em C%
\kern-.11em\TeX}
-\def\logo_ams_script#1%
+\def\syst_logos_ams_script#1%
{$\cal\ifdim\bodyfontsize>1.1em\scriptstyle\fi#1$}
\unexpanded\def\AmSTeX
{\dontleavehmode
- \logo_ams_script A%
- \kern-.1667em\lower.5ex\hbox{\logo_ams_script M}%
- \kern-.125em\logo_ams_script S%
+ \syst_logos_ams_script A%
+ \kern-.1667em\lower.5ex\hbox{\syst_logos_ams_script M}%
+ \kern-.125em\syst_logos_ams_script S%
-\TeX}
\unexpanded\def\LamSTeX
{L%
- \kern-.4em\raise.3ex\hbox{\logo_ams_script A}%
- \kern-.25em\lower.4ex\hbox{\logo_ams_script M}%
- \kern-.1em{\logo_ams_script S}%
+ \kern-.4em\raise.3ex\hbox{\syst_logos_ams_script A}%
+ \kern-.25em\lower.4ex\hbox{\syst_logos_ams_script M}%
+ \kern-.1em{\syst_logos_ams_script S}%
-\TeX}
\unexpanded\def\AmSLaTeX
{\dontleavehmode
- \logo_ams_script A%
- \kern-.1667em\lower.5ex\hbox{\logo_ams_script M}%
+ \syst_logos_ams_script A%
+ \kern-.1667em\lower.5ex\hbox{\syst_logos_ams_script M}%
\kern-.125em\AMSswitch S%
-\LaTeX}
@@ -117,19 +117,19 @@
10 at \currentfontscale\bodyfontsize % there is no afm in the minimals yet
\logofont}
-\def\logo_meta_hyphen % there is no hyphenchar in this font
+\def\syst_logos_meta_hyphen % there is no hyphenchar in this font
{\discretionary{\vrule\!!height.33em\!!depth-.27em\!!width.33em}{}{}}
\unexpanded\def\MetaFont
{\dontleavehmode
\begingroup
- \setMFPfont META\logo_meta_hyphen FONT%
+ \setMFPfont META\syst_logos_meta_hyphen FONT%
\endgroup}
\unexpanded\def\MetaPost
{\dontleavehmode
\begingroup
- \setMFPfont META\logo_meta_hyphen POST%
+ \setMFPfont META\syst_logos_meta_hyphen POST%
\endgroup}
\unexpanded\def\MetaFun
@@ -175,7 +175,7 @@
% Adapted from a patch by Mojca:
-\def\logo_xetex_e
+\def\syst_logos_xetex_e
{\setbox\scratchbox\hbox{E}%
\raise\dimexpr\ht\scratchbox+\dp\scratchbox\relax\hbox{\rotate[\c!rotation=180]{\box\scratchbox}}}
@@ -186,12 +186,12 @@
\iffontchar\font"018E\relax
\char"018E%
\else
- \ifx\fontalternative\c!bf \mirror{E}\else
- \ifx\fontalternative\c!it\logo_xetex_e\else
- \ifx\fontalternative\c!sl\logo_xetex_e\else
- \ifx\fontalternative\c!bi\logo_xetex_e\else
- \ifx\fontalternative\c!bs\logo_xetex_e\else
- \mirror{E}\fi\fi\fi\fi\fi
+ \ifx\fontalternative\c!bf \mirror{E}\else
+ \ifx\fontalternative\c!it\syst_logos_xetex_e\else
+ \ifx\fontalternative\c!sl\syst_logos_xetex_e\else
+ \ifx\fontalternative\c!bi\syst_logos_xetex_e\else
+ \ifx\fontalternative\c!bs\syst_logos_xetex_e\else
+ \mirror{E}\fi\fi\fi\fi\fi
\fi}%
\kern-.1667em\TeX}
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index d24b011a1..3c2201671 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png
index d8a933563..13328848d 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 2bf51cade..a84f3fb9d 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -23,7 +23,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2011.12.31 18:06}
+\edef\contextversion{2012.01.02 17:18}
%D For those who want to use this:
@@ -467,4 +467,6 @@
\ctxlua{statistics.savefmtstatus("\jobname","\contextversion","context.mkiv")}% can become automatic
\to \everydump
+% \tracingall
+
\errorstopmode \dump \endinput
diff --git a/tex/context/base/core-con.mkiv b/tex/context/base/core-con.mkiv
index 8db66a5fc..1b319d7a6 100644
--- a/tex/context/base/core-con.mkiv
+++ b/tex/context/base/core-con.mkiv
@@ -415,9 +415,9 @@
\newtoks \everycurrentdate
\unexpanded\def\currentdate
- {\dosingleempty\system_current_date}
+ {\dosingleempty\syst_converters_current_date}
-\def\system_current_date[#1]%
+\def\syst_converters_current_date[#1]%
{\begingroup
\the\everycurrentdate
\doifsomething{#1}{\edef\currentdatespecification{#1}}%
@@ -425,9 +425,9 @@
\endgroup}
\unexpanded\def\date
- {\dodoubleempty\system_date}
+ {\dodoubleempty\syst_converters_date}
-\def\system_date[#1][#2]%
+\def\syst_converters_date[#1][#2]%
{\begingroup
\iffirstargument
\getparameters[\??da][d=\normalday,m=\normalmonth,y=\normalyear,#1]%
@@ -435,7 +435,7 @@
\normalmonth\@@dam\relax
\normalyear \@@day\relax
\fi
- \system_current_date[#2]%
+ \syst_converters_current_date[#2]%
\endgroup}
\def\rawdate[#1]% expandable and no labels
@@ -460,15 +460,15 @@
\def\currenttimespecification{h,:,m}
\unexpanded\def\currenttime
- {\doifnextoptionalelse\system_current_time_yes\system_current_time_nop}
+ {\doifnextoptionalelse\syst_converters_current_time_yes\syst_converters_current_time_nop}
-\unexpanded\def\system_current_time_yes[#1]%
+\unexpanded\def\syst_converters_current_time_yes[#1]%
{\calculatecurrenttime
\processallactionsinset[#1][h=>\currenthour,m=>\currentminute,\s!unknown=>\commalistelement]}
-\unexpanded\def\system_current_time_nop
- {\normalexpanded{\system_current_time_yes[\currenttimespecification]}}
+\unexpanded\def\syst_converters_current_time_nop
+ {\normalexpanded{\syst_converters_current_time_yes[\currenttimespecification]}}
%D Because we're dealing with dates, we also introduce a few
@@ -531,22 +531,22 @@
\installcorenamespace {conversionwords}
\unexpanded\def\defineconversion
- {\dotripleempty\system_define_conversion}
+ {\dotripleempty\syst_converters_define_conversion}
-\def\system_define_conversion[#1][#2][#3]% from now on global (maybe local again some day)
+\def\syst_converters_define_conversion[#1][#2][#3]% from now on global (maybe local again some day)
{\ifthirdargument
- \system_define_conversion_indeed{#1#2}{#1:#2}{#3}%
+ \syst_converters_define_conversion_indeed{#1#2}{#1:#2}{#3}%
\else
- \system_define_conversion_indeed{#1}{#1}{#2}%
+ \syst_converters_define_conversion_indeed{#1}{#1}{#2}%
\fi}
-\def\system_define_conversion_indeed#1#2#3%
+\def\syst_converters_define_conversion_indeed#1#2#3%
{\doifinstringelse{,}{\detokenize{#3}}
{\ctxcommand{defineconversion("#2",\!!bs\detokenize{#3}\!!es)}%
- \setgvalue{\??conversion#1}{\system_checked_conversion{#2}}}
+ \setgvalue{\??conversion#1}{\syst_converters_checked_conversion{#2}}}
{\setgvalue{\??conversion#1}{#3}}}
-\def\system_checked_conversion#1#2%
+\def\syst_converters_checked_conversion#1#2%
{\ctxcommand{checkedconversion("#1",#2)}}
%D If a conversion is just a font switch then we need to make sure
@@ -562,7 +562,7 @@
\setvalue{\??conversionarguments1}#1{\csname\??conversion\currentlanguage#1\endcsname}
\setvalue{\??conversionarguments2}#1{\csname\??conversion #1\endcsname}
-\letvalue{\??conversionarguments3}\system_checked_conversion
+\letvalue{\??conversionarguments3}\syst_converters_checked_conversion
\def\doifconversiondefinedelse#1%
{\ifcsname\??conversion\currentlanguage#1\endcsname
diff --git a/tex/context/base/core-env.mkiv b/tex/context/base/core-env.mkiv
index d2113539a..8afe469bb 100644
--- a/tex/context/base/core-env.mkiv
+++ b/tex/context/base/core-env.mkiv
@@ -54,29 +54,29 @@
% fast internal ones
-\def\system_modes_new#1%
+\def\syst_modes_new#1%
{\expandafter\newcount\csname\s!mode#1\endcsname}
\unexpanded\def\newmode#1%
- {\ifcsname\s!mode#1\endcsname\else\system_modes_new{#1}\fi}
+ {\ifcsname\s!mode#1\endcsname\else\syst_modes_new{#1}\fi}
\unexpanded\def\setmode#1%
- {\ifcsname\s!mode#1\endcsname\else\system_modes_new{#1}\fi
+ {\ifcsname\s!mode#1\endcsname\else\syst_modes_new{#1}\fi
\csname\s!mode#1\endcsname\enabledmode}
\unexpanded\def\resetmode#1%
- {\ifcsname\s!mode#1\endcsname\else\system_modes_new{#1}\fi
+ {\ifcsname\s!mode#1\endcsname\else\syst_modes_new{#1}\fi
\csname\s!mode#1\endcsname\disabledmode}
\unexpanded\def\newsystemmode#1%
- {\ifcsname\s!mode\systemmodeprefix#1\endcsname\else\system_modes_new{\systemmodeprefix#1}\fi}
+ {\ifcsname\s!mode\systemmodeprefix#1\endcsname\else\syst_modes_new{\systemmodeprefix#1}\fi}
\unexpanded\def\setsystemmode#1%
- {\ifcsname\s!mode\systemmodeprefix#1\endcsname\else\system_modes_new{\systemmodeprefix#1}\fi
+ {\ifcsname\s!mode\systemmodeprefix#1\endcsname\else\syst_modes_new{\systemmodeprefix#1}\fi
\csname\s!mode\systemmodeprefix#1\endcsname\enabledmode}
\unexpanded\def\resetsystemmode#1%
- {\ifcsname\s!mode\systemmodeprefix#1\endcsname\else\system_modes_new{\systemmodeprefix#1}\fi
+ {\ifcsname\s!mode\systemmodeprefix#1\endcsname\else\syst_modes_new{\systemmodeprefix#1}\fi
\csname\s!mode\systemmodeprefix#1\endcsname\disabledmode}
% \def\dosetsystemmode#1%
@@ -101,28 +101,28 @@
% user ones
-\unexpanded\def\preventmode{\unprotect\system_modes_prevent}
-\unexpanded\def\enablemode {\unprotect\system_modes_enable }
-\unexpanded\def\disablemode{\unprotect\system_modes_disable}
+\unexpanded\def\preventmode{\unprotect\syst_modes_prevent}
+\unexpanded\def\enablemode {\unprotect\syst_modes_enable }
+\unexpanded\def\disablemode{\unprotect\syst_modes_disable}
\let\definemode\disablemode % nicer
-\def\system_modes_prevent[#1]{\protect\rawprocesscommacommand[#1]\system_modes_prevent_indeed}
-\def\system_modes_enable [#1]{\protect\rawprocesscommacommand[#1]\system_modes_enable_indeed }
-\def\system_modes_disable[#1]{\protect\rawprocesscommacommand[#1]\system_modes_disable_indeed}
+\def\syst_modes_prevent[#1]{\protect\rawprocesscommacommand[#1]\syst_modes_prevent_indeed}
+\def\syst_modes_enable [#1]{\protect\rawprocesscommacommand[#1]\syst_modes_enable_indeed }
+\def\syst_modes_disable[#1]{\protect\rawprocesscommacommand[#1]\syst_modes_disable_indeed}
-\def\system_modes_prevent_indeed#1%
- {\ifcsname\s!mode#1\endcsname\else\system_modes_new{#1}\fi
+\def\syst_modes_prevent_indeed#1%
+ {\ifcsname\s!mode#1\endcsname\else\syst_modes_new{#1}\fi
\csname\s!mode#1\endcsname\preventedmode}
-\def\system_modes_enable_indeed#1% we can speed it up by moving the new outside
- {\ifcsname\s!mode#1\endcsname\else\system_modes_new{#1}\fi
+\def\syst_modes_enable_indeed#1% we can speed it up by moving the new outside
+ {\ifcsname\s!mode#1\endcsname\else\syst_modes_new{#1}\fi
\ifnum\csname\s!mode#1\endcsname=\preventedmode \else
\csname\s!mode#1\endcsname\enabledmode
\fi}
-\def\system_modes_disable_indeed#1%
- {\ifcsname\s!mode#1\endcsname\else\system_modes_new{#1}\fi
+\def\syst_modes_disable_indeed#1%
+ {\ifcsname\s!mode#1\endcsname\else\syst_modes_new{#1}\fi
\ifnum\csname\s!mode#1\endcsname=\preventedmode \else
\csname\s!mode#1\endcsname\disabledmode
\fi}
@@ -140,65 +140,65 @@
\newconditional\c_checked_mode
-\def\system_modes_check_indeed#1%
+\def\syst_modes_check_indeed#1%
{\ifcsname\s!mode#1\endcsname
\ifcase\csname\s!mode#1\endcsname\else
- \let\system_modes_check_step\gobbleoneargument
+ \let\syst_modes_check_step\gobbleoneargument
\fi
\fi}
-\def\system_modes_check#1#2#3%
- {\let\system_modes_check_step\system_modes_check_indeed
- \rawprocesscommacommand[#3]\system_modes_check_step
- \ifx\system_modes_check_step\gobbleoneargument
+\def\syst_modes_check#1#2#3%
+ {\let\syst_modes_check_step\syst_modes_check_indeed
+ \rawprocesscommacommand[#3]\syst_modes_check_step
+ \ifx\syst_modes_check_step\gobbleoneargument
\expandafter#1%
\else
\expandafter#2%
\fi}
-\def\system_modes_check_all_indeed#1%
+\def\syst_modes_check_all_indeed#1%
{\ifcsname\s!mode#1\endcsname
\ifcase\csname\s!mode#1\endcsname
- \let\system_modes_check_all_step\gobbleoneargument
+ \let\syst_modes_check_all_step\gobbleoneargument
\fi
\else
- \let\system_modes_check_all_step\gobbleoneargument
+ \let\syst_modes_check_all_step\gobbleoneargument
\fi}
-\def\system_modes_check_all#1#2#3%
- {\let\system_modes_check_all_step\system_modes_check_all_indeed
- \rawprocesscommacommand[#3]\system_modes_check_all_step
- \ifx\system_modes_check_all_step\gobbleoneargument
+\def\syst_modes_check_all#1#2#3%
+ {\let\syst_modes_check_all_step\syst_modes_check_all_indeed
+ \rawprocesscommacommand[#3]\syst_modes_check_all_step
+ \ifx\syst_modes_check_all_step\gobbleoneargument
\expandafter#2
\else
\expandafter#1
\fi}
-\unexpanded\def\doifmodeelse {\system_modes_check\firstoftwoarguments\secondoftwoarguments}
-\unexpanded\def\doifmode {\system_modes_check\firstofoneargument\gobbleoneargument}
-\unexpanded\def\doifnotmode {\system_modes_check\gobbleoneargument\firstofoneargument}
-\unexpanded\def\startmode [#1]{\system_modes_check\donothing\system_modes_stop_yes{#1}}
-\unexpanded\def\startnotmode [#1]{\system_modes_check\system_modes_stop_nop\donothing{#1}}
-\unexpanded\def\doifallmodeselse {\system_modes_check_all\firstoftwoarguments\secondoftwoarguments}
-\unexpanded\def\doifallmodes {\system_modes_check_all\firstofoneargument\gobbleoneargument}
-\unexpanded\def\doifnotallmodes {\system_modes_check_all\gobbleoneargument\firstofoneargument}
-\unexpanded\def\startallmodes [#1]{\system_modes_check_all\donothing\system_modes_stop_all_yes{#1}}
-\unexpanded\def\startnotallmodes[#1]{\system_modes_check_all\system_modes_stop_all_nop\donothing{#1}}
+\unexpanded\def\doifmodeelse {\syst_modes_check\firstoftwoarguments\secondoftwoarguments}
+\unexpanded\def\doifmode {\syst_modes_check\firstofoneargument\gobbleoneargument}
+\unexpanded\def\doifnotmode {\syst_modes_check\gobbleoneargument\firstofoneargument}
+\unexpanded\def\startmode [#1]{\syst_modes_check\donothing\syst_modes_stop_yes{#1}}
+\unexpanded\def\startnotmode [#1]{\syst_modes_check\syst_modes_stop_nop\donothing{#1}}
+\unexpanded\def\doifallmodeselse {\syst_modes_check_all\firstoftwoarguments\secondoftwoarguments}
+\unexpanded\def\doifallmodes {\syst_modes_check_all\firstofoneargument\gobbleoneargument}
+\unexpanded\def\doifnotallmodes {\syst_modes_check_all\gobbleoneargument\firstofoneargument}
+\unexpanded\def\startallmodes [#1]{\syst_modes_check_all\donothing\syst_modes_stop_all_yes{#1}}
+\unexpanded\def\startnotallmodes[#1]{\syst_modes_check_all\syst_modes_stop_all_nop\donothing{#1}}
\unexpanded\def\stopmode {} % no relax
\unexpanded\def\stopnotmode {} % no relax
\unexpanded\def\stopallmodes {} % no relax
\unexpanded\def\stopnotallmodes {} % no relax
-\def\system_modes_stop_yes #1\stopmode {}
-\def\system_modes_stop_nop #1\stopnotmode {}
-\def\system_modes_stop_all_yes#1\stopallmodes {}
-\def\system_modes_stop_all_nop#1\stopnotallmodes{}
+\def\syst_modes_stop_yes #1\stopmode {}
+\def\syst_modes_stop_nop #1\stopnotmode {}
+\def\syst_modes_stop_all_yes#1\stopallmodes {}
+\def\syst_modes_stop_all_nop#1\stopnotallmodes{}
%D Pushing/popping:
\unexpanded\def\pushmode[#1]%
- {\ifcsname\s!mode#1\endcsname\else\system_modes_new{#1}\fi
+ {\ifcsname\s!mode#1\endcsname\else\syst_modes_new{#1}\fi
\expandafter\edef\csname\??modestack#1\endcsname{\number\csname\s!mode#1\endcsname}%
\expandafter\pushmacro\csname\??modestack#1\endcsname}
@@ -209,7 +209,7 @@
\fi}
\def\pushsystemmode#1%
- {\ifcsname\s!mode\systemmodeprefix#1\endcsname\else\system_modes_new{\systemmodeprefix#1}\fi
+ {\ifcsname\s!mode\systemmodeprefix#1\endcsname\else\syst_modes_new{\systemmodeprefix#1}\fi
\expandafter\edef\csname\??modestack\systemmodeprefix#1\endcsname{\number\csname\s!mode\systemmodeprefix#1\endcsname}%
\expandafter\pushmacro\csname\??modestack\systemmodeprefix#1\endcsname}
@@ -238,16 +238,16 @@
\letvalue{\e!stop\v!setups}\relax
-\unexpanded\def\setups{\doifnextbgroupelse\system_setups_a\system_setups_b} % {..} or [..]
-\unexpanded\def\setup {\doifnextbgroupelse\system_setups \system_setups_c} % {..} or [..]
+\unexpanded\def\setups{\doifnextbgroupelse\syst_setups_a\syst_setups_b} % {..} or [..]
+\unexpanded\def\setup {\doifnextbgroupelse\syst_setups \syst_setups_c} % {..} or [..]
-\def\system_setups_a #1{\processcommacommand[#1]\system_setups} % {..}
-\def\system_setups_b[#1]{\processcommacommand[#1]\system_setups} % [..]
-\def\system_setups_c[#1]{\system_setups{#1}} % [..]
+\def\syst_setups_a #1{\processcommacommand[#1]\syst_setups} % {..}
+\def\syst_setups_b[#1]{\processcommacommand[#1]\syst_setups} % [..]
+\def\syst_setups_c[#1]{\syst_setups{#1}} % [..]
\letvalue{\??setup:\letterpercent}\gobbleoneargument
-\def\system_setups#1% the grid option will be extended to other main modes
+\def\syst_setups#1% the grid option will be extended to other main modes
{\csname\??setup
\ifgridsnapping
\ifcsname\??setup\v!grid:#1\endcsname\v!grid:#1\else\ifcsname\??setup:#1\endcsname:#1\else:\letterpercent\fi\fi
@@ -275,7 +275,7 @@
\fi}
% \def\dodoprocesslocalsetups
-% {\expandafter\processcommalist\expandafter[\tobeprocessedsetups]\system_setups}
+% {\expandafter\processcommalist\expandafter[\tobeprocessedsetups]\syst_setups}
% setups=S1
% setups=lua(S2)
@@ -291,8 +291,8 @@
\edef\setupwithargument#1% saves a few expansions
{\noexpand\csname\??setup:\noexpand\ifcsname\??setup:#1\endcsname#1\noexpand\else\letterpercent\noexpand\fi\endcsname}
-\let\directsetup\system_setups
-\let\texsetup \system_setups % nicer than \directsetup and more en par with xmlsetup and luasetup
+\let\directsetup\syst_setups
+\let\texsetup \syst_setups % nicer than \directsetup and more en par with xmlsetup and luasetup
\def\doifsetupselse#1% to be done: grid
{\ifcsname\??setup:#1\endcsname
@@ -333,35 +333,35 @@
%
% \ctxluabuffer
-\newtoks\t_system_setups_tex \appendtoks
+\newtoks\t_syst_setups_tex \appendtoks
\catcode\endoflineasciicode \ignorecatcode
-\to \t_system_setups_tex
+\to \t_syst_setups_tex
-\newtoks\t_system_setups_loc \appendtoks
+\newtoks\t_syst_setups_loc \appendtoks
\catcode\endoflineasciicode \ignorecatcode
-\to \t_system_setups_loc
+\to \t_syst_setups_loc
-\newtoks\t_system_setups_raw \appendtoks
+\newtoks\t_syst_setups_raw \appendtoks
% nothing
-\to \t_system_setups_raw
+\to \t_syst_setups_raw
-\newtoks\t_system_setups_xml \appendtoks
+\newtoks\t_syst_setups_xml \appendtoks
\catcode\endoflineasciicode\ignorecatcode
\catcode\barasciicode \othercatcode
-\to \t_system_setups_xml
+\to \t_syst_setups_xml
-\newtoks\t_system_setups_lua \appendtoks
+\newtoks\t_syst_setups_lua \appendtoks
\obeylualines
\obeyluatokens
-\to \t_system_setups_lua
+\to \t_syst_setups_lua
% Is doglobal still relevant? Maybe always global? Or never? Anyway, it will become obsolete.
-\unexpanded\def\startluasetups {\begingroup\doifnextoptionalelse\system_setups_start_lua_a\system_setups_start_lua_b}
-\unexpanded\def\startxmlsetups {\begingroup\doifnextoptionalelse\system_setups_start_xml_a\system_setups_start_xml_b}
-\unexpanded\def\startrawsetups {\begingroup\doifnextoptionalelse\system_setups_start_raw_a\system_setups_start_raw_b}
-\unexpanded\def\startlocalsetups{\begingroup\doifnextoptionalelse\system_setups_start_loc_a\system_setups_start_loc_b}
-\unexpanded\def\startsetups {\begingroup\doifnextoptionalelse\system_setups_start_tex_a\system_setups_start_tex_b}
+\unexpanded\def\startluasetups {\begingroup\doifnextoptionalelse\syst_setups_start_lua_a\syst_setups_start_lua_b}
+\unexpanded\def\startxmlsetups {\begingroup\doifnextoptionalelse\syst_setups_start_xml_a\syst_setups_start_xml_b}
+\unexpanded\def\startrawsetups {\begingroup\doifnextoptionalelse\syst_setups_start_raw_a\syst_setups_start_raw_b}
+\unexpanded\def\startlocalsetups{\begingroup\doifnextoptionalelse\syst_setups_start_loc_a\syst_setups_start_loc_b}
+\unexpanded\def\startsetups {\begingroup\doifnextoptionalelse\syst_setups_start_tex_a\syst_setups_start_tex_b}
\let\stopluasetups \relax
\let\stopxmlsetups \relax
@@ -369,51 +369,51 @@
\let\stoplocalsetups \relax
\let\stopsetups \relax
-\def\system_setups_start_lua_indeed#1#2#3\stopluasetups {\endgroup\dodoglobal\expandafter\def\csname\??setup#1:#2\expandafter\endcsname\expandafter##\expandafter1\expandafter{#3}}
-\def\system_setups_start_xml_indeed#1#2#3\stopxmlsetups {\endgroup\dodoglobal\expandafter\def\csname\??setup#1:#2\expandafter\endcsname\expandafter##\expandafter1\expandafter{#3}}
-\def\system_setups_start_raw_indeed#1#2#3\stoprawsetups {\endgroup\dodoglobal\expandafter\def\csname\??setup#1:#2\expandafter\endcsname\expandafter##\expandafter1\expandafter{#3}}
-\def\system_setups_start_loc_indeed#1#2#3\stoplocalsetups{\endgroup\dodoglobal\expandafter\def\csname\??setup#1:#2\expandafter\endcsname\expandafter##\expandafter1\expandafter{#3}}
-\def\system_setups_start_tex_indeed#1#2#3\stopsetups {\endgroup\dodoglobal\expandafter\def\csname\??setup#1:#2\expandafter\endcsname\expandafter##\expandafter1\expandafter{#3}}
+\def\syst_setups_start_lua_indeed#1#2#3\stopluasetups {\endgroup\dodoglobal\expandafter\def\csname\??setup#1:#2\expandafter\endcsname\expandafter##\expandafter1\expandafter{#3}}
+\def\syst_setups_start_xml_indeed#1#2#3\stopxmlsetups {\endgroup\dodoglobal\expandafter\def\csname\??setup#1:#2\expandafter\endcsname\expandafter##\expandafter1\expandafter{#3}}
+\def\syst_setups_start_raw_indeed#1#2#3\stoprawsetups {\endgroup\dodoglobal\expandafter\def\csname\??setup#1:#2\expandafter\endcsname\expandafter##\expandafter1\expandafter{#3}}
+\def\syst_setups_start_loc_indeed#1#2#3\stoplocalsetups{\endgroup\dodoglobal\expandafter\def\csname\??setup#1:#2\expandafter\endcsname\expandafter##\expandafter1\expandafter{#3}}
+\def\syst_setups_start_tex_indeed#1#2#3\stopsetups {\endgroup\dodoglobal\expandafter\def\csname\??setup#1:#2\expandafter\endcsname\expandafter##\expandafter1\expandafter{#3}}
-\def\system_setups_start_lua{\ifsecondargument\expandafter\system_setups_start_lua_c\else\expandafter\system_setups_start_lua_d\fi}
-\def\system_setups_start_xml{\ifsecondargument\expandafter\system_setups_start_xml_c\else\expandafter\system_setups_start_xml_d\fi}
-\def\system_setups_start_raw{\ifsecondargument\expandafter\system_setups_start_raw_c\else\expandafter\system_setups_start_raw_d\fi}
-\def\system_setups_start_loc{\ifsecondargument\expandafter\system_setups_start_loc_c\else\expandafter\system_setups_start_loc_d\fi}
-\def\system_setups_start_tex{\ifsecondargument\expandafter\system_setups_start_tex_c\else\expandafter\system_setups_start_tex_d\fi}
+\def\syst_setups_start_lua{\ifsecondargument\expandafter\syst_setups_start_lua_c\else\expandafter\syst_setups_start_lua_d\fi}
+\def\syst_setups_start_xml{\ifsecondargument\expandafter\syst_setups_start_xml_c\else\expandafter\syst_setups_start_xml_d\fi}
+\def\syst_setups_start_raw{\ifsecondargument\expandafter\syst_setups_start_raw_c\else\expandafter\syst_setups_start_raw_d\fi}
+\def\syst_setups_start_loc{\ifsecondargument\expandafter\syst_setups_start_loc_c\else\expandafter\syst_setups_start_loc_d\fi}
+\def\syst_setups_start_tex{\ifsecondargument\expandafter\syst_setups_start_tex_c\else\expandafter\syst_setups_start_tex_d\fi}
-\def\system_setups_start_lua_a{\the\t_system_setups_lua\dodoubleempty\system_setups_start_lua} % [ ] delimited
-\def\system_setups_start_xml_a{\the\t_system_setups_xml\dodoubleempty\system_setups_start_xml} % [ ] delimited
-\def\system_setups_start_raw_a{\the\t_system_setups_raw\dodoubleempty\system_setups_start_raw} % [ ] delimited
-\def\system_setups_start_loc_a{\the\t_system_setups_loc\dodoubleempty\system_setups_start_loc} % [ ] delimited
-\def\system_setups_start_tex_a{\the\t_system_setups_tex\dodoubleempty\system_setups_start_tex} % [ ] delimited
+\def\syst_setups_start_lua_a{\the\t_syst_setups_lua\dodoubleempty\syst_setups_start_lua} % [ ] delimited
+\def\syst_setups_start_xml_a{\the\t_syst_setups_xml\dodoubleempty\syst_setups_start_xml} % [ ] delimited
+\def\syst_setups_start_raw_a{\the\t_syst_setups_raw\dodoubleempty\syst_setups_start_raw} % [ ] delimited
+\def\syst_setups_start_loc_a{\the\t_syst_setups_loc\dodoubleempty\syst_setups_start_loc} % [ ] delimited
+\def\syst_setups_start_tex_a{\the\t_syst_setups_tex\dodoubleempty\syst_setups_start_tex} % [ ] delimited
% empty preserves inner {} (is removed by the \expandafter{#3})
-\def\system_setups_start_lua_b#1 {\the\t_system_setups_lua\system_setups_start_lua_indeed\empty{#1}\empty} % space delimited
-\def\system_setups_start_xml_b#1 {\the\t_system_setups_xml\system_setups_start_xml_indeed\empty{#1}\empty} % space delimited
-\def\system_setups_start_raw_b#1 {\the\t_system_setups_raw\system_setups_start_raw_indeed\empty{#1}\empty} % space delimited
-\def\system_setups_start_loc_b#1 {\the\t_system_setups_loc\system_setups_start_loc_indeed\empty{#1}\empty} % space delimited
-\def\system_setups_start_tex_b#1 {\the\t_system_setups_tex\system_setups_start_tex_indeed\empty{#1}\empty} % space delimited
+\def\syst_setups_start_lua_b#1 {\the\t_syst_setups_lua\syst_setups_start_lua_indeed\empty{#1}\empty} % space delimited
+\def\syst_setups_start_xml_b#1 {\the\t_syst_setups_xml\syst_setups_start_xml_indeed\empty{#1}\empty} % space delimited
+\def\syst_setups_start_raw_b#1 {\the\t_syst_setups_raw\syst_setups_start_raw_indeed\empty{#1}\empty} % space delimited
+\def\syst_setups_start_loc_b#1 {\the\t_syst_setups_loc\syst_setups_start_loc_indeed\empty{#1}\empty} % space delimited
+\def\syst_setups_start_tex_b#1 {\the\t_syst_setups_tex\syst_setups_start_tex_indeed\empty{#1}\empty} % space delimited
-\def\system_setups_start_lua_c[#1][#2]{\the\t_system_setups_lua\system_setups_start_lua_indeed{#1}{#2}\empty} % [..] [..]
-\def\system_setups_start_xml_c[#1][#2]{\the\t_system_setups_xml\system_setups_start_xml_indeed{#1}{#2}\empty} % [..] [..]
-\def\system_setups_start_raw_c[#1][#2]{\the\t_system_setups_raw\system_setups_start_raw_indeed{#1}{#2}\empty} % [..] [..]
-\def\system_setups_start_loc_c[#1][#2]{\the\t_system_setups_loc\system_setups_start_loc_indeed{#1}{#2}\empty} % [..] [..]
-\def\system_setups_start_tex_c[#1][#2]{\the\t_system_setups_tex\system_setups_start_tex_indeed{#1}{#2}\empty} % [..] [..]
+\def\syst_setups_start_lua_c[#1][#2]{\the\t_syst_setups_lua\syst_setups_start_lua_indeed{#1}{#2}\empty} % [..] [..]
+\def\syst_setups_start_xml_c[#1][#2]{\the\t_syst_setups_xml\syst_setups_start_xml_indeed{#1}{#2}\empty} % [..] [..]
+\def\syst_setups_start_raw_c[#1][#2]{\the\t_syst_setups_raw\syst_setups_start_raw_indeed{#1}{#2}\empty} % [..] [..]
+\def\syst_setups_start_loc_c[#1][#2]{\the\t_syst_setups_loc\syst_setups_start_loc_indeed{#1}{#2}\empty} % [..] [..]
+\def\syst_setups_start_tex_c[#1][#2]{\the\t_syst_setups_tex\syst_setups_start_tex_indeed{#1}{#2}\empty} % [..] [..]
-\def\system_setups_start_lua_d[#1][#2]{\the\t_system_setups_lua\system_setups_start_lua_indeed\empty{#1}\empty} % [..]
-\def\system_setups_start_xml_d[#1][#2]{\the\t_system_setups_xml\system_setups_start_xml_indeed\empty{#1}\empty} % [..]
-\def\system_setups_start_raw_d[#1][#2]{\the\t_system_setups_raw\system_setups_start_raw_indeed\empty{#1}\empty} % [..]
-\def\system_setups_start_loc_d[#1][#2]{\the\t_system_setups_loc\system_setups_start_loc_indeed\empty{#1}\empty} % [..]
-\def\system_setups_start_tex_d[#1][#2]{\the\t_system_setups_tex\system_setups_start_tex_indeed\empty{#1}\empty} % [..]
+\def\syst_setups_start_lua_d[#1][#2]{\the\t_syst_setups_lua\syst_setups_start_lua_indeed\empty{#1}\empty} % [..]
+\def\syst_setups_start_xml_d[#1][#2]{\the\t_syst_setups_xml\syst_setups_start_xml_indeed\empty{#1}\empty} % [..]
+\def\syst_setups_start_raw_d[#1][#2]{\the\t_syst_setups_raw\syst_setups_start_raw_indeed\empty{#1}\empty} % [..]
+\def\syst_setups_start_loc_d[#1][#2]{\the\t_syst_setups_loc\syst_setups_start_loc_indeed\empty{#1}\empty} % [..]
+\def\syst_setups_start_tex_d[#1][#2]{\the\t_syst_setups_tex\syst_setups_start_tex_indeed\empty{#1}\empty} % [..]
-\def\luasetup#1{\ctxlua{\system_setups{#1}}}
+\def\luasetup#1{\ctxlua{\syst_setups{#1}}}
% % % %
\def\systemsetupsprefix{*}
-\def\systemsetups#1{\system_setups{\systemsetupsprefix#1}}
+\def\systemsetups#1{\syst_setups{\systemsetupsprefix#1}}
\def\resetsetups[#1]% see x-fo for usage
{\ifcsname\??setup\ifgridsnapping\v!grid\fi:#1\endcsname
@@ -439,15 +439,15 @@
\installcorenamespace{variables}
-\unexpanded\def\setvariables {\dotripleargument\system_variables_set[\getrawparameters ]}
-\unexpanded\def\setevariables{\dotripleargument\system_variables_set[\getraweparameters]}
-\unexpanded\def\setgvariables{\dotripleargument\system_variables_set[\getrawgparameters]}
-\unexpanded\def\setxvariables{\dotripleargument\system_variables_set[\getrawxparameters]}
+\unexpanded\def\setvariables {\dotripleargument\syst_variables_set[\getrawparameters ]}
+\unexpanded\def\setevariables{\dotripleargument\syst_variables_set[\getraweparameters]}
+\unexpanded\def\setgvariables{\dotripleargument\syst_variables_set[\getrawgparameters]}
+\unexpanded\def\setxvariables{\dotripleargument\syst_variables_set[\getrawxparameters]}
\unexpanded\def\globalsetvariables % obsolete
- {\dotripleargument\system_variables_set[\globalgetrawparameters]}
+ {\dotripleargument\syst_variables_set[\globalgetrawparameters]}
-\def\system_variables_set[#1][#2][#3]% tricky, test on s-pre-60
+\def\syst_variables_set[#1][#2][#3]% tricky, test on s-pre-60
{\errorisfataltrue
\doifelse{#2}\currentvariableclass
{#1[\??variables#2:][#3]}%
@@ -479,18 +479,18 @@
%D
%D I'll probably forget that this on exists.
-\let\m_system_variables_temp\empty
+\let\m_syst_variables_temp\empty
\def\checkvariables
- {\dodoubleargument\system_variables_check}
+ {\dodoubleargument\syst_variables_check}
-\def\system_variables_check
- {\dogetparameters\system_variables_check_value}
+\def\syst_variables_check
+ {\dogetparameters\syst_variables_check_value}
-\def\system_variables_check_value#1#2#3%
+\def\syst_variables_check_value#1#2#3%
{\ifcsname\??variables#1:#2\endcsname
- \edef\m_system_variables_temp{\csname\??variables#1:#2\endcsname}%
- \ifx\m_system_variables_temp\empty
+ \edef\m_syst_variables_temp{\csname\??variables#1:#2\endcsname}%
+ \ifx\m_syst_variables_temp\empty
\expandafter\def\csname\??variables#1:#2\endcsname{#3}%
\fi
\else
@@ -527,7 +527,7 @@
{\executeifdefined{\??variables#1:#2}}% {#3}
\unexpanded\def\setupenv
- {\dotripleargument\system_variables_set[\getrawparameters][\s!environment]}
+ {\dotripleargument\syst_variables_set[\getrawparameters][\s!environment]}
\unexpanded\def\doifenvelse{\doifelsevariable \s!environment}
\unexpanded\def\doifenv {\doifvariable \s!environment}
diff --git a/tex/context/base/core-mis.mkiv b/tex/context/base/core-mis.mkiv
index ad74c2084..515cca57f 100644
--- a/tex/context/base/core-mis.mkiv
+++ b/tex/context/base/core-mis.mkiv
@@ -732,6 +732,8 @@
% this will replace the quotation and speed definitions
+% todo: \typo_ namespace
+
\newsignal\delimitedtextsignal
\let\currentdelimitedtext\s!unknown
@@ -808,7 +810,7 @@
\pushdelimitedtext{#1}%
\dostarttagged\t!delimitedblock\currentdelimitedtext
\doifelse{\delimitedtextparameter\c!method}\s!font
- {\let\dostopdelimitedtext\dostopdelimitedtext_font
+ {\let\dostopdelimitedtext\typo_delimitedtexts_finish_font
\ignoredelimitedtext\c!left\ignorespaces}
{\doifelse{\delimitedtextparameter\c!repeat}\v!yes
{\let\dohandlerepeatdelimitedtext\dorepeatdelimitedtext}%
@@ -816,7 +818,7 @@
\doifinsetelse{\delimitedtextparameter\c!location}{\v!paragraph,\v!margin}%
{\dosingleempty\dostartdelimitedtextpar}\dostartdelimitedtexttxt}}
-\def\dostopdelimitedtext_font
+\def\typo_delimitedtexts_finish_font
{\removeunwantedspaces\ignoredelimitedtext\c!right}
\def\dostartdelimitedtextpar[#1]%
@@ -854,7 +856,7 @@
\delimitedtextparameter\c!after
\doifsomething{\delimitedtextparameter\c!spaceafter}
{\blank[\delimitedtextparameter\c!spaceafter]}%
- \checknextindentation[\delimitedtextparameter\c!indentnext]% AM: here
+ \useindentnextparameter\delimitedtextparameter
\dorechecknextindentation}% AM: This was missing!
\def\dostartdelimitedtexttxt
@@ -1817,15 +1819,15 @@
\global\advance\totcombination\minusone
\global\advance\horcombination\minusone
\ifnum\horcombination=\zerocount
- \doubleexpandafter\docombination_a
+ \doubleexpandafter\docombinationa
\else
- \doubleexpandafter\docombination_b
+ \doubleexpandafter\docombinationb
\fi
\else
- \expandafter\docombination_c
+ \expandafter\docombinationc
\fi}
-\def\docombination_a
+\def\docombinationa
{\cr
\flushcombinationstack
\noalign
@@ -1839,10 +1841,10 @@
\global\horcombination\maxhorcombination\relax
\docombination}
-\def\docombination_b
+\def\docombinationb
{&&&\hskip\combinationparameter\c!distance&\docombination}
-\def\docombination_c
+\def\docombinationc
{\cr
\flushcombinationstack
\egroup}
diff --git a/tex/context/base/core-sys.mkiv b/tex/context/base/core-sys.mkiv
index 9dc03d336..dc346c3fa 100644
--- a/tex/context/base/core-sys.mkiv
+++ b/tex/context/base/core-sys.mkiv
@@ -166,12 +166,12 @@
\installcommandhandler \??startstop {startstop} \??startstop
\appendtoks
- \setuevalue{\e!start\currentstartstop}{\dostartstop_start {\currentstartstop}}%
- \setuevalue{\e!stop \currentstartstop}{\dostartstop_stop {\currentstartstop}}%
- \setuevalue {\currentstartstop}{\dostartstop_indeed{\currentstartstop}}%
+ \setuevalue{\e!start\currentstartstop}{\syst_startstop_start {\currentstartstop}}%
+ \setuevalue{\e!stop \currentstartstop}{\syst_startstop_stop {\currentstartstop}}%
+ \setuevalue {\currentstartstop}{\syst_startstop_indeed{\currentstartstop}}%
\to \everydefinestartstop
-\unexpanded\def\dostartstop_start#1%
+\unexpanded\def\syst_startstop_start#1%
{\namedstartstopparameter{#1}\c!before
\bgroup
\def\currentstartstop{#1}%
@@ -179,12 +179,12 @@
\dostarttagged\t!construct\currentstartstop
\usestartstopstyleandcolor\c!style\c!color}
-\unexpanded\def\dostartstop_stop#1%
+\unexpanded\def\syst_startstop_stop#1%
{\dostoptagged
\egroup
\namedstartstopparameter{#1}\c!after}
-\unexpanded\def\dostartstop_indeed#1%
+\unexpanded\def\syst_startstop_indeed#1%
{\groupedcommand
{\def\currentstartstop{#1}%
\startstopparameter\c!commands % will become setups
@@ -199,12 +199,12 @@
\installcommandhandler \??highlight {highlight} \??highlight % we could do with less
\appendtoks
- \setuevalue\currenthighlight{\dohighlight_indeed{\currenthighlight}}%
+ \setuevalue\currenthighlight{\typo_highlights_indeed{\currenthighlight}}%
\to \everydefinehighlight
\ifdefined\dotaghighlight \else \let\dotaghighlight\relax \fi
-\unexpanded\def\dohighlight_indeed#1% inline style/color switch
+\unexpanded\def\typo_highlights_indeed#1% inline style/color switch
{\dontleavehmode\groupedcommand % otherwise wrong par number in tags
{\def\currenthighlight{#1}%
\dostarttagged\t!highlight\currenthighlight
@@ -213,9 +213,9 @@
{\dostoptagged}}
\unexpanded\def\define
- {\doifnextoptionalelse\system_define_yes\def}
+ {\doifnextoptionalelse\syst_basics_define\def}
-\unexpanded\def\system_define_yes[#1]#2#3%
+\unexpanded\def\syst_basics_define[#1]#2#3%
{\ifdefined#2%
\showmessage\m!system4{\string#2}%
\fi
diff --git a/tex/context/base/core-two.mkiv b/tex/context/base/core-two.mkiv
index 58662d030..b08914ef4 100644
--- a/tex/context/base/core-two.mkiv
+++ b/tex/context/base/core-two.mkiv
@@ -87,7 +87,7 @@
\newif \iftwopassdatafound % obsolete, will go
-\def\system_twopass_check
+\def\syst_twopass_check
{\ifx\twopassdata\empty
\twopassdatafoundfalse % obsolete
\setfalse\twopassdatafound
@@ -96,21 +96,21 @@
\settrue\twopassdatafound
\fi}
-\def\system_twopass_set_not_found
+\def\syst_twopass_set_not_found
{\twopassdatafoundfalse % obsolete
\setfalse\twopassdatafound}
-\def\system_twopass_set_found
+\def\syst_twopass_set_found
{\twopassdatafoundtrue % obsolete
\settrue\twopassdatafound}
\unexpanded\def\definetwopasslist #1{\ctxcommand{definetwopasslist('#1')}}
-\unexpanded\def\gettwopassdata #1{\edef\twopassdata {\ctxcommand{gettwopassdata ("#1")}}\system_twopass_check}
-\unexpanded\def\checktwopassdata #1{\edef\twopassdata {\ctxcommand{checktwopassdata ("#1")}}\system_twopass_check}
-\unexpanded\def\findtwopassdata #1#2{\edef\twopassdata {\ctxcommand{findtwopassdata("#1","#2")}}\system_twopass_check}
-\unexpanded\def\getfirsttwopassdata #1{\edef\twopassdata {\ctxcommand{getfirsttwopassdata ("#1")}}\system_twopass_check}
+\unexpanded\def\gettwopassdata #1{\edef\twopassdata {\ctxcommand{gettwopassdata ("#1")}}\syst_twopass_check}
+\unexpanded\def\checktwopassdata #1{\edef\twopassdata {\ctxcommand{checktwopassdata ("#1")}}\syst_twopass_check}
+\unexpanded\def\findtwopassdata #1#2{\edef\twopassdata {\ctxcommand{findtwopassdata("#1","#2")}}\syst_twopass_check}
+\unexpanded\def\getfirsttwopassdata #1{\edef\twopassdata {\ctxcommand{getfirsttwopassdata ("#1")}}\syst_twopass_check}
\unexpanded\def\getlasttwopassdata #1{\edef\twopassdata {\ctxcommand{getlasttwopassdata ("#1")}}%
- \edef\noftwopassitems{\ctxcommand{counttwopassdata ("#1")}}\system_twopass_check}
+ \edef\noftwopassitems{\ctxcommand{counttwopassdata ("#1")}}\syst_twopass_check}
\unexpanded\def\getnamedtwopassdatalist#1#2{\edef #1{\ctxcommand{gettwopassdatalist ("#2")}}}
\unexpanded\def\gettwopassdatalist #1{\edef\twopassdatalist{\ctxcommand{gettwopassdatalist ("#1")}}}
diff --git a/tex/context/base/file-job.mkvi b/tex/context/base/file-job.mkvi
index 8523be33a..83d9c78ba 100644
--- a/tex/context/base/file-job.mkvi
+++ b/tex/context/base/file-job.mkvi
@@ -48,17 +48,17 @@
% zip files are tree'd
\unexpanded\def\usezipfile
- {\dodoubleempty\use_zip_file}
+ {\dodoubleempty\syst_files_use_zip_file}
-\def\use_zip_file[#zipname][#subtree]%
+\def\syst_files_use_zip_file[#zipname][#subtree]%
{\ctxcommand{usezipfile("#zipname","#subtree")}}
% exa stuff might become obsolete:
\unexpanded\def\loadexamodes
- {\dosingleempty\load_exa_modes}
+ {\dosingleempty\syst_files_load_exa_modes}
-\def\load_exa_modes[#name]%
+\def\syst_files_load_exa_modes[#name]%
{\ctxcommand{loadexamodes("#name")}}
% runtime files (maybe also do this in lua?)
@@ -67,12 +67,12 @@
% {\readfile{sys:///#1.\mksuffix}{\showmessage\m!system2{#1.\mksuffix}}\donothing}
\unexpanded\def\loadsystemfiles
- {\load_system_file\f!newfilename % new code, to be integrated at some point, plus fixes posted on the list
- \load_system_file\f!locfilename % new code, somewhat experimental, not distributed (outside the dev group)
- \load_system_file\f!expfilename % new code, very experimental, can be engine specific, mostly for me only
- \load_system_file\f!sysfilename} % local settings, but probably not that good an idea to use
+ {\syst_files_load\f!newfilename % new code, to be integrated at some point, plus fixes posted on the list
+ \syst_files_load\f!locfilename % new code, somewhat experimental, not distributed (outside the dev group)
+ \syst_files_load\f!expfilename % new code, very experimental, can be engine specific, mostly for me only
+ \syst_files_load\f!sysfilename} % local settings, but probably not that good an idea to use
-\def\load_system_file#name% only mkiv files
+\def\syst_files_load#name% only mkiv files
{\readsysfile{#name.\mksuffix}{\showmessage\m!system2{#name.\mksuffix}}\donothing}
\unexpanded\def\loadoptionfile
@@ -112,39 +112,39 @@
% protect structure
-\unexpanded\def\processfilemany #name{\ctxcommand{processfilemany("#name")}}
-\unexpanded\def\processfileonce #name{\ctxcommand{processfileonce("#name")}}
-\unexpanded\def\processfilenone #name{\ctxcommand{processfilenone("#name")}}
+\unexpanded\def\processfilemany#name{\ctxcommand{processfilemany("#name")}}
+\unexpanded\def\processfileonce#name{\ctxcommand{processfileonce("#name")}}
+\unexpanded\def\processfilenone#name{\ctxcommand{processfilenone("#name")}}
-\unexpanded\def\project {\doifnextoptionalelse\useproject \do_project}
-\unexpanded\def\product {\doifnextoptionalelse\useproduct \do_product}
-\unexpanded\def\component {\doifnextoptionalelse\usecomponent \do_component}
-\unexpanded\def\environment {\doifnextoptionalelse\useenvironment\do_environment}
+\unexpanded\def\project {\doifnextoptionalelse\useproject \syst_structure_arg_project}
+\unexpanded\def\product {\doifnextoptionalelse\useproduct \syst_structure_arg_product}
+\unexpanded\def\component {\doifnextoptionalelse\usecomponent \syst_structure_arg_component}
+\unexpanded\def\environment{\doifnextoptionalelse\useenvironment\syst_structure_arg_environment}
-\def\do_project #name {\ctxcommand{useproject ("#name")}}
-\def\do_product #name {\ctxcommand{useproduct ("#name")}}
-\def\do_component #name {\ctxcommand{usecomponent ("#name")}}
-\def\do_environment #name {\ctxcommand{useenvironment("#name")}}
+\def\syst_structure_arg_project #name {\ctxcommand{useproject ("#name")}}
+\def\syst_structure_arg_product #name {\ctxcommand{useproduct ("#name")}}
+\def\syst_structure_arg_component #name {\ctxcommand{usecomponent ("#name")}}
+\def\syst_structure_arg_environment#name {\ctxcommand{useenvironment("#name")}}
-\unexpanded\def\startproject {\doifnextoptionalelse\do_startproject \redo_startproject}
-\unexpanded\def\startproduct {\doifnextoptionalelse\do_startproduct \redo_startproduct}
-\unexpanded\def\startcomponent {\doifnextoptionalelse\do_startcomponent \redo_startcomponent}
-\unexpanded\def\startenvironment {\doifnextoptionalelse\do_startenvironment\redo_startenvironment}
+\unexpanded\def\startproject {\doifnextoptionalelse\syst_structure_start_opt_project \syst_structure_start_arg_project }
+\unexpanded\def\startproduct {\doifnextoptionalelse\syst_structure_start_opt_product \syst_structure_start_arg_product }
+\unexpanded\def\startcomponent {\doifnextoptionalelse\syst_structure_start_opt_component \syst_structure_start_arg_component }
+\unexpanded\def\startenvironment{\doifnextoptionalelse\syst_structure_start_opt_environment\syst_structure_start_arg_environment}
-\def\redo_startproject #name {\ctxcommand{startproject ("#name")}}
-\def\redo_startproduct #name {\ctxcommand{startproduct ("#name")}}
-\def\redo_startcomponent #name {\ctxcommand{startcomponent ("#name")}}
-\def\redo_startenvironment #name {\ctxcommand{startenvironment("#name")}}
+\def\syst_structure_start_arg_project #name {\ctxcommand{startproject ("#name")}}
+\def\syst_structure_start_arg_product #name {\ctxcommand{startproduct ("#name")}}
+\def\syst_structure_start_arg_component #name {\ctxcommand{startcomponent ("#name")}}
+\def\syst_structure_start_arg_environment#name {\ctxcommand{startenvironment("#name")}}
-\unexpanded\def\useproject [#name]{\ctxcommand{useproject ("#name")}}
-\unexpanded\def\useproduct [#name]{\ctxcommand{useproduct ("#name")}}
-\unexpanded\def\usecomponent [#name]{\ctxcommand{usecomponent ("#name")}}
-\unexpanded\def\useenvironment [#name]{\ctxcommand{useenvironment("#name")}}
+\unexpanded\def\useproject [#name]{\ctxcommand{useproject ("#name")}}
+\unexpanded\def\useproduct [#name]{\ctxcommand{useproduct ("#name")}}
+\unexpanded\def\usecomponent [#name]{\ctxcommand{usecomponent ("#name")}}
+\unexpanded\def\useenvironment[#name]{\ctxcommand{useenvironment("#name")}}
-\unexpanded\def\do_startproject [#name]{\ctxcommand{startproject ("#name")}}
-\unexpanded\def\do_startproduct [#name]{\ctxcommand{startproduct ("#name")}}
-\unexpanded\def\do_startcomponent [#name]{\ctxcommand{startcomponent ("#name")}}
-\unexpanded\def\do_startenvironment[#name]{\ctxcommand{startenvironment("#name")}}
+\unexpanded\def\syst_structure_start_opt_project [#name]{\ctxcommand{startproject ("#name")}}
+\unexpanded\def\syst_structure_start_opt_product [#name]{\ctxcommand{startproduct ("#name")}}
+\unexpanded\def\syst_structure_start_opt_component [#name]{\ctxcommand{startcomponent ("#name")}}
+\unexpanded\def\syst_structure_start_opt_environment[#name]{\ctxcommand{startenvironment("#name")}}
\newconditional\endofinput % hack, needed because \endinput happens one level down in the input when we write from lua
@@ -265,9 +265,9 @@
\newtoks\everysetupdocument
\unexpanded\def\startdocument % todo: dostarttagged\t!document
- {\dosingleargument\start_document}
+ {\dosingleargument\syst_structure_document_start}
-\unexpanded\def\start_document[#settings]%
+\unexpanded\def\syst_structure_document_start[#settings]%
{\setvariables[\s!document][#settings]%
\the\everysetupdocument\relax
\starttext
diff --git a/tex/context/base/file-res.mkvi b/tex/context/base/file-res.mkvi
index c3f2065b1..2247a2559 100644
--- a/tex/context/base/file-res.mkvi
+++ b/tex/context/base/file-res.mkvi
@@ -69,15 +69,15 @@
\let\readfilename\empty
-\def\system_files_read_file#protocol#path#name% #true #false
+\def\syst_files_read_file#protocol#path#name% #true #false
{\edef\readfilename{\ctxcommand{getreadfilename("#protocol","#path","#name")}}%
\ifx\readfilename\empty
\expandafter\secondoftwoarguments
\else
- \expandafter\system_files_read_file_indeed
+ \expandafter\syst_files_read_file_indeed
\fi}
-\def\system_files_read_file_indeed#true#false%
+\def\syst_files_read_file_indeed#true#false%
{#true
\relax
\normalinput{\readfilename}%
@@ -107,13 +107,13 @@
%D
%D The most liberal is \type {\readfile}.
-\unexpanded\def\readjobfile #name{\system_files_read_file{job} {.}{#name}} % current path, no backtracking
-\unexpanded\def\readlocfile #name{\system_files_read_file{loc} {.}{#name}} % current path, backtracking
-\unexpanded\def\readsysfile #name{\system_files_read_file{sys} {.}{#name}} % current path, obeys tex search
-\unexpanded\def\readfixfile#path#name{\system_files_read_file{fix}{#path}{#name}} % specified path, backtracking
-\unexpanded\def\readsetfile#path#name{\system_files_read_file{set}{#path}{#name}} % specified path, no backtracking
-\unexpanded\def\readfile #name{\system_files_read_file{any} {.}{#name}}
-\unexpanded\def\ReadFile #name{\system_files_read_file{any} {.}{#name}\donothing\donothing}
+\unexpanded\def\readjobfile #name{\syst_files_read_file{job} {.}{#name}} % current path, no backtracking
+\unexpanded\def\readlocfile #name{\syst_files_read_file{loc} {.}{#name}} % current path, backtracking
+\unexpanded\def\readsysfile #name{\syst_files_read_file{sys} {.}{#name}} % current path, obeys tex search
+\unexpanded\def\readfixfile#path#name{\syst_files_read_file{fix}{#path}{#name}} % specified path, backtracking
+\unexpanded\def\readsetfile#path#name{\syst_files_read_file{set}{#path}{#name}} % specified path, no backtracking
+\unexpanded\def\readfile #name{\syst_files_read_file{any} {.}{#name}}
+\unexpanded\def\ReadFile #name{\syst_files_read_file{any} {.}{#name}\donothing\donothing}
%D So now we've got ourselves five file loading commands:
%D
diff --git a/tex/context/base/file-syn.mkvi b/tex/context/base/file-syn.mkvi
index e823a3519..b61bd8ae4 100644
--- a/tex/context/base/file-syn.mkvi
+++ b/tex/context/base/file-syn.mkvi
@@ -43,11 +43,11 @@
%D \usemodules[pictex,chemie,unit]
%D \stoptyping
-\unexpanded\def\definefilesynonym {\dodoubleempty \system_define_file_synonym }
-\unexpanded\def\definefilefallback{\dodoubleargument\system_define_file_fallback} % still used?
+\unexpanded\def\definefilesynonym {\dodoubleempty \syst_files_define_synonym }
+\unexpanded\def\definefilefallback{\dodoubleargument\syst_files_define_fallback} % still used?
-\def\system_define_file_synonym [#name][#realname]{\ctxcommand{definefilesynonym ("#name","#realname")}}
-\def\system_define_file_fallback[#name][#alternatives]{\ctxcommand{definefilefallback("#name","#alternatives")}}
+\def\syst_files_define_synonym [#name][#realname]{\ctxcommand{definefilesynonym ("#name","#realname")}}
+\def\syst_files_define_fallback[#name][#alternatives]{\ctxcommand{definefilefallback("#name","#alternatives")}}
%D \macros
%D {truefilename}
diff --git a/tex/context/base/font-ini.mkiv b/tex/context/base/font-ini.mkiv
index 4f0c40e7f..a76418478 100644
--- a/tex/context/base/font-ini.mkiv
+++ b/tex/context/base/font-ini.mkiv
@@ -752,7 +752,7 @@
\unexpanded\def\synchronizemathfamilymr
{\attribute\mathfamilyattribute\ifconditional\bidirectionalmathstrategy
- \ifconditional\mathematics_right_to_left
+ \ifconditional\c_math_right_to_left
\plustwo
\else
\plusone
@@ -763,7 +763,7 @@
\unexpanded\def\synchronizemathfamilymb
{\attribute\mathfamilyattribute\ifconditional\bidirectionalmathstrategy
- \ifconditional\mathematics_right_to_left
+ \ifconditional\c_math_right_to_left
\ifconditional\pseudoboldmathstate\pluseight\else\plusfive\fi
\else
\ifconditional\pseudoboldmathstate\plusseven\else\plusfour\fi
@@ -1508,12 +1508,12 @@
\unexpanded\def\xxdododefinefont#1%
{\edef\lastfontidentifier{#1}%
\ifcsname\newfontidentifier\endcsname
- \expandafter\xxdododefinefont_nop
+ \expandafter\xxdododefinefontnop
\else
- \expandafter\xxdododefinefont_yes
+ \expandafter\xxdododefinefontyes
\fi}
-\def\xxdododefinefont_yes#1#2#3% \autofontsizetrue is set by calling routine
+\def\xxdododefinefontyes#1#2#3% \autofontsizetrue is set by calling routine
{\def\localrelativefontsize{#1}%
\def\localabsolutefontsize{#2}%
\lowleveldefinefont{#3}\newfontidentifier
@@ -1525,7 +1525,7 @@
\fi
\let\newfontidentifier\oldnewfontidentifier}
-\def\xxdododefinefont_nop#1#2#3% \autofontsizetrue is set by calling routine
+\def\xxdododefinefontnop#1#2#3% \autofontsizetrue is set by calling routine
{\csname\newfontidentifier\endcsname
\autofontsizefalse
\ifskipfontcharacteristics \else
@@ -3789,9 +3789,9 @@
\def\setemphasisboldface
{\let\savedemphasisboldface\bf
\let\setemphasisboldface\relax
- \let\bf\emphasisboldface_bf}
+ \let\bf\font_emphasis_bold_bold}
-\unexpanded\def\emphasisboldface_bf
+\unexpanded\def\font_emphasis_bold_bold
{%\relax
\let\bf\relax % new
\ifx\fontalternative\c!it
@@ -3811,7 +3811,7 @@
\let\italiccorrection=\/ % tex primitive
\def\emphasiscorrection % not in raw alignment groups, else omit problem
- {\ifhmode\ifnum\currentgrouptype=\@@aligngroup\else
+ {\ifhmode\ifnum\currentgrouptype=\aligngroupcode\else
\expandafter\expandafter\expandafter\emphasislook
\fi\fi}
@@ -4511,75 +4511,69 @@
\appendtoks
\letvalue{\??stylecheck\currentstyle}\relax
- \setuevalue{\e!start\currentstyle}{\apply_style_start{\currentstyle}}%
- \setuevalue{\e!stop \currentstyle}{\apply_style_stop}%
- \setuevalue {\currentstyle}{\apply_style_grouped{\currentstyle}}% no longer groupedcommand here
+ \setuevalue{\e!start\currentstyle}{\font_styles_apply_start{\currentstyle}}%
+ \setuevalue{\e!stop \currentstyle}{\font_styles_apply_stop}%
+ \setuevalue {\currentstyle}{\font_styles_apply_grouped{\currentstyle}}% no longer groupedcommand here
\to \everydefinestyle
-\unexpanded\def\apply_style_start#1%
+\unexpanded\def\font_styles_apply_start#1%
{\begingroup
- \use_defined_style{#1}}
+ \font_styles_use_defined{#1}}
-\unexpanded\def\apply_style_stop
+\unexpanded\def\font_styles_apply_stop
{\endgroup}
-\unexpanded\def\apply_style_grouped#1% assumes that the next is { or \bgroup
+\unexpanded\def\font_styles_apply_grouped#1% assumes that the next is { or \bgroup
{\bgroup
- \def\g_style{\use_defined_style{#1}}%
+ \def\g_style{\font_styles_use_defined{#1}}%
\afterassignment\g_style
\let\nexttoken}
-\unexpanded\def\use_defined_style#1%
+\unexpanded\def\font_styles_use_defined#1%
{\edef\currentstyle{#1}%
\usestylestyleandcolor\c!style\c!color}
-\unexpanded\def\use_generic_style#1%
+\unexpanded\def\font_styles_use_generic#1%
{\let\currentstyle\s!unknown % reasonable generic tag
\setupcurrentstyle[\c!style=,\c!color=,#1]%
\usestylestyleandcolor\c!style\c!color}
% commands
+\installcorenamespace{styleargument}
+
\unexpanded\def\style[#1]% as this is can be a switch we use groupedcommand
- {\csname style_%
- \ifcsname#1\endcsname
- nop%
- \else\ifcsname\??stylecheck#1\endcsname
- use%
- \else
- yes%
- \fi\fi
+ {\csname\??styleargument
+ \ifcsname#1\endcsname1\else\ifcsname\??stylecheck#1\endcsname2\else3\fi\fi
\endcsname{#1}}
-\def\style_nop #1{\csname#1\endcsname}
-\def\style_use #1{\groupedcommand{\use_defined_style{#1}}{}}
-\def\style_yes #1{\doifassignmentelse{#1}\style_assignment\style_direct{#1}}
-\def\style_assignment#1{\groupedcommand{\use_generic_style{#1}}{}}
-\def\style_direct #1{\groupedcommand{\definedfont[#1]}{}}
+\setvalue{\??styleargument1}#1{\csname#1\endcsname}
+\setvalue{\??styleargument2}#1{\groupedcommand{\font_styles_use_defined{#1}}{}}
+\setvalue{\??styleargument3}#1{\doifassignmentelse{#1}\font_styles_assignment\font_styles_direct{#1}}
+
+\def\font_styles_assignment#1{\groupedcommand{\font_styles_use_generic{#1}}{}}
+\def\font_styles_direct #1{\groupedcommand{\definedfont[#1]}{}}
% environments
+\installcorenamespace{styleenvironment}
+
\unexpanded\def\startstyle[#1]%
{\begingroup
- \csname start_style_%
- \ifcsname#1\endcsname
- nop%
- \else\ifcsname\??stylecheck#1\endcsname
- use%
- \else
- yes%
- \fi\fi
+ \csname\??styleenvironment
+ \ifcsname#1\endcsname1\else\ifcsname\??stylecheck#1\endcsname2\else3\fi\fi
\endcsname{#1}}
\unexpanded\def\stopstyle
{\endgroup
\autoinsertnextspace} % will be configurable, maybe also in \definestartstop
-\def\start_style_nop #1{\csname#1\endcsname}
-\def\start_style_use #1{\use_defined_style{#1}}
-\def\start_style_yes #1{\doifassignmentelse{#1}\start_style_assignment\start_style_direct{#1}}
-\def\start_style_assignment#1{\usegenericstyle{#1}}
-\def\start_style_direct #1{\definedfont[#1]\relax}
+\setvalue{\??styleenvironment1}#1{\csname#1\endcsname}
+\setvalue{\??styleenvironment2}#1{\font_styles_use_defined{#1}}
+\setvalue{\??styleenvironment3}#1{\doifassignmentelse{#1}\font_styles_start_assignment\font_styles_start_direct{#1}}
+
+\def\font_styles_start_assignment#1{\usegenericstyle{#1}}
+\def\font_styles_start_direct #1{\definedfont[#1]\relax}
%D Still experimental (might even go away).
@@ -4593,42 +4587,44 @@
% {\bf test \mine test \sl test \mine test \bs oeps \mine oeps {\tt test \mine \bf test}}
+\installcorenamespace{stylecollection}
+
\unexpanded\def\definestylecollection
- {\dosingleargument\dodefinestylecollection}
+ {\dosingleargument\font_styles_define_style_collection}
-\def\dodefinestylecollection[#1]%
+\def\font_styles_define_style_collection[#1]%
{\iffirstargument
\setuvalue{#1}{\styleinstance[#1]}%
- \def\dododefinestylecollection##1%
- {\def\dodododefinestylecollection####1{\letbeundefined{\??sx#1:##1:####1}}%
- \processcommacommand[\fontalternativelist,\s!default]\dodododefinestylecollection}%
- \processcommacommand[\fontstylelist,\s!default]\dododefinestylecollection
+ \def\font_styles_define_style_collection_do##1%
+ {\def\font_styles_define_style_collection_do_do####1{\letbeundefined{\??stylecollection#1:##1:####1}}%
+ \processcommacommand[\fontalternativelist,\s!default]\font_styles_define_style_collection_do_do}%
+ \processcommacommand[\fontstylelist,\s!default]\font_styles_define_style_collection_do
\fi}
\unexpanded\def\definestyleinstance
- {\doquadrupleargument\dodefinestyleinstance}
+ {\doquadrupleargument\font_styles_define_style_instance}
-\def\dodefinestyleinstance[#1][#2][#3][#4]% [name] [rm|ss|tt|..] [sl|bf|...] [whatever]
+\def\font_styles_define_style_instance[#1][#2][#3][#4]% [name] [rm|ss|tt|..] [sl|bf|...] [whatever]
{\iffirstargument
- \ifcsname#1\endcsname\else\definestylecollection[#1]\fi
+ \ifcsname#1\endcsname\else\font_styles_define_style_collection[#1]\fi
\fi
\iffourthargument
- \setvalue{\??sx#1:#2:#3}{#4}%
+ \setvalue{\??stylecollection#1:#2:#3}{#4}%
\else\ifthirdargument
- \setvalue{\??sx#1::#2}{#3}%
+ \setvalue{\??stylecollection#1::#2}{#3}%
\else\ifsecondargument
- \letvalueempty{\??sx#1::#2}%
+ \letvalueempty{\??stylecollection#1::#2}%
\fi\fi\fi}
\unexpanded\def\styleinstance[#1]% will be made faster
{%\begingroup\normalexpanded{\noexpand\infofont[#1:\fontstyle:\fontalternative]}\endgroup
- \executeifdefined{\??sx#1:\fontstyle:\fontalternative}%
- {\executeifdefined{\??sx#1:\fontstyle:\s!default}%
- {\executeifdefined{\??sx#1::\fontalternative}
- {\getvalue {\??sx#1::\s!default}}}}}
+ \executeifdefined{\??stylecollection#1:\fontstyle:\fontalternative}%
+ {\executeifdefined{\??stylecollection#1:\fontstyle:\s!default}%
+ {\executeifdefined{\??stylecollection#1::\fontalternative}
+ {\getvalue {\??stylecollection#1::\s!default}}}}}
% \unexpanded\def\styleinstance[#1]%
-% {\csname\??sx#1%
+% {\csname\??stylecollection#1%
% \ifcsname:\fontstyle:\fontalternative\endcsname
% :\fontstyle:\fontalternative
% \else\ifcsname:\fontstyle:\s!default\endcsname
diff --git a/tex/context/base/grph-epd.mkiv b/tex/context/base/grph-epd.mkiv
index 015298de1..947128b6b 100644
--- a/tex/context/base/grph-epd.mkiv
+++ b/tex/context/base/grph-epd.mkiv
@@ -26,14 +26,14 @@
\reference[\figurereference]{}% todo: dest area
\stopsetups
-\def\graphics_epdf_add_overlay
+\def\grph_epdf_add_overlay
{\global\setbox\foundexternalfigure\vbox\bgroup
\framed[\c!offset=\v!overlay,\c!background={\v!foreground,system:graphics:epdf}]{\box\foundexternalfigure}%
\egroup}
\appendtoks
\iflocation
- \doif\figurefiletype{pdf}{\doifnot\@@efinteraction\v!none\graphics_epdf_add_overlay}%
+ \doif\figurefiletype{pdf}{\doifnot\@@efinteraction\v!none\grph_epdf_add_overlay}%
\fi
\to \externalfigurepostprocessors
diff --git a/tex/context/base/grph-trf.mkiv b/tex/context/base/grph-trf.mkiv
index 754ea70d8..0b603f1ba 100644
--- a/tex/context/base/grph-trf.mkiv
+++ b/tex/context/base/grph-trf.mkiv
@@ -28,36 +28,36 @@
% local:
-\newdimen\d_transforms_scale_x_size
-\newdimen\d_transforms_scale_y_size
-\newdimen\d_transforms_scale_x_offset
-\newdimen\d_transforms_scale_y_offset
+\newdimen\d_grph_scale_x_size
+\newdimen\d_grph_scale_y_size
+\newdimen\d_grph_scale_x_offset
+\newdimen\d_grph_scale_y_offset
-\newdimen\d_transforms_scale_h_size
-\newdimen\d_transforms_scale_v_size
+\newdimen\d_grph_scale_h_size
+\newdimen\d_grph_scale_v_size
-\newconditional\c_transforms_scale_done
-\newconditional\c_transforms_scale_scaling_done
+\newconditional\c_grph_scale_done
+\newconditional\c_grph_scale_scaling_done
-\newdimen\d_transforms_scale_wd
-\newdimen\d_transforms_scale_ht
-\newdimen\d_transforms_scale_dp
+\newdimen\d_grph_scale_wd
+\newdimen\d_grph_scale_ht
+\newdimen\d_grph_scale_dp
% global
-\newdimen\d_transforms_scale_used_x_size
-\newdimen\d_transforms_scale_used_y_size
+\newdimen\d_grph_scale_used_x_size
+\newdimen\d_grph_scale_used_y_size
-\newcount\c_transforms_scale_used_x_scale
-\newcount\c_transforms_scale_used_y_scale
+\newcount\c_grph_scale_used_x_scale
+\newcount\c_grph_scale_used_y_scale
-\newdimen\d_transforms_scale_outer_v_size % we cannot manipulate any global vsize !
+\newdimen\d_grph_scale_outer_v_size % we cannot manipulate any global vsize !
% scratch:
-\let\m_transforms_scale_temp \empty
-\let\m_transforms_scale_temp_x\empty
-\let\m_transforms_scale_temp_y\empty
+\let\m_grph_scale_temp \empty
+\let\m_grph_scale_temp_x\empty
+\let\m_grph_scale_temp_y\empty
% public:
@@ -94,11 +94,11 @@
\c!maxwidth=\scaleparameter\c!width,
\c!maxheight=\scaleparameter\c!height]
-\unexpanded\def\scale{\dodoubleempty\transforms_scale}
+\unexpanded\def\scale{\dodoubleempty\grph_scale}
% we could have: \freezeparameter\c!scale etc (less backtracking when used multiple)
-\def\transforms_scale[#1][#2]%
+\def\grph_scale[#1][#2]%
{\bgroup
% this is quite common so we might make this a helper
\ifsecondargument
@@ -113,9 +113,9 @@
\let\currentscale\empty
\fi\fi
%
- \dowithnextboxcs\transforms_scale_finish\hbox}
+ \dowithnextboxcs\grph_scale_finish\hbox}
-\def\transforms_scale_finish
+\def\grph_scale_finish
{% todo: p_scale_
\edef\p_scale {\scaleparameter\c!scale }%
\edef\p_xscale {\scaleparameter\c!xscale }%
@@ -135,19 +135,19 @@
\edef\p_equalwidth {\scaleparameter\c!equalwidth }%
\edef\p_equalheight{\scaleparameter\c!equalheight}%
%
- \d_transforms_scale_dp\dp\nextbox
- \ifx\p_depth\v!no \ifzeropt\d_transforms_scale_dp \else
- \setbox\nextbox\hbox{\raise\d_transforms_scale_dp\box\nextbox}% new
- \d_transforms_scale_dp\dp\nextbox
+ \d_grph_scale_dp\dp\nextbox
+ \ifx\p_depth\v!no \ifzeropt\d_grph_scale_dp \else
+ \setbox\nextbox\hbox{\raise\d_grph_scale_dp\box\nextbox}% new
+ \d_grph_scale_dp\dp\nextbox
\fi \fi
- \d_transforms_scale_wd\wd\nextbox
- \d_transforms_scale_ht\ht\nextbox
- \d_transforms_scale_dp\dp\nextbox
+ \d_grph_scale_wd\wd\nextbox
+ \d_grph_scale_ht\ht\nextbox
+ \d_grph_scale_dp\dp\nextbox
%
\global\let\finalscaleboxxscale \!!plusone
\global\let\finalscaleboxyscale \!!plusone
- \xdef \finalscaleboxwidth {\the\d_transforms_scale_wd}%
- \xdef \finalscaleboxheight{\the\d_transforms_scale_ht}%
+ \xdef \finalscaleboxwidth {\the\d_grph_scale_wd}%
+ \xdef \finalscaleboxheight{\the\d_grph_scale_ht}%
\global\let\finalscaleboxxfactor\!!hundred
\global\let\finalscaleboxyfactor\!!hundred
%
@@ -155,262 +155,262 @@
\dontshowcomposition
\dontcomplain
%
- \setfalse\c_transforms_scale_done
- \transforms_scale_calculate
- \ifconditional\c_transforms_scale_done
- \transforms_scale_apply
+ \setfalse\c_grph_scale_done
+ \grph_scale_calculate
+ \ifconditional\c_grph_scale_done
+ \grph_scale_apply
\fi
- \transforms_scale_position
+ \grph_scale_position
%
\box\nextbox
\egroup}
-\def\transforms_scale_apply
- {\d_transforms_scale_wd\finalscaleboxxscale\d_transforms_scale_wd
- \d_transforms_scale_ht\finalscaleboxyscale\d_transforms_scale_ht
- \d_transforms_scale_dp\finalscaleboxyscale\d_transforms_scale_dp
+\def\grph_scale_apply
+ {\d_grph_scale_wd\finalscaleboxxscale\d_grph_scale_wd
+ \d_grph_scale_ht\finalscaleboxyscale\d_grph_scale_ht
+ \d_grph_scale_dp\finalscaleboxyscale\d_grph_scale_dp
\setbox\nextbox\hbox
{\dostartscaling \finalscaleboxxscale \finalscaleboxyscale
\smashedbox\nextbox
\dostopscaling}%
- \wd\nextbox\d_transforms_scale_wd
- \ht\nextbox\d_transforms_scale_ht
- \dp\nextbox\d_transforms_scale_dp}
-
-\def\m_transforms_scale_stamp_c{11}
-
-\def\transforms_scale_calculate
- {\ifdim\d_transforms_scale_ht>\zeropoint \ifdim\d_transforms_scale_wd>\zeropoint
- \edef\m_transforms_scale_stamp_a{\p_scale\p_xscale\p_yscale\p_factor\p_wfactor\p_hfactor\p_lines\p_width\p_height}%
- \edef\m_transforms_scale_stamp_b{\p_sx\p_sy}%
- \ifx\m_transforms_scale_stamp_a\empty
- \ifx\m_transforms_scale_stamp_b\m_transforms_scale_stamp_c
+ \wd\nextbox\d_grph_scale_wd
+ \ht\nextbox\d_grph_scale_ht
+ \dp\nextbox\d_grph_scale_dp}
+
+\def\m_grph_scale_stamp_c{11}
+
+\def\grph_scale_calculate
+ {\ifdim\d_grph_scale_ht>\zeropoint \ifdim\d_grph_scale_wd>\zeropoint
+ \edef\m_grph_scale_stamp_a{\p_scale\p_xscale\p_yscale\p_factor\p_wfactor\p_hfactor\p_lines\p_width\p_height}%
+ \edef\m_grph_scale_stamp_b{\p_sx\p_sy}%
+ \ifx\m_grph_scale_stamp_a\empty
+ \ifx\m_grph_scale_stamp_b\m_grph_scale_stamp_c
% no scaling, don't change this (previous attempts failed anyway)
\insidefloattrue % trick
- \transforms_scale_calculations_yes
+ \grph_scale_calculations_yes
\else
- \transforms_scale_check_sx_sy
- \transforms_scale_calculations_nop
+ \grph_scale_check_sx_sy
+ \grph_scale_calculations_nop
\fi
\else
- \ifx\m_transforms_scale_stamp_b\empty
+ \ifx\m_grph_scale_stamp_b\empty
% no need to check further
\else
- \transforms_scale_check_sx_sy
+ \grph_scale_check_sx_sy
\fi
- \transforms_scale_calculations_yes
+ \grph_scale_calculations_yes
\fi
\fi \fi}
-\def\transforms_scale_check_sx_sy
- {\ifdim\p_sx\onepoint=\onepoint\else\edef\p_width {\the\dimexpr\p_sx\d_transforms_scale_wd}\fi
- \ifdim\p_sy\onepoint=\onepoint\else\edef\p_height{\the\dimexpr\p_sy\d_transforms_scale_ht}\fi}
+\def\grph_scale_check_sx_sy
+ {\ifdim\p_sx\onepoint=\onepoint\else\edef\p_width {\the\dimexpr\p_sx\d_grph_scale_wd}\fi
+ \ifdim\p_sy\onepoint=\onepoint\else\edef\p_height{\the\dimexpr\p_sy\d_grph_scale_ht}\fi}
-\def\transforms_scale_rounded#1%
- {\expandafter\expandafter\expandafter\transforms_scale_rounded_indeed
+\def\grph_scale_rounded#1%
+ {\expandafter\expandafter\expandafter\grph_scale_rounded_indeed
\expandafter\WITHOUTPT\the\dimexpr#1\points*100+32768sp\relax.\relax}
-\def\transforms_scale_rounded_indeed#1.#2\relax{#1}
+\def\grph_scale_rounded_indeed#1.#2\relax{#1}
-\def\transforms_scale_calculations_nop
- {\settrue\c_transforms_scale_done
- \xdef\finalscaleboxwidth {\the\dimexpr\p_sx\d_transforms_scale_wd\relax}%
- \xdef\finalscaleboxheight{\the\dimexpr\p_sy\d_transforms_scale_ht\relax}%
+\def\grph_scale_calculations_nop
+ {\settrue\c_grph_scale_done
+ \xdef\finalscaleboxwidth {\the\dimexpr\p_sx\d_grph_scale_wd\relax}%
+ \xdef\finalscaleboxheight{\the\dimexpr\p_sy\d_grph_scale_ht\relax}%
\glet\finalscaleboxxscale\p_sx
\glet\finalscaleboxyscale\p_sy
\ifx\finalscaleboxxscale\empty\let\finalscaleboxxscale\!!plusone\fi
\ifx\finalscaleboxyscale\empty\let\finalscaleboxyscale\!!plusone\fi
- \xdef\finalscaleboxxfactor{\transforms_scale_rounded\finalscaleboxxscale}%
- \xdef\finalscaleboxyfactor{\transforms_scale_rounded\finalscaleboxyscale}}
+ \xdef\finalscaleboxxfactor{\grph_scale_rounded\finalscaleboxxscale}%
+ \xdef\finalscaleboxyfactor{\grph_scale_rounded\finalscaleboxyscale}}
-\def\transforms_scale_calculations_yes
- {\settrue\c_transforms_scale_done
+\def\grph_scale_calculations_yes
+ {\settrue\c_grph_scale_done
% initial values
- \d_transforms_scale_x_offset\zeropoint
- \d_transforms_scale_y_offset\zeropoint
- \d_transforms_scale_x_size \d_transforms_scale_wd
- \d_transforms_scale_y_size \d_transforms_scale_ht % alleen ht wordt geschaald!
+ \d_grph_scale_x_offset\zeropoint
+ \d_grph_scale_y_offset\zeropoint
+ \d_grph_scale_x_size \d_grph_scale_wd
+ \d_grph_scale_y_size \d_grph_scale_ht % alleen ht wordt geschaald!
% final values
- \global\d_transforms_scale_used_x_size \zeropoint % see note * (core-fig)
- \global\d_transforms_scale_used_y_size \zeropoint % see note * (core-fig)
- \c_transforms_scale_used_x_scale \plusone % see note * (core-fig)
- \c_transforms_scale_used_y_scale \plusone % see note * (core-fig)
+ \global\d_grph_scale_used_x_size \zeropoint % see note * (core-fig)
+ \global\d_grph_scale_used_y_size \zeropoint % see note * (core-fig)
+ \c_grph_scale_used_x_scale \plusone % see note * (core-fig)
+ \c_grph_scale_used_y_scale \plusone % see note * (core-fig)
% preparations
- \setfalse\c_transforms_scale_scaling_done
- \transforms_scale_check_parameters
+ \setfalse\c_grph_scale_scaling_done
+ \grph_scale_check_parameters
% calculators
% beware, they operate in sequence, and calculate missing dimensions / messy
%setscaleboxbynature % when? needed?
- \ifconditional\c_transforms_scale_scaling_done\else\transforms_scale_by_factor \fi
- \ifconditional\c_transforms_scale_scaling_done\else\transforms_scale_by_scale \fi
- \ifconditional\c_transforms_scale_scaling_done\else\transforms_scale_by_dimension\fi
+ \ifconditional\c_grph_scale_scaling_done\else\grph_scale_by_factor \fi
+ \ifconditional\c_grph_scale_scaling_done\else\grph_scale_by_scale \fi
+ \ifconditional\c_grph_scale_scaling_done\else\grph_scale_by_dimension\fi
% finalizers / to be done (no longer needed this way, clean up)
- \transforms_scale_convert_large_scale\d_transforms_scale_h_size\figx\c_transforms_scale_used_x_scale\m_transforms_scale_temp_x
- \transforms_scale_convert_large_scale\d_transforms_scale_v_size\figy\c_transforms_scale_used_y_scale\m_transforms_scale_temp_y
+ \grph_scale_convert_large_scale\d_grph_scale_h_size\figx\c_grph_scale_used_x_scale\m_grph_scale_temp_x
+ \grph_scale_convert_large_scale\d_grph_scale_v_size\figy\c_grph_scale_used_y_scale\m_grph_scale_temp_y
% used in actual scaling
- \xdef\finalscaleboxwidth {\the\d_transforms_scale_used_x_size}%
- \xdef\finalscaleboxheight {\the\d_transforms_scale_used_y_size}%
- \xdef\finalscaleboxxfactor{\the\c_transforms_scale_used_x_scale}%
- \xdef\finalscaleboxyfactor{\the\c_transforms_scale_used_y_scale}%
- \xdef\finalscaleboxxscale {\withoutpt\the\dimexpr\m_transforms_scale_temp_x\points/\plushundred\relax}%
- \xdef\finalscaleboxyscale {\withoutpt\the\dimexpr\m_transforms_scale_temp_y\points/\plushundred\relax}}
-
-\setvalue{\??scalegrid\v!yes }{\getnoflines \d_transforms_scale_used_y_size\edef\p_height{\the\noflines\lineheight}}
-\setvalue{\??scalegrid\v!height }{\getrawnoflines\d_transforms_scale_used_y_size\edef\p_height{\the\dimexpr\noflines\lineheight+\strutdepth}}
-\setvalue{\??scalegrid\v!depth }{\getrawnoflines\d_transforms_scale_used_y_size\edef\p_height{\the\dimexpr\noflines\lineheight-\strutdepth}}
-\setvalue{\??scalegrid\v!halfline}{\getrawnoflines\d_transforms_scale_used_y_size\edef\p_height{\the\dimexpr\noflines\lineheight+.5\lineheight}}
-\setvalue{\??scalegrid\v!fit }{\getrawnoflines\d_transforms_scale_used_y_size\edef\p_height{\the\noflines\lineheight}}
+ \xdef\finalscaleboxwidth {\the\d_grph_scale_used_x_size}%
+ \xdef\finalscaleboxheight {\the\d_grph_scale_used_y_size}%
+ \xdef\finalscaleboxxfactor{\the\c_grph_scale_used_x_scale}%
+ \xdef\finalscaleboxyfactor{\the\c_grph_scale_used_y_scale}%
+ \xdef\finalscaleboxxscale {\withoutpt\the\dimexpr\m_grph_scale_temp_x\points/\plushundred\relax}%
+ \xdef\finalscaleboxyscale {\withoutpt\the\dimexpr\m_grph_scale_temp_y\points/\plushundred\relax}}
+
+\setvalue{\??scalegrid\v!yes }{\getnoflines \d_grph_scale_used_y_size\edef\p_height{\the\noflines\lineheight}}
+\setvalue{\??scalegrid\v!height }{\getrawnoflines\d_grph_scale_used_y_size\edef\p_height{\the\dimexpr\noflines\lineheight+\strutdepth}}
+\setvalue{\??scalegrid\v!depth }{\getrawnoflines\d_grph_scale_used_y_size\edef\p_height{\the\dimexpr\noflines\lineheight-\strutdepth}}
+\setvalue{\??scalegrid\v!halfline}{\getrawnoflines\d_grph_scale_used_y_size\edef\p_height{\the\dimexpr\noflines\lineheight+.5\lineheight}}
+\setvalue{\??scalegrid\v!fit }{\getrawnoflines\d_grph_scale_used_y_size\edef\p_height{\the\noflines\lineheight}}
\letvalue{\??scalegrid\empty }\donothing
-\def\transforms_scale_check_parameters % resolve self referencing loops
+\def\grph_scale_check_parameters % resolve self referencing loops
{\ifx\p_maxwidth \empty\else \edef\p_maxwidth {\the\dimexpr\p_maxwidth }\fi
\ifx\p_maxheight\empty\else \edef\p_maxheight{\the\dimexpr\p_maxheight }\fi
\ifx\p_lines \empty\else \edef\p_height {\the\dimexpr\p_lines\lineheight}\fi
\getvalue{\??scalegrid\scaleparameter\c!grid}}
-\def\transforms_scale_by_nature % where ! ! ! ! !
- {\ifx\p_width \empty\else \global\d_transforms_scale_used_x_size\p_width \fi
- \ifx\p_height\empty\else \global\d_transforms_scale_used_y_size\p_height\fi
- \ifx\p_scale \empty\else \c_transforms_scale_used_x_scale\p_scale
- \c_transforms_scale_used_y_scale\p_scale \fi
- \ifx\p_xscale\empty\else \c_transforms_scale_used_x_scale\p_xscale\fi
- \ifx\p_yscale\empty\else \c_transforms_scale_used_y_scale\p_yscale\fi}
+\def\grph_scale_by_nature % where ! ! ! ! !
+ {\ifx\p_width \empty\else \global\d_grph_scale_used_x_size\p_width \fi
+ \ifx\p_height\empty\else \global\d_grph_scale_used_y_size\p_height\fi
+ \ifx\p_scale \empty\else \c_grph_scale_used_x_scale\p_scale
+ \c_grph_scale_used_y_scale\p_scale \fi
+ \ifx\p_xscale\empty\else \c_grph_scale_used_x_scale\p_xscale\fi
+ \ifx\p_yscale\empty\else \c_grph_scale_used_y_scale\p_yscale\fi}
% \defineexternalfigure[width-6][factor=auto,maxwidth=\textheight,maxheight=\textwidth]
% \defineexternalfigure[width-7][factor=auto,maxwidth=\textwidth,maxheight=\textheight]
% \placefigure{none}{\rotate[frame=on,offset=overlay]{\externalfigure[t:/sources/cow.pdf][width-6]}} \page
% \placefigure{none}{\framed[frame=on,offset=overlay]{\externalfigure[t:/sources/cow.pdf][width-7]}}
-\def\m_transforms_scale_factor_set{\v!max,\v!fit,\v!broad,\v!auto} % can be an \edef
-
-\def\transforms_scale_by_factor
- {\doifinsetelse\p_factor\m_transforms_scale_factor_set
- \transforms_scale_by_factor_a
- {\doifinsetelse\p_hfactor\m_transforms_scale_factor_set
- \transforms_scale_by_factor_b
- {\doifinsetelse\p_wfactor\m_transforms_scale_factor_set
- \transforms_scale_by_factor_c
- \transforms_scale_by_factor_d}}}
-
-\def\transforms_scale_by_factor_a
- {\transforms_scale_apply_size
- \ifdim\d_transforms_scale_x_size>\d_transforms_scale_y_size
- \transforms_scale_calculate_norm \d_transforms_scale_used_x_size\p_factor\p_maxwidth\hsize\d_transforms_scale_h_size
- \transforms_scale_calculate_scales\d_transforms_scale_used_x_size\d_transforms_scale_x_size\d_transforms_scale_used_y_size\d_transforms_scale_y_size
+\def\m_grph_scale_factor_set{\v!max,\v!fit,\v!broad,\v!auto} % can be an \edef
+
+\def\grph_scale_by_factor
+ {\doifinsetelse\p_factor\m_grph_scale_factor_set
+ \grph_scale_by_factor_a
+ {\doifinsetelse\p_hfactor\m_grph_scale_factor_set
+ \grph_scale_by_factor_b
+ {\doifinsetelse\p_wfactor\m_grph_scale_factor_set
+ \grph_scale_by_factor_c
+ \grph_scale_by_factor_d}}}
+
+\def\grph_scale_by_factor_a
+ {\grph_scale_apply_size
+ \ifdim\d_grph_scale_x_size>\d_grph_scale_y_size
+ \grph_scale_calculate_norm \d_grph_scale_used_x_size\p_factor\p_maxwidth\hsize\d_grph_scale_h_size
+ \grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size\d_grph_scale_used_y_size\d_grph_scale_y_size
\else
- \transforms_scale_calculate_norm \d_transforms_scale_used_y_size\p_factor\p_maxheight\d_transforms_scale_outer_v_size\d_transforms_scale_v_size
- \transforms_scale_calculate_scales\d_transforms_scale_used_y_size\d_transforms_scale_y_size\d_transforms_scale_used_x_size\d_transforms_scale_x_size
+ \grph_scale_calculate_norm \d_grph_scale_used_y_size\p_factor\p_maxheight\d_grph_scale_outer_v_size\d_grph_scale_v_size
+ \grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size\d_grph_scale_used_x_size\d_grph_scale_x_size
\fi
- \transforms_scale_by_factor_indeed}
-
-\def\transforms_scale_by_factor_b
- {\transforms_scale_apply_size
- \transforms_scale_calculate_norm \d_transforms_scale_used_y_size\p_hfactor\p_maxheight\d_transforms_scale_outer_v_size\d_transforms_scale_v_size
- \transforms_scale_calculate_scales\d_transforms_scale_used_y_size\d_transforms_scale_y_size\d_transforms_scale_used_x_size\d_transforms_scale_x_size
- \transforms_scale_by_factor_indeed}
-
-\def\transforms_scale_by_factor_c
- {\transforms_scale_apply_size
- \transforms_scale_calculate_norm \d_transforms_scale_used_x_size\p_wfactor\p_maxwidth\hsize\d_transforms_scale_h_size
- \transforms_scale_calculate_scales\d_transforms_scale_used_x_size\d_transforms_scale_x_size\d_transforms_scale_used_y_size\d_transforms_scale_y_size
- \transforms_scale_by_factor_indeed}
-
-\def\transforms_scale_by_factor_d
- {\transforms_scale_calculate_norm\d_transforms_scale_used_y_size\p_factor \p_height \textheight\d_transforms_scale_v_size
- \transforms_scale_calculate_norm\d_transforms_scale_used_y_size\p_hfactor\p_height \textheight\d_transforms_scale_v_size
- \transforms_scale_calculate_norm\d_transforms_scale_used_x_size\p_wfactor\p_width \hsize \hsize}
-
-\def\transforms_scale_by_factor_indeed
- {\settrue\c_transforms_scale_scaling_done
- \ifdim\d_transforms_scale_used_x_size>\d_transforms_scale_h_size
- \global\d_transforms_scale_used_y_size\zeropoint
- \global\d_transforms_scale_used_x_size\d_transforms_scale_h_size
- \else\ifdim\d_transforms_scale_used_y_size>\d_transforms_scale_v_size
- \global\d_transforms_scale_used_x_size\zeropoint
- \global\d_transforms_scale_used_y_size\d_transforms_scale_v_size
+ \grph_scale_by_factor_indeed}
+
+\def\grph_scale_by_factor_b
+ {\grph_scale_apply_size
+ \grph_scale_calculate_norm \d_grph_scale_used_y_size\p_hfactor\p_maxheight\d_grph_scale_outer_v_size\d_grph_scale_v_size
+ \grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size\d_grph_scale_used_x_size\d_grph_scale_x_size
+ \grph_scale_by_factor_indeed}
+
+\def\grph_scale_by_factor_c
+ {\grph_scale_apply_size
+ \grph_scale_calculate_norm \d_grph_scale_used_x_size\p_wfactor\p_maxwidth\hsize\d_grph_scale_h_size
+ \grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size\d_grph_scale_used_y_size\d_grph_scale_y_size
+ \grph_scale_by_factor_indeed}
+
+\def\grph_scale_by_factor_d
+ {\grph_scale_calculate_norm\d_grph_scale_used_y_size\p_factor \p_height \textheight\d_grph_scale_v_size
+ \grph_scale_calculate_norm\d_grph_scale_used_y_size\p_hfactor\p_height \textheight\d_grph_scale_v_size
+ \grph_scale_calculate_norm\d_grph_scale_used_x_size\p_wfactor\p_width \hsize \hsize}
+
+\def\grph_scale_by_factor_indeed
+ {\settrue\c_grph_scale_scaling_done
+ \ifdim\d_grph_scale_used_x_size>\d_grph_scale_h_size
+ \global\d_grph_scale_used_y_size\zeropoint
+ \global\d_grph_scale_used_x_size\d_grph_scale_h_size
+ \else\ifdim\d_grph_scale_used_y_size>\d_grph_scale_v_size
+ \global\d_grph_scale_used_x_size\zeropoint
+ \global\d_grph_scale_used_y_size\d_grph_scale_v_size
\fi\fi
- \transforms_scale_by_dimension}
-
-\def\transforms_scale_by_scale
- {\edef\m_transforms_scale_temp{\p_scale\p_xscale\p_yscale}%
- \ifx\m_transforms_scale_temp\empty \else
- \transforms_scale_apply_scale\d_transforms_scale_used_x_size\d_transforms_scale_x_size\c_transforms_scale_used_x_scale\p_xscale
- \transforms_scale_apply_scale\d_transforms_scale_used_y_size\d_transforms_scale_y_size\c_transforms_scale_used_y_scale\p_yscale
- \global\d_transforms_scale_used_x_size\zeropoint
- \global\d_transforms_scale_used_y_size\zeropoint
+ \grph_scale_by_dimension}
+
+\def\grph_scale_by_scale
+ {\edef\m_grph_scale_temp{\p_scale\p_xscale\p_yscale}%
+ \ifx\m_grph_scale_temp\empty \else
+ \grph_scale_apply_scale\d_grph_scale_used_x_size\d_grph_scale_x_size\c_grph_scale_used_x_scale\p_xscale
+ \grph_scale_apply_scale\d_grph_scale_used_y_size\d_grph_scale_y_size\c_grph_scale_used_y_scale\p_yscale
+ \global\d_grph_scale_used_x_size\zeropoint
+ \global\d_grph_scale_used_y_size\zeropoint
\ifx\p_maxwidth\empty
\ifx\p_maxheight\empty
\else
- \ifdim\d_transforms_scale_y_size>\p_maxheight\relax
- \global\d_transforms_scale_used_y_size\p_maxheight
+ \ifdim\d_grph_scale_y_size>\p_maxheight\relax
+ \global\d_grph_scale_used_y_size\p_maxheight
\fi
\fi
\else
- \ifdim\d_transforms_scale_x_size>\p_maxwidth\relax
- \global\d_transforms_scale_used_x_size\p_maxwidth
+ \ifdim\d_grph_scale_x_size>\p_maxwidth\relax
+ \global\d_grph_scale_used_x_size\p_maxwidth
\fi
\fi
\fi}
-\def\transforms_scale_by_dimension
- {\ifdim\d_transforms_scale_used_x_size>\zeropoint
- \ifdim\d_transforms_scale_used_y_size>\zeropoint
- \transforms_scale_by_dimension_a
+\def\grph_scale_by_dimension
+ {\ifdim\d_grph_scale_used_x_size>\zeropoint
+ \ifdim\d_grph_scale_used_y_size>\zeropoint
+ \grph_scale_by_dimension_a
\else
- \transforms_scale_by_dimension_b
+ \grph_scale_by_dimension_b
\fi
\else
- \ifdim\d_transforms_scale_used_y_size>\zeropoint
- \transforms_scale_by_dimension_c
+ \ifdim\d_grph_scale_used_y_size>\zeropoint
+ \grph_scale_by_dimension_c
\else
- \transforms_scale_by_dimension_d
+ \grph_scale_by_dimension_d
\fi
\fi}
-\def\transforms_scale_by_dimension_a
- {\transforms_scale_by_dimension_indeed
- {\transforms_scale_calculate_scale\d_transforms_scale_used_y_size\d_transforms_scale_y_size\c_transforms_scale_used_y_scale
- \transforms_scale_calculate_scale\d_transforms_scale_used_x_size\d_transforms_scale_x_size\c_transforms_scale_used_x_scale}%
- {\transforms_scale_calculate_scale\d_transforms_scale_used_y_size\d_transforms_scale_y_size\c_transforms_scale_used_y_scale
- \transforms_scale_calculate_scale\d_transforms_scale_used_x_size\d_transforms_scale_x_size\c_transforms_scale_used_x_scale}%
- {\transforms_scale_calculate_scale\d_transforms_scale_used_y_size\d_transforms_scale_y_size\c_transforms_scale_used_y_scale
- \transforms_scale_calculate_scale\d_transforms_scale_used_x_size\d_transforms_scale_x_size\c_transforms_scale_used_x_scale}}
-
-\def\transforms_scale_by_dimension_b
- {\transforms_scale_by_dimension_indeed
- {\transforms_scale_calculate_scales\d_transforms_scale_used_x_size\d_transforms_scale_x_size\d_transforms_scale_used_y_size\d_transforms_scale_y_size}%
- {\transforms_scale_calculate_scales\d_transforms_scale_used_x_size\d_transforms_scale_x_size\d_transforms_scale_used_y_size\d_transforms_scale_y_size}%
- {\transforms_scale_calculate_scales\d_transforms_scale_used_x_size\d_transforms_scale_x_size\d_transforms_scale_used_y_size\d_transforms_scale_y_size}}
-
-\def\transforms_scale_by_dimension_c
- {\transforms_scale_by_dimension_indeed
- {\transforms_scale_calculate_scales\d_transforms_scale_used_y_size\d_transforms_scale_y_size\d_transforms_scale_used_x_size\d_transforms_scale_x_size}%
- {\transforms_scale_calculate_scales\d_transforms_scale_used_y_size\d_transforms_scale_y_size\d_transforms_scale_used_x_size\d_transforms_scale_x_size}%
- {\transforms_scale_calculate_scales\d_transforms_scale_used_y_size\d_transforms_scale_y_size\d_transforms_scale_used_x_size\d_transforms_scale_x_size}}
-
-\def\transforms_scale_by_dimension_d
- {\transforms_scale_by_dimension_indeed
- {\transforms_scale_apply_scale\d_transforms_scale_used_x_size\d_transforms_scale_x_size\c_transforms_scale_used_x_scale\p_xscale
- \transforms_scale_apply_scale\d_transforms_scale_used_y_size\d_transforms_scale_y_size\c_transforms_scale_used_y_scale\p_yscale}%
- {\transforms_scale_calculate_scales\d_transforms_scale_used_x_size\d_transforms_scale_x_size\d_transforms_scale_used_y_size\d_transforms_scale_y_size}%
- {\transforms_scale_calculate_scales\d_transforms_scale_used_y_size\d_transforms_scale_y_size\d_transforms_scale_used_x_size\d_transforms_scale_x_size}}
-
-\def\transforms_scale_by_dimension_indeed#1#2#3%
+\def\grph_scale_by_dimension_a
+ {\grph_scale_by_dimension_indeed
+ {\grph_scale_calculate_scale\d_grph_scale_used_y_size\d_grph_scale_y_size\c_grph_scale_used_y_scale
+ \grph_scale_calculate_scale\d_grph_scale_used_x_size\d_grph_scale_x_size\c_grph_scale_used_x_scale}%
+ {\grph_scale_calculate_scale\d_grph_scale_used_y_size\d_grph_scale_y_size\c_grph_scale_used_y_scale
+ \grph_scale_calculate_scale\d_grph_scale_used_x_size\d_grph_scale_x_size\c_grph_scale_used_x_scale}%
+ {\grph_scale_calculate_scale\d_grph_scale_used_y_size\d_grph_scale_y_size\c_grph_scale_used_y_scale
+ \grph_scale_calculate_scale\d_grph_scale_used_x_size\d_grph_scale_x_size\c_grph_scale_used_x_scale}}
+
+\def\grph_scale_by_dimension_b
+ {\grph_scale_by_dimension_indeed
+ {\grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size\d_grph_scale_used_y_size\d_grph_scale_y_size}%
+ {\grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size\d_grph_scale_used_y_size\d_grph_scale_y_size}%
+ {\grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size\d_grph_scale_used_y_size\d_grph_scale_y_size}}
+
+\def\grph_scale_by_dimension_c
+ {\grph_scale_by_dimension_indeed
+ {\grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size\d_grph_scale_used_x_size\d_grph_scale_x_size}%
+ {\grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size\d_grph_scale_used_x_size\d_grph_scale_x_size}%
+ {\grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size\d_grph_scale_used_x_size\d_grph_scale_x_size}}
+
+\def\grph_scale_by_dimension_d
+ {\grph_scale_by_dimension_indeed
+ {\grph_scale_apply_scale\d_grph_scale_used_x_size\d_grph_scale_x_size\c_grph_scale_used_x_scale\p_xscale
+ \grph_scale_apply_scale\d_grph_scale_used_y_size\d_grph_scale_y_size\c_grph_scale_used_y_scale\p_yscale}%
+ {\grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size\d_grph_scale_used_y_size\d_grph_scale_y_size}%
+ {\grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size\d_grph_scale_used_x_size\d_grph_scale_x_size}}
+
+\def\grph_scale_by_dimension_indeed#1#2#3%
{#1\relax
\ifx\p_maxwidth\empty \else
- \ifdim\d_transforms_scale_used_x_size>\p_maxwidth\relax
- \global\d_transforms_scale_used_x_size\p_maxwidth
+ \ifdim\d_grph_scale_used_x_size>\p_maxwidth\relax
+ \global\d_grph_scale_used_x_size\p_maxwidth
#2\relax
\fi
\fi
\ifx\p_maxheight\empty \else
- \ifdim\d_transforms_scale_used_y_size>\p_maxheight\relax
- \global\d_transforms_scale_used_y_size\p_maxheight
+ \ifdim\d_grph_scale_used_y_size>\p_maxheight\relax
+ \global\d_grph_scale_used_y_size\p_maxheight
#3\relax
\fi
\fi}
-\def\transforms_scale_calculate_norm#1#2% todo: swap 1 and 2 and pass one less
+\def\grph_scale_calculate_norm#1#2% todo: swap 1 and 2 and pass one less
{\csname\??scalenorm\ifcsname\??scalenorm#2\endcsname#2\else\s!unknown\fi\endcsname#1#2}
\setvalue{\??scalenorm\v!max }#1#2#3#4#5{\global#1#4}
@@ -421,16 +421,16 @@
\setvalue{\??scalenorm\empty }#1#2#3#4#5{\ifx#3\empty\else\global#1#3\fi}
\setvalue{\??scalenorm\s!default}#1#2#3#4#5{\ifx#3\empty\else\global#1#3\fi}
-\def\transforms_scale_calculate_scales#1#2#3#4%
+\def\grph_scale_calculate_scales#1#2#3#4%
{\scratchdimen\dimexpr#1/\dimexpr#2/\plusthousand\relax\relax
- \c_transforms_scale_used_x_scale\scratchdimen
- \c_transforms_scale_used_y_scale\scratchdimen
- #3\dimexpr\c_transforms_scale_used_x_scale\dimexpr#4/\plusthousand\relax\relax}
+ \c_grph_scale_used_x_scale\scratchdimen
+ \c_grph_scale_used_y_scale\scratchdimen
+ #3\dimexpr\c_grph_scale_used_x_scale\dimexpr#4/\plusthousand\relax\relax}
-\def\transforms_scale_calculate_scale#1#2#3%
+\def\grph_scale_calculate_scale#1#2#3%
{#3\dimexpr#1/\dimexpr#2/\plusthousand\relax\relax}
-\def\transforms_scale_apply_scale#1#2#3#4% #4 = parameter / scale can be empty
+\def\grph_scale_apply_scale#1#2#3#4% #4 = parameter / scale can be empty
{\ifcase0#4\relax
\ifcase0\p_scale\relax
#3=\plusthousand
@@ -444,45 +444,45 @@
\global#1\ifnum#3=\plusthousand#2\else\dimexpr#3\dimexpr#2/\plusthousand\relax\relax\fi
\relax}
-\def\transforms_scale_apply_size
+\def\grph_scale_apply_size
{\ifx\p_maxheight\empty
- \d_transforms_scale_outer_v_size\textheight
+ \d_grph_scale_outer_v_size\textheight
\ifinner
- \d_transforms_scale_outer_v_size \vsize % \textheight =\vsize
+ \d_grph_scale_outer_v_size \vsize % \textheight =\vsize
\scratchdimen\vsize % \scratchdimen=\textheight
\else\ifinsidefloat
- \d_transforms_scale_outer_v_size \vsize % \textheight =\vsize
+ \d_grph_scale_outer_v_size \vsize % \textheight =\vsize
\scratchdimen\vsize % \scratchdimen=\textheight
\else\ifinpagebody
- \d_transforms_scale_outer_v_size \vsize % \textheight =\vsize
+ \d_grph_scale_outer_v_size \vsize % \textheight =\vsize
\scratchdimen\vsize % \scratchdimen=\textheight
\else % hm, there should be an option to force this
\ifdim\pagegoal<\maxdimen
\ifdim\pagetotal<\pagegoal
\scratchdimen\dimexpr\pagegoal-\pagetotal\relax
\else
- \scratchdimen\d_transforms_scale_outer_v_size % \textheight
+ \scratchdimen\d_grph_scale_outer_v_size % \textheight
\fi
\else
- \scratchdimen\d_transforms_scale_outer_v_size % \textheight
+ \scratchdimen\d_grph_scale_outer_v_size % \textheight
\fi
\fi\fi\fi
\else
\scratchdimen\p_maxheight
- \d_transforms_scale_outer_v_size\scratchdimen
+ \d_grph_scale_outer_v_size\scratchdimen
\fi
\ifx\p_height\empty
- \d_transforms_scale_v_size\scratchdimen
+ \d_grph_scale_v_size\scratchdimen
\else
- \d_transforms_scale_v_size\p_height
+ \d_grph_scale_v_size\p_height
\fi
\ifx\p_width\empty
- \d_transforms_scale_h_size\hsize
+ \d_grph_scale_h_size\hsize
\else
- \d_transforms_scale_h_size\p_width
+ \d_grph_scale_h_size\p_width
\fi}
-\def\transforms_scale_convert_large_scale#1#2#3#4%
+\def\grph_scale_convert_large_scale#1#2#3#4%
{\scratchdimen#1\relax
\ifnum#3=\plusthousand
% == scale 1
@@ -508,37 +508,37 @@
% {\externalfigure[mill.png][frame=on,height=3cm,equalwidth=6cm]} {}
% \stopcombination
-\def\transforms_scale_position
+\def\grph_scale_position
{\ifx\p_equalwidth\empty \else
\scratchdimen\p_equalwidth\relax
- \ifdim\d_transforms_scale_wd<\scratchdimen
+ \ifdim\d_grph_scale_wd<\scratchdimen
\setbox\nextbox\hbox to \scratchdimen{\hss\box\nextbox\hss}%
\fi
\fi
\ifx\p_equalheight\empty \else
\scratchdimen\p_equalheight\relax
- \ifdim\d_transforms_scale_ht<\scratchdimen
+ \ifdim\d_grph_scale_ht<\scratchdimen
\setbox\nextbox\vbox to \scratchdimen{\vss\box\nextbox\vss}%
\fi
\fi}
\unexpanded\def\fastscale#1%
{\ifnum#1=1000\relax
- \expandafter\transforms_fast_scale_nop
+ \expandafter\grph_scale_fast_nop
\else
- \expandafter\transforms_fast_scale_yes
+ \expandafter\grph_scale_fast_yes
\fi{#1}}
-\def\transforms_fast_scale_nop#1%
+\def\grph_scale_fast_nop#1%
{\hbox}
-\def\transforms_fast_scale_yes#1%
- {\edef\finalscaleboxxscale{\withoutpt\the\dimexpr#1pt/1000\relax}%
+\def\grph_scale_fast_yes#1%
+ {\edef\finalscaleboxxscale{\withoutpt\the\dimexpr#1pt/1000\relax}% brrr
\let\finalscaleboxyscale\finalscaleboxxscale
- \dowithnextboxcs\transforms_fast_scale_finish\hbox}
+ \dowithnextboxcs\grph_scale_fast_finish\hbox}
-\def\transforms_fast_scale_finish
- {\transforms_scale_apply
+\def\grph_scale_fast_finish
+ {\grph_scale_apply
\box\nextbox
\endgroup}
@@ -577,21 +577,21 @@
{\dodoubleargument\getparameters[\??cp]}
\unexpanded\def\clip
- {\dosingleempty\transforms_clip}
+ {\dosingleempty\grph_clip}
-\def\transforms_clip[#1]% nb top->bottom left->right
+\def\grph_clip[#1]% nb top->bottom left->right
{\bgroup
\iffirstargument
\getparameters[\??cp][#1]%
\fi
- \dowithnextboxcs\transforms_clip_finish\hbox}
+ \dowithnextboxcs\grph_clip_finish\hbox}
-\def\transforms_clip_finish
+\def\grph_clip_finish
{\doifelse\@@cpstate\v!start
- \transforms_clip_yes_finish
- \transforms_clip_nop_finish}
+ \grph_clip_yes_finish
+ \grph_clip_nop_finish}
-\def\transforms_clip_yes_finish
+\def\grph_clip_yes_finish
{\ifdim\@@cpwidth>\zeropoint
\!!dimena\@@cpwidth
\!!dimenc\@@cphoffset
@@ -642,7 +642,7 @@
\box\nextbox
\egroup}
-\def\transforms_clip_nop_finish
+\def\grph_clip_nop_finish
{\box\nextbox
\egroup}
@@ -684,9 +684,9 @@
\unexpanded\def\mirror
{\bgroup
- \dowithnextboxcs\transforms_mirror_finish\hbox}
+ \dowithnextboxcs\grph_mirror_finish\hbox}
-\def\transforms_mirror_finish
+\def\grph_mirror_finish
{\dontshowcomposition
\scratchdimen\wd\nextbox
% better use an hbox (if no \forgetall, leftskip etc may creep in)
@@ -729,26 +729,26 @@
% maybe just \rotation_...
-\newdimen\d_transforms_rotation_x_size
-\newdimen\d_transforms_rotation_y_size
-\newdimen\d_transforms_rotation_x_offset
-\newdimen\d_transforms_rotation_y_offset
-\newdimen\d_transforms_rotation_x_position
-\newdimen\d_transforms_rotation_y_position
+\newdimen\d_grph_rotate_x_size
+\newdimen\d_grph_rotate_y_size
+\newdimen\d_grph_rotate_x_offset
+\newdimen\d_grph_rotate_y_offset
+\newdimen\d_grph_rotate_x_position
+\newdimen\d_grph_rotate_y_position
-\newdimen\d_transforms_rotation_used_height
+\newdimen\d_grph_rotate_used_height
-\let\d_transforms_rotation_width \!!widtha
-\let\d_transforms_rotation_height\!!heighta
-\let\d_transforms_rotation_depth \!!deptha
+\let\d_grph_rotate_width \!!widtha
+\let\d_grph_rotate_height\!!heighta
+\let\d_grph_rotate_depth \!!deptha
-\let\d_transforms_rotation_saved_width \!!widthb
-\let\d_transforms_rotation_saved_height\!!heightb
-\let\d_transforms_rotation_saved_depth \!!depthb
+\let\d_grph_rotate_saved_width \!!widthb
+\let\d_grph_rotate_saved_height\!!heightb
+\let\d_grph_rotate_saved_depth \!!depthb
-\newconditional\c_transforms_rotation_obey_depth
-\newconditional\c_transforms_rotation_not_fit
-\newconditional\c_transforms_rotation_center
+\newconditional\c_grph_rotate_obey_depth
+\newconditional\c_grph_rotate_not_fit
+\newconditional\c_grph_rotate_center
\installframedcommandhandler \??rotate {rotate} \??rotate
@@ -765,9 +765,9 @@
\unexpanded\def\rotate % \bgroup: \rotate kan argument zijn
{\bgroup
- \dosingleempty\transforms_rotate}
+ \dosingleempty\grph_rotate}
-\def\transforms_rotate[#1]%
+\def\grph_rotate[#1]%
{\iffirstargument
\setupcurrentrotate[#1]%
\fi
@@ -777,83 +777,83 @@
\ifcsname\??rotatelocation\p_rotation_location\endcsname\p_rotation_location\else\v!default\fi
\endcsname}
-\def\transforms_rotate_framed
+\def\grph_rotate_framed
{\resetrotateparameter\c!location
- \dowithnextboxcs\transforms_rotate_finish\vbox
+ \dowithnextboxcs\grph_rotate_finish\vbox
\inheritedrotateframed}
-\def\transforms_rotate_normal
- {\dowithnextboxcs\transforms_rotate_finish\vbox}
+\def\grph_rotate_normal
+ {\dowithnextboxcs\grph_rotate_finish\vbox}
-\def\transforms_rotate_finish
- {\transforms_rotation_finish_indeed
+\def\grph_rotate_finish
+ {\grph_rotate_finish_indeed
\egroup}
\setvalue{\??rotatelocation\v!depth}%
- {\setfalse\c_transforms_rotation_not_fit
- \setfalse\c_transforms_rotation_center
- \settrue \c_transforms_rotation_obey_depth
- \transforms_rotate_normal}
+ {\setfalse\c_grph_rotate_not_fit
+ \setfalse\c_grph_rotate_center
+ \settrue \c_grph_rotate_obey_depth
+ \grph_rotate_normal}
\setvalue{\??rotatelocation\v!fit}%
- {\settrue \c_transforms_rotation_not_fit
- \setfalse\c_transforms_rotation_center
- \settrue \c_transforms_rotation_obey_depth
- \transforms_rotate_normal}
+ {\settrue \c_grph_rotate_not_fit
+ \setfalse\c_grph_rotate_center
+ \settrue \c_grph_rotate_obey_depth
+ \grph_rotate_normal}
\setvalue{\??rotatelocation\v!broad}%
- {\setfalse\c_transforms_rotation_not_fit
- \setfalse\c_transforms_rotation_center
- \setfalse\c_transforms_rotation_obey_depth
- \transforms_rotate_normal}
+ {\setfalse\c_grph_rotate_not_fit
+ \setfalse\c_grph_rotate_center
+ \setfalse\c_grph_rotate_obey_depth
+ \grph_rotate_normal}
\setvalue{\??rotatelocation\v!high}%
- {\setfalse\c_transforms_rotation_not_fit
- \setfalse\c_transforms_rotation_center
- \setfalse\c_transforms_rotation_obey_depth
- \transforms_rotate_framed}
+ {\setfalse\c_grph_rotate_not_fit
+ \setfalse\c_grph_rotate_center
+ \setfalse\c_grph_rotate_obey_depth
+ \grph_rotate_framed}
\setvalue{\??rotatelocation\v!middle}%
- {\setfalse\c_transforms_rotation_not_fit
- \settrue \c_transforms_rotation_center
- \setfalse\c_transforms_rotation_obey_depth % hm, depth ?
- \transforms_rotate_normal}
+ {\setfalse\c_grph_rotate_not_fit
+ \settrue \c_grph_rotate_center
+ \setfalse\c_grph_rotate_obey_depth % hm, depth ?
+ \grph_rotate_normal}
\setvalue{\??rotatelocation\v!default}%
- {\setfalse\c_transforms_rotation_not_fit
- \setfalse\c_transforms_rotation_center
- \settrue \c_transforms_rotation_obey_depth
- \transforms_rotate_framed}
+ {\setfalse\c_grph_rotate_not_fit
+ \setfalse\c_grph_rotate_center
+ \settrue \c_grph_rotate_obey_depth
+ \grph_rotate_framed}
\def\dorotatebox#1% {angle} \hbox/\vbox/\vtop % a fast low level one
{\ifcase#1\relax
\expandafter\gobbleoneargument
\else
- \expandafter\transforms_rotation_box
+ \expandafter\grph_rotate_box
\fi{#1}}
-\def\transforms_rotation_box#1% {angle} \hbox/\vbox/\vtop
+\def\grph_rotate_box#1% {angle} \hbox/\vbox/\vtop
{\bgroup
\hbox\bgroup % compatibility hack
\edef\p_rotation_rotation{#1}%
- \dowithnextboxcs\transforms_rotation_finish}
+ \dowithnextboxcs\grph_rotate_finish}
-\def\transforms_rotation_finish
+\def\grph_rotate_finish
{\getvalue{\??rotatelocation\v!broad}%
- \transforms_rotation_finish_indeed
+ \grph_rotate_finish_indeed
\egroup
\egroup}
-\def\transforms_rotation_finish_indeed
+\def\grph_rotate_finish_indeed
{\hbox\bgroup
\ifx\p_rotation_rotation\empty
- \transforms_rotation_finish_nop
+ \grph_rotate_finish_nop
\else
- \transforms_rotation_finish_yes
+ \grph_rotate_finish_yes
\fi
\egroup}
-\def\transforms_rotation_finish_nop
+\def\grph_rotate_finish_nop
{\boxcursor\box\nextbox}
\setvalue{\??rotatepreset\v!left}%
@@ -873,133 +873,133 @@
\setvalue{\??rotatepreset\v!default}%
{\edef\p_rotation_rotation{\realnumber{\p_rotation_rotation}}}% get rid of leading zeros and spaces
-\def\transforms_rotation_finish_yes
+\def\grph_rotate_finish_yes
{\csname\??rotatepreset
\ifcsname\??rotatepreset\p_rotation_rotation\endcsname\p_rotation_rotation\else\v!default\fi
\endcsname
\setbox\nextbox\vbox{\box\nextbox}% not really needed
\dontshowcomposition
\dontcomplain
- \ifconditional\c_transforms_rotation_center
- \d_transforms_rotation_saved_width \wd\nextbox
- \d_transforms_rotation_saved_height\ht\nextbox
- \d_transforms_rotation_saved_depth \dp\nextbox
+ \ifconditional\c_grph_rotate_center
+ \d_grph_rotate_saved_width \wd\nextbox
+ \d_grph_rotate_saved_height\ht\nextbox
+ \d_grph_rotate_saved_depth \dp\nextbox
\setbox\nextbox\vbox{\vskip.5\ht\nextbox\hskip-.5\wd\nextbox\box\nextbox}%
\smashbox\nextbox
\fi
- \d_transforms_rotation_width \wd\nextbox
- \d_transforms_rotation_height\ht\nextbox
- \d_transforms_rotation_depth \dp\nextbox
+ \d_grph_rotate_width \wd\nextbox
+ \d_grph_rotate_height\ht\nextbox
+ \d_grph_rotate_depth \dp\nextbox
\setbox\nextbox\vbox{\hbox{\raise\dp\nextbox\box\nextbox}}%
- \d_transforms_rotation_used_height \ht\nextbox
+ \d_grph_rotate_used_height \ht\nextbox
% much of the next happens in lua (all the sin and cos) so we can do that in
% one go if needed
\setcalculatedcos\cos\p_rotation_rotation
\setcalculatedsin\sin\p_rotation_rotation
\ifdim\sin\points>\zeropoint
\ifdim\cos\points>\zeropoint
- \transforms_rotation_calculate_a
- \transforms_rotation_apply
+ \grph_rotate_calculate_a
+ \grph_rotate_apply
\else
- \transforms_rotation_calculate_b
- \transforms_rotation_apply
- \wd\nextbox\ifconditional\c_transforms_rotation_not_fit\sin\d_transforms_rotation_depth\else\d_transforms_rotation_x_size\fi
+ \grph_rotate_calculate_b
+ \grph_rotate_apply
+ \wd\nextbox\ifconditional\c_grph_rotate_not_fit\sin\d_grph_rotate_depth\else\d_grph_rotate_x_size\fi
\fi
\else
\ifdim\cos\points<\zeropoint
- \transforms_rotation_calculate_c
- \transforms_rotation_apply
- \wd\nextbox\ifconditional\c_transforms_rotation_not_fit\negated\sin\d_transforms_rotation_height\else\d_transforms_rotation_x_size\fi
+ \grph_rotate_calculate_c
+ \grph_rotate_apply
+ \wd\nextbox\ifconditional\c_grph_rotate_not_fit\negated\sin\d_grph_rotate_height\else\d_grph_rotate_x_size\fi
\else\ifdim\sin\points=\zeropoint
- \transforms_rotation_calculate_d
- \transforms_rotation_apply
+ \grph_rotate_calculate_d
+ \grph_rotate_apply
% no wd ?
\else
- \transforms_rotation_calculate_e
- \transforms_rotation_apply
- \wd\nextbox\ifconditional\c_transforms_rotation_not_fit\negated\sin\d_transforms_rotation_height\else\d_transforms_rotation_x_size\fi
+ \grph_rotate_calculate_e
+ \grph_rotate_apply
+ \wd\nextbox\ifconditional\c_grph_rotate_not_fit\negated\sin\d_grph_rotate_height\else\d_grph_rotate_x_size\fi
\fi\fi
\fi
- \ifconditional\c_transforms_rotation_center
- \setbox\nextbox\vbox{\vskip-.5\d_transforms_rotation_saved_height\hskip.5\d_transforms_rotation_saved_height\box\nextbox}%
- \wd\nextbox\d_transforms_rotation_saved_width
- \ht\nextbox\d_transforms_rotation_saved_height
- \dp\nextbox\d_transforms_rotation_saved_depth
+ \ifconditional\c_grph_rotate_center
+ \setbox\nextbox\vbox{\vskip-.5\d_grph_rotate_saved_height\hskip.5\d_grph_rotate_saved_height\box\nextbox}%
+ \wd\nextbox\d_grph_rotate_saved_width
+ \ht\nextbox\d_grph_rotate_saved_height
+ \dp\nextbox\d_grph_rotate_saved_depth
\fi
\boxcursor\box\nextbox}
-\def\transforms_rotation_calculate_a
- {\d_transforms_rotation_x_size\dimexpr\cos\d_transforms_rotation_width+\sin\d_transforms_rotation_used_height\relax
- \d_transforms_rotation_y_size\dimexpr\sin\d_transforms_rotation_width+\cos\d_transforms_rotation_used_height\relax
- \d_transforms_rotation_x_position\zeropoint
- \d_transforms_rotation_y_position\cos\d_transforms_rotation_used_height
- \ifconditional\c_transforms_rotation_not_fit
- \d_transforms_rotation_x_offset\dimexpr\negated\sin\d_transforms_rotation_used_height+\sin\d_transforms_rotation_depth\relax
+\def\grph_rotate_calculate_a
+ {\d_grph_rotate_x_size\dimexpr\cos\d_grph_rotate_width+\sin\d_grph_rotate_used_height\relax
+ \d_grph_rotate_y_size\dimexpr\sin\d_grph_rotate_width+\cos\d_grph_rotate_used_height\relax
+ \d_grph_rotate_x_position\zeropoint
+ \d_grph_rotate_y_position\cos\d_grph_rotate_used_height
+ \ifconditional\c_grph_rotate_not_fit
+ \d_grph_rotate_x_offset\dimexpr\negated\sin\d_grph_rotate_used_height+\sin\d_grph_rotate_depth\relax
\fi
- \ifconditional\c_transforms_rotation_obey_depth
- \d_transforms_rotation_y_offset\cos\d_transforms_rotation_depth
+ \ifconditional\c_grph_rotate_obey_depth
+ \d_grph_rotate_y_offset\cos\d_grph_rotate_depth
\fi}
-\def\transforms_rotation_calculate_b
- {\d_transforms_rotation_x_size\dimexpr\negated\cos\d_transforms_rotation_width+\sin\d_transforms_rotation_used_height\relax
- \d_transforms_rotation_y_size\dimexpr\sin\d_transforms_rotation_width+\negated\cos\d_transforms_rotation_used_height\relax
- \d_transforms_rotation_x_position\negated\cos\d_transforms_rotation_width
- \d_transforms_rotation_y_position\zeropoint
- \ifconditional\c_transforms_rotation_not_fit
- \d_transforms_rotation_x_offset\dimexpr-\d_transforms_rotation_x_size+\sin\d_transforms_rotation_depth\relax
+\def\grph_rotate_calculate_b
+ {\d_grph_rotate_x_size\dimexpr\negated\cos\d_grph_rotate_width+\sin\d_grph_rotate_used_height\relax
+ \d_grph_rotate_y_size\dimexpr\sin\d_grph_rotate_width+\negated\cos\d_grph_rotate_used_height\relax
+ \d_grph_rotate_x_position\negated\cos\d_grph_rotate_width
+ \d_grph_rotate_y_position\zeropoint
+ \ifconditional\c_grph_rotate_not_fit
+ \d_grph_rotate_x_offset\dimexpr-\d_grph_rotate_x_size+\sin\d_grph_rotate_depth\relax
\fi
- \ifconditional\c_transforms_rotation_obey_depth
- \d_transforms_rotation_y_offset\negated\cos\d_transforms_rotation_height
+ \ifconditional\c_grph_rotate_obey_depth
+ \d_grph_rotate_y_offset\negated\cos\d_grph_rotate_height
\fi}
-\def\transforms_rotation_calculate_c
- {\d_transforms_rotation_x_size\dimexpr\negated\cos\d_transforms_rotation_width+\negated\sin\d_transforms_rotation_used_height\relax
- \d_transforms_rotation_y_size\dimexpr\negated\sin\d_transforms_rotation_width+\negated\cos\d_transforms_rotation_used_height\relax
- \d_transforms_rotation_x_position\d_transforms_rotation_x_size
- \d_transforms_rotation_y_position\negated\sin\d_transforms_rotation_width
- \ifconditional\c_transforms_rotation_not_fit
- \d_transforms_rotation_x_offset\dimexpr-\d_transforms_rotation_x_size+\negated\sin\d_transforms_rotation_height\relax
+\def\grph_rotate_calculate_c
+ {\d_grph_rotate_x_size\dimexpr\negated\cos\d_grph_rotate_width+\negated\sin\d_grph_rotate_used_height\relax
+ \d_grph_rotate_y_size\dimexpr\negated\sin\d_grph_rotate_width+\negated\cos\d_grph_rotate_used_height\relax
+ \d_grph_rotate_x_position\d_grph_rotate_x_size
+ \d_grph_rotate_y_position\negated\sin\d_grph_rotate_width
+ \ifconditional\c_grph_rotate_not_fit
+ \d_grph_rotate_x_offset\dimexpr-\d_grph_rotate_x_size+\negated\sin\d_grph_rotate_height\relax
\fi
- \ifconditional\c_transforms_rotation_obey_depth
- \d_transforms_rotation_y_offset\dimexpr\d_transforms_rotation_y_size+\cos\d_transforms_rotation_depth\relax
+ \ifconditional\c_grph_rotate_obey_depth
+ \d_grph_rotate_y_offset\dimexpr\d_grph_rotate_y_size+\cos\d_grph_rotate_depth\relax
\fi}
-\def\transforms_rotation_calculate_d
- {\d_transforms_rotation_x_size\dimexpr\cos\d_transforms_rotation_width+\negated\sin\d_transforms_rotation_used_height\relax
- \d_transforms_rotation_y_size\dimexpr\negated\sin\d_transforms_rotation_width+\cos\d_transforms_rotation_used_height\relax
- \d_transforms_rotation_x_position\zeropoint
- \d_transforms_rotation_y_position\d_transforms_rotation_y_size
- \d_transforms_rotation_x_offset\zeropoint
- \ifconditional\c_transforms_rotation_obey_depth
- \d_transforms_rotation_y_offset\d_transforms_rotation_depth
+\def\grph_rotate_calculate_d
+ {\d_grph_rotate_x_size\dimexpr\cos\d_grph_rotate_width+\negated\sin\d_grph_rotate_used_height\relax
+ \d_grph_rotate_y_size\dimexpr\negated\sin\d_grph_rotate_width+\cos\d_grph_rotate_used_height\relax
+ \d_grph_rotate_x_position\zeropoint
+ \d_grph_rotate_y_position\d_grph_rotate_y_size
+ \d_grph_rotate_x_offset\zeropoint
+ \ifconditional\c_grph_rotate_obey_depth
+ \d_grph_rotate_y_offset\d_grph_rotate_depth
\fi}
-\def\transforms_rotation_calculate_e
- {\d_transforms_rotation_x_size\dimexpr\cos\d_transforms_rotation_width+\negated\sin\d_transforms_rotation_used_height\relax
- \d_transforms_rotation_y_size\dimexpr\negated\sin\d_transforms_rotation_width+\cos\d_transforms_rotation_used_height\relax
- \d_transforms_rotation_x_position\negated\sin\d_transforms_rotation_used_height
- \d_transforms_rotation_y_position\d_transforms_rotation_y_size
- \ifconditional\c_transforms_rotation_not_fit
- \d_transforms_rotation_x_offset\dimexpr-\d_transforms_rotation_x_size+\negated\sin\d_transforms_rotation_height\relax
+\def\grph_rotate_calculate_e
+ {\d_grph_rotate_x_size\dimexpr\cos\d_grph_rotate_width+\negated\sin\d_grph_rotate_used_height\relax
+ \d_grph_rotate_y_size\dimexpr\negated\sin\d_grph_rotate_width+\cos\d_grph_rotate_used_height\relax
+ \d_grph_rotate_x_position\negated\sin\d_grph_rotate_used_height
+ \d_grph_rotate_y_position\d_grph_rotate_y_size
+ \ifconditional\c_grph_rotate_not_fit
+ \d_grph_rotate_x_offset\dimexpr-\d_grph_rotate_x_size+\negated\sin\d_grph_rotate_height\relax
\fi
- \ifconditional\c_transforms_rotation_obey_depth
- \d_transforms_rotation_y_offset\negated\sin\d_transforms_rotation_depth
+ \ifconditional\c_grph_rotate_obey_depth
+ \d_grph_rotate_y_offset\negated\sin\d_grph_rotate_depth
\fi}
-\def\transforms_rotation_apply
- {\setbox\nextbox\vbox to \d_transforms_rotation_y_size
+\def\grph_rotate_apply
+ {\setbox\nextbox\vbox to \d_grph_rotate_y_size
{\vfill
- \hbox to \d_transforms_rotation_x_size
+ \hbox to \d_grph_rotate_x_size
{\dostartrotation\p_rotation_rotation
\wd\nextbox\zeropoint
\ht\nextbox\zeropoint
\box\nextbox
\dostoprotation
\hfill}%
- \kern\d_transforms_rotation_y_position}%
+ \kern\d_grph_rotate_y_position}%
\setbox\nextbox\hbox
- {\kern\dimexpr\d_transforms_rotation_x_position+\d_transforms_rotation_x_offset\relax
- \lower\d_transforms_rotation_y_offset\box\nextbox}}
+ {\kern\dimexpr\d_grph_rotate_x_position+\d_grph_rotate_x_offset\relax
+ \lower\d_grph_rotate_y_offset\box\nextbox}}
% \dostepwiserecurse{0}{360}{10}
% {\startlinecorrection[blank]
diff --git a/tex/context/base/hand-ini.mkiv b/tex/context/base/hand-ini.mkiv
index e9a6e087c..450794d27 100644
--- a/tex/context/base/hand-ini.mkiv
+++ b/tex/context/base/hand-ini.mkiv
@@ -39,11 +39,11 @@
%D New stuff.
-\unexpanded\def\setupfontexpansion {\dodoubleargument\fonts_expansion_setup }
-\unexpanded\def\setupfontprotrusion{\dodoubleargument\fonts_protrusion_setup}
+\unexpanded\def\setupfontexpansion {\dodoubleargument\font_expansion_setup }
+\unexpanded\def\setupfontprotrusion{\dodoubleargument\font_protrusion_setup}
-\def\fonts_expansion_setup [#1][#2]{\ctxcommand{setupfontexpansion ("#1","#2")}}
-\def\fonts_protrusion_setup[#1][#2]{\ctxcommand{setupfontprotrusion("#1","#2")}}
+\def\font_expansion_setup [#1][#2]{\ctxcommand{setupfontexpansion ("#1","#2")}}
+\def\font_protrusion_setup[#1][#2]{\ctxcommand{setupfontprotrusion("#1","#2")}}
% \setupfontprotrusion[quality-upright][vector=quality]
% \setupfontprotrusion[quality-slanted][vector=quality,right=1.5]
@@ -51,13 +51,13 @@
\let\pdfadjustspacing\relax \newcount\pdfadjustspacing % a little bit protection
\let\pdfprotrudechars\relax \newcount\pdfprotrudechars % a little bit protection
-\def\fonts_expansion_enable {\normalpdfadjustspacing\plustwo }
-\def\fonts_expansion_disable {\normalpdfadjustspacing\zerocount}
-\def\fonts_protruding_enable {\normalpdfprotrudechars\plustwo }
-\def\fonts_protruding_disable{\normalpdfprotrudechars\zerocount}
+\def\font_expansion_enable {\normalpdfadjustspacing\plustwo }
+\def\font_expansion_disable {\normalpdfadjustspacing\zerocount}
+\def\font_protruding_enable {\normalpdfprotrudechars\plustwo }
+\def\font_protruding_disable{\normalpdfprotrudechars\zerocount}
-\appendtoks \fonts_expansion_disable \to \everyforgetall % Here or not here?
-\appendtoks \fonts_protruding_disable \to \everyforgetall % Here or not here?
+\appendtoks \font_expansion_disable \to \everyforgetall % Here or not here?
+\appendtoks \font_protruding_disable \to \everyforgetall % Here or not here?
% \def\fonthandlingerror{\writestatus\m!fonts{font handling is replaced by features in mkiv}}
%
diff --git a/tex/context/base/java-ini.mkiv b/tex/context/base/java-ini.mkiv
index 76df468e7..e4f0bf28b 100644
--- a/tex/context/base/java-ini.mkiv
+++ b/tex/context/base/java-ini.mkiv
@@ -110,9 +110,9 @@
\obeylualines
\obeyluatokens
\def\u{\letterbackslash u}%
- \javascripts_start_code}
+ \java_start_code}
-\def\javascripts_start_code#1\stopJScode
+\def\java_start_code#1\stopJScode
{\normalexpanded{\endgroup\ctxcommand{storejavascriptcode(\!!bs#1\!!es)}}}
\let\stopJScode\relax
@@ -122,9 +122,9 @@
\obeylualines
\obeyluatokens
\def\u{\letterbackslash u}%
- \javascripts_start_preamble}
+ \java_start_preamble}
-\def\javascripts_start_preamble#1\stopJSpreamble
+\def\java_start_preamble#1\stopJSpreamble
{\normalexpanded{\endgroup\ctxcommand{storejavascriptpreamble(\!!bs#1\!!es)}}}
\let\stopJSpreamble\relax
@@ -148,9 +148,9 @@
%D The not so complicated implementation of this macro is:
\def\useJSscripts
- {\dodoubleempty\javascripts_use_scripts}
+ {\dodoubleempty\java_use_scripts}
-\def\javascripts_use_scripts[#1][#2]%
+\def\java_use_scripts[#1][#2]%
{\ctxcommand{usejavascriptscripts(\!!bs#1\!!es)}% two steps as this one calls tex code
\ctxcommand{usejavascriptpreamble("#2")}} % so this one comes later
diff --git a/tex/context/base/lang-ini.mkiv b/tex/context/base/lang-ini.mkiv
index f010b3c20..150b68f70 100644
--- a/tex/context/base/lang-ini.mkiv
+++ b/tex/context/base/lang-ini.mkiv
@@ -87,28 +87,28 @@
\installcorenamespace{languagelinked}
\def\defaultlanguage#1%
- {\ifcsname\??la#1\s!default\endcsname
- \expandafter\defaultlanguage\csname\??la#1\s!default\endcsname
+ {\ifcsname\??language#1\s!default\endcsname
+ \expandafter\defaultlanguage\csname\??language#1\s!default\endcsname
\else
#1%
\fi}
\def\languageparameter#1%
- {\ifcsname\??la\currentlanguage#1\endcsname
- \csname\??la\currentlanguage#1\endcsname
- \else\ifcsname\??la\currentlanguage\s!default\endcsname
- \expandafter\specificlanguageparameter\csname\??la\currentlanguage\s!default\endcsname{#1}%
- \else\ifcsname\??la\s!default#1\endcsname
- \csname\??la\s!default#1\endcsname
+ {\ifcsname\??language\currentlanguage#1\endcsname
+ \csname\??language\currentlanguage#1\endcsname
+ \else\ifcsname\??language\currentlanguage\s!default\endcsname
+ \expandafter\specificlanguageparameter\csname\??language\currentlanguage\s!default\endcsname{#1}%
+ \else\ifcsname\??language\s!default#1\endcsname
+ \csname\??language\s!default#1\endcsname
\fi\fi\fi}
\def\specificlanguageparameter#1#2%
- {\ifcsname\??la#1#2\endcsname
- \csname\??la#1#2\endcsname
- \else\ifcsname\??la#1\s!default\endcsname
- \expandafter\specificlanguageparameter\csname\??la#1\s!default\endcsname{#2}%
- \else\ifcsname\??la\s!default#2\endcsname
- \csname\??la\s!default#2\endcsname
+ {\ifcsname\??language#1#2\endcsname
+ \csname\??language#1#2\endcsname
+ \else\ifcsname\??language#1\s!default\endcsname
+ \expandafter\specificlanguageparameter\csname\??language#1\s!default\endcsname{#2}%
+ \else\ifcsname\??language\s!default#2\endcsname
+ \csname\??language\s!default#2\endcsname
\fi\fi\fi}
\unexpanded\def\setupcurrentlanguage[#1]%
@@ -177,7 +177,7 @@
\def\installedlanguages{\ctxlua{languages.installed()}}
\unexpanded\def\doiflanguageelse#1%
- {\ifcsname\??la#1\c!state\endcsname
+ {\ifcsname\??language#1\c!state\endcsname
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
@@ -189,24 +189,24 @@
% \language[#1] gave unwanted side effect of loading language specifics
\unexpanded\def\installlanguage
- {\dodoubleargument\languages_install}
+ {\dodoubleargument\lang_basics_install}
-\def\languages_install[#1][#2]%
+\def\lang_basics_install[#1][#2]%
{\doifassignmentelse{#2}
{\doiflanguageelse{#1}
- {\getparameters[\??la#1][#2]}
+ {\getparameters[\??language#1][#2]}
{\setvalue{\??languagelinked#1}{#1}%
- \languages_install_indeed{#1}{#1}%
- \getparameters[\??la#1][\c!state=\v!start,#2]}%
+ \lang_basics_install_indeed{#1}{#1}%
+ \getparameters[\??language#1][\c!state=\v!start,#2]}%
\edef\currentsetuplanguage{#1}%
\ctxlua{languages.define("#1","\specificlanguageparameter{#1}\s!default")}%
\the\everysetuplanguage}
{\setvalue{\??languagelinked#1}{#2}%
\ctxlua{languages.synonym("#1","#2")}%
- \languages_install_indeed{#1}{#2}}}
+ \lang_basics_install_indeed{#1}{#2}}}
-\def\languages_install_indeed#1#2%
- {\ifcsname#1\endcsname\else\setuvalue{#1}{\complexlanguage[#2]}\fi}
+\def\lang_basics_install_indeed#1#2%
+ {\ifcsname#1\endcsname\else\setuvalue{#1}{\lang_basics_set_current[#2]}\fi}
%D When the second argument is a language identifier, a
%D synonym is created. This feature is present because we
@@ -232,26 +232,26 @@
%D Beware, this command can only be used when a language is installed.
\unexpanded\def\setuplanguage
- {\dodoubleempty\languages_setup}
+ {\dodoubleempty\lang_basics_setup}
-\ifdefined\languages_synchronize \else
- \let\languages_synchronize\relax % be nice for setups till we have one
+\ifdefined\lang_basics_synchronize \else
+ \let\lang_basics_synchronize\relax % be nice for setups till we have one
\fi
-\def\languages_setup[#1][#2]%
+\def\lang_basics_setup[#1][#2]%
{\ifsecondargument
\pushmacro\currentlanguage % can be default
\edef\currentsetuplanguage{\reallanguagetag{#1}}%
- \getparameters[\??la\currentsetuplanguage][#2]%
+ \getparameters[\??language\currentsetuplanguage][#2]%
\the\everysetuplanguage
\popmacro\currentlanguage
%\doif\currentsetuplanguage\currentlanguage we can have influenced inheritance (default)
\else
\let\currentsetuplanguage\currentlanguage
- \getparameters[\??la\currentsetuplanguage][#1]%
+ \getparameters[\??language\currentsetuplanguage][#1]%
\the\everysetuplanguage
\fi
- \languages_synchronize}
+ \lang_basics_synchronize}
\appendtoks
\ctxlua{languages.setdirty("\currentsetuplanguage")}%
@@ -353,7 +353,7 @@
\newtoks \everylanguage
-\def\languages_synchronize% assumes that \currentlanguage is set % % % use different name as complex
+\def\lang_basics_synchronize% assumes that \currentlanguage is set % % % use different name as complex
{\normallanguage\ctxcommand{languagenumber(%
"\currentlanguage",%
"\defaultlanguage\currentlanguage",%
@@ -399,14 +399,14 @@
% we will also permit access by the other names
-\unexpanded\def\languages_set_specified[#1]%
+\unexpanded\def\lang_basics_set_current[#1]%
{\edef\askedlanguage{#1}%
\ifx\askedlanguage\empty \else
\ifcsname\??languagelinked\askedlanguage\endcsname
\edef\askedlanguage{\csname\??languagelinked\askedlanguage\endcsname}%
\ifx\currentlanguage\askedlanguage \else
\setcurrentlanguage\currentmainlanguage\askedlanguage
- \languages_synchronize
+ \lang_basics_synchronize
\fi
\else
\showmessage\m!languages6{#1}%
@@ -414,7 +414,7 @@
\fi}
\unexpanded\def\language
- {\doifnextoptionalelse\languages_set_specified\normallanguage}
+ {\doifnextoptionalelse\lang_basics_set_current\normallanguage}
\newcount\mainlanguagenumber
@@ -426,11 +426,11 @@
\ifx\currentlanguage\askedlanguage
\ifx\currentmainlanguage\askedlanguage \else
\setcurrentlanguage\askedlanguage\askedlanguage
- \languages_synchronize
+ \lang_basics_synchronize
\fi
\else
\setcurrentlanguage\askedlanguage\askedlanguage
- \languages_synchronize
+ \lang_basics_synchronize
\fi
\fi
\fi
diff --git a/tex/context/base/lang-lab.mkiv b/tex/context/base/lang-lab.mkiv
index fcd25e9c8..a9744f699 100644
--- a/tex/context/base/lang-lab.mkiv
+++ b/tex/context/base/lang-lab.mkiv
@@ -22,9 +22,6 @@
\ifdefined\sixperemspace \else \def\sixperemspace{ } \fi % \utfchar{2006"} % we could embed 0x2006 but it does not show up in a editor
-%C The UPPERCASE variants are obsolete as we can now use \WORD
-%C in an non-interfering way.
-
%D In this module we deal with language dependant labels and
%D prefixes, like in {\em Figure~12} and {\em Chapter 1}. In
%D this file we set the default values. Users can easily
@@ -41,7 +38,6 @@
%D current implementation of labels supports two labels too.
\ifdefined\simplifiedcommands \else \newtoks\simplifiedcommands \fi
-\ifdefined\Word \else \let\Word\relax \fi
%D \macros
%D {setupheadtext, setuplabeltext}
@@ -69,12 +65,12 @@
\let\currentlabelcategory\empty
-\def\definelabelclass
- {\dodoubleempty\define_label_class}
+\unexpanded\def\definelabelclass
+ {\dodoubleempty\lang_labels_define_class}
-\def\define_label_class[#1][#2]%
+\def\lang_labels_define_class[#1][#2]%
{\normalexpanded
- {\define_label_class_indeed
+ {\lang_labels_define_class_indeed
{#1}%
{\ifsecondargument#2\else\zerocount\fi}%
\expandafter\noexpand\csname dogetupsome#1text\endcsname
@@ -85,10 +81,10 @@
\expandafter\noexpand\csname #1texts\endcsname
\expandafter\noexpand\csname #1text\endcsname}}
-\unexpanded\def\define_label_class_indeed#1#2#3#4#5#6#7#8#9%
- {\setuvalue{setup#1text}{\protecttextprefixes#2\def\currenttextprefixclass{#1}\dodoubleempty\setup_some_text_prefix}%
- \setuvalue{preset#1text}{\protecttextprefixes1\def\currenttextprefixclass{#1}\dodoubleempty\setup_some_text_prefix}%
- \setuvalue{start#1text}{\protecttextprefixes1\def\currenttextprefixclass{#1}\dotripleempty\start_some_text_prefix[#1]}%
+\unexpanded\def\lang_labels_define_class_indeed#1#2#3#4#5#6#7#8#9%
+ {\setuvalue{setup#1text}{\protecttextprefixes#2\def\currenttextprefixclass{#1}\dodoubleempty\lang_labels_text_prefix_setup}%
+ \setuvalue{preset#1text}{\protecttextprefixes1\def\currenttextprefixclass{#1}\dodoubleempty\lang_labels_text_prefix_setup}%
+ \setuvalue{start#1text}{\protecttextprefixes1\def\currenttextprefixclass{#1}\dotripleempty\lang_labels_text_prefix_start[#1]}%
\letvalue{stop#1text}\relax
\def#4{\reallanguagetag{\defaultlanguage\currentmainlanguage}}%
\ifnum#2=\plustwo
@@ -98,8 +94,8 @@
\csname\??label\currentlabelcategory#1:##1:##2\endcsname
\else\ifcsname\??label#1:##1:##2\endcsname
\csname\??label#1:##1:##2\endcsname
- \else\ifcsname\??la#4\s!default\endcsname
- \expandafter#5\csname\??la#4\s!default\endcsname{##2}%
+ \else\ifcsname\??language#4\s!default\endcsname
+ \expandafter#5\csname\??language#4\s!default\endcsname{##2}%
\else\ifcsname\??label\currentlabelcategory#1:##2\endcsname
\csname\??label\currentlabelcategory#1:##2\endcsname
\else\ifcsname\??label#1:##2\endcsname
@@ -120,8 +116,8 @@
\unexpanded\def#5##1##2%
{\ifcsname\??label#1:##1:##2\endcsname
\expandafter\let\expandafter\thetextprefix\csname\??label#1:##1:##2\endcsname
- \else\ifcsname\??la#4\s!default\endcsname
- \expandafter#5\csname\??la#4\s!default\endcsname{##2}%
+ \else\ifcsname\??language#4\s!default\endcsname
+ \expandafter#5\csname\??language#4\s!default\endcsname{##2}%
\else\ifcsname\??label#1:##2\endcsname
\expandafter\let\expandafter\thetextprefix\csname\??label#1:##2\endcsname
\else\ifcsname\??label#1:\s!en:##2\endcsname
@@ -172,7 +168,7 @@
\let\currenttextprefixtag \s!unknown
\let\currenttextprefixclass\s!unknown
-\def\start_some_text_prefix[#1][#2][#3]% class language name
+\def\lang_labels_text_prefix_start[#1][#2][#3]% class language name
{\ifthirdargument
\edef\currenttextprefixtag{\reallanguagetag{#2}}%
\edef\currenttextprefixname{#3}%
@@ -180,50 +176,50 @@
\edef\currenttextprefixtag{\reallanguagetag\currentmainlanguage}%
\edef\currenttextprefixname{#2}%
\fi
- \grabuntil{stop#1text}\start_some_text_prefix_indeed}
+ \grabuntil{stop#1text}\lang_labels_text_prefix_start_indeed}
-\def\start_some_text_prefix_indeed#1% text (not special checking done here yet, only for long texts anyway)
+\def\lang_labels_text_prefix_start_indeed#1% text (not special checking done here yet, only for long texts anyway)
{\expandafter\edef\csname\??label\currenttextprefixclass:\currenttextprefixtag:\currenttextprefixname\endcsname{{\ctxlua{context(string.strip(\!!bs#1\!!es))}}\empty}}
-\def\setup_some_text_prefix[#1][#2]%
+\def\lang_labels_text_prefix_setup[#1][#2]%
{\ifsecondargument
\edef\currenttextprefixtag{\reallanguagetag{#1}}%
- \processcommalist[#2]\setup_some_text_prefix_indeed
+ \processcommalist[#2]\lang_labels_text_prefix_setup_indeed
\else
\edef\currenttextprefixtag{\reallanguagetag\currentmainlanguage}%
- \processcommalist[#1]\setup_some_text_prefix_indeed
+ \processcommalist[#1]\lang_labels_text_prefix_setup_indeed
\fi}
-\def\setup_some_text_prefix_indeed#1%
- {\assign_some_text_prefix[#1]}
+\def\lang_labels_text_prefix_setup_indeed#1%
+ {\lang_labels_text_prefix_assign[#1]}
-\def\assign_some_text_prefix[#1=#2]%
- {\assign_some_text_prefix_indeed{#1}[#2,,]}
+\def\lang_labels_text_prefix_assign[#1=#2]%
+ {\lang_labels_text_prefix_assign_indeed{#1}[#2,,]}
-\def\assign_some_text_prefix_indeed#1%
+\def\lang_labels_text_prefix_assign_indeed#1%
{\ifcase\protecttextprefixes
% no checking
- \expandafter\assign_some_text_prefix_yes
+ \expandafter\lang_labels_text_prefix_assign_yes
\or
% checking
\ifcsname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname
- \expandafter\expandafter\expandafter\assign_some_text_prefix_nop
+ \expandafter\expandafter\expandafter\lang_labels_text_prefix_assign_nop
\else
- \expandafter\expandafter\expandafter\assign_some_text_prefix_yes
+ \expandafter\expandafter\expandafter\lang_labels_text_prefix_assign_yes
\fi
\or
% simple assignment (a bit overkill but it fits in the whole)
- \expandafter\assign_some_text_prefix_dumb
+ \expandafter\lang_labels_text_prefix_assign_dumb
\fi{#1}}
-\let\m_languages_label_left \empty
-\let\m_languages_label_right\empty
+\let\m_lang_labels_left \empty
+\let\m_lang_labels_right\empty
-\def\assign_some_text_prefix_yes#1[#2,#3,#4]%
- {\edef\m_languages_label_left {#2}%
- \edef\m_languages_label_right{#3}%
- \ifx\m_languages_label_right\empty
- \ifx\m_languages_label_left\empty
+\def\lang_labels_text_prefix_assign_yes#1[#2,#3,#4]%
+ {\def\m_lang_labels_left {#2}% no longer an edef ... else \Word undefined expansion issues
+ \def\m_lang_labels_right{#3}% no longer an edef ... else \Word undefined expansion issues
+ \ifx\m_lang_labels_right\empty
+ \ifx\m_lang_labels_left\empty
\expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{\empty\empty}%
\else
\expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{{#2}\empty}%
@@ -232,10 +228,10 @@
\expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{{#2}{#3}}%
\fi}
-\def\assign_some_text_prefix_nop#1[#2]%
+\def\lang_labels_text_prefix_assign_nop#1[#2]%
{}
-\def\assign_some_text_prefix_dumb#1[#2,#3]%
+\def\lang_labels_text_prefix_assign_dumb#1[#2,#3]%
{\expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{#2}}
\definelabelclass [head] [0] % titles
@@ -269,9 +265,9 @@
%D de current language.
\unexpanded\def\translate
- {\dosingleempty\translate_indeed}
+ {\dosingleempty\lang_translate}
-\def\translate_indeed[#1]%
+\def\lang_translate[#1]%
{\getparameters[\??lg][#1]%
\ifcsname\??lg\currentlanguage\endcsname
\csname\??lg\currentlanguage\endcsname
diff --git a/tex/context/base/lang-mis.mkiv b/tex/context/base/lang-mis.mkiv
index 094e9f971..ce23c0f60 100644
--- a/tex/context/base/lang-mis.mkiv
+++ b/tex/context/base/lang-mis.mkiv
@@ -204,7 +204,7 @@
\def\installdiscretionary#1#2%
{\setevalue{\??discretionarymath\detokenize{#1}}{\detokenize{#1}}% ?
\setvalue {\??discretionarytext\detokenize{#1}}{#2}%
- \setvalue {\??discretionaryboth\detokenize{#1}}{\languages_discretionary_command#1}%
+ \setvalue {\??discretionaryboth\detokenize{#1}}{\lang_discretionaries_command#1}%
\scratchcounter\expandafter`\detokenize{#1}%
\expandafter\uedcatcodecommand\expandafter\ctxcatcodes\expandafter\scratchcounter\csname\??discretionaryboth\detokenize{#1}\endcsname}
@@ -218,24 +218,24 @@
\def\ignorediscretionaries
{\discretionarymode\zerocount}
-\def\languages_discretionary_command
+\def\lang_discretionaries_command
{% if direct if, we need \relax for lookahead in math mode
\csname
\ifcase\discretionarymode
- \strippedcsname\languages_process_discretionary_none
+ \strippedcsname\lang_discretionaries_process_none
\else\ifmmode
- \strippedcsname\languages_process_discretionary_math
+ \strippedcsname\lang_discretionaries_process_math
\else
- \strippedcsname\languages_process_discretionary_text
+ \strippedcsname\lang_discretionaries_process_text
\fi\fi
\endcsname}
-\def\languages_process_discretionary_none#1%
+\def\lang_discretionaries_process_none#1%
{\detokenize{#1}}
-%D The macro \type{\languages_check_before_discretionary} takes care
+%D The macro \type{\lang_discretionaries_check_before} takes care
%D of loners like \type{||word}, while it counterpart \type
-%D {\languages_check_after_discretionary} is responsible for handling
+%D {\lang_discretionaries_check_after} is responsible for handling
%D the comma.
\newsignal\compoundbreakpoint
@@ -243,7 +243,7 @@
\newconditional\punctafterdiscretionary
\newconditional\spaceafterdiscretionary
-\def\languages_check_before_discretionary
+\def\lang_discretionaries_check_before
{\ifvmode
\dontleavehmode
\fi
@@ -257,7 +257,7 @@
\endgroup
\fi}
-\def\languages_check_after_discretionary
+\def\lang_discretionaries_check_after
{\setfalse\punctafterdiscretionary
\setfalse\spaceafterdiscretionary
\ifx\blankspace\nextnext \settrue \spaceafterdiscretionary \else
@@ -267,9 +267,9 @@
\ifx :\nextnext \settrue \punctafterdiscretionary \else
\ifx ;\nextnext \settrue \punctafterdiscretionary \fi\fi\fi\fi\fi\fi}
-\let\languages_process_discretionary_math\handlemathmodediscretionary
+\let\lang_discretionaries_process_math\handlemathmodediscretionary
-\def\languages_process_discretionary_text#1% grouped !
+\def\lang_discretionaries_process_text#1% grouped !
{\bgroup
\let\nextnextnext\egroup
\def\next##1#1%
@@ -280,7 +280,7 @@
\def\activedododotextmodediscretionary#1#2%
{\edef\discretionarytoken{\detokenize{#2}}%
\def\textmodediscretionary{\handletextmodediscretionary{#1}}%
- \languages_check_after_discretionary
+ \lang_discretionaries_check_after
\ifx\discretionarytoken\empty
\ifx#1\nextnext % takes care of ||| and +++ and ......
\ifcsname\??discretionaryaction\string#1\endcsname
@@ -294,7 +294,7 @@
\fi\fi\fi
\def\nextnextnext{\afterassignment\egroup\let\next=}%
\else
- \languages_check_before_discretionary
+ \lang_discretionaries_check_before
% the next line has been changed (20050203)
% \prewordbreak\hbox{\textmodediscretionary\nextnext}\allowbreak\postwordbreak
% but an hbox blocks a possible \discretionary
@@ -312,7 +312,7 @@
\else\ifcsname\??discretionaryaction\discretionarytoken\endcsname
\csname\??discretionaryaction\discretionarytoken\endcsname
\else
- \languages_check_before_discretionary
+ \lang_discretionaries_check_before
\ifconditional\spaceafterdiscretionary
\prewordbreak\hbox{#2}\relax
\else\ifconditional\punctafterdiscretionary
@@ -332,27 +332,27 @@
\def\directdiscretionary
{\csname
\ifcase\discretionarymode
- \strippedcsname\languages_process_discretionary_none
+ \strippedcsname\lang_discretionaries_process_none
\else
- \strippedcsname\languages_process_discretionary_direct
+ \strippedcsname\lang_discretionaries_process_direct
\fi
\endcsname}
\def\indirectdiscretionary
{\csname
\ifcase\discretionarymode
- \strippedcsname\languages_process_discretionary_none
+ \strippedcsname\lang_discretionaries_process_none
\else
- \strippedcsname\languages_process_discretionary_indirect
+ \strippedcsname\lang_discretionaries_process_indirect
\fi
\endcsname}
-\unexpanded\def\languages_process_discretionary_direct#1%
+\unexpanded\def\lang_discretionaries_process_direct#1%
{\edef\discretionarytoken{\detokenize{#1}}%
\let\textmodediscretionary\compoundhyphen
\executeifdefined{\??discretionaryaction\discretionarytoken}{\indirectdiscretionary{#1}}}
-\unexpanded\def\languages_process_discretionary_indirect#1%
+\unexpanded\def\lang_discretionaries_process_indirect#1%
{\prewordbreak\discretionary{\hbox{#1}}{}{\hbox{#1}}\allowbreak\postwordbreak}
\unexpanded\def\definetextmodediscretionary #1
@@ -375,7 +375,7 @@
% xxx3xxx
% xxx1<newline>2xxx
-\def\languages_discretionary_hyphen_like#1#2%
+\def\lang_discretionaries_hyphen_like#1#2%
{\ifconditional\spaceafterdiscretionary
\prewordbreak\hbox{#1}\relax
\else\ifconditional\punctafterdiscretionary
@@ -385,16 +385,16 @@
\fi\fi}
\definetextmodediscretionary {}
- {\languages_discretionary_hyphen_like\textmodehyphen\textmodehyphendiscretionary}
+ {\lang_discretionaries_hyphen_like\textmodehyphen\textmodehyphendiscretionary}
\definetextmodediscretionary -
- {\languages_discretionary_hyphen_like\normalhyphen\normalhyphendiscretionary}
+ {\lang_discretionaries_hyphen_like\normalhyphen\normalhyphendiscretionary}
\definetextmodediscretionary _
- {\languages_discretionary_hyphen_like\composedhyphen\composedhyphendiscretionary}
+ {\lang_discretionaries_hyphen_like\composedhyphen\composedhyphendiscretionary}
\definetextmodediscretionary )
- {\languages_discretionary_hyphen_like{)}{\discretionary{-)}{}{)}}}
+ {\lang_discretionaries_hyphen_like{)}{\discretionary{-)}{}{)}}}
\definetextmodediscretionary (
{\ifdim\lastskip>\zeropoint
@@ -459,9 +459,9 @@
%D \stoptyping
\unexpanded\def\fakecompoundhyphen
- {\def\|{\mathortext\vert\languages_fake_compound_hyphen}}
+ {\def\|{\mathortext\vert\lang_compounds_fake_hyphen}}
-\def\languages_fake_compound_hyphen
+\def\lang_compounds_fake_hyphen
{\def##1|%
{\doifelsenothing{##1}\compoundhyphen{##1}%
\kern\compoundbreakpoint\allowbreak}}
@@ -476,12 +476,12 @@
%D tokens.
\unexpanded\def\midworddiscretionary
- {\futurelet\next\languages_mid_word_discretionary}
+ {\futurelet\nexttoken\lang_discretionaries_mid_word}
-\def\languages_mid_word_discretionary
- {\ifx\next\blankspace\else
- \ifx\next\bgroup \else
- \ifx\next\egroup \else
+\def\lang_discretionaries_mid_word
+ {\ifx\nexttoken\blankspace\else
+ \ifx\nexttoken\bgroup \else
+ \ifx\nexttoken\egroup \else
\discretionary{-}{}{}%
\fi\fi\fi}
@@ -536,18 +536,18 @@
\setnewconstant\compoundcharactermode\plusone
-\newcount\c_languages_compound_character
+\newcount\c_lang_compounds_character
\def\installcompoundcharacter #1#2#3 #4% {#4} no grouping
{\ifcase\compoundcharactermode
% ignore mode
\else
- \chardef\c_languages_compound_character`#1%
- \expandafter\chardef\csname\??compoundnormal\string#1\endcsname\c_languages_compound_character
+ \chardef\c_lang_compounds_character`#1%
+ \expandafter\chardef\csname\??compoundnormal\string#1\endcsname\c_lang_compounds_character
\def\!!stringa{#3}%
\expandafter\def\csname\ifx\!!stringa\empty\??compoundsingle\else\??compoundmultiple\fi\detokenize{#1#2#3}\endcsname{#4}%
- \setevalue{\??compounddefinition\detokenize{#1}}{\noexpand\languages_handle_compound_character{\detokenize{#1}}}% beter nr's
- \expandafter\letcatcodecommand\expandafter\ctxcatcodes\expandafter\c_languages_compound_character\csname\??compounddefinition\detokenize{#1}\endcsname
+ \setevalue{\??compounddefinition\detokenize{#1}}{\noexpand\lang_compounds_handle_character{\detokenize{#1}}}% beter nr's
+ \expandafter\letcatcodecommand\expandafter\ctxcatcodes\expandafter\c_lang_compounds_character\csname\??compounddefinition\detokenize{#1}\endcsname
\fi}
%D We can also ignore definitions (needed in for instance \XML). Beware,
@@ -568,39 +568,39 @@
%D with \type{\futurelet} to prevent spaces from
%D disappearing.
-\def\languages_handle_compound_character#1%
- {\def\languages_handle_compound_character_finish{\languages_handle_compound_character_finish_indeed{#1}}%
+\def\lang_compounds_handle_character#1%
+ {\def\lang_compounds_handle_character_finish{\lang_compounds_handle_character_finish_indeed{#1}}%
\futurelet\nexttoken\xhandlecompoundcharacter}
-\def\languages_handle_compound_character_finish_indeed
+\def\lang_compounds_handle_character_finish_indeed
{\ifx\nexttoken\bgroup
- %\expandafter\languages_handle_compound_character_pickup % handle "{ee} -> \"ee
+ %\expandafter\lang_compounds_handle_character_pickup % handle "{ee} -> \"ee
%\expandafter\gobbleoneargument % forget "{ee} -> ee
- \expandafter\languages_handle_compound_character_one % ignore "{ee} -> "ee
+ \expandafter\lang_compounds_handle_character_one % ignore "{ee} -> "ee
\else\ifx\nexttoken\egroup
- \doubleexpandafter\languages_handle_compound_character_normal
+ \doubleexpandafter\lang_compounds_handle_character_normal
\else\ifx\nexttoken\blankspace
- \tripleexpandafter\languages_handle_compound_character_normal
+ \tripleexpandafter\lang_compounds_handle_character_normal
\else
- \tripleexpandafter\languages_handle_compound_character_pickup
+ \tripleexpandafter\lang_compounds_handle_character_pickup
\fi\fi\fi}
-\def\languages_handle_compound_character_normal#1%
+\def\lang_compounds_handle_character_normal#1%
{\csname\??compoundnormal\string#1\endcsname}
-\def\languages_handle_compound_character_pickup#1#2% preserve space
- {\def\languages_handle_compound_character_finish{\languages_handle_compound_character_finish_indeed#1#2}%
- \futurelet\nexttoken\languages_handle_compound_character_finish}
+\def\lang_compounds_handle_character_pickup#1#2% preserve space
+ {\def\lang_compounds_handle_character_finish{\lang_compounds_handle_character_finish_indeed#1#2}%
+ \futurelet\nexttoken\lang_compounds_handle_character_finish}
-\def\languages_handle_compound_character_finish_indeed
+\def\lang_compounds_handle_character_finish_indeed
{\ifx\nexttoken\bgroup
- \expandafter\languages_handle_compound_character_one
+ \expandafter\lang_compounds_handle_character_one
\else\ifx\nexttoken\egroup
- \doubleexpandafter\languages_handle_compound_character_one
+ \doubleexpandafter\lang_compounds_handle_character_one
\else\ifx\nexttoken\blankspace
- \tripleexpandafter\languages_handle_compound_character_one
+ \tripleexpandafter\lang_compounds_handle_character_one
\else
- \tripleexpandafter\languages_handle_compound_character_two
+ \tripleexpandafter\lang_compounds_handle_character_two
\fi\fi\fi}
%D Besides taken care of the grouping and space tokens, we have
@@ -616,7 +616,7 @@
%D
%D In later modules we will see how these commands are used.
-\def\languages_handle_compound_character_one#1#2%
+\def\lang_compounds_handle_character_one#1#2%
{\if\string#1\string#2% was: \ifx#1#2%
\def\next{\csname\??compoundnormal\string#1\endcsname}%
\else\ifcsname\??compoundsingle\string#1\string#2\endcsname
@@ -626,7 +626,7 @@
\fi\fi
\next}
-\def\languages_handle_compound_character_two#1#2#3%
+\def\lang_compounds_handle_character_two#1#2#3%
{\if\string#1\string#2%
\def\next{\csname\??compoundnormal\string#1\endcsname#3}%
\else\ifcsname\??compoundmultiple\string#1\string#2\string#3\endcsname
diff --git a/tex/context/base/lang-url.mkiv b/tex/context/base/lang-url.mkiv
index 134b899da..8bdf57517 100644
--- a/tex/context/base/lang-url.mkiv
+++ b/tex/context/base/lang-url.mkiv
@@ -15,6 +15,9 @@
\unprotect
+%D Traditionally this code is in the language namespace as
+%D hyphenation relates to languages.
+
%D \macros
%D {hyphenatedurl}
%D
@@ -61,24 +64,24 @@
\setnewconstant\hyphenatedurllefthyphenmin \plusthree
\setnewconstant\hyphenatedurlrighthyphenmin\plusthree
-\def\languages_hyphenated_url_space {\nobreak\hskip\zeropoint plus\onepoint\nobreak}
-\def\languages_hyphenated_url_after #1{\char#1\discretionary{}{\hyphenatedurlseparator}{}}
-\def\languages_hyphenated_url_before #1{\discretionary{\hyphenatedurlseparator}{}{}\char#1\relax}
-\def\languages_hyphenated_url_normal #1{\char#1\relax}
-\def\languages_hyphenated_url_disc #1{\discretionary{}{}{}}
+\def\lang_url_space {\nobreak\hskip\zeropoint plus\onepoint\nobreak}
+\def\lang_url_after #1{\char#1\discretionary{}{\hyphenatedurlseparator}{}}
+\def\lang_url_before #1{\discretionary{\hyphenatedurlseparator}{}{}\char#1\relax}
+\def\lang_url_normal #1{\char#1\relax}
+\def\lang_url_disc #1{\discretionary{}{}{}}
-\def\languages_hyphenated_url_space_trace {\nobreak\begingroup\darkyellow\ruledhskip\zeropoint plus\onepoint\endgroup\nobreak}
-\def\languages_hyphenated_url_after_trace #1{\char#1\hsmash{\darkblue\vl}\discretionary{}{\hyphenatedurlseparator}{}}
-\def\languages_hyphenated_url_before_trace#1{\discretionary{\hyphenatedurlseparator}{}{}\hsmash{\darkred\vl}\char#1\relax}
-\def\languages_hyphenated_url_normal_trace#1{\char#1\relax}
-\def\languages_hyphenated_url_disc_trace #1{\discretionary{\hsmash{\darkgreen\vl}}{\hsmash{\darkgreen\vl}}{\hsmash{\darkgreen\vl}}}
+\def\lang_url_space_trace {\nobreak\begingroup\darkyellow\ruledhskip\zeropoint plus\onepoint\endgroup\nobreak}
+\def\lang_url_after_trace #1{\char#1\hsmash{\darkblue\vl}\discretionary{}{\hyphenatedurlseparator}{}}
+\def\lang_url_before_trace#1{\discretionary{\hyphenatedurlseparator}{}{}\hsmash{\darkred\vl}\char#1\relax}
+\def\lang_url_normal_trace#1{\char#1\relax}
+\def\lang_url_disc_trace #1{\discretionary{\hsmash{\darkgreen\vl}}{\hsmash{\darkgreen\vl}}{\hsmash{\darkgreen\vl}}}
\def\showhyphenatedurlbreaks
- {\let\languages_hyphenated_url_space \languages_hyphenated_url_space_trace
- \let\languages_hyphenated_url_after \languages_hyphenated_url_after_trace
- \let\languages_hyphenated_url_before\languages_hyphenated_url_before_trace
- \let\languages_hyphenated_url_normal\languages_hyphenated_url_normal_trace
- \let\languages_hyphenated_url_disc \languages_hyphenated_url_disc_trace}
+ {\let\lang_url_space \lang_url_space_trace
+ \let\lang_url_after \lang_url_after_trace
+ \let\lang_url_before\lang_url_before_trace
+ \let\lang_url_normal\lang_url_normal_trace
+ \let\lang_url_disc \lang_url_disc_trace}
\def\sethyphenatedurlnormal#1{\ctxcommand{hyphenatedurl.setcharacters(\!!bs#1\!!es,0)}}
\def\sethyphenatedurlbefore#1{\ctxcommand{hyphenatedurl.setcharacters(\!!bs#1\!!es,1)}}
@@ -91,11 +94,11 @@
\begingroup
\the\everyhyphenatedurl
\normallanguage\zerocount
- \let\s\languages_hyphenated_url_space
- \let\a\languages_hyphenated_url_after
- \let\b\languages_hyphenated_url_before
- \let\n\languages_hyphenated_url_normal
- \let\d\languages_hyphenated_url_disc
+ \let\s\lang_url_space
+ \let\a\lang_url_after
+ \let\b\lang_url_before
+ \let\n\lang_url_normal
+ \let\d\lang_url_disc
\normalexpanded{\noexpand\ctxcommand{hyphenatedurl(
\!!bs\noexpand\detokenize{#1}\!!es,
\number\hyphenatedurllefthyphenmin,
diff --git a/tex/context/base/lang-wrd.mkiv b/tex/context/base/lang-wrd.mkiv
index 1408b7372..682489912 100644
--- a/tex/context/base/lang-wrd.mkiv
+++ b/tex/context/base/lang-wrd.mkiv
@@ -45,9 +45,9 @@
\to \everysetupspellchecking
\unexpanded\def\loadspellchecklist
- {\dodoubleempty\languages_load_spell_check_list}
+ {\dodoubleempty\lang_spellchecking_load_list}
-\def\languages_load_spell_check_list[#1][#2]%
+\def\lang_spellchecking_load_list[#1][#2]%
{\ctxcommand{loadspellchecklist("#1","#2")}}
\setupspellchecking
diff --git a/tex/context/base/luat-ini.mkiv b/tex/context/base/luat-ini.mkiv
index cfb15c2b4..46b2d1f7f 100644
--- a/tex/context/base/luat-ini.mkiv
+++ b/tex/context/base/luat-ini.mkiv
@@ -27,28 +27,28 @@
%D A few more goodies:
-\unexpanded\def\startlua {\system_start_lua } \let\stoplua \relax % tex catcodes
-\unexpanded\def\startluacode{\system_start_lua_code} \let\stopluacode\relax % lua catcodes
+\unexpanded\def\startlua {\luat_start_lua } \let\stoplua \relax % tex catcodes
+\unexpanded\def\startluacode{\luat_start_lua_code} \let\stopluacode\relax % lua catcodes
% It might makes sense to have a \type {\directelua} so that we can avoid
% the \type {\normalexpanded} around \type {\directlua}. Something to discuss
% in the team.
-\def\system_start_lua
+\def\luat_start_lua
{\begingroup
\obeylualines
- \system_start_lua_indeed}
+ \luat_start_lua_indeed}
-\def\system_start_lua_indeed#1\stoplua
+\def\luat_start_lua_indeed#1\stoplua
{\normalexpanded{\endgroup\noexpand\directlua\zerocount{#1}}}
-\def\system_start_lua_code
+\def\luat_start_lua_code
{\begingroup
\obeylualines
\obeyluatokens
- \system_start_lua_code_indeed}
+ \luat_start_lua_code_indeed}
-\def\system_start_lua_code_indeed#1\stopluacode
+\def\luat_start_lua_code_indeed#1\stopluacode
{\normalexpanded{\endgroup\noexpand\directlua\zerocount{#1}}}
%D Some delayed definitions:
@@ -108,7 +108,7 @@
%D Beware: because \type {\expanded} is een convert command, the error
%D message will show \type{<inserted text>} as part of the message.
-\def\system_start_named_lua_code#1%
+\def\luat_start_named_lua_code#1%
{\begingroup
\obeylualines
\obeyluatokens
@@ -119,7 +119,7 @@
\scratchcounter\ctxlua{lua.registername("#1","#3")}%
\normalexpanded{\edef\csname\??lu:c:#1\endcsname##1\csname\e!stop#1\v!code\endcsname}%
{\endgroup\noexpand\directlua\the\scratchcounter{protect("#1\s!data")##1}}%
- \expandafter\def \csname\e!start#1\v!code\endcsname {\system_start_named_lua_code{#1}}%
+ \expandafter\def \csname\e!start#1\v!code\endcsname {\luat_start_named_lua_code{#1}}%
\expandafter\edef\csname #1\v!code\endcsname##1{\noexpand\directlua\the\scratchcounter{protect("#1\s!data")##1}}%
\fi}
@@ -196,9 +196,9 @@
{\begingroup
\obeylualines
\obeyluatokens
- \system_start_lua_parameter_set{#1}}
+ \luat_start_lua_parameter_set{#1}}
-\def\system_start_lua_parameter_set#1#2\stopluaparameterset
+\def\luat_start_lua_parameter_set#1#2\stopluaparameterset
{\ctxlua{parametersets["#1"]={#2}}%
\endgroup}
@@ -237,13 +237,13 @@
\obeyluatokens
\catcode\leftbraceasciicode \plusone
\catcode\rightbraceasciicode\plustwo
- \afterassignment\system_lua_code
+ \afterassignment\luat_lua_code
\scratchtoks=}
% Hm, are we sure that the \* commands work out okay here? We could probably
% use \setcatcodetable\luacatcodes instead of \obeyluatokens now.
-\def\system_lua_code
+\def\luat_lua_code
{\normalexpanded{\endgroup\noexpand\directlua\zerocount\expandafter{\the\scratchtoks}}}
\protect \endinput
diff --git a/tex/context/base/lxml-ini.mkiv b/tex/context/base/lxml-ini.mkiv
index 2ba1619e4..84ebc5823 100644
--- a/tex/context/base/lxml-ini.mkiv
+++ b/tex/context/base/lxml-ini.mkiv
@@ -87,10 +87,10 @@
\def\xmldisplayverbatim #1{\ctxlxml{displayverbatim("#1")}}
\def\xmlinlineverbatim #1{\ctxlxml{inlineverbatim("#1")}}
-\def\xmlload #1#2{\ctxlxml{load("#1","#2","\p_xml_entities","\p_xml_compress")}}
-\def\xmlloadbuffer #1#2{\ctxlxml{loadbuffer("#1","#2","\p_xml_entities","\p_xml_compress")}}
-\def\xmlloaddata #1#2{\ctxlxml{loaddata("#1",\!!bs#2\!!es,"\p_xml_entities","\p_xml_compress")}}
-\def\xmlloadregistered #1#2{\ctxlxml{loadregistered("#1","\p_xml_entities","\p_xml_compress")}}
+\def\xmlload #1#2{\ctxlxml{load("#1","#2","\p_lxml_entities","\p_lxml_compress")}}
+\def\xmlloadbuffer #1#2{\ctxlxml{loadbuffer("#1","#2","\p_lxml_entities","\p_lxml_compress")}}
+\def\xmlloaddata #1#2{\ctxlxml{loaddata("#1",\!!bs#2\!!es,"\p_lxml_entities","\p_lxml_compress")}}
+\def\xmlloadregistered #1#2{\ctxlxml{loadregistered("#1","\p_lxml_entities","\p_lxml_compress")}}
\def\xmlloaddirectives #1{\ctxlxml{directives.load("any:///#1")}}
\def\xmlpos #1{\ctxlxml{pos("#1")}}
@@ -316,12 +316,12 @@
\unexpanded\def\xmlinitialize
{\the\everysetupxml}
-\let\p_xml_entities\empty
-\let\p_xml_compress\empty
+\let\p_lxml_entities\empty
+\let\p_lxml_compress\empty
\appendtoks
- \edef\p_xml_entities{\directxmlparameter\c!entities}%
- \edef\p_xml_compress{\directxmlparameter\c!compress}%
+ \edef\p_lxml_entities{\directxmlparameter\c!entities}%
+ \edef\p_lxml_compress{\directxmlparameter\c!compress}%
\to \everysetupxml
\setupxml
@@ -355,26 +355,26 @@
\unexpanded\def\xmle
{\ifcase\xmlautoentities
- \expandafter\xml_e_none
+ \expandafter\lxml_e_none
\or
- \expandafter\xml_e_upper
+ \expandafter\lxml_e_upper
\or
- \expandafter\xml_e_upperlower
+ \expandafter\lxml_e_upperlower
\else
- \expandafter\xml_e_none
+ \expandafter\lxml_e_none
\fi}
-\def\xml_e_none#1#2% safe
+\def\lxml_e_none#1#2% safe
{#1}
-\def\xml_e_upper#1#2% can be abbreviation
+\def\lxml_e_upper#1#2% can be abbreviation
{\ifcsname#2\endcsname
\csname#2\expandafter\endcsname
\else
#1%
\fi}
-\def\xml_e_upperlower#1#2% can be anything, so unsafe
+\def\lxml_e_upperlower#1#2% can be anything, so unsafe
{\ifcsname#2\endcsname
\csname#2\expandafter\endcsname
\else\ifcsname#1\endcsname
@@ -386,9 +386,9 @@
% handy helpers (analogue to MP and LUA and TEX and also MkII)
\unexpanded\def\processXMLbuffer
- {\dosingleempty\xml_process_buffer}
+ {\dosingleempty\lxml_process_buffer}
-\def\xml_process_buffer[#1]%
+\def\lxml_process_buffer[#1]%
{\xmlprocessbuffer{temp}{#1}{}}
\unexpanded\def\processXMLfile#1%
diff --git a/tex/context/base/m-chart.mkvi b/tex/context/base/m-chart.mkvi
index a9de44859..df787e995 100644
--- a/tex/context/base/m-chart.mkvi
+++ b/tex/context/base/m-chart.mkvi
@@ -119,9 +119,9 @@
\unexpanded\def\startFLOWchart
{\startnointerference
\the\everyFLOWchart
- \dosingleempty\start_FLOW_chart}
+ \dosingleempty\module_charts_start_chart}
-\unexpanded\def\start_FLOW_chart[#name]%
+\unexpanded\def\module_charts_process[#name]%
{\ctxcommand{flow_start_chart("#name")}}
\unexpanded\def\stopFLOWchart
@@ -129,9 +129,9 @@
\stopnointerference}
\unexpanded\def\defineFLOWchart % for old times sake
- {\dodoubleempty\define_FLOW_chart}
+ {\dodoubleempty\module_charts_FLOW_define}
-\unexpanded\def\define_FLOW_chart[#name][#settings]#cells% todo: save settings
+\unexpanded\def\module_charts_FLOW_define[#name][#settings]#cells% todo: save settings
{\startnointerference
\the\everyFLOWchart
\ctxcommand{flow_start_chart("#name")}%
@@ -140,9 +140,9 @@
\stopnointerference}
\unexpanded\def\startFLOWcell
- {\dodoubleempty\start_FLOW_cell}
+ {\dodoubleempty\module_charts_start_cell}
-\unexpanded\def\start_FLOW_cell[#1][#2]%
+\unexpanded\def\module_charts_start_cell[#1][#2]%
{\begingroup
\iffirstargument
\setupFLOWshape[#1]%
@@ -178,9 +178,9 @@
{\ctxcommand{flow_stop_cell()}}
\unexpanded\def\FLOWchart
- {\dodoubleempty\FLOW_chart}
+ {\dodoubleempty\module_charts_process}
-\def\FLOW_chart[#name][#settings]%
+\def\module_charts_process[#name][#settings]%
{\vbox\bgroup
\insidefloattrue
\dontcomplain
@@ -274,28 +274,28 @@
\let\includeFLOWchart\include
\to \everyFLOWchart
-\unexpanded\def\FLOW_name #name{\ctxcommand{flow_set_name("#name")}\ignorespaces}
-\unexpanded\def\FLOW_shape #shape{\ctxcommand{flow_set_shape("#shape")}\ignorespaces}
-\unexpanded\def\FLOW_destination #destination{\ctxcommand{flow_set_destination("#destination")}\ignorespaces}
-\unexpanded\def\FLOW_focus #focus{\ctxcommand{flow_set_focus("#focus")}\ignorespaces}
-\unexpanded\def\FLOW_overlay #overlay{\ctxcommand{flow_set_overlay("#overlay")}\ignorespaces}
-\unexpanded\def\FLOW_location #location{\ctxcommand{flow_set_location("#location")}\ignorespaces}
-\unexpanded\def\FLOW_figure #figure{\ctxcommand{flow_set_figure("#figure")}\ignorespaces}
-
-\unexpanded\def\FLOW_text {\dosingleempty\do_FLOW_text}
-\unexpanded\def\FLOW_label {\dosingleempty\do_FLOW_label}
-\unexpanded\def\FLOW_comment {\dosingleempty\do_FLOW_comment}
-\unexpanded\def\FLOW_exit {\dosingleempty\do_FLOW_exit}
-\unexpanded\def\FLOW_connection {\dodoubleempty\do_FLOW_connection}
-\unexpanded\def\FLOW_include {\dodoubleempty\do_FLOW_include}
-
-\unexpanded\def\do_FLOW_text [#align]#text{\ctxcommand{flow_set_text("#align",\!!bs\detokenize{#text}\!!es)}\ignorespaces}
-\unexpanded\def\do_FLOW_label [#location]#text{\ctxcommand{flow_set_label("#location",\!!bs\detokenize{#text}\!!es)}\ignorespaces}
-\unexpanded\def\do_FLOW_comment [#location]#text{\ctxcommand{flow_set_comment("#location",\!!bs\detokenize{#text}\!!es)}\ignorespaces}
-\unexpanded\def\do_FLOW_exit [#location]#text{\ctxcommand{flow_set_exit("#location",\!!bs\detokenize{#text}\!!es)}\ignorespaces}
-\unexpanded\def\do_FLOW_connection[#location][#offset]#name{\ctxcommand{flow_set_connection("#location","#offset","#name")}\ignorespaces}
-
-\unexpanded\def\do_FLOW_include [#name][#settings]{%
+\unexpanded\def\FLOW_name #name{\ctxcommand{flow_set_name("#name")}\ignorespaces}
+\unexpanded\def\FLOW_shape #shape{\ctxcommand{flow_set_shape("#shape")}\ignorespaces}
+\unexpanded\def\FLOW_destination#destination{\ctxcommand{flow_set_destination("#destination")}\ignorespaces}
+\unexpanded\def\FLOW_focus #focus{\ctxcommand{flow_set_focus("#focus")}\ignorespaces}
+\unexpanded\def\FLOW_overlay #overlay{\ctxcommand{flow_set_overlay("#overlay")}\ignorespaces}
+\unexpanded\def\FLOW_location #location{\ctxcommand{flow_set_location("#location")}\ignorespaces}
+\unexpanded\def\FLOW_figure #figure{\ctxcommand{flow_set_figure("#figure")}\ignorespaces}
+
+\unexpanded\def\FLOW_text {\dosingleempty\module_charts_FLOW_text}
+\unexpanded\def\FLOW_label {\dosingleempty\module_charts_FLOW_label}
+\unexpanded\def\FLOW_comment {\dosingleempty\module_charts_FLOW_comment}
+\unexpanded\def\FLOW_exit {\dosingleempty\module_charts_FLOW_exit}
+\unexpanded\def\FLOW_connection{\dodoubleempty\module_charts_FLOW_connection}
+\unexpanded\def\FLOW_include {\dodoubleempty\module_charts_FLOW_include}
+
+\unexpanded\def\module_charts_FLOW_text [#align]#text{\ctxcommand{flow_set_text("#align",\!!bs\detokenize{#text}\!!es)}\ignorespaces}
+\unexpanded\def\module_charts_FLOW_label [#location]#text{\ctxcommand{flow_set_label("#location",\!!bs\detokenize{#text}\!!es)}\ignorespaces}
+\unexpanded\def\module_charts_FLOW_comment [#location]#text{\ctxcommand{flow_set_comment("#location",\!!bs\detokenize{#text}\!!es)}\ignorespaces}
+\unexpanded\def\module_charts_FLOW_exit [#location]#text{\ctxcommand{flow_set_exit("#location",\!!bs\detokenize{#text}\!!es)}\ignorespaces}
+\unexpanded\def\module_charts_FLOW_connection[#location][#offset]#name{\ctxcommand{flow_set_connection("#location","#offset","#name")}\ignorespaces}
+
+\unexpanded\def\module_charts_FLOW_include [#name][#settings]{%
\begingroup
\getparameters[FLOWi][x=1,y=1,#settings]%
\ctxcommand{flow_set_include("#name",\number\FLOWix,\number\FLOWiy,\!!bs\detokenize{#settings}\!!es)}%
diff --git a/tex/context/base/m-steps.mkvi b/tex/context/base/m-steps.mkvi
index 1a4406bab..de861e619 100644
--- a/tex/context/base/m-steps.mkvi
+++ b/tex/context/base/m-steps.mkvi
@@ -17,17 +17,17 @@
\unprotect
-\def\??stpc{@@stpc} % charts
-\def\??stpt{@@stpt} % tables
-\def\??stec{@@stec} % cells
-\def\??stet{@@stet} % texts
-\def\??stel{@@stel} % lines
-
-\installsimplecommandhandler \??stpc {STEPchart} \??stpc
-\installsimplecommandhandler \??stpt {STEPtable} \??stpt
-\installsimplecommandhandler \??stec {STEPcell} \??stec
-\installsimplecommandhandler \??stet {STEPtext} \??stet
-\installsimplecommandhandler \??stel {STEPline} \??stel
+\definecorenamespace {stepcharts}
+\definecorenamespace {steptables}
+\definecorenamespace {stepcells}
+\definecorenamespace {steptexts}
+\definecorenamespace {steplines}
+
+\installsimplecommandhandler \??stepcharts {STEPchart} \??stepcharts
+\installsimplecommandhandler \??steptables {STEPtable} \??steptables
+\installsimplecommandhandler \??stepcells {STEPcell} \??stepcells
+\installsimplecommandhandler \??steptexts {STEPtext} \??steptexts
+\installsimplecommandhandler \??steplines {STEPline} \??steplines
\let\setupSTEPcharts\setupSTEPchart
\let\setupSTEPtables\setupSTEPtable
@@ -93,19 +93,19 @@
\unexpanded\def\startSTEPchart
{\begingroup
- \dodoubleempty\start_STEP_chart}
+ \dodoubleempty\module_steps_start_chart}
-\def\start_STEP_chart[#name][#settings]%
+\def\module_steps_start_chart[#name][#settings]%
{\startnointerference
\iffirstargument
\doifassignmentelse{#name}
{\let\currentSTEPchart\empty
- \xdef\flush_STEP_chart{\STEP_chart[][#name]}}
+ \xdef\module_steps_flush_chart{\module_steps_chart[][#name]}}
{\edef\currentSTEPchart{#name}%
- \glet\flush_STEP_chart\relax}% settings are not stored
+ \glet\module_steps_flush_chart\relax}% settings are not stored
\else
\let\currentSTEPchart\empty
- \gdef\flush_STEP_chart{\STEP_chart[][]}%
+ \gdef\module_steps_flush_chart{\module_steps_chart[][]}%
\fi
\the\everySTEPchart
\ctxcommand{step_start_chart("\currentSTEPchart")}}
@@ -113,22 +113,22 @@
\unexpanded\def\stopSTEPchart
{\ctxcommand{step_stop_chart()}%
\stopnointerference
- \flush_STEP_chart
+ \module_steps_flush_chart
\endgroup}
\unexpanded\def\startSTEPtable
{\begingroup
\setupSTEPchart[\c!alternative=\v!vertical]%
- \dodoubleempty\start_STEP_chart}
+ \dodoubleempty\module_steps_start_chart}
\let\stopSTEPtable\stopSTEPchart
-\let\flush_STEP_chart\relax
+\let\module_steps_flush_chart\relax
\unexpanded\def\STEPchart
- {\dodoubleempty\STEP_chart}
+ {\dodoubleempty\module_steps_chart}
-\unexpanded\def\STEP_chart[#name][#settings]%
+\unexpanded\def\module_steps_chart[#name][#settings]%
{\begingroup
\setupSTEPchart[#settings]%
\ifinsidefloat
@@ -182,43 +182,43 @@
\unexpanded\def\stopSTEPcell
{\ctxcommand{step_stop_cell()}}
-\unexpanded\def\step_cells#top#bot%
+\unexpanded\def\module_steps_cells#top#bot%
{\ctxcommand{step_cells(\!!bs\detokenize{#top}\!!es,\!!bs\detokenize{#bot}\!!es)}}
-\unexpanded\def\step_texts#top#bot%
+\unexpanded\def\module_steps_texts#top#bot%
{\ctxcommand{step_texts(\!!bs\detokenize{#top}\!!es,\!!bs\detokenize{#bot}\!!es)}}
-\unexpanded\def\step_cell#str%
+\unexpanded\def\module_steps_cell#str%
{\ctxcommand{step_cell(\!!bs\detokenize{#str}\!!es)}}
-\unexpanded\def\step_text#str%
+\unexpanded\def\module_steps_text#str%
{\ctxcommand{step_text(\!!bs\detokenize{#str}\!!es)}}
-\unexpanded\def\step_textset#left#middle#right%
+\unexpanded\def\module_steps_textset#left#middle#right%
{\ctxcommand{step_textset(\!!bs\detokenize{#left}\!!es,\!!bs\detokenize{#middle}\!!es,\!!bs\detokenize{#right}\!!es)}}
-\unexpanded\def\step_toptext#top%
+\unexpanded\def\module_steps_toptext#top%
{\ctxcommand{step_text_top(\!!bs\detokenize{#top}\!!es)}}
-\unexpanded\def\step_bottext#bot%
+\unexpanded\def\module_steps_bottext#bot%
{\ctxcommand{step_text_bot(\!!bs\detokenize{#bot}\!!es)}}
-\unexpanded\def\step_topcell#top%
+\unexpanded\def\module_steps_topcell#top%
{\ctxcommand{step_cell_top(\!!bs\detokenize{#top}\!!es)}}
-\unexpanded\def\step_botcell#bot%
+\unexpanded\def\module_steps_botcell#bot%
{\ctxcommand{step_cell_bot(\!!bs\detokenize{#bot}\!!es)}}
\appendtoks
- \let\cells \step_cells
- \let\texts \step_texts
- \let\cell \step_cell
- \let\text \step_text
- \let\textset\step_textset
- \let\toptext\step_toptext
- \let\bottext\step_bottext
- \let\topcell\step_topcell
- \let\botcell\step_botcell
+ \let\cells \module_steps_cells
+ \let\texts \module_steps_texts
+ \let\cell \module_steps_cell
+ \let\text \module_steps_text
+ \let\textset\module_steps_textset
+ \let\toptext\module_steps_toptext
+ \let\bottext\module_steps_bottext
+ \let\topcell\module_steps_topcell
+ \let\botcell\module_steps_botcell
\to \everySTEPchart
% todo: mapping can be done in lua
diff --git a/tex/context/base/math-ini.mkiv b/tex/context/base/math-ini.mkiv
index 075935f4d..561b50a95 100644
--- a/tex/context/base/math-ini.mkiv
+++ b/tex/context/base/math-ini.mkiv
@@ -194,15 +194,15 @@
%D \stopformula
%D \stoptyping
-\newcount\math_renderings_attribute
+\newcount\c_math_renderings_attribute
\appendtoks
- \math_renderings_attribute\cldcontext{mathematics.renderset("\mathematicsparameter\c!symbolset")}\relax
+ \c_math_renderings_attribute\cldcontext{mathematics.renderset("\mathematicsparameter\c!symbolset")}\relax
\to \everysetupmathematics
\appendtoks
- \ifcase\math_renderings_attribute\else
- \attribute\mathrenderingattribute\math_renderings_attribute
+ \ifcase\c_math_renderings_attribute\else
+ \attribute\mathrenderingattribute\c_math_renderings_attribute
\fi
\to \everymathematics
@@ -656,19 +656,19 @@
%D Arabic:
-\newconditional\mathematics_right_to_left
+\newconditional\c_math_right_to_left
\appendtoks
\doifelse{\mathematicsparameter\c!align}{r2l}%
- {\settrue \mathematics_right_to_left}%
- {\setfalse\mathematics_right_to_left}%
+ {\settrue \c_math_right_to_left}%
+ {\setfalse\c_math_right_to_left}%
\to \everysetupmathematics
-\unexpanded\def\mathematics_synchronize_direction
- {\mathdir T\ifconditional\mathematics_right_to_left R\else L\fi T}
+\unexpanded\def\math_basics_synchronize_direction
+ {\mathdir T\ifconditional\c_math_right_to_left R\else L\fi T}
\appendtoks
- \mathematics_synchronize_direction
+ \math_basics_synchronize_direction
%to \everymathematics % comes too late and I'm not in the mood for a mixed mode kludge now
\to \everysetupmathematics
diff --git a/tex/context/base/math-pln.mkiv b/tex/context/base/math-pln.mkiv
index 1f846d5ac..bd5b7ce79 100644
--- a/tex/context/base/math-pln.mkiv
+++ b/tex/context/base/math-pln.mkiv
@@ -148,7 +148,7 @@
\let\activemathprime\domathprime
-% {\catcode`\_=\active \global\let_=\_} % _ in math is either subscript or \_
+% {\catcode`\_=\activecatcode \global\let_=\_} % _ in math is either subscript or \_
\let\activemathunderscore\_
diff --git a/tex/context/base/meta-fig.mkiv b/tex/context/base/meta-fig.mkiv
index 7d268b77d..bee88ffef 100644
--- a/tex/context/base/meta-fig.mkiv
+++ b/tex/context/base/meta-fig.mkiv
@@ -44,7 +44,7 @@
\definefittingpage
[MPpage]
[\c!align=,
- \c!command=\mp_process_graphic]
+ \c!command=\meta_process_graphic]
%D \macros
%D {MPfigure}
diff --git a/tex/context/base/meta-ini.mkiv b/tex/context/base/meta-ini.mkiv
index 09e26edf1..16c56789e 100644
--- a/tex/context/base/meta-ini.mkiv
+++ b/tex/context/base/meta-ini.mkiv
@@ -17,9 +17,9 @@
\unprotect
-\newtoks \t_mp_extensions % mp, once
-\newtoks \t_mp_initializations % tex, each
-\newtoks \t_mp_userinclusions % mp, user
+\newtoks \t_meta_extensions % mp, once
+\newtoks \t_meta_initializations % tex, each
+\newtoks \t_meta_userinclusions % mp, user
\newtoks \everyMPgraphic % mp % public or not ?
@@ -38,73 +38,73 @@
% mechanism is to keep her gnuplot from interfering.
\unexpanded\def\startMPdefinitions
- {\dosinglegroupempty\mp_start_definitions}
+ {\dosinglegroupempty\meta_start_definitions}
-\def\mp_start_definitions#1#2\stopMPdefinitions
+\def\meta_start_definitions#1#2\stopMPdefinitions
{\edef\currentMPgraphicinstance{#1}%
\ifx\currentMPgraphicinstance\empty
\let\currentMPgraphicinstance\defaultMPgraphicinstance
\fi
- \global\t_mp_instance\expandafter{\the\t_mp_instance#2}}
+ \global\t_meta_instance\expandafter{\the\t_meta_instance#2}}
\let\stopMPdefinitions\relax
\unexpanded\def\startMPextensions#1\stopMPextensions
- {\global\t_mp_extensions\expandafter{\the\t_mp_extensions#1}}
+ {\global\t_meta_extensions\expandafter{\the\t_meta_extensions#1}}
\let\stopMPextensions\relax
\unexpanded\def\startMPinitializations#1\stopMPinitializations
- {\global\t_mp_initializations\expandafter{\the\t_mp_initializations#1}}
+ {\global\t_meta_initializations\expandafter{\the\t_meta_initializations#1}}
\let\stopMPinitializations\relax
\unexpanded\def\startMPinclusions
- {\dosingleempty\mp_start_inclusions}
+ {\dosingleempty\meta_start_inclusions}
-\def\mp_start_inclusions[#1]#2\stopMPinclusions
+\def\meta_start_inclusions[#1]#2\stopMPinclusions
{\edef\m_mp_option{#1}%
\ifx\m_mp_option\!!plustoken \else
- \global\t_mp_userinclusions\emptytoks
+ \global\t_meta_userinclusions\emptytoks
\fi
- \global\t_mp_userinclusions\expandafter{\the\t_mp_userinclusions#2}}
+ \global\t_meta_userinclusions\expandafter{\the\t_meta_userinclusions#2}}
\let\stopMPinclusions\relax
\unexpanded\def\MPinclusions
- {\dosingleempty\mp_inclusions}
+ {\dosingleempty\meta_inclusions}
-\def\mp_inclusions[#1]#2%
+\def\meta_inclusions[#1]#2%
{\edef\m_mp_option{#1}%
\ifx\m_mp_option\!!plustoken \else
- \global\t_mp_userinclusions\emptytoks
+ \global\t_meta_userinclusions\emptytoks
\fi
- \global\t_mp_userinclusions\expandafter{\the\t_mp_userinclusions#2}}
+ \global\t_meta_userinclusions\expandafter{\the\t_meta_userinclusions#2}}
-\def\mp_preset_definitions
+\def\meta_preset_definitions
{\edef\overlaywidth {\overlaywidth \space}%
\edef\overlayheight {\overlayheight \space}%
\edef\overlaylinewidth{\overlaylinewidth\space}%
\edef\currentwidth {\the\hsize \space}%
\edef\currentheight {\the\vsize \space}}
-\def\t_mp_instance{\csname\??mpinstancetokens\currentMPgraphicinstance\endcsname} % token register
+\def\t_meta_instance{\csname\??mpinstancetokens\currentMPgraphicinstance\endcsname} % token register
\unexpanded\def\defineMPinstance
- {\dodoubleargument\mp_define_instance}
+ {\dodoubleargument\meta_define_instance}
-\def\mp_define_instance[#1][#2]%
+\def\meta_define_instance[#1][#2]%
{\ifcsname\??mpinstancetokens#1\endcsname\else\expandafter\newtoks\csname\??mpinstancetokens#1\endcsname\fi
- \t_mp_instance\emptytoks % in case we redefine
+ \t_meta_instance\emptytoks % in case we redefine
\getparameters[\??gi#1][\s!format=mpost,\s!extensions=\v!no,\s!initializations=\v!no,#2]}
\unexpanded\def\resetMPinstance[#1]%
{\writestatus\m!metapost{reset will be implemented when needed}}
-\def\mp_analyze_graphicname[#1]%
- {\mp_analyze_graphicname_indeed[#1::::]}
+\def\meta_analyze_graphicname[#1]%
+ {\meta_analyze_graphicname_indeed[#1::::]}
-\def\mp_analyze_graphicname_indeed[#1::#2::#3]% instance ::
+\def\meta_analyze_graphicname_indeed[#1::#2::#3]% instance ::
{\edef\currentMPgraphicname{#2}%
\ifx\currentMPgraphicname\empty
\edef\currentMPgraphicname{#1}%
@@ -128,58 +128,58 @@
\defineMPinstance[metapost][\s!format=mpost]
\defineMPinstance[nofun] [\s!format=mpost]
-\newconditional\mp_include_extensions
-\newconditional\mp_include_initializations
+\newconditional\c_meta_include_extensions
+\newconditional\c_meta_include_initializations
-\def\mp_begin_graphic_group#1%
+\def\meta_begin_graphic_group#1%
{\begingroup
- \mp_analyze_graphicname[#1]}
+ \meta_analyze_graphicname[#1]}
-\def\mp_end_graphic_group
+\def\meta_end_graphic_group
{\endgroup}
\def\MPaskedfigure{false}
-\def\mp_flush_current_initializations
- {\ifconditional\mp_include_initializations\the\t_mp_initializations;\fi\theMPrandomseed;}
+\def\meta_flush_current_initializations
+ {\ifconditional\c_meta_include_initializations\the\t_meta_initializations;\fi\theMPrandomseed;}
-\def\mp_flush_current_preamble
- {\ifconditional\mp_include_extensions\the\t_mp_extensions;\the\t_mp_userinclusions;\fi\the\t_mp_instance;}
+\def\meta_flush_current_preamble
+ {\ifconditional\c_meta_include_extensions\the\t_meta_extensions;\the\t_meta_userinclusions;\fi\the\t_meta_instance;}
-\def\mp_start_current_graphic
+\def\meta_start_current_graphic
{\begingroup
- \mp_enable_include
+ \meta_enable_include
\the\everyMPgraphic
- \mp_preset_definitions
+ \meta_preset_definitions
\setMPrandomseed % this has to change
% we need to preexpand the token lists
\doifelsevalue{\??gi\currentMPgraphicinstance\s!extensions}\v!yes
- {\settrue \mp_include_extensions
+ {\settrue \c_meta_include_extensions
\letgvalue{\??gi\currentMPgraphicinstance\s!extensions}\v!no}
- {\setfalse\mp_include_extensions}%
+ {\setfalse\c_meta_include_extensions}%
\doifelsevalue{\??gi\currentMPgraphicinstance\s!initializations}\v!yes
- {\settrue \mp_include_initializations}%
- {\setfalse\mp_include_initializations}}
+ {\settrue \c_meta_include_initializations}%
+ {\setfalse\c_meta_include_initializations}}
-\def\mp_stop_current_graphic
- {\global\t_mp_instance\emptytoks
+\def\meta_stop_current_graphic
+ {\global\t_meta_instance\emptytoks
\endgroup}
-\unexpanded\def\mp_process_graphic#1% todo: extensions and inclusions outside beginfig
- {\mp_start_current_graphic
+\unexpanded\def\meta_process_graphic#1% todo: extensions and inclusions outside beginfig
+ {\meta_start_current_graphic
\forgetall
\setbox\b_mp_graphic\hbox\bgroup % ; added 20100901 (as in mkii)
\normalexpanded{\noexpand\ctxlua{metapost.graphic(
"\currentMPgraphicinstance",
"\currentMPgraphicformat",
\!!bs#1;\!!es,
- \!!bs\mp_flush_current_initializations;\!!es,
- \!!bs\mp_flush_current_preamble;\!!es,
+ \!!bs\meta_flush_current_initializations;\!!es,
+ \!!bs\meta_flush_current_preamble;\!!es,
\MPaskedfigure
)}}%
\egroup
\placeMPgraphic
- \mp_stop_current_graphic}
+ \meta_stop_current_graphic}
\newif\ifsetMPrandomseed \setMPrandomseedtrue % false by default
@@ -197,9 +197,9 @@
\csname\??mpgraphic#1\endcsname ; % ; is safeguard
\fi}
-\unexpanded\def\mp_enable_include % public
- {\let\mp_handle_use_graphic \thirdofthreearguments
- \let\mp_handle_reusable_graphic\thirdofthreearguments}
+\unexpanded\def\meta_enable_include % public
+ {\let\meta_handle_use_graphic \thirdofthreearguments
+ \let\meta_handle_reusable_graphic\thirdofthreearguments}
%D Drawings (stepwise built):
@@ -223,17 +223,17 @@
\unexpanded\def\getMPdrawing
{\ifMPdrawingdone
- \expandafter\mp_process_graphic\expandafter{\MPdrawingdata}% is this expansion still needed?
+ \expandafter\meta_process_graphic\expandafter{\MPdrawingdata}% is this expansion still needed?
\fi}
\def\startMPdrawing
- {\dosingleempty\mp_start_drawing}
+ {\dosingleempty\meta_start_drawing}
-\def\mp_start_drawing[#1]#2\stopMPdrawing
+\def\meta_start_drawing[#1]#2\stopMPdrawing
{\relax
\bgroup
- \mp_enable_include
- \mp_preset_definitions % in case #2 has measures
+ \meta_enable_include
+ \meta_preset_definitions % in case #2 has measures
\doifelse{#1}{-}{\convertargument#2\to\asciia}{\def\asciia{#2}}%
\xdef\MPdrawingdata{\MPdrawingdata\asciia}%
\egroup}
@@ -243,8 +243,8 @@
\def\MPdrawing#1%
{\relax
\bgroup
- \mp_enable_include
- \mp_preset_definitions
+ \meta_enable_include
+ \meta_preset_definitions
\xdef\MPdrawingdata{\MPdrawingdata#1}%
\egroup}
@@ -253,20 +253,20 @@
\let\stopMPclip\relax
-\unexpanded\def\mp_grab_clip_path#1#2#3#4% #4 is alternative (called in backend code)
+\unexpanded\def\meta_grab_clip_path#1#2#3#4% #4 is alternative (called in backend code)
{\begingroup
\edef\width {#2\space}\let\overlaywidth \width
\edef\height{#3\space}\let\overlayheight\height
\ifcsname\??mpmpclip#1\endcsname
- \mp_start_current_graphic
+ \meta_start_current_graphic
\xdef\MPclippath{\normalexpanded{\noexpand\ctxlua{metapost.theclippath(
"\currentMPgraphicinstance",
"\currentMPgraphicformat",
\!!bs\getvalue{\??mpclip#1}\!!es,
- \!!bs\mp_flush_current_initializations\!!es,
- \!!bs\mp_flush_current_preamble\!!es
+ \!!bs\meta_flush_current_initializations\!!es,
+ \!!bs\meta_flush_current_preamble\!!es
)}}}%
- \mp_stop_current_graphic
+ \meta_stop_current_graphic
\ifx\MPclippath\empty
\xdef\MPclippath{#4}%
\fi
@@ -335,15 +335,15 @@
\let \m_mp_current_variable \empty
\let \m_mp_current_variable_template\empty
-\def \mp_prepare_variable_default {\MPcolor{black}} % just to be sure we use a color but ...
-\edef\mp_unknown_variable_template {\??gv:\s!unknown}
+\def \meta_prepare_variable_default {\MPcolor{black}} % just to be sure we use a color but ...
+\edef\meta_unknown_variable_template {\??gv:\s!unknown}
\letvalue{\??gv:\s!unknown}\empty
\unexpanded\def\setupMPvariables
- {\dodoubleempty\mp_setup_variables}
+ {\dodoubleempty\meta_setup_variables}
-\def\mp_setup_variables[#1][#2]%
+\def\meta_setup_variables[#1][#2]%
{\ifsecondargument
\getrawparameters[\??gv#1:][#2]%
\else
@@ -351,9 +351,9 @@
\fi}
\unexpanded\def\presetMPvariable
- {\dodoubleargument\mp_preset_variable}
+ {\dodoubleargument\meta_preset_variable}
-\def\mp_preset_variable[#1][#2=#3]%
+\def\meta_preset_variable[#1][#2=#3]%
{\ifcsname\??gv#1:#2\endcsname \else
\setvalue{\??gv#1:#2}{#3}%
\fi}
@@ -365,50 +365,50 @@
{\csname\??gv\currentmpvariableclass:#1\endcsname}
\unexpanded\def\useMPvariables
- {\dodoubleargument\mp_use_variables}
+ {\dodoubleargument\meta_use_variables}
-\def\mp_use_variables[#1][#2]%
+\def\meta_use_variables[#1][#2]%
{\edef\currentmpvariableclass{#1}%
- \mp_prepare_variables{#2}}
+ \meta_prepare_variables{#2}}
-\unexpanded\def\mp_prepare_variables#1%
- {\processcommalist[#1]\mp_prepare_variable}
+\unexpanded\def\meta_prepare_variables#1%
+ {\processcommalist[#1]\meta_prepare_variable}
-\unexpanded\def\mp_prepare_variable#1%
+\unexpanded\def\meta_prepare_variable#1%
{\edef\m_mp_current_variable_template
{\??gv\currentmpvariableclass:#1}%
\edef\m_mp_current_variable
{\csname\ifcsname\m_mp_current_variable_template\endcsname
- \m_mp_current_variable_template\else\mp_unknown_variable_template
+ \m_mp_current_variable_template\else\meta_unknown_variable_template
\fi\endcsname}%
\ifx\m_mp_current_variable\empty
- \expandafter\mp_prepare_variable_nop
+ \expandafter\meta_prepare_variable_nop
\else
- \expandafter\mp_prepare_variable_yes
+ \expandafter\meta_prepare_variable_yes
\fi}
-\def\mp_prepare_variable_nop
- {\expandafter \let\csname\m_mp_current_variable_template\endcsname\mp_prepare_variable_default}
+\def\meta_prepare_variable_nop
+ {\expandafter \let\csname\m_mp_current_variable_template\endcsname\meta_prepare_variable_default}
-\def\mp_prepare_variable_color
+\def\meta_prepare_variable_color
{\expandafter\edef\csname\m_mp_current_variable_template\endcsname{\MPcolor\m_mp_current_variable}}
-\def\mp_prepare_variable_number
+\def\meta_prepare_variable_number
{\expandafter\edef\csname\m_mp_current_variable_template\endcsname{\number\m_mp_current_variable}}% also accepts 0.number
-\def\mp_prepare_variable_dimension
+\def\meta_prepare_variable_dimension
{\expandafter\edef\csname\m_mp_current_variable_template\endcsname{\the\dimexpr\m_mp_current_variable}}
-\def\mp_prepare_variable_yes
+\def\meta_prepare_variable_yes
{\defconvertedcommand\ascii\m_mp_current_variable % otherwise problems
\doifcolorelse \ascii % with 2\bodyfontsize
- {\mp_prepare_variable_color}
+ {\meta_prepare_variable_color}
{\begingroup
\setbox\b_mp_variable_box\hbox{\scratchdimen\m_mp_current_variable sp}%
\ifzeropt\wd\b_mp_variable_box
- \endgroup\mp_prepare_variable_number
+ \endgroup\meta_prepare_variable_number
\else
- \endgroup\mp_prepare_variable_dimension
+ \endgroup\meta_prepare_variable_dimension
\fi}}
\let\MPvar \MPvariable
@@ -455,126 +455,126 @@
% hm, isn't this already done elsewhere?
-\unexpanded\def\mp_obey_box_depth
+\unexpanded\def\meta_obey_box_depth
{\setbox\b_mp_graphic\hbox\bgroup
\raise\MPlly\box\b_mp_graphic
\egroup}
-\unexpanded\def\mp_ignore_box_depth
+\unexpanded\def\meta_ignore_box_depth
{\normalexpanded
- {\mp_obey_box_depth % hence the \unexpanded
+ {\meta_obey_box_depth % hence the \unexpanded
\wd\b_mp_graphic\the\wd\b_mp_graphic
\ht\b_mp_graphic\the\ht\b_mp_graphic
\dp\b_mp_graphic\the\dp\b_mp_graphic}}
-\unexpanded\def\mp_obey_box_origin
+\unexpanded\def\meta_obey_box_origin
{\setbox\b_mp_graphic\hbox\bgroup
\hskip\MPllx\raise\MPlly\box\b_mp_graphic
\egroup}
-\unexpanded\def\obeyMPboxdepth {\let\mp_relocate_box\mp_obey_box_depth }
-\unexpanded\def\ignoreMPboxdepth{\let\mp_relocate_box\mp_ignore_box_depth}
-\unexpanded\def\obeyMPboxorigin {\let\mp_relocate_box\mp_obey_box_origin }
-\unexpanded\def\normalMPboxdepth{\let\mp_relocate_box\relax }
+\unexpanded\def\obeyMPboxdepth {\let\meta_relocate_box\meta_obey_box_depth }
+\unexpanded\def\ignoreMPboxdepth{\let\meta_relocate_box\meta_ignore_box_depth}
+\unexpanded\def\obeyMPboxorigin {\let\meta_relocate_box\meta_obey_box_origin }
+\unexpanded\def\normalMPboxdepth{\let\meta_relocate_box\relax }
-\let\mp_relocate_box\relax
+\let\meta_relocate_box\relax
\unexpanded\def\placeMPgraphic % the converter also displaces so in fact we revert
- {\mp_relocate_box
+ {\meta_relocate_box
\box\b_mp_graphic}
-\unexpanded\def\mp_reuse_box#1#2#3#4#5% space delimiting would save some tokens
+\unexpanded\def\meta_reuse_box#1#2#3#4#5% space delimiting would save some tokens
{\MPllx#2\MPlly#3\MPurx#4\MPury#5%
\hbox{\forcecolorhack\getobject{MP}{#1}}} % else no proper color intent
-\def\mp_handle_unique_graphic#1#2#3% when there are too many, we can store data at the lua end, although,
+\def\meta_handle_unique_graphic#1#2#3% when there are too many, we can store data at the lua end, although,
{\begingroup % when there are that many they're probably not that unique anyway
\edef\currentmpvariableclass{#1}%
\extendMPoverlaystamp{#2}% incl prepare
\ifcsname\??mpgraphic\overlaystamp:#1\endcsname\else
- \mp_enable_include % redundant
+ \meta_enable_include % redundant
\global\advance\c_mp_object_counter\plusone
- \setobject{MP}{\number\c_mp_object_counter}\hbox{\mp_process_graphic{#3}}% was vbox, graphic must end up as hbox
- \setxvalue{\??mpgraphic\overlaystamp:#1}{\mp_reuse_box{\number\c_mp_object_counter}{\the\MPllx}{\the\MPlly}{\the\MPurx}{\the\MPury}}%
+ \setobject{MP}{\number\c_mp_object_counter}\hbox{\meta_process_graphic{#3}}% was vbox, graphic must end up as hbox
+ \setxvalue{\??mpgraphic\overlaystamp:#1}{\meta_reuse_box{\number\c_mp_object_counter}{\the\MPllx}{\the\MPlly}{\the\MPurx}{\the\MPury}}%
\fi
\getvalue{\??mpgraphic\overlaystamp:#1}%
\endgroup}
\unexpanded\def\startuniqueMPgraphic
- {\dodoublegroupempty\mp_start_unique_graphic}
+ {\dodoublegroupempty\meta_start_unique_graphic}
-\def\mp_start_unique_graphic#1#2#3\stopuniqueMPgraphic
- {\setgvalue{\??mpgraphic#1}{\mp_handle_unique_graphic{#1}{#2}{#3}}}
+\def\meta_start_unique_graphic#1#2#3\stopuniqueMPgraphic
+ {\setgvalue{\??mpgraphic#1}{\meta_handle_unique_graphic{#1}{#2}{#3}}}
\let\stopuniqueMPgraphic\relax
\unexpanded\def\uniqueMPgraphic
- {\dodoublegroupempty\mp_unique_graphic}
+ {\dodoublegroupempty\meta_unique_graphic}
-\def\mp_unique_graphic#1#2%
- {\mp_begin_graphic_group{#1}%
+\def\meta_unique_graphic#1#2%
+ {\meta_begin_graphic_group{#1}%
\setupMPvariables[\currentMPgraphicname][#2]%
\getvalue{\??mpgraphic\currentMPgraphicname}\empty
- \mp_end_graphic_group}
+ \meta_end_graphic_group}
-\def\mp_handle_use_graphic#1#2#3%
+\def\meta_handle_use_graphic#1#2#3%
{\begingroup
\edef\currentmpvariableclass{#1}%
- \mp_prepare_variables{#2}%
- \mp_enable_include % redundant
- \mp_process_graphic{#3}%
+ \meta_prepare_variables{#2}%
+ \meta_enable_include % redundant
+ \meta_process_graphic{#3}%
\endgroup}
\unexpanded\def\startuseMPgraphic
- {\dodoublegroupempty\mp_start_use_graphic}
+ {\dodoublegroupempty\meta_start_use_graphic}
-\def\mp_start_use_graphic#1#2#3\stopuseMPgraphic
- {\setgvalue{\??mpgraphic#1}{\mp_handle_use_graphic{#1}{#2}{#3}}}
+\def\meta_start_use_graphic#1#2#3\stopuseMPgraphic
+ {\setgvalue{\??mpgraphic#1}{\meta_handle_use_graphic{#1}{#2}{#3}}}
\let\stopuseMPgraphic\relax
\unexpanded\def\startusableMPgraphic % redundant but handy
- {\dodoublegroupempty\mp_start_usable_graphic}
+ {\dodoublegroupempty\meta_start_usable_graphic}
-\def\mp_start_usable_graphic#1#2#3\stopusableMPgraphic
- {\setgvalue{\??mpgraphic#1}{\mp_handle_use_graphic{#1}{#2}{#3}}}
+\def\meta_start_usable_graphic#1#2#3\stopusableMPgraphic
+ {\setgvalue{\??mpgraphic#1}{\meta_handle_use_graphic{#1}{#2}{#3}}}
\let\stopusableMPgraphic\relax
-\def\mp_handle_reusable_graphic#1#2#3%
+\def\meta_handle_reusable_graphic#1#2#3%
{\begingroup
\edef\currentmpvariableclass{#1}%
- \mp_prepare_variables{#2}%
- \mp_enable_include % redundant
+ \meta_prepare_variables{#2}%
+ \meta_enable_include % redundant
\global\advance\c_mp_object_counter\plusone
- \setobject{MP}{\number\c_mp_object_counter}\hbox{\mp_process_graphic{#3}}% was vbox, graphic must end up as hbox
- \setxvalue{\??mpgraphic#1}{\mp_reuse_box{\number\c_mp_object_counter}{\the\MPllx}{\the\MPlly}{\the\MPurx}{\the\MPury}}%
+ \setobject{MP}{\number\c_mp_object_counter}\hbox{\meta_process_graphic{#3}}% was vbox, graphic must end up as hbox
+ \setxvalue{\??mpgraphic#1}{\meta_reuse_box{\number\c_mp_object_counter}{\the\MPllx}{\the\MPlly}{\the\MPurx}{\the\MPury}}%
\getvalue{\??mpgraphic#1}%
\endgroup}
\unexpanded\def\startreusableMPgraphic
- {\dodoublegroupempty\mp_start_reusable_graphic}
+ {\dodoublegroupempty\meta_start_reusable_graphic}
-\def\mp_start_reusable_graphic#1#2#3\stopreusableMPgraphic
- {\setgvalue{\??mpgraphic#1}{\mp_handle_reusable_graphic{#1}{#2}{#3}}}
+\def\meta_start_reusable_graphic#1#2#3\stopreusableMPgraphic
+ {\setgvalue{\??mpgraphic#1}{\meta_handle_reusable_graphic{#1}{#2}{#3}}}
\let\stopreusableMPgraphic\relax
\unexpanded\def\useMPgraphic
- {\dodoublegroupempty\mp_use_graphic}
+ {\dodoublegroupempty\meta_use_graphic}
-\def\mp_use_graphic#1#2%
- {\mp_begin_graphic_group{#1}%
+\def\meta_use_graphic#1#2%
+ {\meta_begin_graphic_group{#1}%
\doifsomething{#2}{\setupMPvariables[\currentMPgraphicname][#2]}%
\getvalue{\??mpgraphic\currentMPgraphicname}\empty
- \mp_end_graphic_group}
+ \meta_end_graphic_group}
\let\reuseMPgraphic \useMPgraphic % we can save a setup here if needed
\let\reusableMPgraphic\reuseMPgraphic % we can save a setup here if needed
-\unexpanded\def\mp_enable_include
- {\let\mp_handle_use_graphic \thirdofthreearguments
- \let\mp_handle_reusable_graphic\thirdofthreearguments}
+\unexpanded\def\meta_enable_include
+ {\let\meta_handle_use_graphic \thirdofthreearguments
+ \let\meta_handle_reusable_graphic\thirdofthreearguments}
%D \macros
%D {startuniqueMPpagegraphic,uniqueMPpagegraphic}
@@ -587,23 +587,23 @@
{\m_mp_page_prefix:\overlaywidth:\overlayheight:\overlaydepth:\MPcolor\overlaycolor:\MPcolor\overlaylinecolor}
\unexpanded\def\startuniqueMPpagegraphic
- {\dodoublegroupempty\mp_start_unique_page_graphic}
+ {\dodoublegroupempty\meta_start_unique_page_graphic}
-\def\mp_start_unique_page_graphic#1#2#3\stopuniqueMPpagegraphic % inefficient, double storage
- {\setgvalue{\??mpgraphic o:#1}{\mp_handle_unique_graphic{o:#1}{#2}{#3}}% % but these also keep the state
- \setgvalue{\??mpgraphic e:#1}{\mp_handle_unique_graphic{e:#1}{#2}{#3}}} % and meaning will be redefined
+\def\meta_start_unique_page_graphic#1#2#3\stopuniqueMPpagegraphic % inefficient, double storage
+ {\setgvalue{\??mpgraphic o:#1}{\meta_handle_unique_graphic{o:#1}{#2}{#3}}% % but these also keep the state
+ \setgvalue{\??mpgraphic e:#1}{\meta_handle_unique_graphic{e:#1}{#2}{#3}}} % and meaning will be redefined
\let\stopuniqueMPpagegraphic\relax
\unexpanded\def\uniqueMPpagegraphic
- {\dodoublegroupempty\mp_unique_page_graphic}
+ {\dodoublegroupempty\meta_unique_page_graphic}
-\def\mp_unique_page_graphic#1#2%
- {\mp_begin_graphic_group{#1}%
+\def\meta_unique_page_graphic#1#2%
+ {\meta_begin_graphic_group{#1}%
\let\overlaystamp\overlaypagestamp
\setupMPvariables[\m_mp_page_prefix:\currentMPgraphicname][#2]% prefix is new here
\getvalue{\??mpgraphic\m_mp_page_prefix:\currentMPgraphicname}{}%
- \mp_end_graphic_group}
+ \meta_end_graphic_group}
%D One way of defining a stamp is:
%D
@@ -618,13 +618,13 @@
%D we introduce a dedicated expansion engine.
%D We redefine \type {\extendMPoverlaystamp} to preprocess
-%D variables using \type {\mp_prepare_variable}.
+%D variables using \type {\meta_prepare_variable}.
\unexpanded\def\extendMPoverlaystamp#1%
- {\processcommalist[#1]\mp_extend_overlay_stamp}
+ {\processcommalist[#1]\meta_extend_overlay_stamp}
-\def\mp_extend_overlay_stamp#1%
- {\mp_prepare_variable{#1}%
+\def\meta_extend_overlay_stamp#1%
+ {\meta_prepare_variable{#1}%
\edef\overlaystamp{\overlaystamp:\MPvariable{#1}}}
%D \macros
@@ -659,18 +659,18 @@
% As usual with buffers, \type {#1} can be a list.
\unexpanded\def\processMPbuffer
- {\dosingleempty\mp_process_buffer}
+ {\dosingleempty\meta_process_buffer}
-\def\mp_process_buffer[#1]%
- {\mp_begin_graphic_group{#1}%
- \mp_process_graphic{\ctxcommand{feedback("\currentMPgraphicname")}}%
- \mp_end_graphic_group}
+\def\meta_process_buffer[#1]%
+ {\meta_begin_graphic_group{#1}%
+ \meta_process_graphic{\ctxcommand{feedback("\currentMPgraphicname")}}%
+ \meta_end_graphic_group}
\unexpanded\def\runMPbuffer
- {\dosingleempty\mp_run_buffer}
+ {\dosingleempty\meta_run_buffer}
-\def\mp_run_buffer[#1]% processing only
- {\startnointerference\mp_process_buffer[#1]\stopnointerference}
+\def\meta_run_buffer[#1]% processing only
+ {\startnointerference\meta_process_buffer[#1]\stopnointerference}
%D \macros
%D {startMPenvironment, resetMPenvironment}
@@ -716,43 +716,43 @@
%D The most simple case:
\unexpanded\def\startMPcode
- {\dosinglegroupempty\mp_start_code}
+ {\dosinglegroupempty\meta_start_code}
-\def\mp_start_code
+\def\meta_start_code
{\iffirstargument
- \expandafter\mp_start_code_instance
+ \expandafter\meta_start_code_instance
\else
- \expandafter\mp_start_code_standard
+ \expandafter\meta_start_code_standard
\fi}
-\def\mp_start_code_instance#1#2\stopMPcode
- {\mp_begin_graphic_group{#1::\s!dummy}% name does not matter
- \mp_enable_include
- \mp_process_graphic{#2}%
- \mp_end_graphic_group}
+\def\meta_start_code_instance#1#2\stopMPcode
+ {\meta_begin_graphic_group{#1::\s!dummy}% name does not matter
+ \meta_enable_include
+ \meta_process_graphic{#2}%
+ \meta_end_graphic_group}
-\def\mp_start_code_standard#1#2\stopMPcode
- {\mp_process_graphic{#2}}
+\def\meta_start_code_standard#1#2\stopMPcode
+ {\meta_process_graphic{#2}}
\let\stopMPcode\relax
\unexpanded\def\MPcode
- {\dosinglegroupempty\mp_code}
+ {\dosinglegroupempty\meta_code}
-\def\mp_code
+\def\meta_code
{\iffirstargument
- \expandafter\mp_code_instance
+ \expandafter\meta_code_instance
\else
- \expandafter\mp_code_standard
+ \expandafter\meta_code_standard
\fi}
-\def\mp_code_instance#1#2%
- {\mp_begin_graphic_group{#1::\s!dummy}% name does not matter
- \mp_process_graphic{#2}%
- \mp_end_graphic_group}
+\def\meta_code_instance#1#2%
+ {\meta_begin_graphic_group{#1::\s!dummy}% name does not matter
+ \meta_process_graphic{#2}%
+ \meta_end_graphic_group}
-\def\mp_code_standard#1% #2
- {\mp_process_graphic}
+\def\meta_code_standard#1% #2
+ {\meta_process_graphic}
% a bit nasty (also needed for compatibility:
@@ -773,9 +773,9 @@
\endgroup}
\unexpanded\def\startMPrun
- {\dosinglegroupempty\mp_start_run}
+ {\dosinglegroupempty\meta_start_run}
-\def\mp_start_run#1#2\stopMPrun
+\def\meta_start_run#1#2\stopMPrun
{\iffirstargument
\startuseMPgraphic{#1}#2\stopuseMPgraphic
\else
@@ -1041,18 +1041,18 @@
{\startreusableMPgraphic{\??mpstaticgraphic#1}#2\stopreusableMPgraphic}
\unexpanded\def\startstaticMPgraphic
- {\dodoublegroupempty\mp_start_static_graphic}
+ {\dodoublegroupempty\meta_start_static_graphic}
-\def\mp_start_static_graphic#1#2#3\stopstaticMPgraphic
+\def\meta_start_static_graphic#1#2#3\stopstaticMPgraphic
{\startreusableMPgraphic{\??mpstaticgraphic#1}{#2}#3\stopreusableMPgraphic}
\let\stopstaticMPfigure \relax
\let\stopstaticMPgraphic\relax
\unexpanded\def\usestaticMPfigure
- {\dodoubleempty\mp_use_static_figure}
+ {\dodoubleempty\meta_use_static_figure}
-\def\mp_use_static_figure[#1][#2]%
+\def\meta_use_static_figure[#1][#2]%
{\ifsecondargument
\scale[#2]{\reuseMPgraphic{\??mpstaticgraphic#1}}%
\else
diff --git a/tex/context/base/meta-tex.mkiv b/tex/context/base/meta-tex.mkiv
index f31910460..b273c58a5 100644
--- a/tex/context/base/meta-tex.mkiv
+++ b/tex/context/base/meta-tex.mkiv
@@ -29,12 +29,12 @@
\let\stopTeXtexts\relax
\def\TeXtext
- {\dosingleempty\mp_textext}
+ {\dosingleempty\meta_textext}
-\def\mp_textext[#1]#2#3% contrary to mkii we don't process yet but we do expand
- {\setxvalue{\??graphictextext#2}{\mp_textext_indeed{#1}{#3}}}
+\def\meta_textext[#1]#2#3% contrary to mkii we don't process yet but we do expand
+ {\setxvalue{\??graphictextext#2}{\meta_textext_indeed{#1}{#3}}}
-\unexpanded\def\mp_textext_indeed#1#2%
+\unexpanded\def\meta_textext_indeed#1#2%
{\begingroup
\setbox\nextbox\hbox{#2}%
\executeifdefined{\??graphictexdepth#1}{\getvalue{\??graphictexdepth\s!depth}}%
@@ -68,21 +68,21 @@
\unexpanded\def\definetextext[#1]%
{\def\currenttextext{#1}%
- \doifnextoptionalelse\mp_define_textext_one\mp_define_textext_zero}
+ \doifnextoptionalelse\meta_define_textext_one\meta_define_textext_zero}
-\def\mp_define_textext_one {\setvalue{\??graphictexarguments1:\currenttextext}}
-\def\mp_define_textext_zero{\setvalue{\??graphictexarguments0:\currenttextext}}
+\def\meta_define_textext_one {\setvalue{\??graphictexarguments1:\currenttextext}}
+\def\meta_define_textext_zero{\setvalue{\??graphictexarguments0:\currenttextext}}
-\def\sometxt#1#{\mp_some_txt{#1}}
+\def\sometxt#1#{\meta_some_txt{#1}}
-\def\mp_some_txt#1#2% we need to capture embedded quotes (a bit messy as later on textext is filtered
+\def\meta_some_txt#1#2% we need to capture embedded quotes (a bit messy as later on textext is filtered
{textext.drt("\mpsometxt#1{\ctxlua{metapost.escaped(\!!bs#2\!!es)}}")}
\unexpanded\def\mpsometxt % no _ catcode
- {\doifnextoptionalelse\mp_some_txt_indeed_yes\mp_some_txt_indeed_nop}
+ {\doifnextoptionalelse\meta_some_txt_indeed_yes\meta_some_txt_indeed_nop}
-\def\mp_some_txt_indeed_yes[#1]%
+\def\meta_some_txt_indeed_yes[#1]%
{\def\currenttextext{#1}%
\csname\??graphictexarguments
\ifcsname\??graphictexarguments0:#1\endcsname0\else
@@ -90,14 +90,14 @@
?\fi\fi
\endcsname}
-\def\mp_some_txt_indeed_nop
+\def\meta_some_txt_indeed_nop
{}
\setvalue{\??graphictexarguments ?}{}
\setvalue{\??graphictexarguments 0}{\csname\??graphictexarguments\currenttextext\endcsname}
-\setvalue{\??graphictexarguments 1}{\dosingleempty\mp_gx_one}
+\setvalue{\??graphictexarguments 1}{\dosingleempty\meta_gx_one}
-\def\mp_gx_one{\csname\??graphictexarguments1:\currenttextext\endcsname}
+\def\meta_gx_one{\csname\??graphictexarguments1:\currenttextext\endcsname}
% \definetextext[framed][#1]#2{\framed[width=4cm]{\switchtobodyfont[#1]#2}}
% \definetextext[simple]{\framed[width=8cm]}
diff --git a/tex/context/base/mlib-pdf.mkiv b/tex/context/base/mlib-pdf.mkiv
index 407ecb534..a049f302d 100644
--- a/tex/context/base/mlib-pdf.mkiv
+++ b/tex/context/base/mlib-pdf.mkiv
@@ -133,20 +133,20 @@
{\dodoublegroupempty\mlib_direct_graphic}
\def\mlib_direct_graphic#1#2% makes pages (todo: make boxes)
- {\mp_begin_graphic_group{#1}%
+ {\meta_begin_graphic_group{#1}%
\let\startMPLIBtoPDF\directstartMPLIBtoPDF
\let\stopMPLIBtoPDF \directstopMPLIBtoPDF
- \mp_start_current_graphic
+ \meta_start_current_graphic
\forgetall
\normalexpanded{\noexpand\ctxlua{metapost.graphic(
"\currentMPgraphicinstance",
"\currentMPgraphicformat",
\!!bs#2;\!!es,
- \!!bs\mp_flush_current_initializations;\!!es,
- \!!bs\mp_flush_current_preamble;\!!es,
+ \!!bs\meta_flush_current_initializations;\!!es,
+ \!!bs\meta_flush_current_preamble;\!!es,
"all"
)}}%
- \mp_stop_current_graphic
- \mp_end_graphic_group}
+ \meta_stop_current_graphic
+ \meta_end_graphic_group}
\protect \endinput
diff --git a/tex/context/base/mult-aux.mkiv b/tex/context/base/mult-aux.mkiv
index 444418a90..66d7add8b 100644
--- a/tex/context/base/mult-aux.mkiv
+++ b/tex/context/base/mult-aux.mkiv
@@ -75,53 +75,52 @@
% and normally don't do testing of them making sense.
%
% \testfeatureonce{100000}{\getparameters[bla][a=111,b=222,c=333]}% 1.669s
-% \testfeatureonce{100000}{\interfaces_get_parameters{bla} [a=111,b=222,c=333]}% 1.529s
-% \testfeatureonce{100000}{\def\current_parameter_namespace{bla}\interfaces_get_parameters_indeed[a=111,b=222,c=333]}% 1.466s
-%
-% \get_parameter {...} [...]
-% \def\current_parameter_namespace{...} \get_parameter_indeed[...]
+% \testfeatureonce{100000}{\mult_interfaces_get_parameters{bla} [a=111,b=222,c=333]}% 1.529s
+% \testfeatureonce{100000}{\def\m_mult_interfaces_namespace{bla}\mult_interfaces_get_parameters_indeed[a=111,b=222,c=333]}% 1.466s
+
+\let\m_mult_interfaces_namespace\empty
-\def\interfaces_get_parameters#1[#2%
+\def\mult_interfaces_get_parameters#1[#2%
{\if\noexpand#2]%
\expandafter\gobbleoneargument
\else
- \def\current_parameter_namespace{#1}%
- \expandafter\interfaces_get_parameters_indeed
+ \def\m_mult_interfaces_namespace{#1}%
+ \expandafter\mult_interfaces_get_parameters_indeed
\fi#2}
-% \def\interfaces_get_parameters#1% we can assume that the test already happened
-% {\def\current_parameter_namespace{#1}%
-% \interfaces_get_parameters_indeed}
+% \def\mult_interfaces_get_parameters#1% we can assume that the test already happened
+% {\def\m_mult_interfaces_namespace{#1}%
+% \mult_interfaces_get_parameters_indeed}
-\def\interfaces_get_parameters_indeed#1]% namespace already set
- {\interfaces_get_parameters_item#1,],\@relax@}
+\def\mult_interfaces_get_parameters_indeed#1]% namespace already set
+ {\mult_interfaces_get_parameters_item#1,],\@relax@}
-\def\interfaces_get_parameters_item#1,#2% #2 takes space before ,
+\def\mult_interfaces_get_parameters_item#1,#2% #2 takes space before ,
{\if,#1,% dirty trick for testing #1=empty
- \expandafter\interfaces_get_parameters_item
+ \expandafter\mult_interfaces_get_parameters_item
\else\if]#1%
\doubleexpandafter\gobbleoneargument
\else
- \interfaces_get_parameters_assign#1==\empty\@relax@
- \doubleexpandafter\interfaces_get_parameters_item
+ \mult_interfaces_get_parameters_assign#1==\empty\@relax@
+ \doubleexpandafter\mult_interfaces_get_parameters_item
\fi\fi#2}
-\def\interfaces_get_parameters_error#1#2#3%
+\def\mult_interfaces_get_parameters_error#1#2#3%
{\showassignerror{#2}{\the\inputlineno\space(#1)}}
-\def\interfaces_get_parameters_assign#1=#2=#3#4\@relax@
+\def\mult_interfaces_get_parameters_assign#1=#2=#3#4\@relax@
{\ifx\empty#1\empty
- \expandafter\interfaces_get_parameters_error
+ \expandafter\mult_interfaces_get_parameters_error
\else\ifx#3\empty
- \doubleexpandafter\interfaces_get_parameters_error
+ \doubleexpandafter\mult_interfaces_get_parameters_error
\else
\doubleexpandafter\dosetvalue
\fi\fi
- \current_parameter_namespace{#1}{#2}}
+ \m_mult_interfaces_namespace{#1}{#2}}
% End of experimental code.
-\unexpanded\def\interfaces_install_parameter_handler#1#2#3#4#5#6#7#8#9% inlining \csname*\endcsname is more efficient (#3 and #6 only)
+\unexpanded\def\mult_interfaces_install_parameter_handler#1#2#3#4#5#6#7#8#9% inlining \csname*\endcsname is more efficient (#3 and #6 only)
{\ifx#2\relax\let#2\empty\fi % it is hardly faster but produces less expansion tracing
%\def#3##1{\csname#4{#1#2}{##1}\endcsname}%
\def#3##1{\csname\ifcsname#1#2:##1\endcsname#1#2:##1\else\expandafter#5\csname#1#2:\s!parent\endcsname{##1}\fi\endcsname}%
@@ -135,7 +134,7 @@
\unexpanded\def\installparameterhandler#1#2%
{\normalexpanded
- {\interfaces_install_parameter_handler
+ {\mult_interfaces_install_parameter_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname current#2\endcsname
\expandafter\noexpand\csname #2parameter\endcsname
@@ -146,18 +145,18 @@
\expandafter\noexpand\csname strict#2parameter\endcsname % checked
\expandafter\noexpand\csname direct#2parameter\endcsname}} % unchecked
-\unexpanded\def\interfaces_install_root_parameter_handler#1#2#3%
+\unexpanded\def\mult_interfaces_install_root_parameter_handler#1#2#3%
{\def#2##1{\detokenize\expandafter\expandafter\expandafter{\csname#1:##1\endcsname}}% always root
\def#3##1{\csname\ifcsname#1:##1\endcsname#1:##1\else\s!empty\fi\endcsname}}
\unexpanded\def\installrootparameterhandler#1#2%
{\normalexpanded
- {\interfaces_install_root_parameter_handler
+ {\mult_interfaces_install_root_parameter_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname detokenizedroot#2parameter\endcsname
\expandafter\noexpand\csname root#2parameter\endcsname}}
-\unexpanded\def\interfaces_install_parameter_hash_handler#1#2#3#4#5#6#7#8#9%
+\unexpanded\def\mult_interfaces_install_parameter_hash_handler#1#2#3#4#5#6#7#8#9%
{\ifx#2\relax\let#2\empty\fi
\def#3##1{#1#4{#1#2}{##1}:}% leading #1 was missing .. is this one used?
\def#4##1##2{\ifcsname##1:##2\endcsname##1\else\expandafter#5\csname##1:\s!parent\endcsname{##2}\fi}%
@@ -170,7 +169,7 @@
\unexpanded\def\installparameterhashhandler#1#2%
{\expandafter\let\csname#2namespace\endcsname#1%
\normalexpanded
- {\interfaces_install_parameter_hash_handler
+ {\mult_interfaces_install_parameter_hash_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname current#2\endcsname
\expandafter\noexpand\csname #2parameterhash\endcsname
@@ -184,7 +183,7 @@
% In \MKIV\ we can probably use the english variant for all other
% languages too.
-\unexpanded\def\interfaces_install_parameter_set_handler#1#2#3#4#5#6% we can speed this up for english
+\unexpanded\def\mult_interfaces_install_parameter_set_handler#1#2#3#4#5#6% we can speed this up for english
{\ifx#2\relax\let#2\empty\fi
\unexpanded\def#3{\dosetvalue {#1#2:}}% ##1 {##2} (braces are mandate)
\unexpanded\def#4{\dosetevalue{#1#2:}}% ##1 {##2} (braces are mandate)
@@ -193,7 +192,7 @@
\startinterface english
- \unexpanded\def\interfaces_install_parameter_set_handler#1#2#3#4#5#6%
+ \unexpanded\def\mult_interfaces_install_parameter_set_handler#1#2#3#4#5#6%
{\ifx#2\relax\let#2\empty\fi
\unexpanded\def#3##1{\expandafter \def\csname#1#2:##1\endcsname}% ##1 {##2} (braces are mandate)
\unexpanded\def#4##1{\expandafter\edef\csname#1#2:##1\endcsname}% ##1 {##2} (braces are mandate)
@@ -204,7 +203,7 @@
\unexpanded\def\installparametersethandler#1#2%
{\normalexpanded
- {\interfaces_install_parameter_set_handler
+ {\mult_interfaces_install_parameter_set_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname current#2\endcsname
\expandafter\noexpand\csname set#2parameter\endcsname
@@ -218,7 +217,7 @@
\let\currentstyleparameter\empty
\let\currentcolorparameter\empty
-\unexpanded\def\interfaces_install_style_and_color_handler#1#2#3#4%
+\unexpanded\def\mult_interfaces_install_style_and_color_handler#1#2#3#4%
{\unexpanded\def#2##1##2% style color
{\edef\currentstyleparameter{#1{##1}}% this name is public
\edef\currentcolorparameter{#1{##2}}% this name is public
@@ -233,7 +232,7 @@
\unexpanded\def\installstyleandcolorhandler#1#2%
{\normalexpanded
- {\interfaces_install_style_and_color_handler
+ {\mult_interfaces_install_style_and_color_handler
\expandafter\noexpand\csname #2parameter\endcsname
\expandafter\noexpand\csname use#2styleandcolor\endcsname % maybe an alias use#2styleandcolorparameters
\expandafter\noexpand\csname use#2styleparameter\endcsname
@@ -241,7 +240,7 @@
\let\definehandlerparent\empty
-\unexpanded\def\interfaces_install_define_handler#1#2#3#4#5#6#7#8%
+\unexpanded\def\mult_interfaces_install_define_handler#1#2#3#4#5#6#7#8%
{\ifx#4\relax\let#4\empty\fi
\unexpanded\def#2{\dotripleempty#5}%
\newtoks#6%
@@ -253,26 +252,26 @@
\ifthirdargument
\edef#8{##2}%
% \getparameters[#1#4:][\s!parent=#1##2,##3]%
- \interfaces_get_parameters{#1#4:}[\s!parent=#1##2,##3]%
+ \mult_interfaces_get_parameters{#1#4:}[\s!parent=#1##2,##3]%
\else\ifsecondargument
\doifassignmentelse{##2}
{\let#8\empty
% \getparameters[#1#4:][\s!parent=#3,##2]}
- \interfaces_get_parameters{#1#4:}[\s!parent=#3,##2]}
+ \mult_interfaces_get_parameters{#1#4:}[\s!parent=#3,##2]}
{\edef#8{##2}%
% \getparameters[#1#4:][\s!parent=#1##2]}%
- \interfaces_get_parameters{#1#4:}[\s!parent=#1##2]}%
+ \mult_interfaces_get_parameters{#1#4:}[\s!parent=#1##2]}%
\else
\let#8\empty
% \getparameters[#1#4:][\s!parent=#3]%
- \interfaces_get_parameters{#1#4:}[\s!parent=#3]%
+ \mult_interfaces_get_parameters{#1#4:}[\s!parent=#3]%
\fi\fi
\the#7%
\let#4\saveddefinewhatever}}
\unexpanded\def\installdefinehandler#1#2#3%
{\normalexpanded
- {\interfaces_install_define_handler
+ {\mult_interfaces_install_define_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname define#2\endcsname
{\noexpand#3}% root
@@ -282,11 +281,11 @@
\expandafter\noexpand\csname everydefine#2\endcsname
\expandafter\noexpand\csname current#2parent\endcsname}}
-\unexpanded\def\interfaces_install_setup_handler#1#2#3#4#5#6%
+\unexpanded\def\mult_interfaces_install_setup_handler#1#2#3#4#5#6%
{\ifx#3\relax\let#3\empty\fi
\unexpanded\def#2{\dodoubleempty#4}%
% \unexpanded\def#6{\getparameters[#1#3:]}% no every ! don't change it
- \unexpanded\def#6{\interfaces_get_parameters{#1#3:}}% no every ! don't change it
+ \unexpanded\def#6{\mult_interfaces_get_parameters{#1#3:}}% no every ! don't change it
\newtoks#5%
\def#4[##1][##2]% maybe helper
{\let\savedsetupwhatever#3%
@@ -294,20 +293,20 @@
\def\docommand####1% we will have a simple one as well
{\edef#3{####1}%
% \getparameters[#1#3:][##2]%
- \interfaces_get_parameters{#1#3:}[##2]%
+ \mult_interfaces_get_parameters{#1#3:}[##2]%
\the#5}%
\processcommalist[##1]\docommand
\else
\let#3\empty
% \getparameters[#1:][##1]%
- \interfaces_get_parameters{#1:}[##1]%
+ \mult_interfaces_get_parameters{#1:}[##1]%
\the#5%
\fi
\let#3\savedsetupwhatever}}
\unexpanded\def\installsetuphandler#1#2%
{\normalexpanded
- {\interfaces_install_setup_handler
+ {\mult_interfaces_install_setup_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname setup#2\endcsname
\expandafter\noexpand\csname current#2\endcsname
@@ -315,18 +314,18 @@
\expandafter\noexpand\csname everysetup#2\endcsname
\expandafter\noexpand\csname setupcurrent#2\endcsname}}
-\unexpanded\def\interfaces_install_switch_setup_handler#1#2#3#4#5#6%
+\unexpanded\def\mult_interfaces_install_switch_setup_handler#1#2#3#4#5#6%
{\ifx#3\relax\let#3\empty\fi
\unexpanded\def#2{\dodoubleempty#4}%
% \unexpanded\def#6{\getparameters[#1#3:]}%
- \unexpanded\def#6{\interfaces_get_parameters{#1#3:}}%
+ \unexpanded\def#6{\mult_interfaces_get_parameters{#1#3:}}%
\newtoks#5%
\def#4[##1][##2]% maybe helper
{\ifsecondargument % no commalist here
\let\savedsetupwhatever#3%
\edef#3{##1}%
% \getparameters[#1#3:][##2]%
- \interfaces_get_parameters{#1#3:}[##2]%
+ \mult_interfaces_get_parameters{#1#3:}[##2]%
\the#5%
\let#3\savedsetupwhatever
\else\iffirstargument
@@ -334,7 +333,7 @@
{\let\savedsetupwhatever#3%
\let#3\empty
% \getparameters[#1:][##1]%
- \interfaces_get_parameters{#1:}[##1]%
+ \mult_interfaces_get_parameters{#1:}[##1]%
\the#5%
\let#3\savedsetupwhatever}
{\edef#3{##1}% this will catch reset
@@ -346,7 +345,7 @@
\unexpanded\def\installswitchsetuphandler#1#2%
{\normalexpanded
- {\interfaces_install_switch_setup_handler
+ {\mult_interfaces_install_switch_setup_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname setup#2\endcsname
\expandafter\noexpand\csname current#2\endcsname
@@ -354,11 +353,11 @@
\expandafter\noexpand\csname everysetup#2\endcsname
\expandafter\noexpand\csname setupcurrent#2\endcsname}}
-\unexpanded\def\interfaces_install_auto_setup_handler#1#2#3#4#5#6#7%
+\unexpanded\def\mult_interfaces_install_auto_setup_handler#1#2#3#4#5#6#7%
{\ifx#3\relax\let#3\empty\fi
\unexpanded\def#2{\dotripleempty#4}%
% \unexpanded\def#6{\getparameters[#1#3:]}%
- \unexpanded\def#6{\interfaces_get_parameters{#1#3:}}%
+ \unexpanded\def#6{\mult_interfaces_get_parameters{#1#3:}}%
\newtoks#5%
\def#4[##1][##2][##3]%
{\let\savedsetupwhatever#3%
@@ -366,7 +365,7 @@
\def\docommand####1%
{\edef#3{####1}%
% \getparameters[#1#3:][\s!parent=#1##2,##3]%
- \interfaces_get_parameters{#1#3:}[\s!parent=#1##2,##3]% always sets parent
+ \mult_interfaces_get_parameters{#1#3:}[\s!parent=#1##2,##3]% always sets parent
\the#5}%
\processcommalist[##1]\docommand
\else\ifsecondargument
@@ -374,20 +373,20 @@
{\edef#3{####1}%
#7% checks parent and sets if needed
% \getparameters[#1#3:][##2]%
- \interfaces_get_parameters{#1#3:}[##2]%
+ \mult_interfaces_get_parameters{#1#3:}[##2]%
\the#5}%
\processcommalist[##1]\docommand
\else
\let#3\empty
% \getparameters[#1:][##1]%
- \interfaces_get_parameters{#1:}[##1]%
+ \mult_interfaces_get_parameters{#1:}[##1]%
\the#5%
\fi\fi
\let#3\savedsetupwhatever}}
\unexpanded\def\installautosetuphandler#1#2%
{\normalexpanded
- {\interfaces_install_auto_setup_handler
+ {\mult_interfaces_install_auto_setup_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname setup#2\endcsname
\expandafter\noexpand\csname current#2\endcsname
@@ -440,35 +439,35 @@
%D We don't need colons for such simple cases.
-\unexpanded\def\interfaces_install_direct_parameter_handler#1#2#3#4%
+\unexpanded\def\mult_interfaces_install_direct_parameter_handler#1#2#3#4%
{\def#2##1{\csname\ifcsname#1##1\endcsname#1##1\else\s!empty\fi\endcsname}%
\def#3##1{\detokenize\expandafter\expandafter\expandafter{\csname#1##1\endcsname}}%
\def#4##1{\csname#1##1\endcsname}}
\unexpanded\def\installdirectparameterhandler#1#2%
{\normalexpanded
- {\interfaces_install_direct_parameter_handler
+ {\mult_interfaces_install_direct_parameter_handler
{\noexpand#1}%
\expandafter\noexpand\csname #2parameter\endcsname
\expandafter\noexpand\csname detokenized#2parameter\endcsname
\expandafter\noexpand\csname direct#2parameter\endcsname}}
-\unexpanded\def\interfaces_install_direct_setup_handler#1#2#3#4%
+\unexpanded\def\mult_interfaces_install_direct_setup_handler#1#2#3#4%
{\unexpanded\def#2{\dosingleempty#3}%
\newtoks#4%
\def#3[##1]%
- {\interfaces_get_parameters#1[##1]%
+ {\mult_interfaces_get_parameters#1[##1]%
\the#4}}
\unexpanded\def\installdirectsetuphandler#1#2%
{\normalexpanded
- {\interfaces_install_direct_setup_handler
+ {\mult_interfaces_install_direct_setup_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname setup#2\endcsname
\expandafter\noexpand\csname d@setup#2\endcsname
\expandafter\noexpand\csname everysetup#2\endcsname}}
-\unexpanded\def\interfaces_install_direct_parameter_set_handler#1#2#3#4#5%
+\unexpanded\def\mult_interfaces_install_direct_parameter_set_handler#1#2#3#4#5%
{\unexpanded\def#2{\dosetvalue #1}%
\unexpanded\def#3{\dosetevalue#1}%
\unexpanded\def#4{\doletvalue #1}%
@@ -476,7 +475,7 @@
\startinterface english
- \unexpanded\def\interfaces_install_direct_parameter_set_handler#1#2#3#4#5%
+ \unexpanded\def\mult_interfaces_install_direct_parameter_set_handler#1#2#3#4#5%
{\unexpanded\def#2##1{\expandafter \def\csname#1##1\endcsname}%
\unexpanded\def#3##1{\expandafter\edef\csname#1##1\endcsname}%
\unexpanded\def#4##1{\expandafter \let\csname#1##1\endcsname}%
@@ -486,7 +485,7 @@
\unexpanded\def\installdirectparametersethandler#1#2%
{\normalexpanded
- {\interfaces_install_direct_parameter_set_handler
+ {\mult_interfaces_install_direct_parameter_set_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname set#2parameter\endcsname
\expandafter\noexpand\csname setexpanded#2parameter\endcsname
@@ -553,22 +552,22 @@
% todo: register namespaces at lua end for logging and reverse resolve
% todo: move this to syst-ini so that we can use it real early
-\newcount\interfaces_n_of_namespaces
+\newcount\c_mult_interfaces_n_of_namespaces
-\def\v_interfaces_prefix_template{\number \interfaces_n_of_namespaces::}
-\def\v_interfaces_prefix_template{\characters\interfaces_n_of_namespaces::}
-\def\v_interfaces_prefix_template{\number \interfaces_n_of_namespaces>}
-\def\v_interfaces_prefix_template{\characters\interfaces_n_of_namespaces>}
+\def\v_interfaces_prefix_template{\number \c_mult_interfaces_n_of_namespaces::}
+\def\v_interfaces_prefix_template{\characters\c_mult_interfaces_n_of_namespaces::}
+\def\v_interfaces_prefix_template{\number \c_mult_interfaces_n_of_namespaces>}
+\def\v_interfaces_prefix_template{\characters\c_mult_interfaces_n_of_namespaces>}
\def\v_interfaces_prefix_template % consistently %03i>
- {\ifnum\interfaces_n_of_namespaces<\plusten00\else\ifnum\interfaces_n_of_namespaces<\plushundred0\fi\fi
- \number\interfaces_n_of_namespaces>}
+ {\ifnum\c_mult_interfaces_n_of_namespaces<\plusten00\else\ifnum\c_mult_interfaces_n_of_namespaces<\plushundred0\fi\fi
+ \number\c_mult_interfaces_n_of_namespaces>}
\unexpanded\def\installnamespace#1% for modules and users
{\ifcsname ????#1\endcsname
\writestatus\m!system{duplicate user namespace '#1'}\wait
\else
- \global\advance\interfaces_n_of_namespaces\plusone
+ \global\advance\c_mult_interfaces_n_of_namespaces\plusone
\expandafter\edef\csname ????#1\endcsname{\v_interfaces_prefix_template}%
\fi}
@@ -576,9 +575,9 @@
{\ifcsname ??#1\endcsname
\writestatus\m!system{duplicate core namespace '#1'}\wait
\else
- \global\advance\interfaces_n_of_namespaces\plusone
+ \global\advance\c_mult_interfaces_n_of_namespaces\plusone
\expandafter\edef\csname ??#1\endcsname{\v_interfaces_prefix_template}%
- \ctxcommand{registernamespace(\number\interfaces_n_of_namespaces,"#1")}%
+ \ctxcommand{registernamespace(\number\c_mult_interfaces_n_of_namespaces,"#1")}%
\fi}
% \enabletrackers[interfaces.namespaces,context.flush]
@@ -620,9 +619,9 @@
% This is a user (module) command:
\unexpanded\def\definenamespace
- {\dodoubleargument\interfaces_define_name_space}
+ {\dodoubleargument\mult_interfaces_define_name_space}
-\def\interfaces_define_name_space[#1][#2]% namespace settings
+\def\mult_interfaces_define_name_space[#1][#2]% namespace settings
{\ctxlua{interfaces.namespaces.define(\!!bs#1\!!es,\!!bs#2\!!es)}}
\def\listnamespaces
@@ -635,12 +634,12 @@
%D \stoptyping
\unexpanded\def\showparentchain#1#2%
- {\writestatus\m!system{chain: [ \interfaces_show_parent_chain{#1#2}]}}
+ {\writestatus\m!system{chain: [ \mult_interfaces_show_parent_chain{#1#2}]}}
-\def\interfaces_show_parent_chain#1%
+\def\mult_interfaces_show_parent_chain#1%
{#1 => %
\ifcsname#1:\s!parent\endcsname
- \expandafter\interfaces_show_parent_chain\csname#1:\s!parent\endcsname
+ \expandafter\mult_interfaces_show_parent_chain\csname#1:\s!parent\endcsname
\fi}
%D Conventions:
diff --git a/tex/context/base/mult-chk.mkiv b/tex/context/base/mult-chk.mkiv
index fc9950fda..9260d2040 100644
--- a/tex/context/base/mult-chk.mkiv
+++ b/tex/context/base/mult-chk.mkiv
@@ -35,38 +35,38 @@
\registerctxluafile{mult-chk}{1.001}
-\def\setvalidparameterkeys{\dodoubleargument\interfaces_set_valid_parameter_keys}
-\def\addvalidparameterkeys{\dodoubleargument\interfaces_add_valid_parameter_keys}
+\def\setvalidparameterkeys{\dodoubleargument\mult_checkers_set_valid_parameter_keys}
+\def\addvalidparameterkeys{\dodoubleargument\mult_checkers_add_valid_parameter_keys}
-\def\interfaces_set_valid_parameter_keys[#1][#2]{\ctxlua{interfaces.setvalidkeys("#1",\!!bs#2\!!es)}}
-\def\interfaces_add_valid_parameter_keys[#1][#2]{\ctxlua{interfaces.addvalidkeys("#1",\!!bs#2\!!es)}}
+\def\mult_checkers_set_valid_parameter_keys[#1][#2]{\ctxlua{interfaces.setvalidkeys("#1",\!!bs#2\!!es)}}
+\def\mult_checkers_add_valid_parameter_keys[#1][#2]{\ctxlua{interfaces.addvalidkeys("#1",\!!bs#2\!!es)}}
-\def\interfaces_get_checked_parameters_yes[#1]#2[#3]#4[#5%
+\def\mult_checkers_get_checked_parameters_yes[#1]#2[#3]#4[#5%
{\if\noexpand#5]%
\expandafter\gobblethreearguments
\else
\let\setsomevalue\dosetvalue % used at the lua end
- \expandafter\interfaces_get_checked_parameters_yes_indeed
+ \expandafter\mult_checkers_get_checked_parameters_yes_indeed
\fi{#1}{#3}#5}
-\def\interfaces_get_checked_parameters_yes_indeed#1#2#3]%
+\def\mult_checkers_get_checked_parameters_yes_indeed#1#2#3]%
%{\ctxlua{_igcp_("#1","#2",\!!bs\detokenize{#3}\!!es)}}
{\ctxlua{interfaces.getcheckedparameters("#1","#2",\!!bs\detokenize{#3}\!!es)}}
-\def\interfaces_get_checked_parameters_nop[#1]#2[#3]#4[#5%
+\def\mult_checkers_get_checked_parameters_nop[#1]#2[#3]#4[#5%
{\if\noexpand#5]%
\expandafter\gobbletwoarguments
\else
\let\setsomevalue\dosetvalue % used at the lua end
- \expandafter\interfaces_get_checked_parameters_nop_indeed
+ \expandafter\mult_checkers_get_checked_parameters_nop_indeed
\fi{#3}#5}
-\def\interfaces_get_checked_parameters_nop_indeed#1#2]%
+\def\mult_checkers_get_checked_parameters_nop_indeed#1#2]%
{\def\p!dogetparameter{\p!doassign#1}%
\xprocesscommaitem#2,],\@relax@}
-\def\disablecheckparameters{\let\getcheckedparameters\interfaces_get_checked_parameters_nop}
-\def\enablecheckparameters {\let\getcheckedparameters\interfaces_get_checked_parameters_yes}
+\def\disablecheckparameters{\let\getcheckedparameters\mult_checkers_get_checked_parameters_nop}
+\def\enablecheckparameters {\let\getcheckedparameters\mult_checkers_get_checked_parameters_yes}
\disablecheckparameters
diff --git a/tex/context/base/mult-dim.mkvi b/tex/context/base/mult-dim.mkvi
index 3110e8f8b..04d391fde 100644
--- a/tex/context/base/mult-dim.mkvi
+++ b/tex/context/base/mult-dim.mkvi
@@ -41,7 +41,7 @@
\setvalue{\??dimensionnormal-\v!small }#value#dimension#small#medium#big{#dimension=-#small\relax}
\setvalue{\??dimensionnormal-\v!medium}#value#dimension#small#medium#big{#dimension=-#medium\relax}
\setvalue{\??dimensionnormal-\v!big }#value#dimension#small#medium#big{#dimension=-#big\relax}
-\setvalue{\??dimensionnormal\s!unknown}#value#dimension#small#medium#big{#dimension=-#value\relax}
+\setvalue{\??dimensionnormal\s!unknown}#value#dimension#small#medium#big{#dimension=#value\relax}
\unexpanded\def\assigndimension#value%
{\csname\??dimensionnormal\ifcsname\??dimensionnormal#value\endcsname#value\else\s!unknown\fi\endcsname{#value}}
diff --git a/tex/context/base/mult-ini.mkiv b/tex/context/base/mult-ini.mkiv
index 0ec6e4239..09f047063 100644
--- a/tex/context/base/mult-ini.mkiv
+++ b/tex/context/base/mult-ini.mkiv
@@ -358,13 +358,13 @@
{\bgroup
\ifcsname\m!prefix!#2\endcsname\else\setgvalue{\m!prefix!#2}{#2}\fi
\catcode\endoflineasciicode\activecatcode
- \doifinsetelse{#1}{\currentresponses,all}\interfaces_messages_start_yes\interfaces_messages_start_nop{#2}}
+ \doifinsetelse{#1}{\currentresponses,all}\mult_messages_start_yes\mult_messages_start_nop{#2}}
-\def\interfaces_messages_start_yes#1#2\stopmessages
+\def\mult_messages_start_yes#1#2\stopmessages
{\ctxlua{interfaces.setmessages("#1",\!!bs#2\!!es)}%
\egroup}
-\def\interfaces_messages_start_nop#1#2\stopmessages
+\def\mult_messages_start_nop#1#2\stopmessages
{\egroup}
\let\stopmessages\relax
diff --git a/tex/context/base/mult-low.lua b/tex/context/base/mult-low.lua
index 8c39350f2..ec865e793 100644
--- a/tex/context/base/mult-low.lua
+++ b/tex/context/base/mult-low.lua
@@ -60,6 +60,21 @@ return {
--
"activetabtoken", "activeformfeedtoken", "activeendoflinetoken",
--
+ "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode",
+ --
+ "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode",
+ "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode",
+ "discretionarygroupcode", "insertgroupcode", "vcentergroupcode", "mathchoicegroupcode",
+ "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "vadjustgroupcode",
+ --
+ "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode",
+ "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode",
+ "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode",
+ --
+ "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode",
+ "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode",
+ "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode",
+ --
-- maybe a different class
--
"startmode", "stopmode", "startnotmode", "stopnotmode", "doifmode", "doifmodeelse", "doifnotmode",
diff --git a/tex/context/base/mult-sys.mkiv b/tex/context/base/mult-sys.mkiv
index 954746eca..ae9513945 100644
--- a/tex/context/base/mult-sys.mkiv
+++ b/tex/context/base/mult-sys.mkiv
@@ -447,7 +447,6 @@
\definesystemvariable {id} % Index
\definesystemvariable {ih} % InHoudsopgave
\definesystemvariable {il} % stelInvulRegelsin
-\definesystemvariable {in} % INspringen
\definesystemvariable {ip} % InsertPages
\definesystemvariable {is} % Items
\definesystemvariable {it} % stelInTerliniein
@@ -460,7 +459,6 @@
\definesystemvariable {ks} % KolomSpan
\definesystemvariable {kt} % KonTakten
\definesystemvariable {kw} % KontaktWaarde
-\definesystemvariable {la} % LAnguage
\definesystemvariable {ld} % LegenDa
\definesystemvariable {le} % LinetablE
\definesystemvariable {lf} % LocalFigures
@@ -511,7 +509,6 @@
\definesystemvariable {sb} % SectieBlok
\definesystemvariable {sd} % SounD
\definesystemvariable {se} % SEctie
-\definesystemvariable {sg} % SpacinG
\definesystemvariable {sh} % ShapeText
\definesystemvariable {si} % SplIt
\definesystemvariable {sl} % SmalLer
diff --git a/tex/context/base/node-bck.mkiv b/tex/context/base/node-bck.mkiv
index d0860dcdc..f44852a45 100644
--- a/tex/context/base/node-bck.mkiv
+++ b/tex/context/base/node-bck.mkiv
@@ -20,7 +20,7 @@
\registerctxluafile{node-bck}{1.001}
-\def\backgrounds_boxes_initialize % will move to lua
+\def\node_backgrounds_boxes_initialize % will move to lua
{\ctxlua{nodes.tasks.enableaction("shipouts","nodes.handlers.backgrounds")}%
\glet\doinitializeboxbackgrounds\donothing}
@@ -54,13 +54,13 @@
attr \colorattribute \csname\??colorattribute#1\endcsname
attr \transparencyattribute \thetransparencyattribute{#1} } % can be optimized
-\unexpanded\def\backgroundhbox{\backgrounds_boxes_add\hbox}
-\unexpanded\def\backgroundvbox{\backgrounds_boxes_add\vbox}
-\unexpanded\def\backgroundvtop{\backgrounds_boxes_add\vtop}
+\unexpanded\def\backgroundhbox{\node_backgrounds_boxes_add\hbox}
+\unexpanded\def\backgroundvbox{\node_backgrounds_boxes_add\vbox}
+\unexpanded\def\backgroundvtop{\node_backgrounds_boxes_add\vtop}
-% \def\backgrounds_boxes_add#1[#2]%
+% \def\node_backgrounds_boxes_add#1[#2]%
% {\begingroup
-% \backgrounds_boxes_initialize
+% \node_backgrounds_boxes_initialize
% \dousecolorparameter{#2}%
% \normalexpanded{\endgroup#1
% attr \backgroundattribute \plusone
@@ -70,13 +70,13 @@
%
% more efficient:
-\def\backgrounds_boxes_add#1[#2]%
- {\backgrounds_boxes_initialize#1\backgroundcolorattr{#2}}
+\def\node_backgrounds_boxes_add#1[#2]%
+ {\node_backgrounds_boxes_initialize#1\backgroundcolorattr{#2}}
% less argument carry over:
%
-% \def\backgrounds_boxes_add#1[#2]%
-% {\backgrounds_boxes_initialize#1%
+% \def\node_backgrounds_boxes_add#1[#2]%
+% {\node_backgrounds_boxes_initialize#1%
% \ifcsname\??colorattribute\currentcolorprefix#2\endcsname
% \thebackgroundcolorattr{\currentcolorprefix#2}%
% \else\ifcsname\??colorattribute#2\endcsname
diff --git a/tex/context/base/node-ini.mkiv b/tex/context/base/node-ini.mkiv
index afc362de9..79e02ff46 100644
--- a/tex/context/base/node-ini.mkiv
+++ b/tex/context/base/node-ini.mkiv
@@ -32,13 +32,13 @@
%registerctxluafile{node-inj}{1.001} % we might split it off
\registerctxluafile{node-acc}{1.001} % experimental
-\newcount\c_nodes_show_box % box number
+\newcount\c_node_tracers_show_box % box number
-\unexpanded\def\shownextnodes{\afterassignment\nodes_show_next\c_nodes_show_box}
-\unexpanded\def\showflatnodes{\afterassignment\nodes_show_flat\c_nodes_show_box}
+\unexpanded\def\shownextnodes{\afterassignment\node_tracers_show_next\c_node_tracers_show_box}
+\unexpanded\def\showflatnodes{\afterassignment\node_tracers_show_flat\c_node_tracers_show_box}
-\def\nodes_show_next{\ctxlua{texio.write_nl('log',nodes.serializebox(\number\c_nodes_show_box,false,true))}}
-\def\nodes_show_flat{\ctxlua{texio.write_nl('log',nodes.serializebox(\number\c_nodes_show_box,true, true))}}
+\def\node_tracers_show_next{\ctxlua{texio.write_nl('log',nodes.serializebox(\number\c_node_tracers_show_box,false,true))}}
+\def\node_tracers_show_flat{\ctxlua{texio.write_nl('log',nodes.serializebox(\number\c_node_tracers_show_box,true, true))}}
\unexpanded\def\visualizenextnodes{\dowithnextbox{\ctxlua{nodes.visualizebox(\number\nextbox,false,true)}}}
\unexpanded\def\visualizeflatnodes{\dowithnextbox{\ctxlua{nodes.visualizebox(\number\nextbox,true,true)}}}
diff --git a/tex/context/base/node-par.mkiv b/tex/context/base/node-par.mkiv
index 17eefe39b..685167e8a 100644
--- a/tex/context/base/node-par.mkiv
+++ b/tex/context/base/node-par.mkiv
@@ -38,26 +38,26 @@
\installcorenamespace {parbuilder}
-\newcount\c_par_n_of_builders
+\newcount\c_node_paragraphs_n_of_builders
-\let\m_par_current_builder\empty
+\let\m_node_paragraphs_current_builder\empty
\unexpanded\def\defineparbuilder[#1]%
- {\global\advance\c_par_n_of_builders\plusone
- \ctxlua{builders.paragraphs.constructors.register("#1",\number\c_par_n_of_builders)}%
- \setxvalue{\??parbuilder#1}{\attribute\parbuilderattribute\number\c_par_n_of_builders}}
+ {\global\advance\c_node_paragraphs_n_of_builders\plusone
+ \ctxlua{builders.paragraphs.constructors.register("#1",\number\c_node_paragraphs_n_of_builders)}%
+ \setxvalue{\??parbuilder#1}{\attribute\parbuilderattribute\number\c_node_paragraphs_n_of_builders}}
\unexpanded\def\startparbuilder[#1]%
- {\edef\m_par_current_builder{\number\attribute\parbuilderattribute}%
- \globalpushmacro\m_par_current_builder
+ {\edef\m_node_paragraphs_current_builder{\number\attribute\parbuilderattribute}%
+ \globalpushmacro\m_node_paragraphs_current_builder
\getvalue{\??parbuilder#1}\relax
- \par_builders_check}
+ \node_paragraphs_builders_check}
\unexpanded\def\stopparbuilder
{\ifhmode\par\fi
- \globalpopmacro\m_par_current_builder
- \attribute\parbuilderattribute\m_par_current_builder\relax
- \par_builders_check}
+ \globalpopmacro\m_node_paragraphs_current_builder
+ \attribute\parbuilderattribute\m_node_paragraphs_current_builder\relax
+ \node_paragraphs_builders_check}
\unexpanded\def\setmainparbuilder[#1]%
{\ctxlua{builders.paragraphs.constructors.set("#1")}}
@@ -72,7 +72,7 @@
\def\enableparbuilders {\ctxlua{builders.paragraphs.constructors.enable ()}}
\def\disableparbuilders{\ctxlua{builders.paragraphs.constructors.disable()}}
-\def\par_builders_check % can be made more efficient as we don't want to do this too often
+\def\node_paragraphs_builders_check % can be made more efficient as we don't want to do this too often
{\ifcase\attribute\parbuilderattribute
\disableparbuilders
\else
diff --git a/tex/context/base/node-res.lua b/tex/context/base/node-res.lua
index 836a24b19..4522bef98 100644
--- a/tex/context/base/node-res.lua
+++ b/tex/context/base/node-res.lua
@@ -379,7 +379,7 @@ function pool.special(str)
end
statistics.register("cleaned up reserved nodes", function()
- return format("%s nodes, %s lists of %s", pool.cleanup(tex.count["last_allocated_box"]))
+ return format("%s nodes, %s lists of %s", pool.cleanup(tex.count["c_syst_last_allocated_box"]))
end) -- \topofboxstack
statistics.register("node memory usage", function() -- comes after cleanup !
diff --git a/tex/context/base/node-rul.mkiv b/tex/context/base/node-rul.mkiv
index 58e51b1b8..1f1ac20ec 100644
--- a/tex/context/base/node-rul.mkiv
+++ b/tex/context/base/node-rul.mkiv
@@ -15,9 +15,6 @@
\writestatus{loading}{ConTeXt Core Macros / Bars}
-%D The name of this file might change (and then the prefix will
-%D become \xxxx_bar etc).
-
%D \macros
%D {underbar,underbars,
%D overbar,overbars,
@@ -77,18 +74,18 @@
\installcommandhandler \??bar {bar} \??bar
-\newtoks\t_bar_checklist
+\newtoks\t_node_rules_checklist
-\let\c_bar_index\relax % temporary synonym
-\let\p_bar_color\empty
+\let\c_node_rules_index\relax % temporary synonym
+\let\p_node_rules_color\empty
\let\setupbars\setupbar
\appendtoks
\ifsecondargument
- \bar_define
+ \node_rules_define
\else
- \the\t_bar_checklist
+ \the\t_node_rules_checklist
\fi
\to \everysetupbar
@@ -98,13 +95,13 @@
\else
\expandafter\newcount\csname\??barindex\currentbar\endcsname
\fi
- \normalexpanded{\t_bar_checklist{\bar_redefine{\currentbar}\the\t_bar_checklist}}%
- \bar_define
- \setuevalue\currentbar{\bar_direct{\currentbar}}%
+ \normalexpanded{\t_node_rules_checklist{\node_rules_redefine{\currentbar}\the\t_node_rules_checklist}}%
+ \node_rules_define
+ \setuevalue\currentbar{\node_rules_direct{\currentbar}}%
\to \everydefinebar
-\unexpanded\def\bar_define
- {\edef\p_bar_color{\barparameter\c!color}%
+\unexpanded\def\node_rules_define
+ {\edef\p_node_rules_color{\barparameter\c!color}%
\setevalue{\??barattribute\currentbar}{\number\ctxlua{nodes.rules.define {
method = \barparameter\c!method,
offset = \barparameter\c!offset,
@@ -115,50 +112,50 @@
order = "\barparameter\c!order",
max = \barparameter\c!max,
ma = \thecolormodelattribute,
- ca = \thecolorattribute\p_bar_color,
- ta = \thetransparencyattribute\p_bar_color
+ ca = \thecolorattribute\p_node_rules_color,
+ ta = \thetransparencyattribute\p_node_rules_color
}}}}
-\unexpanded\def\bar_redefine#1%
- {\def\currentbar{#1}\bar_define}
+\unexpanded\def\node_rules_redefine#1%
+ {\def\currentbar{#1}\node_rules_define}
-\unexpanded\def\bar_direct#1%
- {\groupedcommand{\bar_set{#1}}\relax}
+\unexpanded\def\node_rules_direct#1%
+ {\groupedcommand{\node_rules_set{#1}}\relax}
-\def\bar_set
+\def\node_rules_set
{\ctxlua{nodes.rules.enable()}% will be moved to lua
- \glet\bar_set\bar_set_indeed
- \bar_set}
+ \glet\node_rules_set\node_rules_set_indeed
+ \node_rules_set}
-\def\bar_set_indeed#1% maybe reverse the 1000 (also maybe use more attributes instead of settings)
+\def\node_rules_set_indeed#1% maybe reverse the 1000 (also maybe use more attributes instead of settings)
{\edef\currentbar{#1}%
- \expandafter\let\expandafter\c_bar_index\csname\??barindex#1\endcsname
- \advance\c_bar_index\plusone
+ \expandafter\let\expandafter\c_node_rules_index\csname\??barindex#1\endcsname
+ \advance\c_node_rules_index\plusone
\usebarstyleandcolor\c!foregroundstyle\c!foregroundcolor
\attribute\ruledattribute\numexpr
- \plusthousand*\c_bar_index
- +\csname\??barattribute#1\ifcsname\??bar#1:\number\c_bar_index\s!parent\endcsname:\number\c_bar_index\fi\endcsname
+ \plusthousand*\c_node_rules_index
+ +\csname\??barattribute#1\ifcsname\??bar#1:\number\c_node_rules_index\s!parent\endcsname:\number\c_node_rules_index\fi\endcsname
\relax}
\unexpanded\def\startbar[#1]%
{\begingroup
- \bar_set{#1}}
+ \node_rules_set{#1}}
\unexpanded\def\stopbar
{\endgroup}
% ungrouped
-\newcount\c_bar_nesting % todo: same as colors
+\newcount\c_node_rules_nesting % todo: same as colors
\unexpanded\def\pushbar[#1]%
- {\global\advance\c_bar_nesting\plusone
- \expandafter\edef\csname\??barstack\number\c_bar_nesting\endcsname{\attribute\ruledattribute\the\attribute\ruledattribute}%
- \bar_set{#1}}
+ {\global\advance\c_node_rules_nesting\plusone
+ \expandafter\edef\csname\??barstack\number\c_node_rules_nesting\endcsname{\attribute\ruledattribute\the\attribute\ruledattribute}%
+ \node_rules_set{#1}}
\unexpanded\def\popbar
- {\csname\??barstack\number\c_bar_nesting\endcsname
- \global\advance\c_bar_nesting\minusone}
+ {\csname\??barstack\number\c_node_rules_nesting\endcsname
+ \global\advance\c_node_rules_nesting\minusone}
\setupbars
[\c!method=0, % new: 0=center nested, 1=stack nested
@@ -213,17 +210,17 @@
\installcommandhandler \??shift {shift} \??shift
-\newtoks\t_shift_checklist
+\newtoks\t_node_shifts_checklist
-\let\c_shift_index\relax % temporary synonym
+\let\c_node_shifts_index\relax % temporary synonym
\let\setupshifts\setupshift
\appendtoks
\ifsecondargument
- \shift_define
+ \node_shifts_define
\else
- \the\t_shift_checklist
+ \the\t_node_shifts_checklist
\fi
\to \everysetupshift
@@ -233,12 +230,12 @@
\else
\expandafter\newcount\csname\??shiftindex\currentshift\endcsname
\fi
- \normalexpanded{\t_shift_checklist{\shift_redefine{\currentshift}\the\t_shift_checklist}}%
- \shift_define
- \setuevalue\currentshift{\shift_direct{\currentshift}}%
+ \normalexpanded{\t_node_shifts_checklist{\node_shifts_redefine{\currentshift}\the\t_node_shifts_checklist}}%
+ \node_shifts_define
+ \setuevalue\currentshift{\node_shifts_direct{\currentshift}}%
\to \everydefineshift
-\unexpanded\def\shift_define
+\unexpanded\def\node_shifts_define
{\setevalue{\??shiftattribute\currentshift}{\number\ctxlua{nodes.shifts.define {
method = \shiftparameter\c!method,
continue = "\shiftparameter\c!continue",
@@ -246,36 +243,36 @@
unit = "\shiftparameter\c!unit",
}}}}
-\unexpanded\def\shift_redefine#1%
- {\def\currentshift{#1}\shift_define}
+\unexpanded\def\node_shifts_redefine#1%
+ {\def\currentshift{#1}\node_shifts_define}
-\unexpanded\def\shift_set
+\unexpanded\def\node_shifts_set
{\ctxlua{nodes.shifts.enable()}%
- \glet\shift_set\shift_set_indeed
- \shift_set}
+ \glet\node_shifts_set\node_shifts_set_indeed
+ \node_shifts_set}
-% \unexpanded\def\shift_direct#1%
-% {\doisolatedgroupedalign{\shift_set{#1}}\donothing}
+% \unexpanded\def\node_shifts_direct#1%
+% {\doisolatedgroupedalign{\node_shifts_set{#1}}\donothing}
-\unexpanded\def\shift_direct#1%
+\unexpanded\def\node_shifts_direct#1%
{\groupedcommand
- {\begingroup\dostartisolation\begingroup\shift_set{#1}}
+ {\begingroup\dostartisolation\begingroup\node_shifts_set{#1}}
{\endgroup\dostopisolation\endgroup}}
-\def\shift_set_indeed#1% todo: check parent !
+\def\node_shifts_set_indeed#1% todo: check parent !
{\def\currentshift{#1}%
- \expandafter\let\expandafter\c_shift_index\csname\??shiftindex#1\endcsname
- \advance\c_shift_index\plusone
+ \expandafter\let\expandafter\c_node_shifts_index\csname\??shiftindex#1\endcsname
+ \advance\c_node_shifts_index\plusone
\attribute\shiftedattribute\numexpr
- \plusthousand*\c_shift_index
- +\csname\??shiftattribute#1\ifcsname\??shift#1:\number\c_shift_index\s!parent\endcsname:\number\c_shift_index\fi\endcsname
+ \plusthousand*\c_node_shifts_index
+ +\csname\??shiftattribute#1\ifcsname\??shift#1:\number\c_node_shifts_index\s!parent\endcsname:\number\c_node_shifts_index\fi\endcsname
\relax
\useshiftstyleandcolor\c!style\c!color
\dosetupisolatedalign{\shiftparameter\c!align}}
\unexpanded\def\startshift[#1]%
{\begingroup
- \shift_set{#1}}
+ \node_shifts_set{#1}}
\unexpanded\def\stopshift
{\endgroup}
diff --git a/tex/context/base/pack-bck.mkvi b/tex/context/base/pack-bck.mkvi
index a105150b6..38750f590 100644
--- a/tex/context/base/pack-bck.mkvi
+++ b/tex/context/base/pack-bck.mkvi
@@ -70,34 +70,34 @@
\setnewconstant\backgroundsplitmode\plusthree
\appendtoks
- \setuevalue{\e!start\currentbackground}{\background_start [\currentbackground]}%
- \setuevalue{\e!stop \currentbackground}{\background_stop }%
- \setuevalue {\currentbackground}{\background_direct[\currentbackground]}%
+ \setuevalue{\e!start\currentbackground}{\pack_backgrounds_start [\currentbackground]}%
+ \setuevalue{\e!stop \currentbackground}{\pack_backgrounds_stop }%
+ \setuevalue {\currentbackground}{\pack_backgrounds_direct[\currentbackground]}%
\to \everydefinebackground
-\unexpanded\def\background_start[#tag]%
+\unexpanded\def\pack_backgrounds_start[#tag]%
{\endgraf
\begingroup
\def\currentbackground{#tag}%
\doifelse{\backgroundparameter\c!state}\v!start
- {\dosingleempty\background_start_indeed}
- {\dosingleempty\background_start_ignore}}
+ {\dosingleempty\pack_backgrounds_start_indeed}
+ {\dosingleempty\pack_backgrounds_start_ignore}}
-\def\background_start_indeed[#settings]%
+\def\pack_backgrounds_start_indeed[#settings]%
{\setupcurrentbackground[#settings,\c!state=\v!start,\c!offset=\v!overlay]%
- \let\background_stop\background_stop_indeed
+ \let\pack_backgrounds_stop\pack_backgrounds_stop_indeed
\setbox0\vbox\bgroup
\vbox to \lineheight{}\vskip\zeropoint
\blank[\v!disable]
\leftskip \backgroundparameter\c!leftoffset
\rightskip\backgroundparameter\c!rightoffset}
-\def\background_start_ignore[#settings]%
- {\let\background_stop\background_stop_ignore}
+\def\pack_backgrounds_start_ignore[#settings]%
+ {\let\pack_backgrounds_stop\pack_backgrounds_stop_ignore}
-\let\background_stop\relax
+\let\pack_backgrounds_stop\relax
-\unexpanded\def\background_stop_indeed
+\unexpanded\def\pack_backgrounds_stop_indeed
{\endgraf
\removelastskip
\egroup
@@ -166,26 +166,26 @@
\endgroup
\endgraf}
-\unexpanded\def\background_stop_ignore
+\unexpanded\def\pack_backgrounds_stop_ignore
{\endgroup
\endgraf}
-\unexpanded\def\background_direct[#tag]%
+\unexpanded\def\pack_backgrounds_direct[#tag]%
{\begingroup
\def\currentbackground{#tag}%
\doifelse{\backgroundparameter\c!state}\c!start
- \background_direct_indeed
- \background_direct_ignore}
+ \pack_backgrounds_direct_indeed
+ \pack_backgrounds_direct_ignore}
-\def\background_direct_indeed
- {\dowithnextboxcs\background_direct_finish\vbox}
+\def\pack_backgrounds_direct_indeed
+ {\dowithnextboxcs\pack_backgrounds_direct_finish\vbox}
-\def\background_direct_finish
+\def\pack_backgrounds_direct_finish
{\setupcurrentbackground[\c!offset=\v!overlay]%
\inheritedbackgroundframed{\flushnextbox}%
\endgroup}
-\def\background_direct_ignore
+\def\pack_backgrounds_direct_ignore
{\endgroup}
\definebackground[\v!background]
@@ -241,9 +241,9 @@
\unexpanded\def\backgroundline[#color]%
{\dontleavehmode
- \dowithnextbox{\background_add_to_nextbox{#color}}\hbox}
+ \dowithnextbox{\pack_backgrounds_add_to_nextbox{#color}}\hbox}
-\unexpanded\def\background_add_to_nextbox#color% handy helper
+\unexpanded\def\pack_backgrounds_add_to_nextbox#color% handy helper
{\hbox
{\dousecolorparameter{#color}%
\vrule
diff --git a/tex/context/base/pack-box.mkiv b/tex/context/base/pack-box.mkiv
index 843f3fcd8..daf2bb48e 100644
--- a/tex/context/base/pack-box.mkiv
+++ b/tex/context/base/pack-box.mkiv
@@ -166,62 +166,62 @@
{\def\currentcollector{#1}%
\chardef\collectorbox\csname\@@collectorbox#1\endcsname
\getparameters[\??cb#1][#2]%
- \d_layers_x_size\wd\collectorbox
- \d_layers_y_size\ht\collectorbox
+ \d_pack_layers_x_size\wd\collectorbox
+ \d_pack_layers_y_size\ht\collectorbox
\doifvaluesomething{\??cb#1\c!rotation}
{\setbox\nextbox\hbox
{\rotate
[\c!location=\v!high,
\c!rotation=\collectorparameter\c!rotation]
{\flushnextbox}}}%
- \advance\d_layers_y_size\dp\collectorbox
- \d_layers_x_position\collectorparameter\c!x
- \advance\d_layers_x_position\collectorparameter\c!hoffset
- \d_layers_y_position\collectorparameter\c!y
- \advance\d_layers_y_position\collectorparameter\c!voffset
+ \advance\d_pack_layers_y_size\dp\collectorbox
+ \d_pack_layers_x_position\collectorparameter\c!x
+ \advance\d_pack_layers_x_position\collectorparameter\c!hoffset
+ \d_pack_layers_y_position\collectorparameter\c!y
+ \advance\d_pack_layers_y_position\collectorparameter\c!voffset
\doifelse\v!middle{\collectorparameter\c!corner}
- {\ifdim\d_layers_x_size>\zeropoint
- \advance\d_layers_x_position.5\d_layers_x_size
+ {\ifdim\d_pack_layers_x_size>\zeropoint
+ \advance\d_pack_layers_x_position.5\d_pack_layers_x_size
\fi
- \ifdim\d_layers_y_size>\zeropoint
- \advance\d_layers_y_position.5\d_layers_y_size
+ \ifdim\d_pack_layers_y_size>\zeropoint
+ \advance\d_pack_layers_y_position.5\d_pack_layers_y_size
\fi}%
{\normalexpanded{\noexpand\doifinset{\v!bottom}{\collectorparameter\c!corner}}
- {\ifdim\d_layers_y_size>\zeropoint
- \advance\d_layers_y_position-\d_layers_y_size
- \d_layers_y_position-\d_layers_y_position
+ {\ifdim\d_pack_layers_y_size>\zeropoint
+ \advance\d_pack_layers_y_position-\d_pack_layers_y_size
+ \d_pack_layers_y_position-\d_pack_layers_y_position
\fi}%
\normalexpanded{\noexpand\doifinset{\v!right}{\collectorparameter\c!corner}}
- {\ifdim\d_layers_x_size>\zeropoint
- \advance\d_layers_x_position-\d_layers_x_size
- \d_layers_x_position-\d_layers_x_position
+ {\ifdim\d_pack_layers_x_size>\zeropoint
+ \advance\d_pack_layers_x_position-\d_pack_layers_x_size
+ \d_pack_layers_x_position-\d_pack_layers_x_position
\fi}}%
\setbox\nextbox\hbox
{\alignedbox[\collectorparameter\c!location]\vbox{\flushnextbox}}%
\boxmaxdepth\zeropoint % really needed, nice example
- \global\advance\boxhdisplacement\d_layers_x_position
+ \global\advance\boxhdisplacement\d_pack_layers_x_position
\ifdim\boxhdisplacement<\zeropoint
\global\setbox\collectorbox\hbox
{\hskip-\boxhdisplacement
\box\collectorbox}%
\fi
- \global\advance\boxvdisplacement\d_layers_y_position
+ \global\advance\boxvdisplacement\d_pack_layers_y_position
\ifdim\boxvdisplacement<\zeropoint
\global\setbox\collectorbox\hbox
{\lower-\boxvdisplacement
\box\collectorbox}%
\fi
- \d_layers_x_size\wd\collectorbox
- \d_layers_y_size\ht\collectorbox
- \advance\d_layers_y_size\dp\collectorbox
+ \d_pack_layers_x_size\wd\collectorbox
+ \d_pack_layers_y_size\ht\collectorbox
+ \advance\d_pack_layers_y_size\dp\collectorbox
\global\setbox\collectorbox\hbox
{\box\collectorbox
- \hskip-\d_layers_x_size
- \hskip\d_layers_x_position\relax
+ \hskip-\d_pack_layers_x_size
+ \hskip\d_pack_layers_x_position\relax
\ifdim\boxhdisplacement<\zeropoint
\hskip-\boxhdisplacement
\fi
- \lower\d_layers_y_position\hbox
+ \lower\d_pack_layers_y_position\hbox
{\ifdim\boxvdisplacement<\zeropoint
\lower-\boxvdisplacement\flushnextbox
\else
@@ -231,8 +231,8 @@
\global\setbox\collectorbox\hbox
{\lower\ht\collectorbox\box\collectorbox}%
% just to be sure
- \ifdim\wd\collectorbox<\d_layers_x_size
- \wd\collectorbox\d_layers_x_size
+ \ifdim\wd\collectorbox<\d_pack_layers_x_size
+ \wd\collectorbox\d_pack_layers_x_size
\fi}
\def\flushcollector[#1]%
@@ -444,12 +444,12 @@
\c!hoffset=\@@bgoffset]
\unexpanded\def\bleed
- {\dosingleempty\boxes_bleed}
+ {\dosingleempty\pack_boxes_bleed}
\def\bleedwidth {\the\hsize}%
\def\bleedheight{\the\vsize}%
-\def\boxes_bleed[#1]#2%
+\def\pack_boxes_bleed[#1]#2%
{\hbox\bgroup
\xdef\bleedwidth {\the\hsize}%
\xdef\bleedheight{\the\vsize}%
@@ -561,33 +561,33 @@
% only apply the offset to ...
\def\setlayerframed
- {\dotripleempty\layers_set_framed}
+ {\dotripleempty\pack_layers_set_framed}
-\def\layers_set_framed
+\def\pack_layers_set_framed
{\ifthirdargument
- \expandafter \layers_set_framed_t
+ \expandafter \pack_layers_set_framed_t
\else\ifsecondargument
- \doubleexpandafter\layers_set_framed_d
+ \doubleexpandafter\pack_layers_set_framed_d
\else
- \doubleexpandafter\layers_set_framed_s
+ \doubleexpandafter\pack_layers_set_framed_s
\fi\fi}
-\def\layers_set_framed_s[#1][#2][#3]%
+\def\pack_layers_set_framed_s[#1][#2][#3]%
{\setlayer[#1][\c!width=\wd\nextbox,\c!height=\ht\nextbox,\c!offset=\zeropoint]%
\normalframedwithsettings[\c!location=\v!normal]} % diffrent kind of location
-\def\layers_set_framed_d[#1][#2][#3]%
+\def\pack_layers_set_framed_d[#1][#2][#3]%
{\setlayer[#1][\c!width=\wd\nextbox,\c!height=\ht\nextbox,#2,\c!offset=\zeropoint]%
\normalframedwithsettings[\c!location=\v!normal,#2]} % diffrent kind of location
-\def\layers_set_framed_t[#1][#2][#3]%
+\def\pack_layers_set_framed_t[#1][#2][#3]%
{\setlayer[#1][#2]%
\normalframedwithsettings[#3]}
\def\setlayertext
- {\dotripleempty\layers_set_text}
+ {\dotripleempty\pack_layers_set_text}
-\def\layers_set_text[#1][#2][#3]%
+\def\pack_layers_set_text[#1][#2][#3]%
{\bgroup
\getparameters
[\??lx]
@@ -681,13 +681,13 @@
\installcorenamespace{alignedboxes}
-\unexpanded\def\alignedbox{\dosingleempty\boxes_aligned_box}
-\unexpanded\def\aligned {\dosingleempty\boxes_aligned}
+\unexpanded\def\alignedbox{\dosingleempty\pack_boxes_aligned_box}
+\unexpanded\def\aligned {\dosingleempty\pack_boxes_aligned}
-\def\boxes_aligned_box[#1]{\bgroup\serializecommalist[#1]\dowithnextboxcs\boxes_aligned_finish}
-\def\boxes_aligned [#1]{\bgroup\serializecommalist[#1]\dowithnextboxcs\boxes_aligned_finish\hbox}
+\def\pack_boxes_aligned_box[#1]{\bgroup\serializecommalist[#1]\dowithnextboxcs\pack_boxes_aligned_finish}
+\def\pack_boxes_aligned [#1]{\bgroup\serializecommalist[#1]\dowithnextboxcs\pack_boxes_aligned_finish\hbox}
-\def\boxes_aligned_finish
+\def\pack_boxes_aligned_finish
{\csname\??alignedboxes
\ifcsname\??alignedboxes\serializedcommalist\endcsname\serializedcommalist\else\v!middle\fi
\endcsname{\flushnextbox}%
@@ -734,13 +734,13 @@
% left/right/top/bottomoffset -> dimensions change
% x/y | method=fixed -> dimensions don't change
-\unexpanded\def\offsetbox{\dosingleempty\boxes_offset_box}
-\unexpanded\def\offset {\dosingleempty\boxes_offset}
+\unexpanded\def\offsetbox{\dosingleempty\pack_boxes_offset_box}
+\unexpanded\def\offset {\dosingleempty\pack_boxes_offset}
-\def\boxes_offset_box[#1]{\bgroup\dowithnextbox{\boxes_offsetfinish{#1}}}
-\def\boxes_offset [#1]{\bgroup\dowithnextbox{\boxes_offsetfinish{#1}}\hbox}
+\def\pack_boxes_offset_box[#1]{\bgroup\dowithnextbox{\pack_boxes_offsetfinish{#1}}}
+\def\pack_boxes_offset [#1]{\bgroup\dowithnextbox{\pack_boxes_offsetfinish{#1}}\hbox}
-\def\boxes_offsetfinish#1%
+\def\pack_boxes_offsetfinish#1%
{\getparameters[\??ox]
[\c!x=\zeropoint,
\c!y=\zeropoint,
@@ -836,16 +836,16 @@
% \ctabbed{\romannumerals{3}}{\romannumerals{2}} test \endgraf
% \ctabbed{\romannumerals{3}}{\romannumerals{3}} test \endgraf
-\def\boxes_tabbed#1#2#3#4%
+\def\pack_boxes_tabbed#1#2#3#4%
{\dontleavehmode
\begingroup
\setbox\scratchbox\hbox{#3}%
\hbox to \wd\scratchbox{#1#4#2}%
\endgroup}
-\unexpanded\def\ltabbed{\boxes_tabbed\relax\hss}
-\unexpanded\def\rtabbed{\boxes_tabbed\hss \relax}
-\unexpanded\def\ctabbed{\boxes_tabbed\hss \hss}
+\unexpanded\def\ltabbed{\pack_boxes_tabbed\relax\hss}
+\unexpanded\def\rtabbed{\pack_boxes_tabbed\hss \relax}
+\unexpanded\def\ctabbed{\pack_boxes_tabbed\hss \hss}
\let\mtabbed\ctabbed
@@ -870,9 +870,9 @@
\unexpanded\def\backgroundimage#1#2#3% repeat hsize vsize
{\bgroup
\forgetall
- \dowithnextbox{\boxes_background_image{#1}{#2}{#3}}\hbox}
+ \dowithnextbox{\pack_boxes_background_image{#1}{#2}{#3}}\hbox}
-\def\boxes_background_image#1#2#3%
+\def\pack_boxes_background_image#1#2#3%
{\offinterlineskip
\ifcase#1\relax
% just one
diff --git a/tex/context/base/pack-fen.mkiv b/tex/context/base/pack-fen.mkiv
index a5e692b68..575c46849 100644
--- a/tex/context/base/pack-fen.mkiv
+++ b/tex/context/base/pack-fen.mkiv
@@ -43,9 +43,9 @@
{\setvalue{\??framedbottom\v!on#1}{\whateverbottomframe{#2}}%
\expandafter\let\csname\??framedbottom\v!off#1\expandafter\endcsname\csname\??framedbottom\v!on#1\endcsname}
-\ifdefined \framed_overlay_initialize_indeed
+\ifdefined \pack_framed_overlay_initialize_indeed
- \let\installedframedimensions\framed_overlay_initialize_indeed
+ \let\installedframedimensions\pack_framed_overlay_initialize_indeed
\else
diff --git a/tex/context/base/pack-lyr.mkiv b/tex/context/base/pack-lyr.mkiv
index 461edaefe..68201a660 100644
--- a/tex/context/base/pack-lyr.mkiv
+++ b/tex/context/base/pack-lyr.mkiv
@@ -35,16 +35,16 @@
\ifdefined\defineoverlay \else \message{loaded to early} \wait \fi
\unexpanded\def\defineoverlay
- {\dotripleempty\framed_define_overlay}
+ {\dotripleempty\pack_framed_define_overlay}
-\def\framed_define_overlay[#1][#2][#3]% overlay [layer] content
+\def\pack_framed_define_overlay[#1][#2][#3]% overlay [layer] content
{\ifthirdargument
%\writestatus{BEWARE}{This (overlay definition) has changed!}% temp
- \def\framed_define_overlay_indeed##1{\setvalue{\??overlay##1}{\setlayer[#2]{\executedefinedoverlay{##1}{#3}}}}
+ \def\pack_framed_define_overlay_indeed##1{\setvalue{\??overlay##1}{\setlayer[#2]{\executedefinedoverlay{##1}{#3}}}}
\else
- \def\framed_define_overlay_indeed##1{\setvalue{\??overlay##1}{\executedefinedoverlay{##1}{#2}}}%
+ \def\pack_framed_define_overlay_indeed##1{\setvalue{\??overlay##1}{\executedefinedoverlay{##1}{#2}}}%
\fi
- \processcommalist[#1]\framed_define_overlay_indeed}
+ \processcommalist[#1]\pack_framed_define_overlay_indeed}
%D We use the command handler code. The previous, more direct parameter
%D handling was 25\% faster when no parameters were passed when adding
@@ -98,45 +98,45 @@
\c!sx=1,
\c!sy=1]
-\let\p_layers_doublesided\empty
-\let\p_layers_state \empty
-\let\p_layers_option \empty
-\let\p_layers_method \empty
-\let\p_layers_preset \empty
-\let\p_layers_rotation \empty
-\let\p_layers_position \empty
-\let\p_layers_hoffset \empty
-\let\p_layers_voffset \empty
-\let\p_layers_offset \empty
-\let\p_layers_dx \empty
-\let\p_layers_dy \empty
-\let\p_layers_sx \empty
-\let\p_layers_sy \empty
-\let\p_layers_x \empty
-\let\p_layers_y \empty
-\let\p_layers_corner \empty
-\let\p_layers_location \empty
-\let\p_layers_line \empty
-\let\p_layers_column \empty
-\let\p_layers_width \empty
-\let\p_layers_height \empty
-\let\p_layers_direction \empty
-
-\let\m_layers_page \empty
-\let\m_layers_target \empty
-
-\newconditional\c_layers_repeated
-\newconditional\c_layers_trace
-\newcount \c_layers_current_data
+\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\m_pack_layers_page \empty
+\let\m_pack_layers_target \empty
+
+\newconditional\c_pack_layers_repeated
+\newconditional\c_pack_layers_trace
+\newcount \c_pack_layers_current_data
\newbox\b_layers
-\newdimen\d_layers_x_size
-\newdimen\d_layers_y_size
-\newdimen\d_layers_x_offset
-\newdimen\d_layers_y_offset
-\newdimen\d_layers_x_position
-\newdimen\d_layers_y_position
+\newdimen\d_pack_layers_x_size
+\newdimen\d_pack_layers_y_size
+\newdimen\d_pack_layers_x_offset
+\newdimen\d_pack_layers_y_offset
+\newdimen\d_pack_layers_x_position
+\newdimen\d_pack_layers_y_position
\newdimen\layerwidth
\newdimen\layerheight
@@ -148,18 +148,18 @@
\let\lastlayerdp \!!zeropoint
\appendtoks
- \edef\p_layers_doublesided{\layerparameter\c!doublesided}%
- \ifx\p_layers_doublesided\v!yes
+ \edef\p_pack_layers_doublesided{\layerparameter\c!doublesided}%
+ \ifx\p_pack_layers_doublesided\v!yes
\relateparameterhandlers{layer}{\v!left \currentlayer}{layer}\currentlayer % permits left*
\relateparameterhandlers{layer}{\v!right\currentlayer}{layer}\currentlayer % permits right*
- \layers_preset_box{\v!left \currentlayer}%
- \layers_preset_box{\v!right\currentlayer}%
+ \pack_layers_preset_box{\v!left \currentlayer}%
+ \pack_layers_preset_box{\v!right\currentlayer}%
\fi
- \layers_preset_box\currentlayer
+ \pack_layers_preset_box\currentlayer
\normalexpanded{\defineoverlay[\currentlayer][\noexpand\composedlayer{\currentlayer}]}%
\to \everydefinelayer
-\def\layers_preset_box#1%
+\def\pack_layers_preset_box#1%
{\ifcsname\??layerbox#1\endcsname
\resetlayer[#1]%
\else
@@ -172,16 +172,16 @@
%D This macro hardly needs an explanation (but is seldom
%D needed anyway).
-\def\layers_reset_box#1%
+\def\pack_layers_reset_box#1%
{\ifcsname\??layerbox#1\endcsname
\global\setbox\csname\??layerbox#1\endcsname\emptybox
\fi}
\def\resetlayer[#1]%
- {\layers_reset_box{#1}%
- \layers_reset_box{\v!left #1}%
- \layers_reset_box{\v!right#1}%
- \layers_reset_box{#1:\realfolio}}
+ {\pack_layers_reset_box{#1}%
+ \pack_layers_reset_box{\v!left #1}%
+ \pack_layers_reset_box{\v!right#1}%
+ \pack_layers_reset_box{#1:\realfolio}}
%D \macros
%D {setlayer}
@@ -196,9 +196,9 @@
%D \stoptyping
\def\setcurrentlayerdimensions
- {\dodoubleempty\layers_set_current_dimensions}
+ {\dodoubleempty\pack_layers_set_current_dimensions}
-\def\layers_set_current_dimensions[#1][#2]% name left|right
+\def\pack_layers_set_current_dimensions[#1][#2]% name left|right
{\edef\currentlayerwidth {\thelayerwidth {#2#1}}%
\edef\currentlayerheight{\thelayerheight{#2#1}}}
@@ -209,52 +209,52 @@
\def\thelayerheight#1{\the\ifcsname\??layerbox#1\endcsname\ht\csname\??layerbox#1\endcsname\else\zeropoint\fi}
\unexpanded\def\setlayer
- {\dotripleempty\layers_set}
+ {\dotripleempty\pack_layers_set}
-\def\layers_set[#1][#2][#3]% #4 == box do \fi is ok
+\def\pack_layers_set[#1][#2][#3]% #4 == box do \fi is ok
{\bgroup
\edef\currentlayer{#1}%
- \edef\p_layers_state{\layerparameter{#1}\c!state}
- \ifx\p_layers_state\v!stop
+ \edef\p_pack_layers_state{\layerparameter{#1}\c!state}
+ \ifx\p_pack_layers_state\v!stop
\dowithnextboxcs\egroup\hbox
\else\ifthirdargument
- \layers_set_indeed[#1][#2][#3]%
+ \pack_layers_set_indeed[#1][#2][#3]%
\else
\doifassignmentelse{#2}
- {\layers_set_indeed[#1][][#2]}%
- {\layers_set_indeed[#1][#2][]}%
+ {\pack_layers_set_indeed[#1][][#2]}%
+ {\pack_layers_set_indeed[#1][#2][]}%
\fi\fi}
-\def\layers_set_indeed[#1][#2][#3]% #2 = links/rechts
+\def\pack_layers_set_indeed[#1][#2][#3]% #2 = links/rechts
{\page_backgrounds_recalculate % brrr
- \global\advance\c_layers_current_data\plusone
+ \global\advance\c_pack_layers_current_data\plusone
\forgetall
\dontcomplain
- \edef\p_layers_option{\layerparameter\c!option}%
- \ifx\p_layers_option\v!test
+ \edef\p_pack_layers_option{\layerparameter\c!option}%
+ \ifx\p_pack_layers_option\v!test
\traceboxplacementtrue
\fi
- \edef\m_layers_target{#2}%
- \dowithnextbox{\layers_set_finish{#3}}\hbox}
+ \edef\m_pack_layers_target{#2}%
+ \dowithnextbox{\pack_layers_set_finish{#3}}\hbox}
-\def\layers_set_finish#1%
+\def\pack_layers_set_finish#1%
{\ifcsname\??layerbox\currentlayer\endcsname % can move up
- \ifx\m_layers_target\v!even
+ \ifx\m_pack_layers_target\v!even
\ifodd\realpageno
% discard nextbox
\else
- \let\m_layers_target\v!left
- \layers_set_content{#1}%
+ \let\m_pack_layers_target\v!left
+ \pack_layers_set_content{#1}%
\fi
- \else\ifx\m_layers_target\v!odd
+ \else\ifx\m_pack_layers_target\v!odd
\ifodd\realpageno
- \let\m_layers_target\v!right
- \layers_set_content{#1}%
+ \let\m_pack_layers_target\v!right
+ \pack_layers_set_content{#1}%
\else
% discard nextbox
\fi
\else
- \layers_set_content{#1}%
+ \pack_layers_set_content{#1}%
\fi\fi
\else
\writestatus{layer}{unknown layer \currentlayer}%
@@ -263,100 +263,100 @@
% todo left/right
-\def\layers_set_last_position_yes
- {\edef\m_layers_page{\MPp{\??layerposition\the\c_layers_current_data}}%
- \xdef\lastlayerxpos{\the\dimexpr-\MPx{\??layerposition\m_layers_target\currentlayer:\m_layers_page}+\MPx{\??layerposition\the\c_layers_current_data}\relax}%
- \xdef\lastlayerypos{\the\dimexpr \MPy{\??layerposition\m_layers_target\currentlayer:\m_layers_page}-\MPy{\??layerposition\the\c_layers_current_data}\relax}%}
- \d_layers_x_position\lastlayerxpos
- \d_layers_y_position\lastlayerypos
+\def\pack_layers_set_last_position_yes
+ {\edef\m_pack_layers_page{\MPp{\??layerposition\the\c_pack_layers_current_data}}%
+ \xdef\lastlayerxpos{\the\dimexpr-\MPx{\??layerposition\m_pack_layers_target\currentlayer:\m_pack_layers_page}+\MPx{\??layerposition\the\c_pack_layers_current_data}\relax}%
+ \xdef\lastlayerypos{\the\dimexpr \MPy{\??layerposition\m_pack_layers_target\currentlayer:\m_pack_layers_page}-\MPy{\??layerposition\the\c_pack_layers_current_data}\relax}%}
+ \d_pack_layers_x_position\lastlayerxpos
+ \d_pack_layers_y_position\lastlayerypos
\begingroup
- \edef\currentlayer{\currentlayer\m_layers_page}%
+ \edef\currentlayer{\currentlayer\m_pack_layers_page}%
\global\letlayerparameter\c!position\v!yes
\endgroup
\global\letlayerparameter\c!state\v!start % needed ?
- \setbox\b_layers\vbox to \d_layers_y_size{\hbox to \d_layers_x_size{\xypos{\??layerposition\the\c_layers_current_data}\hss}\vss}}
+ \setbox\b_layers\vbox to \d_pack_layers_y_size{\hbox to \d_pack_layers_x_size{\xypos{\??layerposition\the\c_pack_layers_current_data}\hss}\vss}}
-\def\layers_set_last_position_nop
+\def\pack_layers_set_last_position_nop
{\setbox\b_layers\emptybox
\globallet\lastlayerxpos\!!zeropoint
\globallet\lastlayerypos\!!zeropoint
- \doifinset\v!bottom\p_layers_corner\layers_set_bottom_positions
- \doifinset\v!right \p_layers_corner\layers_set_right_positions
- \doifinset\v!middle\p_layers_corner\layers_set_middle_positions
- \edef\m_layers_page{\layerparameter\c!page}}
+ \doifinset\v!bottom\p_pack_layers_corner\pack_layers_set_bottom_positions
+ \doifinset\v!right \p_pack_layers_corner\pack_layers_set_right_positions
+ \doifinset\v!middle\p_pack_layers_corner\pack_layers_set_middle_positions
+ \edef\m_pack_layers_page{\layerparameter\c!page}}
\unexpanded\def\definelayerpreset
- {\dodoubleargument\layers_define_preset}
+ {\dodoubleargument\pack_layers_define_preset}
-\def\layers_define_preset[#1][#2]%
+\def\pack_layers_define_preset[#1][#2]%
{\doifassignmentelse{#2}
{\setvalue{\??layerpreset#1}{\setupcurrentlayer[#2]}}
{\setvalue{\??layerpreset#1}{\csname\??layerpreset#2\endcsname}}}
-\def\layers_set_content#1%
+\def\pack_layers_set_content#1%
{\layerwidth \layerparameter\c!width % global (local later)
\layerheight\layerparameter\c!height % global (local later)
- \d_layers_x_size\layerwidth
- \d_layers_y_size\layerheight
+ \d_pack_layers_x_size\layerwidth
+ \d_pack_layers_y_size\layerheight
%
\setupcurrentlayer[#1]% preroll
%
- \edef\p_layers_preset {\layerparameter\c!preset }%
+ \edef\p_pack_layers_preset {\layerparameter\c!preset }%
%
- \ifcsname\??layerpreset\p_layers_preset\endcsname
- \csname\??layerpreset\p_layers_preset\endcsname
+ \ifcsname\??layerpreset\p_pack_layers_preset\endcsname
+ \csname\??layerpreset\p_pack_layers_preset\endcsname
\setupcurrentlayer[#1]% postroll
\fi
%
- \edef\p_layers_rotation {\layerparameter\c!rotation }%
- \edef\p_layers_position {\layerparameter\c!position }%
- \edef\p_layers_hoffset {\layerparameter\c!hoffset }%
- \edef\p_layers_voffset {\layerparameter\c!voffset }%
- \edef\p_layers_offset {\layerparameter\c!offset }%
- \edef\p_layers_dx {\layerparameter\c!dx }%
- \edef\p_layers_dy {\layerparameter\c!dy }%
- \edef\p_layers_sx {\layerparameter\c!sx }%
- \edef\p_layers_sy {\layerparameter\c!sy }%
- \edef\p_layers_x {\layerparameter\c!x }%
- \edef\p_layers_y {\layerparameter\c!y }%
- \edef\p_layers_corner {\layerparameter\c!corner }%
- \edef\p_layers_location {\layerparameter\c!location }%
- \edef\p_layers_line {\layerparameter\c!line }%
- \edef\p_layers_column {\layerparameter\c!column }%
- \edef\p_layers_width {\layerparameter\c!width }% local ones
- \edef\p_layers_height {\layerparameter\c!height }% local ones
- \edef\p_layers_direction{\layerparameter\c!direction}%
+ \edef\p_pack_layers_rotation {\layerparameter\c!rotation }%
+ \edef\p_pack_layers_position {\layerparameter\c!position }%
+ \edef\p_pack_layers_hoffset {\layerparameter\c!hoffset }%
+ \edef\p_pack_layers_voffset {\layerparameter\c!voffset }%
+ \edef\p_pack_layers_offset {\layerparameter\c!offset }%
+ \edef\p_pack_layers_dx {\layerparameter\c!dx }%
+ \edef\p_pack_layers_dy {\layerparameter\c!dy }%
+ \edef\p_pack_layers_sx {\layerparameter\c!sx }%
+ \edef\p_pack_layers_sy {\layerparameter\c!sy }%
+ \edef\p_pack_layers_x {\layerparameter\c!x }%
+ \edef\p_pack_layers_y {\layerparameter\c!y }%
+ \edef\p_pack_layers_corner {\layerparameter\c!corner }%
+ \edef\p_pack_layers_location {\layerparameter\c!location }%
+ \edef\p_pack_layers_line {\layerparameter\c!line }%
+ \edef\p_pack_layers_column {\layerparameter\c!column }%
+ \edef\p_pack_layers_width {\layerparameter\c!width }% local ones
+ \edef\p_pack_layers_height {\layerparameter\c!height }% local ones
+ \edef\p_pack_layers_direction{\layerparameter\c!direction}%
%
- \ifx\p_layers_position\v!overlay
- \let\p_layers_width \zeropoint
- \let\p_layers_height \zeropoint
- \let\p_layers_position\v!yes
+ \ifx\p_pack_layers_position\v!overlay
+ \let\p_pack_layers_width \zeropoint
+ \let\p_pack_layers_height \zeropoint
+ \let\p_pack_layers_position\v!yes
\fi
- \ifx\p_layers_rotation\empty \else
+ \ifx\p_pack_layers_rotation\empty \else
% use direct call
\setbox\nextbox\hbox{\rotate[\c!location=\v!high,\c!rotation=\layerparameter\c!rotation]{\box\nextbox}}%
\fi
- \d_layers_x_offset\p_layers_sx\dimexpr
- \ifx\p_layers_hoffset\v!max\d_layers_x_size\else\p_layers_hoffset\fi+\p_layers_offset+\p_layers_dx
+ \d_pack_layers_x_offset\p_pack_layers_sx\dimexpr
+ \ifx\p_pack_layers_hoffset\v!max\d_pack_layers_x_size\else\p_pack_layers_hoffset\fi+\p_pack_layers_offset+\p_pack_layers_dx
\relax
- \d_layers_y_offset\p_layers_sy\dimexpr
- \ifx\p_layers_voffset\v!max\d_layers_y_size\else\p_layers_voffset\fi+\p_layers_offset+\p_layers_dy
+ \d_pack_layers_y_offset\p_pack_layers_sy\dimexpr
+ \ifx\p_pack_layers_voffset\v!max\d_pack_layers_y_size\else\p_pack_layers_voffset\fi+\p_pack_layers_offset+\p_pack_layers_dy
\relax
- \d_layers_x_position\p_layers_sx\dimexpr\p_layers_x\relax
- \d_layers_y_position\p_layers_sy\dimexpr\p_layers_y\relax
- \ifx\p_layers_position\v!yes
- \layers_set_last_position_yes
+ \d_pack_layers_x_position\p_pack_layers_sx\dimexpr\p_pack_layers_x\relax
+ \d_pack_layers_y_position\p_pack_layers_sy\dimexpr\p_pack_layers_y\relax
+ \ifx\p_pack_layers_position\v!yes
+ \pack_layers_set_last_position_yes
\else
- \layers_set_last_position_nop
+ \pack_layers_set_last_position_nop
\fi
%
- \ifx\m_layers_page\empty \else % is expanded
- \edef\m_layers_page{:\m_layers_page}%
- \ifcsname\??layerbox\m_layers_target\currentlayer\m_layers_page\endcsname \else
- \expandafter\newbox\csname\??layerbox\m_layers_target\currentlayer\m_layers_page\endcsname
+ \ifx\m_pack_layers_page\empty \else % is expanded
+ \edef\m_pack_layers_page{:\m_pack_layers_page}%
+ \ifcsname\??layerbox\m_pack_layers_target\currentlayer\m_pack_layers_page\endcsname \else
+ \expandafter\newbox\csname\??layerbox\m_pack_layers_target\currentlayer\m_pack_layers_page\endcsname
\fi
\fi
- \chardef\layerpagebox\csname\??layerbox\m_layers_target\currentlayer\m_layers_page\endcsname
+ \chardef\layerpagebox\csname\??layerbox\m_pack_layers_target\currentlayer\m_pack_layers_page\endcsname
\ifvoid\layerpagebox
\gsetboxllx\layerpagebox\zeropoint
\gsetboxlly\layerpagebox\zeropoint
@@ -372,7 +372,7 @@
\ht\layerpagebox\zeropoint
\dp\layerpagebox\zeropoint
\wd\layerpagebox\zeropoint
- \ifx\p_layers_direction\v!reverse\else
+ \ifx\p_pack_layers_direction\v!reverse\else
\box\layerpagebox
\fi
\fi
@@ -381,29 +381,29 @@
\xdef\lastlayerht{\the\ht\nextbox}% % not entirely ok when grid !
\xdef\lastlayerdp{\the\dp\nextbox}% % not entirely ok when grid !
% this code
- \ifx\p_layers_location\v!grid
+ \ifx\p_pack_layers_location\v!grid
\ht\nextbox\strutheight
\dp\nextbox\strutdepth
\else
- \setbox\nextbox\hbox{\alignedbox[\p_layers_location]\vbox{\box\nextbox}}%
+ \setbox\nextbox\hbox{\alignedbox[\p_pack_layers_location]\vbox{\box\nextbox}}%
\fi
- \ifnum\p_layers_line=\zerocount\else % no \ifcase, can be negative
- \advance\d_layers_y_position\dimexpr\p_layers_line\lineheight+\topskip-\lineheight-\ht\nextbox\relax
+ \ifnum\p_pack_layers_line=\zerocount\else % no \ifcase, can be negative
+ \advance\d_pack_layers_y_position\dimexpr\p_pack_layers_line\lineheight+\topskip-\lineheight-\ht\nextbox\relax
\fi
- \ifnum\p_layers_column=\zerocount\else % no \ifcase, can be negative
- \advance\d_layers_x_position\layoutcolumnoffset\p_layers_column\relax
+ \ifnum\p_pack_layers_column=\zerocount\else % no \ifcase, can be negative
+ \advance\d_pack_layers_x_position\layoutcolumnoffset\p_pack_layers_column\relax
\fi
- \ifx\p_layers_location\v!grid
+ \ifx\p_pack_layers_location\v!grid
\setbox\nextbox\hbox{\alignedbox[rb]\vbox{\box\nextbox}}%
\fi
% ll registration
- \scratchdimen\dimexpr\d_layers_x_position+\d_layers_x_offset\relax
+ \scratchdimen\dimexpr\d_pack_layers_x_position+\d_pack_layers_x_offset\relax
\ifdim\scratchdimen<\getboxllx\layerpagebox
\gsetboxllx\layerpagebox\scratchdimen
\fi
\advance\scratchdimen\wd\nextbox
\wd\nextbox\ifdim\scratchdimen>\lastlayerwidth \scratchdimen \else \lastlayerwidth \fi
- \scratchdimen\dimexpr\d_layers_y_position+\d_layers_y_offset\relax
+ \scratchdimen\dimexpr\d_pack_layers_y_position+\d_pack_layers_y_offset\relax
\ifdim\scratchdimen<\getboxlly\layerpagebox
\gsetboxlly\layerpagebox\scratchdimen
\fi
@@ -412,17 +412,17 @@
\ht\nextbox\ifdim\scratchdimen>\lastlayerheight \scratchdimen \else \lastlayerheight \fi
\dp\nextbox\zeropoint
% placement
- \hsize\p_layers_width
- \vbox to \p_layers_height \bgroup
+ \hsize\p_pack_layers_width
+ \vbox to \p_pack_layers_height \bgroup
\smashbox\nextbox
- \vskip\dimexpr\d_layers_y_position+\d_layers_y_offset\relax
- \hskip\dimexpr\d_layers_x_position+\d_layers_x_offset\relax
+ \vskip\dimexpr\d_pack_layers_y_position+\d_pack_layers_y_offset\relax
+ \hskip\dimexpr\d_pack_layers_x_position+\d_pack_layers_x_offset\relax
\box\nextbox
\ifvoid\layerpagebox
% already flushed
\else
% the reverse case % check !
- \vskip-\dimexpr\d_layers_y_position+\d_layers_y_offset\relax
+ \vskip-\dimexpr\d_pack_layers_y_position+\d_pack_layers_y_offset\relax
\box\layerpagebox
\fi
\egroup}%
@@ -432,29 +432,29 @@
\box\b_layers
\fi}
-\def\layers_set_bottom_positions
- {\ifnum\p_layers_line=\zerocount\else % can be < 0
- \edef\p_layers_line{\the\numexpr-\p_layers_line+\layoutlines+\plusone\relax}% use counter instead ?
+\def\pack_layers_set_bottom_positions
+ {\ifnum\p_pack_layers_line=\zerocount\else % can be < 0
+ \edef\p_pack_layers_line{\the\numexpr-\p_pack_layers_line+\layoutlines+\plusone\relax}% use counter instead ?
\fi
- \ifdim\d_layers_y_size>\zeropoint
- \advance\d_layers_y_position-\d_layers_y_size
- \d_layers_y_position-\d_layers_y_position
- \d_layers_y_offset-\d_layers_y_offset
+ \ifdim\d_pack_layers_y_size>\zeropoint
+ \advance\d_pack_layers_y_position-\d_pack_layers_y_size
+ \d_pack_layers_y_position-\d_pack_layers_y_position
+ \d_pack_layers_y_offset-\d_pack_layers_y_offset
\fi}
-\def\layers_set_right_positions
- {\ifnum\p_layers_column=\zerocount\else % can be < 0
- \edef\p_layers_column{\the\numexpr-\layerparameter\c!column+\layoutcolumns+\plusone\relax}% use counter instead ?
+\def\pack_layers_set_right_positions
+ {\ifnum\p_pack_layers_column=\zerocount\else % can be < 0
+ \edef\p_pack_layers_column{\the\numexpr-\layerparameter\c!column+\layoutcolumns+\plusone\relax}% use counter instead ?
\fi
- \ifdim\d_layers_x_size>\zeropoint
- \advance\d_layers_x_position-\d_layers_x_size
- \d_layers_x_position-\d_layers_x_position
- \d_layers_x_offset-\d_layers_x_offset
+ \ifdim\d_pack_layers_x_size>\zeropoint
+ \advance\d_pack_layers_x_position-\d_pack_layers_x_size
+ \d_pack_layers_x_position-\d_pack_layers_x_position
+ \d_pack_layers_x_offset-\d_pack_layers_x_offset
\fi}
-\def\layers_set_middle_positions
- {\ifdim\d_layers_x_size>\zeropoint \advance\d_layers_x_position.5\d_layers_x_size \fi
- \ifdim\d_layers_y_size>\zeropoint \advance\d_layers_y_position.5\d_layers_y_size \fi}
+\def\pack_layers_set_middle_positions
+ {\ifdim\d_pack_layers_x_size>\zeropoint \advance\d_pack_layers_x_position.5\d_pack_layers_x_size \fi
+ \ifdim\d_pack_layers_y_size>\zeropoint \advance\d_pack_layers_y_position.5\d_pack_layers_y_size \fi}
%D Given the task to be accomplished, the previous macro is
%D not even that complicated. It mainly comes down to skipping
@@ -490,73 +490,73 @@
{\begingroup
\forgetall
\edef\currentlayer{#1}%
- \edef\p_layers_state{\layerparameter\c!state}%
- \ifx\p_layers_state\v!stop
+ \edef\p_pack_layers_state{\layerparameter\c!state}%
+ \ifx\p_pack_layers_state\v!stop
% nothing
- \else\ifx\p_layers_state\v!next
+ \else\ifx\p_pack_layers_state\v!next
\global\letlayerparameter\c!state\v!start % dangerous, stack-built-up
- \else\ifx\p_layers_state\v!continue
+ \else\ifx\p_pack_layers_state\v!continue
\global\letlayerparameter\c!state\v!repeat % dangerous, stack-built-up
\else
- \edef\p_layers_doublesided{\layerparameter\c!doublesided}%
- \ifx\p_layers_doublesided\v!yes
+ \edef\p_pack_layers_doublesided{\layerparameter\c!doublesided}%
+ \ifx\p_pack_layers_doublesided\v!yes
\ifcsname\??layerbox#1\endcsname
% we can make a dedicated one for this
\doifbothsidesoverruled
- {\layers_flush_double\v!left }%
- {\layers_flush_double\v!right}%
- {\layers_flush_double\v!left }%
+ {\pack_layers_flush_double\v!left }%
+ {\pack_layers_flush_double\v!right}%
+ {\pack_layers_flush_double\v!left }%
\else
- \layers_flush_single
+ \pack_layers_flush_single
\fi
\else
- \layers_flush_single
+ \pack_layers_flush_single
\fi
\fi\fi\fi
\endgroup}
% \ifcase#1\else\writestatus{layer}{unknown layer #3}\fi
-\def\layers_flush_single
+\def\pack_layers_flush_single
{\startoverlay
- {\ifcsname\??layerbox \currentlayer \endcsname\layers_flush_indeed\plusone \currentlayer \fi}%
- {\ifcsname\??layerbox \currentlayer:\realfolio\endcsname\layers_flush_indeed\zerocount{\currentlayer:\realfolio}\fi}%
+ {\ifcsname\??layerbox \currentlayer \endcsname\pack_layers_flush_indeed\plusone \currentlayer \fi}%
+ {\ifcsname\??layerbox \currentlayer:\realfolio\endcsname\pack_layers_flush_indeed\zerocount{\currentlayer:\realfolio}\fi}%
\stopoverlay}
-\def\layers_flush_double#1%
+\def\pack_layers_flush_double#1%
{\startoverlay
- {\ifcsname\??layerbox \currentlayer \endcsname\layers_flush_indeed\plusone \currentlayer \fi}%
- {\ifcsname\??layerbox \currentlayer:\realfolio\endcsname\layers_flush_indeed\zerocount {\currentlayer:\realfolio}\fi}%
- {\ifcsname\??layerbox#1\currentlayer \endcsname\layers_flush_indeed\plusone {#1\currentlayer }\fi}%
- {\ifcsname\??layerbox#1\currentlayer:\realfolio\endcsname\layers_flush_indeed\zerocount{#1\currentlayer:\realfolio}\fi}%
+ {\ifcsname\??layerbox \currentlayer \endcsname\pack_layers_flush_indeed\plusone \currentlayer \fi}%
+ {\ifcsname\??layerbox \currentlayer:\realfolio\endcsname\pack_layers_flush_indeed\zerocount {\currentlayer:\realfolio}\fi}%
+ {\ifcsname\??layerbox#1\currentlayer \endcsname\pack_layers_flush_indeed\plusone {#1\currentlayer }\fi}%
+ {\ifcsname\??layerbox#1\currentlayer:\realfolio\endcsname\pack_layers_flush_indeed\zerocount{#1\currentlayer:\realfolio}\fi}%
\stopoverlay}
-\def\layers_flush_indeed#1#2% quite core, so optimized
+\def\pack_layers_flush_indeed#1#2% quite core, so optimized
{\begingroup % already grouped
\offinterlineskip
- \edef\p_layers_preset{\layerparameter\c!preset}%
- \ifcsname\??layerpreset\p_layers_preset\endcsname
- \csname\??layerpreset\p_layers_preset\endcsname
+ \edef\p_pack_layers_preset{\layerparameter\c!preset}%
+ \ifcsname\??layerpreset\p_pack_layers_preset\endcsname
+ \csname\??layerpreset\p_pack_layers_preset\endcsname
\fi
- \edef\p_layers_method{\layerparameter\c!method}%
- \edef\p_layers_option{\layerparameter\c!option}%
- \ifx\p_layers_option\v!test
+ \edef\p_pack_layers_method{\layerparameter\c!method}%
+ \edef\p_pack_layers_option{\layerparameter\c!option}%
+ \ifx\p_pack_layers_option\v!test
\traceboxplacementtrue
\fi
\ifcase#1\relax
- \setfalse\c_layers_repeated
+ \setfalse\c_pack_layers_repeated
\else
- \edef\p_layers_position{\layerparameter\c!position}%
- \ifx\p_layers_position\v!yes
- \setfalse\c_layers_repeated
+ \edef\p_pack_layers_position{\layerparameter\c!position}%
+ \ifx\p_pack_layers_position\v!yes
+ \setfalse\c_pack_layers_repeated
\else
- \edef\p_layers_repeat{\layerparameter\c!repeat}%
- \ifx\p_layers_repeat\v!yes
- \settrue\c_layers_repeated
- \else\ifx\p_layers_state\v!repeat
- \settrue\c_layers_repeated
+ \edef\p_pack_layers_repeat{\layerparameter\c!repeat}%
+ \ifx\p_pack_layers_repeat\v!yes
+ \settrue\c_pack_layers_repeated
+ \else\ifx\p_pack_layers_state\v!repeat
+ \settrue\c_pack_layers_repeated
\else
- \setfalse\c_layers_repeated
+ \setfalse\c_pack_layers_repeated
\fi\fi
\fi
\fi
@@ -565,40 +565,40 @@
% stage of additions, i.e. llx/lly accumulate in repeat mode and the
% compensation may differ each flush depending on added content
\setbox\nextbox
- \ifx\p_layers_method\v!fit
- \layers_positioned_box_yes
+ \ifx\p_pack_layers_method\v!fit
+ \pack_layers_positioned_box_yes
\else
- \layers_positioned_box_nop
+ \pack_layers_positioned_box_nop
\fi
% todo: method=offset => overlayoffset right/down (handy for backgrounds with offset)
\doifoverlayelse{#2}%
{\setlayoutcomponentattribute{\v!layer:#2}}%
\resetlayoutcomponentattribute
- \ifx\p_layers_option\v!test \ruledvbox \else \vbox \fi \ifx\p_layers_method\v!overlay to \overlayheight \fi \layoutcomponentboxattribute
- {\hbox \ifx\p_layers_method\v!overlay to \overlaywidth \fi
+ \ifx\p_pack_layers_option\v!test \ruledvbox \else \vbox \fi \ifx\p_pack_layers_method\v!overlay to \overlayheight \fi \layoutcomponentboxattribute
+ {\hbox \ifx\p_pack_layers_method\v!overlay to \overlaywidth \fi
{\edef\currentlayer{#2\realfolio}% local
- \edef\p_layers_position{\layerparameter\c!position}% local
- \ifx\p_layers_position\v!yes
+ \edef\p_pack_layers_position{\layerparameter\c!position}% local
+ \ifx\p_pack_layers_position\v!yes
\xypos{\??layerposition#2:\realfolio}%
\fi
\box\nextbox
\hss}%
\vss}%
- \ifconditional\c_layers_repeated\else
+ \ifconditional\c_pack_layers_repeated\else
\gsetboxllx\b_layers\zeropoint
\gsetboxlly\b_layers\zeropoint
\fi
\endgroup}
-\def\layers_positioned_box_yes
+\def\pack_layers_positioned_box_yes
{\vbox
{\vskip-\getboxlly\b_layers
\hskip-\getboxllx\b_layers
\hsize-\dimexpr\getboxllx\b_layers-\wd\b_layers\relax
- \ifconditional\c_layers_repeated\copy\else\box\fi\b_layers}}
+ \ifconditional\c_pack_layers_repeated\copy\else\box\fi\b_layers}}
-\def\layers_positioned_box_nop
- {\ifconditional\c_layers_repeated\copy\else\box\fi\b_layers}
+\def\pack_layers_positioned_box_nop
+ {\ifconditional\c_pack_layers_repeated\copy\else\box\fi\b_layers}
% \definelayer[test][method=fit] \setupcolors[state=start,option=test]
%
@@ -658,20 +658,20 @@
%D \stoptyping
\unexpanded\def\setMPlayer
- {\dotripleempty\layers_set_MP}
+ {\dotripleempty\pack_layers_set_MP}
\def\MPlayerwidth {\hsize}
\def\MPlayerheight{\vsize}
-\def\layers_set_MP[#1][#2][#3]%
+\def\pack_layers_set_MP[#1][#2][#3]%
{\edef\MPlayerwidth {\MPw{#2}}%
\edef\MPlayerheight{\MPh{#2}}%
\setlayer[#1][\c!x=\MPx{#2},\c!y=\MPy{#2},\c!position=\v!no,#3]}
\unexpanded\def\getMPlayer
- {\dodoubleempty\layers_get_MP}
+ {\dodoubleempty\pack_layers_get_MP}
-\def\layers_get_MP[#1][#2]%
+\def\pack_layers_get_MP[#1][#2]%
{\framed[\c!background={\v!foreground,#1},\c!frame=\v!off,\c!offset=\v!overlay,#2]} % takes argument
%D Watch out, a redefinition:
diff --git a/tex/context/base/pack-rul.mkiv b/tex/context/base/pack-rul.mkiv
index 68dd4b28f..adef6aa8a 100644
--- a/tex/context/base/pack-rul.mkiv
+++ b/tex/context/base/pack-rul.mkiv
@@ -42,9 +42,9 @@
\newdimen\linewidth
\unexpanded\def\setuplinewidth
- {\dosingleargument\framed_setup_line_width}
+ {\dosingleargument\pack_framed_setup_line_width}
-\def\framed_setup_line_width[#1]%
+\def\pack_framed_setup_line_width[#1]%
{\assigndimension{#1}\linewidth{.2\points}{.4\points}{.6\points}}
%D \macros
@@ -95,7 +95,7 @@
\let\normalframedparameter \framedparameter
\let\normalframedparameterhash\framedparameterhash
-\def\framed_initialize#1% will be inlined
+\def\pack_framed_initialize#1% will be inlined
{\inframedtrue
\edef\currentframed{#1}%
\let\framedparameter \normalframedparameter
@@ -122,7 +122,7 @@
\let\currentframed #1% not used (more for tracing)
\let\framedparameter #2%
\let\framedparameterhash#3%
- \framed_process_indeed}}
+ \pack_framed_process_indeed}}
\unexpanded\def\installframedcommandhandler#1#2#3%
{\installcommandhandler{#1}{#2}{#3}%
@@ -242,30 +242,30 @@
%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.
-\def\framed_filled_box
+\def\pack_framed_filled_box
{\edef\p_framed_backgroundcorner{\framedparameter\c!backgroundcorner}%
\ifx\p_framed_backgroundcorner\v!rectangular
- \framed_filled_box_normal
+ \pack_framed_filled_box_normal
\else
- \framed_filled_box_radius
+ \pack_framed_filled_box_radius
\fi}
-\def\framed_filled_box_normal
+\def\pack_framed_filled_box_normal
{\vrule
\!!width \d_framed_target_wd
\!!height\d_framed_target_ht
\!!depth \d_framed_target_dp
\relax}
-\def\framed_filled_box_radius
+\def\pack_framed_filled_box_radius
{\edef\p_framed_backgroundradius{\framedparameter\c!backgroundradius}%
\ifzeropt\dimexpr\p_framed_backgroundradius\relax % just in case of .x\bodyfontsize
- \framed_filled_box_normal
+ \pack_framed_filled_box_normal
\else
- \framed_filled_box_round
+ \pack_framed_filled_box_round
\fi}
-\def\framed_filled_box_round
+\def\pack_framed_filled_box_round
{\normalexpanded{\doovalbox
{\the\d_framed_target_wd}%
{\the\d_framed_target_ht}%
@@ -277,27 +277,27 @@
{\ifx\p_framed_backgroundcorner\v!round0\else\number\p_framed_backgroundcorner\fi}%
}}
-\def\framed_stroked_box
+\def\pack_framed_stroked_box
{\edef\p_framed_framecorner{\framedparameter\c!framecorner}%
\ifx\p_framed_framecorner\v!rectangular
- \framed_stroked_box_normal
+ \pack_framed_stroked_box_normal
\else
- \framed_stroked_box_radius
+ \pack_framed_stroked_box_radius
\fi}
-\def\framed_stroked_box_radius
+\def\pack_framed_stroked_box_radius
{\edef\p_framed_frameradius{\framedparameter\c!frameradius}%
\ifzeropt\dimexpr\p_framed_frameradius\relax % just in case of .x\bodyfontsize
- \framed_stroked_box_normal
+ \pack_framed_stroked_box_normal
\else
\ifx\p_framed_frame\v!on
- \framed_stroked_box_round
+ \pack_framed_stroked_box_round
\fi
\fi}
-% \framed_stroked_box_normal % later
+% \pack_framed_stroked_box_normal % later
-\def\framed_stroked_box_round
+\def\pack_framed_stroked_box_round
{\normalexpanded{\doovalbox
{\the\d_framed_target_wd}%
{\the\d_framed_target_ht}%
@@ -358,26 +358,26 @@
%D The oval box is drawn using a special macro, depending on
%D the driver in use.
-\def\framed_background_box_gray % avoid black rules when no gray
+\def\pack_framed_background_box_gray % avoid black rules when no gray
{\edef\p_framed_backgroundscreen{\framedparameter\c!backgroundscreen}%
\ifx\p_framed_backgroundscreen\empty \else
- \framed_background_box_gray_indeed
+ \pack_framed_background_box_gray_indeed
\fi}
-\def\framed_background_box_gray_indeed
- {\raster[\p_framed_backgroundscreen]{\framed_filled_box}} % can be more direct but who cares
+\def\pack_framed_background_box_gray_indeed
+ {\raster[\p_framed_backgroundscreen]{\pack_framed_filled_box}} % can be more direct but who cares
%D It won't be a surprise that we not only provide gray boxes,
%D but also colored ones. Here it is:
-\def\framed_background_box_color
+\def\pack_framed_background_box_color
{\edef\p_framed_backgroundcolor{\framedparameter\c!backgroundcolor}%
\ifx\p_framed_backgroundcolor\empty \else
- \doifcolor\p_framed_backgroundcolor\framed_background_box_color_indeed
+ \doifcolor\p_framed_backgroundcolor\pack_framed_background_box_color_indeed
\fi}
-\def\framed_background_box_color_indeed
- {\hbox{\dousecolorparameter\p_framed_backgroundcolor\framed_filled_box}}
+\def\pack_framed_background_box_color_indeed
+ {\hbox{\dousecolorparameter\p_framed_backgroundcolor\pack_framed_filled_box}}
%D \macros
%D {defineoverlay, doifoverlayelse, overlayoffset,
@@ -466,11 +466,11 @@
\to \everyoverlay
\unexpanded\def\defineoverlay
- {\dodoubleargument\framed_define_overlay}
+ {\dodoubleargument\pack_framed_define_overlay}
-\def\framed_define_overlay[#1][#2]%
- {\def\framed_define_overlay_indeed##1{\setvalue{\??overlay##1}{\executedefinedoverlay{##1}{#2}}}%
- \processcommalist[#1]\framed_define_overlay_indeed}
+\def\pack_framed_define_overlay[#1][#2]%
+ {\def\pack_framed_define_overlay_indeed##1{\setvalue{\??overlay##1}{\executedefinedoverlay{##1}{#2}}}%
+ \processcommalist[#1]\pack_framed_define_overlay_indeed}
\unexpanded\def\executedefinedoverlay#1#2% we can share the definitions
{\bgroup % redundant grouping
@@ -522,14 +522,14 @@
\let\currentbackground\empty
-\def\framed_process_background
+\def\pack_framed_process_background
{\ifcsname\??overlaybuiltin\currentbackground\endcsname
- \framed_process_background_indeed_internal
+ \pack_framed_process_background_indeed_internal
\else\ifcsname\??overlay\currentbackground\endcsname
- \framed_process_background_indeed_external
+ \pack_framed_process_background_indeed_external
\fi\fi}
-\def\framed_process_background_indeed_internal % : in name
+\def\pack_framed_process_background_indeed_internal % : in name
{\bgroup
\setbox\b_framed_extra\hbox{%\bgroup
\ifzeropt\framedbackgroundoffset
@@ -545,8 +545,8 @@
\box\b_framed_extra
\egroup}
-\def\framed_process_background_indeed_external
- {\framed_overlay_initialize
+\def\pack_framed_process_background_indeed_external
+ {\pack_framed_overlay_initialize
\bgroup
\setbox\b_framed_extra\hbox{%\bgroup
\ifzeropt\framedbackgroundoffset
@@ -562,11 +562,11 @@
\box\b_framed_extra
\egroup}
-\def\framed_process_backgrounds#1,#2% #2 gobbles spaces (we could avoid one catch if we have nextbackground)
+\def\pack_framed_process_backgrounds#1,#2% #2 gobbles spaces (we could avoid one catch if we have nextbackground)
{\edef\currentbackground{#1}%
\ifx\currentbackground\s!unknown\else
- \framed_process_background
- \expandafter\framed_process_backgrounds
+ \pack_framed_process_background
+ \expandafter\pack_framed_process_backgrounds
\fi#2}
% beware, a backgroundbox can be empty which is another reason
@@ -577,12 +577,12 @@
\newdimen\framedbackgrounddepth
\newdimen\framedbackgroundoffset
-\def\framed_background_box_content% fuzzy but needed hack, this \vss, otherwise
+\def\pack_framed_background_box_content% fuzzy but needed hack, this \vss, otherwise
{\vbox to \framedbackgroundheight{\vss\box\b_framed_normal\vss}} % vertical shift \backgroundheight
-\def\framed_add_background
+\def\pack_framed_add_background
{\setbox\b_framed_normal\hbox % was vbox
- {\framed_forgetall % can be relaxed
+ {\pack_framed_forgetall % can be relaxed
\boxmaxdepth\maxdimen
\framedbackgroundoffset\d_framed_backgroundoffset
\framedbackgroundwidth \wd\b_framed_normal
@@ -591,21 +591,21 @@
\d_framed_target_wd\dimexpr\framedbackgroundwidth +2\framedbackgroundoffset\relax
\d_framed_target_ht\dimexpr\framedbackgroundheight+ \framedbackgroundoffset\relax
\d_framed_target_dp\dimexpr\framedbackgrounddepth + \framedbackgroundoffset+\framedparameter\c!backgrounddepth\relax
- \let\framed_overlay_initialize\framed_overlay_initialize_indeed
+ \let\pack_framed_overlay_initialize\pack_framed_overlay_initialize_indeed
\ifx\p_framed_component\empty
\resetlayoutcomponentattribute
\else
\setlayoutcomponentattribute{\v!background:\p_framed_component}%
\fi
- \let\foregroundbox\framed_background_box_content
+ \let\foregroundbox\pack_framed_background_box_content
\hbox \layoutcomponentboxattribute to \framedbackgroundwidth\bgroup % width in case 'foreground' is used as overlay
\the\everybackgroundbox % moved
- \expandafter\framed_process_backgrounds\p_framed_background,\s!unknown,\relax % hm, messy .. look into it
+ \expandafter\pack_framed_process_backgrounds\p_framed_background,\s!unknown,\relax % hm, messy .. look into it
\box\b_framed_normal
\hss
\egroup}}
-\def\framed_overlay_initialize_indeed
+\def\pack_framed_overlay_initialize_indeed
{%\writestatus{!!!!}{<<<<<}%
\edef\overlaywidth {\the\d_framed_target_wd\space}%
\edef\overlayheight {\the\dimexpr\d_framed_target_ht+\d_framed_target_dp\relax\space}%
@@ -616,16 +616,16 @@
%\edef\overlaycorner {\framedparameter\c!backgroundcorner}%
%\edef\overlayradius {\framedparameter\c!backgroundradius}%
\edef\overlayoffset {\the\framedbackgroundoffset\space}% \backgroundoffset % we steal this one
- \let\framed_overlay_initialize\relax}
+ \let\pack_framed_overlay_initialize\relax}
%D One can explictly insert the foreground box. For that
%D purpose we introduce the overlay \type {foreground}.
%D
%D We predefine two already familiar backgrounds:
-\letvalue{\??overlaybuiltin\v!screen }\framed_background_box_gray
-\letvalue{\??overlaybuiltin\v!color }\framed_background_box_color
-\letvalue{\??overlaybuiltin\v!foreground}\framed_background_box_content % replaces: \defineoverlay[\v!foreground][\foregroundbox]
+\letvalue{\??overlaybuiltin\v!screen }\pack_framed_background_box_gray
+\letvalue{\??overlaybuiltin\v!color }\pack_framed_background_box_color
+\letvalue{\??overlaybuiltin\v!foreground}\pack_framed_background_box_content % replaces: \defineoverlay[\v!foreground][\foregroundbox]
%D We can specify overlays as a comma separated list of
%D overlays, a sometimes handy feature.
@@ -636,7 +636,7 @@
%D by \TEX\ itself, the latter one depends on the driver. This
%D macro also support a negative offset.
-\def\framed_add_outline
+\def\pack_framed_add_outline
{\setbox\b_framed_normal\hbox % rules on top of box
{\d_framed_target_wd\dimexpr\wd\b_framed_normal+2\d_framed_frameoffset\relax
\d_framed_target_ht\dimexpr\ht\b_framed_normal+ \d_framed_frameoffset\relax
@@ -652,7 +652,7 @@
\setbox\b_framed_extra\hbox
{\kern-\d_framed_frameoffset
\raise\scratchdimen
- \hbox{\ifx\overlaylinecolor\empty\else\dousecolorparameter\overlaylinecolor\fi\framed_stroked_box}}%
+ \hbox{\ifx\overlaylinecolor\empty\else\dousecolorparameter\overlaylinecolor\fi\pack_framed_stroked_box}}%
\wd\b_framed_extra\wd\b_framed_normal
\ht\b_framed_extra\ht\b_framed_normal
\dp\b_framed_extra\dp\b_framed_normal
@@ -660,7 +660,7 @@
\box\b_framed_normal
\box\b_framed_extra}}
-\def\framed_stroked_box_normal
+\def\pack_framed_stroked_box_normal
{\setbox\scratchbox\emptyhbox
\wd\scratchbox\d_framed_target_wd
\ht\scratchbox\d_framed_target_ht
@@ -681,49 +681,49 @@
\dp\scratchbox\d_framed_target_dp
\box\scratchbox}
-\def\framed_t_rule{\hrule\!!height\d_framed_linewidth\kern-\d_framed_linewidth}
-\def\framed_b_rule{\kern-\d_framed_linewidth\hrule\!!height\d_framed_linewidth}
-\def\framed_r_rule{\kern-\d_framed_linewidth\vrule\!!width\d_framed_linewidth}
-\def\framed_l_rule{\vrule\!!width\d_framed_linewidth\kern-\d_framed_linewidth}
+\def\pack_framed_t_rule{\hrule\!!height\d_framed_linewidth\kern-\d_framed_linewidth}
+\def\pack_framed_b_rule{\kern-\d_framed_linewidth\hrule\!!height\d_framed_linewidth}
+\def\pack_framed_r_rule{\kern-\d_framed_linewidth\vrule\!!width\d_framed_linewidth}
+\def\pack_framed_l_rule{\vrule\!!width\d_framed_linewidth\kern-\d_framed_linewidth}
-\letvalue{\??framedtop \v!on \v!on}\framed_t_rule
-\letvalue{\??framedtop \v!off\v!on}\framed_t_rule
-\letvalue{\??framedtop \v!on }\framed_t_rule
+\letvalue{\??framedtop \v!on \v!on}\pack_framed_t_rule
+\letvalue{\??framedtop \v!off\v!on}\pack_framed_t_rule
+\letvalue{\??framedtop \v!on }\pack_framed_t_rule
-\letvalue{\??framedbottom\v!on \v!on}\framed_b_rule
-\letvalue{\??framedbottom\v!off\v!on}\framed_b_rule
-\letvalue{\??framedbottom\v!on }\framed_b_rule
+\letvalue{\??framedbottom\v!on \v!on}\pack_framed_b_rule
+\letvalue{\??framedbottom\v!off\v!on}\pack_framed_b_rule
+\letvalue{\??framedbottom\v!on }\pack_framed_b_rule
-\letvalue{\??framedleft \v!on \v!on}\framed_l_rule
-\letvalue{\??framedleft \v!off\v!on}\framed_l_rule
-\letvalue{\??framedleft \v!on }\framed_l_rule
+\letvalue{\??framedleft \v!on \v!on}\pack_framed_l_rule
+\letvalue{\??framedleft \v!off\v!on}\pack_framed_l_rule
+\letvalue{\??framedleft \v!on }\pack_framed_l_rule
-\letvalue{\??framedright \v!on \v!on}\framed_r_rule
-\letvalue{\??framedright \v!off\v!on}\framed_r_rule
-\letvalue{\??framedright \v!on }\framed_r_rule
+\letvalue{\??framedright \v!on \v!on}\pack_framed_r_rule
+\letvalue{\??framedright \v!off\v!on}\pack_framed_r_rule
+\letvalue{\??framedright \v!on }\pack_framed_r_rule
% no overlapping rules
-\def\framed_t_rules{\hbox{\kern\d_framed_linewidth\vrule\!!width\dimexpr\d_framed_target_wd-2\d_framed_linewidth\relax\!!height\d_framed_linewidth}\nointerlineskip\kern-\d_framed_linewidth}
-\def\framed_b_rules{\kern-\d_framed_linewidth\nointerlineskip\hbox{\kern\d_framed_linewidth\vrule\!!width\dimexpr\d_framed_target_wd-2\d_framed_linewidth\relax\!!height\d_framed_linewidth}}
-\def\framed_r_rules{\kern-\d_framed_linewidth\vrule\!!height\dimexpr\d_framed_target_ht-\d_framed_linewidth\relax\!!depth-\d_framed_linewidth\!!width\d_framed_linewidth}
-\def\framed_l_rules{\vrule\!!height\dimexpr\d_framed_target_ht-\d_framed_linewidth\relax\!!depth-\d_framed_linewidth\!!width\d_framed_linewidth\kern-\d_framed_linewidth}
+\def\pack_framed_t_rules{\hbox{\kern\d_framed_linewidth\vrule\!!width\dimexpr\d_framed_target_wd-2\d_framed_linewidth\relax\!!height\d_framed_linewidth}\nointerlineskip\kern-\d_framed_linewidth}
+\def\pack_framed_b_rules{\kern-\d_framed_linewidth\nointerlineskip\hbox{\kern\d_framed_linewidth\vrule\!!width\dimexpr\d_framed_target_wd-2\d_framed_linewidth\relax\!!height\d_framed_linewidth}}
+\def\pack_framed_r_rules{\kern-\d_framed_linewidth\vrule\!!height\dimexpr\d_framed_target_ht-\d_framed_linewidth\relax\!!depth-\d_framed_linewidth\!!width\d_framed_linewidth}
+\def\pack_framed_l_rules{\vrule\!!height\dimexpr\d_framed_target_ht-\d_framed_linewidth\relax\!!depth-\d_framed_linewidth\!!width\d_framed_linewidth\kern-\d_framed_linewidth}
-\letvalue{\??framedtop \v!small\v!small}\frame_t_rules
-\letvalue{\??framedtop \v!off \v!small}\frame_t_rules
-\letvalue{\??framedtop \v!small }\frame_t_rules
+\letvalue{\??framedtop \v!small\v!small}\pack_framed_t_rules
+\letvalue{\??framedtop \v!off \v!small}\pack_framed_t_rules
+\letvalue{\??framedtop \v!small }\pack_framed_t_rules
-\letvalue{\??framedbottom\v!small\v!small}\frame_b_rules
-\letvalue{\??framedbottom\v!off \v!small}\frame_b_rules
-\letvalue{\??framedbottom\v!small }\frame_b_rules
+\letvalue{\??framedbottom\v!small\v!small}\pack_framed_b_rules
+\letvalue{\??framedbottom\v!off \v!small}\pack_framed_b_rules
+\letvalue{\??framedbottom\v!small }\pack_framed_b_rules
-\letvalue{\??framedleft \v!small\v!small}\frame_l_rules
-\letvalue{\??framedleft \v!off \v!small}\frame_l_rules
-\letvalue{\??framedleft \v!small }\frame_l_rules
+\letvalue{\??framedleft \v!small\v!small}\pack_framed_l_rules
+\letvalue{\??framedleft \v!off \v!small}\pack_framed_l_rules
+\letvalue{\??framedleft \v!small }\pack_framed_l_rules
-\letvalue{\??framedright \v!small\v!small}\frame_r_rules
-\letvalue{\??framedright \v!off \v!small}\frame_r_rules
-\letvalue{\??framedright \v!small }\frame_r_rules
+\letvalue{\??framedright \v!small\v!small}\pack_framed_r_rules
+\letvalue{\??framedright \v!off \v!small}\pack_framed_r_rules
+\letvalue{\??framedright \v!small }\pack_framed_r_rules
% \framed
% [width=4cm,height=3cm,rulethickness=3mm,
@@ -788,16 +788,16 @@
{\bgroup
\advance\framednesting\plusone
\expandafter\let\csname\??ol:\the\framednesting\s!parent\endcsname\??ol
- \dodoubleempty\framed_process[\??ol:\the\framednesting]}
+ \dodoubleempty\pack_framed_process[\??ol:\the\framednesting]}
\unexpanded\def\startframed
- {\dosingleempty\framed_start_framed}
+ {\dosingleempty\pack_framed_start_framed}
-\def\framed_start_framed[#1]%
+\def\pack_framed_start_framed[#1]%
{\bgroup
\advance\framednesting\plusone
\expandafter\let\csname\??ol:\the\framednesting\s!parent\endcsname\??ol
- \framed_process[\??ol:\the\framednesting][#1]%
+ \pack_framed_process[\??ol:\the\framednesting][#1]%
\bgroup}
\let\stopframed\egroup
@@ -809,7 +809,7 @@
{\bgroup
\advance\framednesting\plusone
\expandafter\let\csname\??ol:\the\framednesting\s!parent\endcsname\??ol
- \framed_process[\??ol:\the\framednesting]}
+ \pack_framed_process[\??ol:\the\framednesting]}
% we can consider setting the parent of the regular framed to
% something else in the otr so that we isolate it there
@@ -855,7 +855,7 @@
\unexpanded\def\fastlocalframed[#1]#2[#3]#4% 3-4
{\bgroup
- \framed_initialize{#1}%
+ \pack_framed_initialize{#1}%
\setbox\b_framed_normal\hbox{#4}%
\getparameters[\currentframed][#3]% no \expanded !
\edef\p_framed_rulethickness{\framedparameter\c!rulethickness}% also used in backgrounds
@@ -863,12 +863,12 @@
\edef\p_framed_frame{\framedparameter\c!frame}%
\edef\p_framed_background{\framedparameter\c!background}%
% not here, in calling macro: setups
- \framed_remove_depth
+ \pack_framed_remove_depth
\ifx\p_framed_frame\v!overlay \else \ifx\p_framed_frame\v!none \else
\ifx\p_framed_rulethickness\empty\else
\d_framed_linewidth\p_framed_rulethickness\relax
\fi
- \framed_add_outline % real or invisible frame
+ \pack_framed_add_outline % real or invisible frame
\fi \fi
\ifx\p_framed_background\empty \else
\edef\p_framed_backgroundoffset{\framedparameter\c!backgroundoffset}%
@@ -879,9 +879,9 @@
\p_framed_backgroundoffset
\fi
\edef\p_framed_component{\framedparameter\c!component}%
- \framed_add_background
+ \pack_framed_add_background
\fi
- \framed_restore_depth
+ \pack_framed_restore_depth
\box\b_framed_normal
\egroup}
@@ -890,7 +890,7 @@
\def\localbackgroundframed#1#2#3% namespace component box
{\bgroup
- \framed_initialize{#1}%
+ \pack_framed_initialize{#1}%
\setbox\b_framed_normal\box#3%
\edef\p_framed_rulethickness{\framedparameter\c!rulethickness}% also used in backgrounds
\d_framed_frameoffset\framedparameter\c!frameoffset\relax % also used in backgrounds
@@ -900,7 +900,7 @@
\ifx\p_framed_rulethickness\empty \else
\d_framed_linewidth\p_framed_rulethickness\relax
\fi
- \framed_add_outline % real or invisible frame
+ \pack_framed_add_outline % real or invisible frame
\fi \fi
\ifx\p_framed_background\empty \else
\edef\p_framed_backgroundoffset{\framedparameter\c!backgroundoffset}%
@@ -911,7 +911,7 @@
\p_framed_backgroundoffset
\fi
\edef\p_framed_component{#2}%
- \framed_add_background
+ \pack_framed_add_background
\fi
\box\b_framed_normal
\egroup}
@@ -939,28 +939,28 @@
\unexpanded\def\localframed
{\bgroup
- \dodoubleempty\framed_process}
+ \dodoubleempty\pack_framed_process}
-\unexpanded\def\framed_process[#1][#2]% assumes a \dodoubleempty (slows down), also should have leading \bgroup
+\unexpanded\def\pack_framed_process[#1][#2]% assumes a \dodoubleempty (slows down), also should have leading \bgroup
{\bgroup
- \framed_initialize{#1}%
+ \pack_framed_initialize{#1}%
\ifsecondargument % faster
\getparameters[\currentframed][#2]% here !
\fi
- \framed_process_indeed}
+ \pack_framed_process_indeed}
\unexpanded\def\directlocalframed[#1]% no optional
{\bgroup
\bgroup
- \framed_initialize{#1}%
- \framed_process_indeed}
+ \pack_framed_initialize{#1}%
+ \pack_framed_process_indeed}
\unexpanded\def\localframedwithsettings[#1][#2]% no checking (so no spaces between)
{\bgroup
\bgroup
- \framed_initialize{#1}%
+ \pack_framed_initialize{#1}%
\getparameters[\currentframed][#2]% here !
- \framed_process_indeed}
+ \pack_framed_process_indeed}
% done
@@ -968,7 +968,7 @@
% we can make macros for the offset, width, and height branches or do an \csname
-\unexpanded\def\framed_process_indeed
+\unexpanded\def\pack_framed_process_indeed
{\d_framed_frameoffset\framedparameter\c!frameoffset
\edef\p_framed_backgroundoffset{\framedparameter\c!backgroundoffset}%
\d_framed_backgroundoffset
@@ -1151,65 +1151,65 @@
\let\localstrut \relax
\fi
\ifconditional\c_framed_has_height
- \let\\\framed_vboxed_newline
+ \let\\\pack_framed_vboxed_newline
\ifconditional\c_framed_has_width
- \let\hairline\framed_vboxed_hairline
+ \let\hairline\pack_framed_vboxed_hairline
\ifconditional\c_framed_has_format
- \let\next\framed_format_format_yes
+ \let\next\pack_framed_format_format_yes
\else
- \let\next\framed_format_format_nop
+ \let\next\pack_framed_format_format_nop
\fi
\else
- \let\hairline\framed_hboxed_hairline
+ \let\hairline\pack_framed_hboxed_hairline
\ifconditional\c_framed_has_format
- \let\next\framed_format_format_height
+ \let\next\pack_framed_format_format_height
\else
- \let\next\framed_format_format_vsize
+ \let\next\pack_framed_format_format_vsize
\fi
\fi
\else
\ifconditional\c_framed_has_width
\ifconditional\c_framed_has_format
- \let\hairline\framed_vboxed_hairline
- \let\\\framed_vboxed_newline
- \let\next\framed_format_format_width
+ \let\hairline\pack_framed_vboxed_hairline
+ \let\\\pack_framed_vboxed_newline
+ \let\next\pack_framed_format_format_width
\else
- \let\hairline\framed_hboxed_hairline
- \let\\\framed_hboxed_newline
- \let\next\framed_format_format_hsize
+ \let\hairline\pack_framed_hboxed_hairline
+ \let\\\pack_framed_hboxed_newline
+ \let\next\pack_framed_format_format_hsize
\fi
\else
- \let\hairline\framed_hboxed_hairline
- \let\\\framed_hboxed_newline
- \let\next\framed_format_format_no_size
+ \let\hairline\pack_framed_hboxed_hairline
+ \let\\\pack_framed_hboxed_newline
+ \let\next\pack_framed_format_format_no_size
\fi
\fi
- \framed_check_extra_offsets
+ \pack_framed_check_extra_offsets
\edef\p_framed_background{\framedparameter\c!background}%
\ifx\p_framed_background\empty
- \let\framed_forgetall\forgetall
+ \let\pack_framed_forgetall\forgetall
\else
- \let\framed_forgetall\relax
+ \let\pack_framed_forgetall\relax
\forgetall
\fi
\edef\framedwidth {\ifdim\d_framed_width >\zeropoint\the\d_framed_width \else\!!zeropoint\fi}% a new feature, visible for user
\edef\framedheight{\ifdim\d_framed_height>\zeropoint\the\d_framed_height\else\!!zeropoint\fi}% a new feature, visible for user
\edef\framedoffset{\the\dimexpr\ifconditional\c_framed_has_offset\localoffset\else\zeropoint\fi}%
\ifx\p_framed_orientation\empty
- \let\framed_stop_orientation\relax
+ \let\pack_framed_stop_orientation\relax
\else
- \framed_start_orientation
+ \pack_framed_start_orientation
\fi
- \afterassignment\framed_restart
+ \afterassignment\pack_framed_restart
\setbox\b_framed_normal\next}
-\let\framed_stop_orientation\relax
+\let\pack_framed_stop_orientation\relax
-\def\framed_restart
- {\aftergroup\framed_finish}
+\def\pack_framed_restart
+ {\aftergroup\pack_framed_finish}
-\def\framed_do_top {\raggedtopcommand\framedparameter\c!top}
-\def\framed_do_bottom{\framedparameter\c!bottom\raggedbottomcommand}
+\def\pack_framed_do_top {\raggedtopcommand\framedparameter\c!top}
+\def\pack_framed_do_bottom{\framedparameter\c!bottom\raggedbottomcommand}
%D Carefull analysis of this macro will learn us that not all
%D branches in the last conditionals can be encountered, that
@@ -1265,54 +1265,54 @@
% options (btw, beware of location settings of derived functionality that bleed
% into this
-\def\framed_finish_a
+\def\pack_framed_finish_a
{\ifreshapeframebox
- \framed_reshape_process
+ \pack_framed_reshape_process
\else\ifx\p_framed_franalyze\v!yes
- \framed_reshape_analyze
+ \pack_framed_reshape_analyze
\else
- \framed_reshape_reset
+ \pack_framed_reshape_reset
\fi\fi
\setfalse\c_framed_has_width}
-\def\framed_finish_b
+\def\pack_framed_finish_b
{\ifx\p_framed_franalyze\v!yes
- \framed_reshape_analyze
+ \pack_framed_reshape_analyze
\else
- \framed_reshape_reset
+ \pack_framed_reshape_reset
\fi
\setfalse\c_framed_has_width}
-\def\framed_finish_c
+\def\pack_framed_finish_c
{\ifx\p_framed_franalyze\v!yes
- \framed_reshape_analyze
+ \pack_framed_reshape_analyze
\else
- \framed_reshape_reset
+ \pack_framed_reshape_reset
\fi}
-\unexpanded\def\framed_finish
+\unexpanded\def\pack_framed_finish
{\dontshowcomposition
- \framed_stop_orientation % hm, wrong place ! should rotate the result (after reshape)
- \framed_locator_before\p_framed_location
+ \pack_framed_stop_orientation % hm, wrong place ! should rotate the result (after reshape)
+ \pack_framed_locator_before\p_framed_location
\ifconditional\c_framed_has_format
\ifx\p_framed_autowidth\v!force
- \framed_finish_a
+ \pack_framed_finish_a
\else\ifx\localwidth\v!fit
\ifx\p_framed_autowidth\v!yes
- \framed_finish_a
+ \pack_framed_finish_a
\else
- \framed_finish_b
+ \pack_framed_finish_b
\fi
\else\ifx\localwidth\v!fixed
- \framed_finish_b
+ \pack_framed_finish_b
\else
- \framed_finish_c
+ \pack_framed_finish_c
\fi\fi\fi
\ifconditional\boxcontentneedsprocessing
\mkdoprocessboxcontents\b_framed_normal
\fi
\else
- \framed_finish_c
+ \pack_framed_finish_c
\fi
\ifconditional\c_framed_has_width
\wd\b_framed_normal\d_framed_width
@@ -1322,7 +1322,7 @@
\fi
\edef\p_framed_empty{\framedparameter\c!empty}%
\ifx\p_framed_empty\v!yes
- \framed_fake_box
+ \pack_framed_fake_box
\fi
%
\d_framed_applied_offset
@@ -1335,11 +1335,11 @@
\advance\d_framed_applied_offset\localoffset
\fi
\ifconditional\c_framed_has_extra_offset
- \framed_apply_extra_offsets % includes \d_framed_applied_offset
+ \pack_framed_apply_extra_offsets % includes \d_framed_applied_offset
\else
\ifzeropt\d_framed_applied_offset
\else
- \framed_widen_box
+ \pack_framed_widen_box
\fi
\fi
%
@@ -1352,14 +1352,14 @@
% new
\else
\ifconditional\c_framed_has_frame % real or invisible frame
- \framed_add_outline
+ \pack_framed_add_outline
\fi
\ifx\p_framed_background\empty \else
\edef\p_framed_component{\framedparameter\c!component}%
- \framed_add_background
+ \pack_framed_add_background
\fi
\fi
- \framed_locator_after\p_framed_location
+ \pack_framed_locator_after\p_framed_location
\box\b_framed_normal
\global\frameddimensionstate % global so to be used directly afterwards !
\ifconditional\c_framed_has_width
@@ -1372,7 +1372,7 @@
\newconstant\frameddimensionstate % global state: 0=unknown 1=width 2=height 3=both
-\def\framed_fake_box
+\def\pack_framed_fake_box
{\setbox\scratchbox\emptyhbox
\wd\scratchbox\wd\b_framed_normal
\ht\scratchbox\ht\b_framed_normal
@@ -1383,10 +1383,10 @@
{\setvalue{\??hf:b:#1}{#2}%
\setvalue{\??hf:a:#1}{#3}}
-\def\framed_locator_before#1%
+\def\pack_framed_locator_before#1%
{\csname\??hf:b:#1\endcsname}
-\def\framed_locator_after#1%
+\def\pack_framed_locator_after#1%
{\csname\??hf:a:#1\endcsname}
\newdimen\d_framed_locator_ht
@@ -1480,8 +1480,8 @@
\hbox{\box\b_framed_normal}}
\installframedlocator \v!lohi
- {\framed_locator_before\v!middle}
- {\framed_locator_after \v!middle}
+ {\pack_framed_locator_before\v!middle}
+ {\pack_framed_locator_after \v!middle}
\installframedlocator \v!bottom
{}
@@ -1492,8 +1492,8 @@
\hbox{\box\b_framed_normal}}
\installframedlocator \v!keep % retains height/depth
- {\framed_remove_depth}
- {\framed_restore_depth}
+ {\pack_framed_remove_depth}
+ {\pack_framed_restore_depth}
% also used in fastlocalframed
@@ -1501,7 +1501,7 @@
\newdimen\d_framed_original_ht
\newdimen\d_framed_original_dp
-\def\framed_remove_depth
+\def\pack_framed_remove_depth
{\d_framed_original_wd\wd\b_framed_normal
\d_framed_original_ht\ht\b_framed_normal
\d_framed_original_dp\dp\b_framed_normal
@@ -1512,7 +1512,7 @@
\ht\b_framed_normal\dimexpr\d_framed_original_ht+\d_framed_original_dp\relax
\dp\b_framed_normal\zeropoint}
-\def\framed_restore_depth
+\def\pack_framed_restore_depth
{\ifzeropt\d_framed_original_dp \else
\setbox\b_framed_normal\hbox{\lower\d_framed_original_dp\box\b_framed_normal}%
\fi
@@ -1528,9 +1528,9 @@
% \framed[width=12cm,height=3cm,orientation=-180]{\input ward\relax}
% \framed[width=12cm,height=3cm,orientation=-270]{\input ward\relax}
-\def\framed_start_orientation
+\def\pack_framed_start_orientation
{\ifcase\p_framed_orientation\else
- \let\framed_stop_orientation\relax
+ \let\pack_framed_stop_orientation\relax
\else
\scratchcounter\p_framed_orientation % weird .. why
\divide\scratchcounter\plustwo
@@ -1538,19 +1538,19 @@
\swapmacros\framedwidth\framedheight
\swapmacros\localwidth\localheight
\swapdimens\d_framed_height\d_framed_width
- \let\framed_stop_orientation\framed_stop_orientation_odd
+ \let\pack_framed_stop_orientation\pack_framed_stop_orientation_odd
\else
- \let\framed_stop_orientation\framed_stop_orientation_even
+ \let\pack_framed_stop_orientation\pack_framed_stop_orientation_even
\fi
\fi}
-\def\framed_stop_orientation_odd
+\def\pack_framed_stop_orientation_odd
{\swapmacros\framedwidth\framedheight
\swapmacros\localwidth\localheight
\swapdimens\d_framed_height\d_framed_width
- \framed_stop_orientation_even}
+ \pack_framed_stop_orientation_even}
-\def\framed_stop_orientation_even
+\def\pack_framed_stop_orientation_even
{\setbox\b_framed_normal\hbox{\dorotatebox\p_framed_orientation\hbox{\box\b_framed_normal}}}
%D The last conditional takes care of the special situation of
@@ -1558,14 +1558,14 @@
%D to be \inframed{aligned} with the running text.
\unexpanded\def\inframed
- {\dosingleempty\framed_inline}
+ {\dosingleempty\pack_framed_inline}
-% \def\framed_inline[#1]%
+% \def\pack_framed_inline[#1]%
% {\framed[\c!location=\v!low,#1]}
%
% or:
-\def\framed_inline[%
+\def\pack_framed_inline[%
{\framed[\c!location=\v!low,}
%D When we set \type{empty} to \type{yes}, we get
@@ -1614,10 +1614,10 @@
\newcount\c_framed_mstyle
-\unexpanded\def\mframed {\dosingleempty\framed_math_display}
-\unexpanded\def\inmframed{\dosingleempty\framed_math_inline }
+\unexpanded\def\mframed {\dosingleempty\pack_framed_math_display}
+\unexpanded\def\inmframed{\dosingleempty\pack_framed_math_inline }
-\def\framed_math_inline[#1]#2%
+\def\pack_framed_math_inline[#1]#2%
{\begingroup
\c_framed_mstyle\mathstyle
\inframed[#1]{\Ustartmath\triggermathstyle\c_framed_mstyle#2\Ustopmath}%
@@ -1626,7 +1626,7 @@
\unexpanded\def\funnymathstrut
{\Ustartmath\triggermathstyle\c_framed_mstyle\vphantom{(}\Ustopmath}
-\def\framed_math_display[#1]#2%
+\def\pack_framed_math_display[#1]#2%
{\begingroup
\c_framed_mstyle\mathstyle
\let\normalstrut\funnymathstrut
@@ -1683,7 +1683,7 @@
\newdimen\d_framed_toffset
\newdimen\d_framed_boffset
-\def\framed_check_extra_offsets
+\def\pack_framed_check_extra_offsets
{\setfalse\c_framed_has_extra_offset
\d_framed_loffset\framedparameter\c!loffset\relax
\d_framed_roffset\framedparameter\c!roffset\relax
@@ -1694,7 +1694,7 @@
\ifzeropt\d_framed_toffset\else \advance\d_framed_height-\d_framed_toffset \settrue\c_framed_has_extra_offset \fi
\ifzeropt\d_framed_boffset\else \advance\d_framed_height-\d_framed_boffset \settrue\c_framed_has_extra_offset \fi}
-\def\framed_apply_extra_offsets
+\def\pack_framed_apply_extra_offsets
{\setbox\b_framed_normal\vbox\bgroup
\advance\d_framed_toffset\d_framed_applied_offset
\advance\d_framed_boffset\d_framed_applied_offset
@@ -1709,7 +1709,7 @@
\kern\d_framed_boffset
\egroup}
-\def\framed_widen_box
+\def\pack_framed_widen_box
{\setbox\b_framed_normal\vbox
{\kern\d_framed_applied_offset
\hbox{\kern\d_framed_applied_offset\box\b_framed_normal\kern\d_framed_applied_offset}%
@@ -1819,60 +1819,60 @@
%D The handlers:
-\def\framed_forgetall{\forgetall}
+\def\pack_framed_forgetall{\forgetall}
% test: (saves one forgetall)
%
% \edef\framedbackground{\framedparameter\c!background}%
% \ifx\framedbackground\empty
-% \let\framed_forgetall\forgetall
+% \let\pack_framed_forgetall\forgetall
% \else
-% \let\framed_forgetall\relax
+% \let\pack_framed_forgetall\relax
% \forgetall
% \fi
-\def\framed_set_foregroundcolor
+\def\pack_framed_set_foregroundcolor
{\edef\p_framed_foregroundcolor{\framedparameter\c!foregroundcolor}%
\ifx\p_framed_foregroundcolor\empty\else\dousecolorparameter\p_framed_foregroundcolor\fi}
-\def\framed_do_setups
+\def\pack_framed_do_setups
{\ifx\p_framed_setups\empty \else
\setups[\p_framed_setups]%
\fi}
-\def\framed_format_format_yes
+\def\pack_framed_format_format_yes
{\vbox to \d_framed_height
\bgroup
\let\postprocessframebox\relax
- \framed_forgetall
+ \pack_framed_forgetall
\iftrialtypesetting \else
- \framed_set_foregroundcolor
+ \pack_framed_set_foregroundcolor
\fi
\oninterlineskip
\hsize\d_framed_width
\vsize\d_framed_height
- \framed_do_setups
+ \pack_framed_do_setups
\raggedcommand
- \framed_do_top
+ \pack_framed_do_top
\bgroup
\localbegstrut
\aftergroup\localendstrut
- \aftergroup\framed_do_bottom
+ \aftergroup\pack_framed_do_bottom
\aftergroup\egroup
\doformatonelinerbox}
-\def\framed_format_format_nop
+\def\pack_framed_format_format_nop
{\vbox to \d_framed_height
\bgroup
\let\postprocessframebox\relax
- \framed_forgetall
+ \pack_framed_forgetall
\iftrialtypesetting \else
- \framed_set_foregroundcolor
+ \pack_framed_set_foregroundcolor
\fi
\oninterlineskip
\hsize\d_framed_width
\vsize\d_framed_height
- \framed_do_setups
+ \pack_framed_do_setups
\raggedcenter
\vss
\bgroup
@@ -1882,16 +1882,16 @@
\aftergroup\egroup
\doformatonelinerbox}
-\def\framed_format_format_height
+\def\pack_framed_format_format_height
{\vbox to \d_framed_height
\bgroup
\let\postprocessframebox\relax
- \framed_forgetall
+ \pack_framed_forgetall
\iftrialtypesetting \else
- \framed_set_foregroundcolor
+ \pack_framed_set_foregroundcolor
\fi
\oninterlineskip
- \framed_do_setups
+ \pack_framed_do_setups
\raggedcommand
\vss
\bgroup
@@ -1901,36 +1901,36 @@
\localbegstrut
\doformatonelinerbox}
-\def\framed_format_format_width
+\def\pack_framed_format_format_width
{\vbox
\bgroup
\let\postprocessframebox\relax
- \framed_forgetall
+ \pack_framed_forgetall
\iftrialtypesetting \else
- \framed_set_foregroundcolor
+ \pack_framed_set_foregroundcolor
\fi
\oninterlineskip
\hsize\d_framed_width
- \framed_do_setups
+ \pack_framed_do_setups
\raggedcommand
- \framed_do_top
+ \pack_framed_do_top
\bgroup
\localbegstrut
\aftergroup\localendstrut
- \aftergroup\framed_do_bottom
+ \aftergroup\pack_framed_do_bottom
\aftergroup\egroup
\doformatonelinerbox}
-\def\framed_format_format_vsize
+\def\pack_framed_format_format_vsize
{\vbox to \d_framed_height
\bgroup
\let\postprocessframebox\relax
- \framed_forgetall
+ \pack_framed_forgetall
\iftrialtypesetting \else
- \framed_set_foregroundcolor
+ \pack_framed_set_foregroundcolor
\fi
\vsize\d_framed_height
- \framed_do_setups
+ \pack_framed_do_setups
\vss
\bgroup
\aftergroup\vss
@@ -1941,15 +1941,15 @@
\localstrut
\doformatonelinerbox}
-\def\framed_format_format_hsize
+\def\pack_framed_format_format_hsize
{\hbox to \d_framed_width
\bgroup
\let\postprocessframebox\relax
- \framed_forgetall
+ \pack_framed_forgetall
\iftrialtypesetting \else
- \framed_set_foregroundcolor
+ \pack_framed_set_foregroundcolor
\fi
- \framed_do_setups
+ \pack_framed_do_setups
\hss
\localstrut
\bgroup
@@ -1957,14 +1957,14 @@
\aftergroup\egroup
\doformatonelinerbox}
-\def\framed_format_format_no_size
+\def\pack_framed_format_format_no_size
{\hbox
\bgroup
\iftrialtypesetting \else
- \framed_set_foregroundcolor
+ \pack_framed_set_foregroundcolor
\fi
\let\postprocessframebox\relax
- \framed_do_setups
+ \pack_framed_do_setups
\localstrut
\doformatonelinerbox}
@@ -2038,7 +2038,7 @@
\newdimen\framedmaxwidth
\newdimen\framedaveragewidth
-\def\framed_reshape_reset
+\def\pack_framed_reshape_reset
{\framednoflines \zerocount
\framedfirstheight \zeropoint
\framedlastdepth \zeropoint
@@ -2046,8 +2046,8 @@
\framedmaxwidth \zeropoint
\framedaveragewidth\zeropoint}
-\def\framed_reshape_process{\ifvbox\b_framed_normal\ctxcommand{doreshapeframedbox(\number\b_framed_normal)}\fi}
-\def\framed_reshape_analyze{\ifvbox\b_framed_normal\ctxcommand{doanalyzeframedbox(\number\b_framed_normal)}\fi}
+\def\pack_framed_reshape_process{\ifvbox\b_framed_normal\ctxcommand{doreshapeframedbox(\number\b_framed_normal)}\fi}
+\def\pack_framed_reshape_analyze{\ifvbox\b_framed_normal\ctxcommand{doanalyzeframedbox(\number\b_framed_normal)}\fi}
% torture test / strange case (much depth) / method 2 needed
%
@@ -2137,7 +2137,7 @@
%D possible to the circumstances and act as natural as
%D possible.
-\def\framed_vboxed_hairline
+\def\pack_framed_vboxed_hairline
{\bgroup
\dimen2=\ifconditional\c_framed_has_offset \localoffset \else \zeropoint \fi
\dimen4=\dimexpr\dimen2+\d_framed_linewidth\relax
@@ -2154,7 +2154,7 @@
\endgraf\nointerlineskip\localbegstrut % beware, we might kill it in a style using \vskip\lineheight
\egroup} % so this must not be changed
-\def\framed_hboxed_hairline % use framed dimen
+\def\pack_framed_hboxed_hairline % use framed dimen
{\bgroup
\dimen2=\ifconditional\c_framed_has_offset \localoffset \else \zeropoint \fi
\ifconditional\c_framed_has_height
@@ -2179,10 +2179,10 @@
%D sort of newline signal. In horizontal boxes it expands to a
%D space.
-\unexpanded\def\framed_vboxed_newline
+\unexpanded\def\pack_framed_vboxed_newline
{\endgraf\ignorespaces}
-\unexpanded\def\framed_hboxed_newline
+\unexpanded\def\pack_framed_hboxed_newline
{\unskip\normalspace\ignorespaces}
%D We can set each rule on or off. The default setting is
@@ -2350,9 +2350,9 @@
\c!margin=\v!standard]
\appendtoks
- \setuevalue{\e!start\currentframedtext}{\framed_text_start {\currentframedtext}}%
- \setuevalue{\e!stop \currentframedtext}{\framed_text_stop }%
- \setuevalue {\currentframedtext}{\framed_text_direct{\currentframedtext}}%
+ \setuevalue{\e!start\currentframedtext}{\pack_framed_text_start {\currentframedtext}}%
+ \setuevalue{\e!stop \currentframedtext}{\pack_framed_text_stop }%
+ \setuevalue {\currentframedtext}{\pack_framed_text_direct{\currentframedtext}}%
\to \everydefineframedtext
\setvalue{\??framedtextlocation\v!left }{\letframedtextparameter\c!left \relax
@@ -2368,17 +2368,17 @@
\letframedtextparameter\c!right\relax
\settrue\c_framed_text_location_none}
-\unexpanded\def\framed_text_start#1%
+\unexpanded\def\pack_framed_text_start#1%
{\bgroup
\edef\currentframedtext{#1}%
- \dodoubleempty\framed_text_start_indeed}
+ \dodoubleempty\pack_framed_text_start_indeed}
-\def\framed_text_start_indeed[#1][#2]%
+\def\pack_framed_text_start_indeed[#1][#2]%
{\doifassignmentelse{#1}
- {\framed_text_start_continue\empty{#1}}
- {\framed_text_start_continue{#1}{#2}}}
+ {\pack_framed_text_start_continue\empty{#1}}
+ {\pack_framed_text_start_continue{#1}{#2}}}
-\def\framed_text_start_continue#1#2%
+\def\pack_framed_text_start_continue#1#2%
{\setupframedtexts[\currentframedtext][#2]%
\doifsomething{#1}{\setframedtextparameter\c!location{#1}}% does not listen to #3
\setfalse\c_framed_text_location_none
@@ -2387,7 +2387,7 @@
% removed 06/2001
% \forgetparindent
% added 06/2001 [see demo-bbv]
- \framed_text_check
+ \pack_framed_text_check
% so far
\setbox\b_framed_normal\vbox
\startboxedcontent
@@ -2399,7 +2399,7 @@
\inheritedframedtextframed\bgroup
\let\\=\endgraf
\framedtextparameter\c!inner % oud spul
- \doif{\framedtextparameter\c!depthcorrection}\v!on\framed_text_start_depth_correction
+ \doif{\framedtextparameter\c!depthcorrection}\v!on\pack_framed_text_start_depth_correction
\doinhibitblank % \blank[\v!disable]% plaatst signal
\setupindenting[\framedtextparameter\c!indenting]%
\useframedtextstyleandcolor\c!style\c!color}
@@ -2410,10 +2410,10 @@
\defineplacement[\??framedtext][\s!parent=\??framedtext\currentframedtext]
-\unexpanded\def\framed_text_stop % no \baselinecorrection, see faq docs
+\unexpanded\def\pack_framed_text_stop % no \baselinecorrection, see faq docs
{\endgraf
\removelastskip
- \doif{\framedtextparameter\c!depthcorrection}\v!on\framed_text_stop_depth_correction
+ \doif{\framedtextparameter\c!depthcorrection}\v!on\pack_framed_text_stop_depth_correction
\stopboxedcontent
\stopcolor
\ifconditional\c_framed_text_location_none
@@ -2430,7 +2430,7 @@
%D We define the general (and original) case by just saying:
-\def\framed_text_check % messy dependency
+\def\pack_framed_text_check % messy dependency
{\localhsize\hsize
\ifinsidefloat \else \ifdim\d_page_sides_vsize>\zeropoint % also possible: \c_page_sides_checks_done>\zeropoint
% \strut % rather clean way to invoke the sidefloat OTR
@@ -2440,7 +2440,7 @@
\setlocalhsize
\fi \fi}
-\def\framed_text_start_depth_correction
+\def\pack_framed_text_start_depth_correction
{\bgroup
\ifhmode
\par
@@ -2453,7 +2453,7 @@
\nowhitespace
\fi} % na vskip ! new 20/05/2004, fails with next content being box (\scale{..})
-\def\framed_text_stop_depth_correction
+\def\pack_framed_text_stop_depth_correction
{\ifhmode
\par
\fi
@@ -2490,12 +2490,12 @@
%D The simple brace (or group) delimited case is typeset
%D slightly different and is not aligned.
-\unexpanded\def\framed_text_direct#1%
+\unexpanded\def\pack_framed_text_direct#1%
{\bgroup
\edef\currentframedtext{#1}%
- \dosingleempty\framed_text_start_direct}
+ \dosingleempty\pack_framed_text_start_direct}
-\def\framed_text_start_direct[#1]%
+\def\pack_framed_text_start_direct[#1]%
{\normalexpanded{\switchtobodyfont[\framedtextparameter\c!bodyfont]}%
\letframedtextparameter\c!strut\v!no
\iffirstargument
@@ -2507,10 +2507,10 @@
\framedtextparameter\c!inner
\useframedtextstyleandcolor\c!style\c!color
\bgroup
- \aftergroup\framed_text_stop_direct
+ \aftergroup\pack_framed_text_stop_direct
\let\next=}
-\def\framed_text_stop_direct
+\def\pack_framed_text_stop_direct
{\removelastskip
\egroup
\egroup}
@@ -2532,9 +2532,9 @@
% actually, this can be another command handler .. todo
\def\defineframed
- {\dotripleempty\framed_define}
+ {\dotripleempty\pack_framed_define}
-\def\framed_define[#1][#2][#3]%
+\def\pack_framed_define[#1][#2][#3]%
{\ifcsname\??ol:#1\endcsname
% already defined, keeps settings
\else
@@ -2551,11 +2551,11 @@
\else
\getparameters[\??ol#1][\s!parent=\??ol,#2]%
\fi
- \setuvalue{#1}{\framed_defined_process[#1]}}% % \the\everydefineframed
+ \setuvalue{#1}{\pack_framed_defined_process[#1]}}% % \the\everydefineframed
\newcount\c_framed_crap
-\def\framed_defined_process[#1]% official (not much checking, todo: parent)
+\def\pack_framed_defined_process[#1]% official (not much checking, todo: parent)
{\bgroup
\ifcsname\??ol:#1\endcsname
\expandafter\let\expandafter\c_framed_temp\csname\??ol:#1\endcsname
@@ -2564,7 +2564,7 @@
\fi
\advance\c_framed_temp\plusone
\expandafter\def\csname\??ol#1:\the\c_framed_temp\s!parent\endcsname{\??ol#1}% \inheritlocalframed
- \dodoubleempty\framed_process[\??ol#1:\the\c_framed_temp]}
+ \dodoubleempty\pack_framed_process[\??ol#1:\the\c_framed_temp]}
%D We can do:
%D
@@ -2645,19 +2645,19 @@
\processcommacommand[#1]\docommand}
\unexpanded\def\startframedcontent
- {\dosingleempty\framed_start_content}
+ {\dosingleempty\pack_framed_start_content}
-\def\framed_start_content[#1]%
+\def\pack_framed_start_content[#1]%
{\bgroup
\edef\currentframedcontent{#1}%
\ifx\currentframedcontent\v!off
\let\stopframedcontent\egroup
\else
- \let\stopframedcontent\framed_stop_content_indeed
- \expandafter\framed_start_content_indeed
+ \let\stopframedcontent\pack_framed_stop_content_indeed
+ \expandafter\pack_framed_start_content_indeed
\fi}
-\def\framed_start_content_indeed
+\def\pack_framed_start_content_indeed
{\setbox\b_framed_normal\hbox\bgroup
\setlocalhsize
\hsize\localhsize
@@ -2670,7 +2670,7 @@
\forgetall
\blank[\v!disable]}
-\def\framed_stop_content_indeed
+\def\pack_framed_stop_content_indeed
{\removelastskip
\egroup
\vskip\framedcontentparameter\c!bottomoffset
diff --git a/tex/context/base/page-app.mkiv b/tex/context/base/page-app.mkiv
index 07195996f..fd9822fd6 100644
--- a/tex/context/base/page-app.mkiv
+++ b/tex/context/base/page-app.mkiv
@@ -21,14 +21,14 @@
\installframedcommandhandler \??fittingpage {fittingpage} \??fittingpage
-\newdimen\fitting_page_width
-\newdimen\fitting_page_height
-\newbox \fitting_page_box
+\newdimen\d_page_fitting_width
+\newdimen\d_page_fitting_height
+\newbox \b_page_fitting
\definepapersize
[fittingpage]
- [\c!width=\fitting_page_width,
- \c!height=\fitting_page_height]
+ [\c!width=\d_page_fitting_width,
+ \c!height=\d_page_fitting_height]
\definemakeup
[fittingpage]
@@ -42,8 +42,8 @@
\setuplayout
[fittingpage]
- [\c!width=\fitting_page_width,
- \c!height=\fitting_page_height,
+ [\c!width=\d_page_fitting_width,
+ \c!height=\d_page_fitting_height,
\c!location=\v!middle]
\appendtoks
@@ -52,9 +52,9 @@
\to \everydefinefittingpage
\unexpanded\def\startfittingpage
- {\dodoubleempty\start_fitting_page}
+ {\dodoubleempty\page_fitting_start}
-\def\start_fitting_page[#1][#2]%
+\def\page_fitting_start[#1][#2]%
{\page % this is kind of tricky! there can be preceding page refs
\autostarttext
\bgroup % resulting in a zero height page; test fig-make !
@@ -64,50 +64,50 @@
% runs under current page regime, i.e. page variables passed to mp
\setupcurrentfittingpage[\c!paper=,#2]% auto or size or nothing
\doifelsenothing{\fittingpageparameter\c!command}
- \start_fitting_page_normal
- \start_fitting_page_command}
+ \page_fitting_start_normal
+ \page_fitting_start_command}
-\def\start_fitting_page_command
- {\grabuntil{\e!stop\currentfittingpage}\stop_fitting_page_command}
+\def\page_fitting_start_command
+ {\grabuntil{\e!stop\currentfittingpage}\page_fitting_stop_command}
-\def\stop_fitting_page_command#1%
- {\start_fitting_page_normal
+\def\page_fitting_stop_command#1%
+ {\page_fitting_start_normal
\fittingpageparameter\c!command{#1}%
- \stop_fitting_page_normal}
+ \page_fitting_stop_normal}
-\def\start_fitting_page_normal
- {\setbox\fitting_page_box\hbox
+\def\page_fitting_start_normal
+ {\setbox\b_page_fitting\hbox
\bgroup
\inheritedfittingpageframed
\bgroup
\gobblespacetokens}
-\unexpanded\def\stop_fitting_page_normal % todo: figure out why a small mp image gets shifted
+\unexpanded\def\page_fitting_stop_normal % todo: figure out why a small mp image gets shifted
{\removeunwantedspaces
\egroup
\egroup
% finalize
\doif{\fittingpageparameter\c!margin}\v!page
- {\setbox\fitting_page_box\hbox\bgroup
+ {\setbox\b_page_fitting\hbox\bgroup
\offsetbox
[\c!leftoffset=\backspace,
\c!rightoffset=\cutspace,
\c!topoffset=\topspace,
\c!bottomoffset=\bottomspace]
- {\box\fitting_page_box}%
+ {\box\b_page_fitting}%
\egroup}%
\doifsomething{\fittingpageparameter\c!scale}
- {\setbox\fitting_page_box\hbox\bgroup
- \scale[\c!scale=\fittingpageparameter\c!scale]{\box\fitting_page_box}%
+ {\setbox\b_page_fitting\hbox\bgroup
+ \scale[\c!scale=\fittingpageparameter\c!scale]{\box\b_page_fitting}%
\egroup}%
- \ifdim\ht\fitting_page_box=\zeropoint
- \ht\fitting_page_box\onepoint
+ \ifdim\ht\b_page_fitting=\zeropoint
+ \ht\b_page_fitting\onepoint
\fi
- \ifdim\wd\fitting_page_box=\zeropoint
- \wd\fitting_page_box\onepoint
+ \ifdim\wd\b_page_fitting=\zeropoint
+ \wd\b_page_fitting\onepoint
\fi
- \fitting_page_width \wd\fitting_page_box
- \fitting_page_height\ht\fitting_page_box
+ \d_page_fitting_width \wd\b_page_fitting
+ \d_page_fitting_height\ht\b_page_fitting
\startlocallayout % still valid?
\let\checkcurrentlayout\relax % else interference with odd/even layout
\processaction
@@ -117,13 +117,13 @@
\s!default=>\def\fittingpapersize{fittingpage}]%
\expanded{\setuppapersize[fittingpage][\fittingpapersize]}%
\startmakeup[fittingpage]%
- \box\fitting_page_box
+ \box\b_page_fitting
\stopmakeup
\stoplocallayout % still valid?
\egroup
\autostoptext}
-\let\stopfittingpage\stop_fitting_page_normal
+\let\stopfittingpage\page_fitting_stop_normal
\setupfittingpage
[%\c!scale=1000,
@@ -151,9 +151,9 @@
%D maybe I should support stream=yes in framed.
\unexpanded\def\startTEXstream
- {\dosingleempty\start_TEX_stream}
+ {\dosingleempty\page_streams_TEX_start}
-\def\start_TEX_stream[#1]% old code, to be redone
+\def\page_streams_TEX_start[#1]% old code, to be redone
{\page
\enableoutputstream[tex]}
@@ -184,9 +184,9 @@
%D \stoptyping
\unexpanded\def\startpagefigure
- {\dodoubleempty\start_page_figure}
+ {\dodoubleempty\page_figures_start}
-\def\start_page_figure[#1][#2]%
+\def\page_figures_start[#1][#2]%
{\bgroup
\getparameters[\??ex][\c!offset=\v!overlay,#2]%
\startTEXpage[\c!offset=\@@exoffset]%
@@ -200,6 +200,6 @@
{\dodoubleempty\page_figure}
\def\page_figure[#1][#2]%
- {\start_page_figure[#1][#2]\stoppagefigure}
+ {\page_figures_start[#1][#2]\stoppagefigure}
\protect \endinput
diff --git a/tex/context/base/page-box.mkvi b/tex/context/base/page-box.mkvi
index 145f2192b..746944ef3 100644
--- a/tex/context/base/page-box.mkvi
+++ b/tex/context/base/page-box.mkvi
@@ -134,21 +134,21 @@
\fi\fi}
\def\page_boxes_apply_scale#box%
- {\edef\tmp_currentlayout_scale{\layoutparameter\c!scale}%
- \ifdim\tmp_currentlayout_scale\points=\onepoint
- \edef\tmp_currentlayout_sx{\layoutparameter\c!sx}%
- \edef\tmp_currentlayout_sy{\layoutparameter\c!sy}%
- \ifdim\tmp_currentlayout_sx\points=\onepoint
+ {\edef\p_page_layouts_scale{\layoutparameter\c!scale}%
+ \ifdim\p_page_layouts_scale\points=\onepoint
+ \edef\p_page_layouts_sx{\layoutparameter\c!sx}%
+ \edef\p_page_layouts_sy{\layoutparameter\c!sy}%
+ \ifdim\p_page_layouts_sx\points=\onepoint
\ifdim\layoutparameter\c!sy\points=\onepoint
% no scaling done (and no copying either)
\else
- \page_boxes_apply_scale_indeed\tmp_currentlayout_sx\tmp_currentlayout_sy{#box}%
+ \page_boxes_apply_scale_indeed\p_page_layouts_sx\p_page_layouts_sy{#box}%
\fi
\else
- \page_boxes_apply_scale_indeed\tmp_currentlayout_sx\tmp_currentlayout_sy{#box}%
+ \page_boxes_apply_scale_indeed\p_page_layouts_sx\p_page_layouts_sy{#box}%
\fi
\else
- \page_boxes_apply_scale_indeed\tmp_currentlayout_scale\tmp_currentlayout_scale{#box}%
+ \page_boxes_apply_scale_indeed\p_page_layouts_scale\p_page_layouts_scale{#box}%
\fi}
\def\page_boxes_apply_scale_indeed#sx#sy#box%
diff --git a/tex/context/base/page-inf.mkiv b/tex/context/base/page-inf.mkiv
index 4c01e3076..6c220fb31 100644
--- a/tex/context/base/page-inf.mkiv
+++ b/tex/context/base/page-inf.mkiv
@@ -42,7 +42,7 @@
\fi
\the\everysetupversion}
-\unexpanded\def\place_info_place_info % at the bottom of the page
+\unexpanded\def\page_info_place_info % at the bottom of the page
{\csname\??layoutinfo\currentversioninfo\endcsname}
\unexpanded\def\installversioninfo#1#2%
@@ -94,7 +94,7 @@
\settexthoffset
\hsize\dimexpr\scratchdimen-2\texthoffset\relax
\hskip\texthoffset % brrrr
- \vbox to \zeropoint{\vss\place_info_place_info}%
+ \vbox to \zeropoint{\vss\page_info_place_info}%
\vskip\bodyfontsize}%
\dp\b_page_versions\zeropoint
\wd\b_page_versions\scratchdimen
diff --git a/tex/context/base/page-ini.mkiv b/tex/context/base/page-ini.mkiv
index 623ee908e..1550b1405 100644
--- a/tex/context/base/page-ini.mkiv
+++ b/tex/context/base/page-ini.mkiv
@@ -371,18 +371,18 @@
% Mark synchronization
-\newconditional\page_marks_building_successive_pages \settrue\page_marks_building_successive_pages
+\newconditional\c_page_marks_building_successive_pages \settrue\c_page_marks_building_successive_pages
\def\page_marks_synchronize_page#1% box
- {\marking_synchronize[\v!page][#1][\ifconditional\page_marks_building_successive_pages\v!keep\fi]}
+ {\strc_markings_synchronize[\v!page][#1][\ifconditional\c_page_marks_building_successive_pages\v!keep\fi]}
\def\page_marks_synchronize_column#1#2#3#4% first last column box
{\ifnum#3=#1\relax
- \marking_synchronize[\number#3,\v!column:\number#3,\v!first,\v!column:\v!first][#4][]%
+ \strc_markings_synchronize[\number#3,\v!column:\number#3,\v!first,\v!column:\v!first][#4][]%
\else\ifnum#3=#2\relax
- \marking_synchronize[\number#3,\v!column:\number#3,\v!last, \v!column:\v!last ][#4][]%
+ \strc_markings_synchronize[\number#3,\v!column:\number#3,\v!last, \v!column:\v!last ][#4][]%
\else
- \marking_synchronize[\number#3,\v!column:\number#3 ][#4][]%
+ \strc_markings_synchronize[\number#3,\v!column:\number#3 ][#4][]%
\fi\fi}
% Page body building
@@ -402,7 +402,7 @@
\ifcase\pageornamentstate
\page_backgrounds_add_to_paper \pagebox
\fi
- \positions_register_page \pagebox
+ \anch_positions_register_page \pagebox
\ifarrangingpages
\page_boxes_apply_shift_paper \pagebox % \v!paper
\else
diff --git a/tex/context/base/page-lay.mkiv b/tex/context/base/page-lay.mkiv
index a6126b660..ab6633992 100644
--- a/tex/context/base/page-lay.mkiv
+++ b/tex/context/base/page-lay.mkiv
@@ -339,9 +339,9 @@
% \definepapersize[name][settings]
\unexpanded\def\definepapersize
- {\dotripleempty\define_paper_size}
+ {\dotripleempty\page_paper_define_size}
-\def\define_paper_size[#1][#2][#3]%
+\def\page_paper_define_size[#1][#2][#3]%
{\edef\currentlayouttarget{#1}%
\ifx\currentlayouttarget\empty
% invalid target
@@ -367,20 +367,20 @@
\let\page_paper_restore \relax
\unexpanded\def\setuppapersize
- {\dodoubleempty\setup_paper_size}
+ {\dodoubleempty\page_paper_setup_size}
-\unexpanded\def\setup_paper_size[#1][#2]%
+\unexpanded\def\page_paper_setup_size[#1][#2]%
{\iffirstargument
\doifassignmentelse{#1}
- {\setup_paper_size_settings[#1]}
+ {\page_paper_setup_size_settings[#1]}
{\doifassignmentelse{#2}
- {\setup_paper_size_settings_by_name[#1][#2]}
- {\setup_paper_size_change_size[#1][#2]}}%
+ {\page_paper_setup_size_settings_by_name[#1][#2]}
+ {\page_paper_setup_size_change_size[#1][#2]}}%
\else
\page_paper_restore
\fi}
-\unexpanded\def\setup_paper_size_settings[#1]% sometimes used to set paper/print size
+\unexpanded\def\page_paper_setup_size_settings[#1]% sometimes used to set paper/print size
{\let\currentlayouttarget\empty
\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}}%
@@ -391,13 +391,13 @@
\ifx\m_layouttarget_print_saved\m_layouttarget_print
% we didn't change the size, maybe only sx or sy or so
\else
- \setup_paper_size_settings_recalibrate
+ \page_paper_setup_size_settings_recalibrate
\fi
\else
- \setup_paper_size_settings_recalibrate
+ \page_paper_setup_size_settings_recalibrate
\fi}
-\def\setup_paper_size_settings_recalibrate
+\def\page_paper_setup_size_settings_recalibrate
{\ifx\m_layouttarget_paper\empty
% forget about it
\else
@@ -409,16 +409,16 @@
\letlayouttargetparameter\c!page \papersize
\letlayouttargetparameter\c!paper\printpapersize}
-\unexpanded\def\setup_paper_size_settings_by_name[#1][#2]%
+\unexpanded\def\page_paper_setup_size_settings_by_name[#1][#2]%
{\def\currentlayouttarget{\page_paper_the_paper_size{#1}}%
\setuplayouttarget[#2]}
-\unexpanded\def\setup_paper_size_change_size[#1][#2]%
+\unexpanded\def\page_paper_setup_size_change_size[#1][#2]%
{\doifelsenothing{#2}
{\page_paper_set_current[#1][#1]}
{\page_paper_set_current[#1][#2]}}
-\let\setuppaper\setup_paper_size_settings
+\let\setuppaper\page_paper_setup_size_settings
\unexpanded\def\adaptpapersize
{\global\let\page_paper_reinstate\page_paper_reinstate_indeed
@@ -569,6 +569,9 @@
\ifdefined\setups \else \unexpanded\def\setups[#1]{\setdefaultpenalties} \fi % still needed?
\ifdefined\docheckgridsnapping \else \let\docheckgridsnapping\relax \fi
+\let\p_page_layouts_width \empty
+\let\p_page_layouts_height\empty
+
\def\page_layouts_synchronize
{\setups[\layoutparameter\c!preset]%
\global\leftmarginwidth \layoutparameter\c!leftmargin
@@ -588,13 +591,13 @@
\simplesetupblank
\setupinterlinespace[\v!reset]% \synchronizegloballinespecs
\global\cutspace\layoutparameter\c!cutspace\relax
- \edef\layout_parameter_width{\layoutparameter\c!width}%
- \ifx\layout_parameter_width\v!middle
+ \edef\p_page_layouts_width{\layoutparameter\c!width}%
+ \ifx\p_page_layouts_width\v!middle
\ifdim\cutspace=\zeropoint
\global\cutspace\backspace
\fi
\global\makeupwidth\dimexpr\paperwidth-\backspace-\cutspace\relax
- \else\ifx\layout_parameter_width\v!fit
+ \else\ifx\p_page_layouts_width\v!fit
\ifdim\cutspace=\zeropoint
\global\cutspace\backspace
\fi
@@ -610,7 +613,7 @@
-\rightedgedistance -\rightedgewidth
-\scratchdimen\relax
\else
- \global\makeupwidth\layout_parameter_width\relax
+ \global\makeupwidth\p_page_layouts_width\relax
\ifdim\cutspace=\zeropoint
\global\cutspace\dimexpr\paperwidth-\makeupwidth-\backspace\relax
% \else
@@ -627,13 +630,13 @@
\global\bottomspace\layoutparameter\c!bottomspace\relax
\global\layoutlines0\number\layoutparameter\c!lines\relax % may be empty
\ifcase\layoutlines
- \edef\layout_parameter_height{\layoutparameter\c!height}%
- \ifx\layout_parameter_height\v!middle
+ \edef\p_page_layouts_height{\layoutparameter\c!height}%
+ \ifx\p_page_layouts_height\v!middle
\ifdim\bottomspace=\zeropoint
\global\bottomspace\topspace
\fi
\global\makeupheight\dimexpr\paperheight-\topspace-\bottomspace\relax
- \else\ifx\layout_parameter_height\v!fit
+ \else\ifx\p_page_layouts_height\v!fit
\ifdim\bottomspace=\zeropoint
\global\bottomspace\topspace
\fi
@@ -856,7 +859,7 @@
\begingroup % needed ?
\uselayoutstyleandcolor\c!style\c!color
\offinterlineskip
- \page_insert_elements % zero size
+ \page_layouts_insert_elements % zero size
\endgroup
\page_insert_body#1#2}}% including footnotes
@@ -873,9 +876,9 @@
%D \macros
%D {adaptlayout}
-\newdimen\page_adepts_pushed_text_height
-\newdimen\page_adepts_pushed_footer_height
-\newdimen\page_adepts_height
+\newdimen\d_page_adepts_pushed_text_height
+\newdimen\d_page_adepts_pushed_footer_height
+\newdimen\d_page_adepts_height
\unexpanded\def\adaptlayout
{\dodoubleempty\page_adapts_layout}
@@ -895,20 +898,20 @@
{\getparameters[\??za][\c!height=\zeropoint,\c!lines=0,#1]%
\page_adepts_push
\doifelse\@@zaheight\v!max
- {\global\page_adepts_height\footerheight}
- {\global\page_adepts_height\dimexpr
+ {\global\d_page_adepts_height\footerheight}
+ {\global\d_page_adepts_height\dimexpr
\ifnum\@@zalines=\zerocount
\@@zaheight
\else
\@@zalines\openlineheight
\fi
\relax
- \ifdim\page_adepts_height>\footerheight
- \global\page_adepts_height\footerheight
+ \ifdim\d_page_adepts_height>\footerheight
+ \global\d_page_adepts_height\footerheight
\fi}
- \global\advance\textheight \page_adepts_height
- \global\advance\footerheight-\page_adepts_height
- \showmessage\m!layouts1{\the\page_adepts_height,\the\realpageno}%
+ \global\advance\textheight \d_page_adepts_height
+ \global\advance\footerheight-\d_page_adepts_height
+ \showmessage\m!layouts1{\the\d_page_adepts_height,\the\realpageno}%
% this will become a better one (do we need insert correction?)
\setvsize
\global\pagegoal\vsize
@@ -927,12 +930,12 @@
\letvalue{\??za:\the\realpageno}\relax}
\def\page_adepts_push_indeed
- {\global\page_adepts_pushed_text_height \textheight
- \global\page_adepts_pushed_footer_height\footerheight}
+ {\global\d_page_adepts_pushed_text_height \textheight
+ \global\d_page_adepts_pushed_footer_height\footerheight}
\def\page_adepts_pop_indeed
- {\global\textheight \page_adepts_pushed_text_height
- \global\footerheight\page_adepts_pushed_footer_height
+ {\global\textheight \d_page_adepts_pushed_text_height
+ \global\footerheight\d_page_adepts_pushed_footer_height
\page_layouts_synchronize
\global\let\page_adepts_push\page_adepts_push_indeed
\global\let\page_adepts_pop\relax}
@@ -946,7 +949,7 @@
\def\page_adapts_status_info % used elsewhere
{\ifx\page_adepts_pop\relax \else
- \space(adept: \the\page_adepts_height)\space
+ \space(adept: \the\d_page_adepts_height)\space
\fi
\the\realpageno}
diff --git a/tex/context/base/page-lin.mkiv b/tex/context/base/page-lin.mkiv
index 4996ad2b1..f43839441 100644
--- a/tex/context/base/page-lin.mkiv
+++ b/tex/context/base/page-lin.mkiv
@@ -129,7 +129,7 @@
\attribute\linereferenceattribute\linerefcounter
#3%
% for the moment we use a simple system i.e. no prefixes etc .. todo: store as number
- \expanded{\set_named_reference{line}{#2}{conversion=\linenumberparameter\c!conversion}{\the\linerefcounter}}% kind labels userdata text
+ \expanded{\strc_references_set_named_reference{line}{#2}{conversion=\linenumberparameter\c!conversion}{\the\linerefcounter}}% kind labels userdata text
\endgroup}
\def\mkstartlinereference#1{\mksomelinereference{#1}{lr:b:#1}{}\ignorespaces}
diff --git a/tex/context/base/page-mak.mkvi b/tex/context/base/page-mak.mkvi
index 5cd9aa51b..f37c4f613 100644
--- a/tex/context/base/page-mak.mkvi
+++ b/tex/context/base/page-mak.mkvi
@@ -85,8 +85,8 @@
%D The normal variant.
-\newbox \page_makeup_box
-\newtoks\page_makeup_every_setup
+\newbox \b_page_makeup
+\newtoks\t_page_makeup_every_setup
\def\page_makeup_start_yes[#name][#settings]%
{\doifelsenothing{\namedmakeupparameter{#name}\c!page}
@@ -97,11 +97,11 @@
\edef\currentmakeup{#name}%
\setupcurrentmakeup[#settings]%
\setsystemmode\v!makeup
- \the\page_makeup_every_setup
+ \the\t_page_makeup_every_setup
\makeupparameter\c!commands % hm, what is this one doing here ?
\forgetall % else indented flush
\dontcomplain
- \global\setbox\page_makeup_box\vbox to \makeupparameter\c!height \bgroup
+ \global\setbox\b_page_makeup\vbox to \makeupparameter\c!height \bgroup
\usemakeupstyleandcolor\c!style\c!color
\hsize\makeupparameter\c!width
\setupalign[\makeupparameter\c!align]%
@@ -116,12 +116,12 @@
\pushpagestate % new
\makeupparameter\c!before
\relax % to be sure we don't enter the \if
- \ifdim\ht\page_makeup_box>\vsize
- \ht\page_makeup_box\vsize % is already set to \textheight (maybe set dp to 0)
+ \ifdim\ht\b_page_makeup>\vsize
+ \ht\b_page_makeup\vsize % is already set to \textheight (maybe set dp to 0)
\fi
\setuppagenumber[\c!state=\makeupparameter\c!pagestate]%
- \box\page_makeup_box
- \the\page_makeup_every_setup
+ \box\b_page_makeup
+ \the\t_page_makeup_every_setup
\page
\makeupparameter\c!after
\relax % to be sure we don't enter the \if
@@ -137,7 +137,7 @@
\page}
\setvalue{\??makeupdoublesided\v!empty}%
- {\the\page_makeup_every_setup
+ {\the\t_page_makeup_every_setup
% == \page[\v!dummy]
\page[\v!blank]%
\emptyhbox
@@ -153,7 +153,7 @@
\setuptext [\c!state=\makeupparameter\c!textstate]%
\setupbottom[\c!state=\makeupparameter\c!bottomstate]%
\setuptop [\c!state=\makeupparameter\c!topstate]%
-\to \page_makeup_every_setup
+\to \t_page_makeup_every_setup
%D The standard page template is defined as follows:
diff --git a/tex/context/base/page-mbk.mkvi b/tex/context/base/page-mbk.mkvi
index 05e3cb104..ed0b45ad6 100644
--- a/tex/context/base/page-mbk.mkvi
+++ b/tex/context/base/page-mbk.mkvi
@@ -66,30 +66,30 @@
\c!bottom=\vfill]
\unexpanded\def\startmarginblock
- {\dosingleempty\start_margin_block}
+ {\dosingleempty\page_margin_start_block}
-\unexpanded\def\stoptmarginblock
- {\stop_margin_block}
+\unexpanded\def\stopmarginblock
+ {\page_margin_stop_block}
-\def\start_margin_block[#tag]%
+\def\page_margin_start_block[#tag]%
{\begingroup
\edef\currentmarginblock{#tag}%
\doifelse{\marginblockparameter\c!state}\v!start
- \start_margin_block_yes
- \start_margin_block_nop}
+ \page_margin_start_block_yes
+ \page_margin_start_block_nop}
-\def\stop_margin_block
+\def\page_margin_stop_block
{\doifelse{\marginblockparameter\c!state}\v!start
- \stop_margin_block_yes
- \stop_margin_block_nop
+ \page_margin_stop_block_yes
+ \page_margin_stop_block_nop
\endgroup}
-\def\start_margin_block_yes % 2 maal \vbox ivm \unvbox elders
+\def\page_margin_start_block_yes % 2 maal \vbox ivm \unvbox elders
{\showmessage\m!layouts4\empty
- \global\setbox\page_margin_box\vtop\bgroup\vbox\bgroup
+ \global\setbox\b_page_margin\vtop\bgroup\vbox\bgroup
\hsize\marginblockparameter\c!width
- \ifvoid\page_margin_box\else
- \unvbox\page_margin_box
+ \ifvoid\b_page_margin\else
+ \unvbox\b_page_margin
\marginblockparameter\c!inbetween
\fi
\setupalign[\marginblockparameter\c!align]%
@@ -97,40 +97,40 @@
\begstrut
\ignorespaces}
-\def\stop_margin_block_yes
+\def\page_margin_stop_block_yes
{\removeunwantedspaces
\endstrut
\egroup
\egroup}
-\def\start_margin_block_nop
+\def\page_margin_start_block_nop
{\showmessage\m!layouts5\empty
\marginblockparameter\c!before
\bgroup
\usemarginblockstyleandcolor\c!style\c!color}
-\def\stop_margin_block_nop
+\def\page_margin_stop_block_nop
{\egroup
\marginblockparameter\c!after}
-\newbox\page_margin_box
-\newbox\page_margin_prepared_box
+\newbox\b_page_margin
+\newbox\b_page_margin_prepared
\def\page_margin_reshape
- {\ifdim\ht\page_margin_prepared_box>\zeropoint
+ {\ifdim\ht\b_page_margin_prepared>\zeropoint
\beginofshapebox
- \unvbox\page_margin_prepared_box
+ \unvbox\b_page_margin_prepared
\endofshapebox
\reshapebox
{\box\shapebox}%
- \setbox\page_margin_prepared_box\vbox to \textheight
+ \setbox\b_page_margin_prepared\vbox to \textheight
{\marginblockparameter\c!top
\flushshapebox
\marginblockparameter\c!bottom}%
\fi}
\unexpanded\def\checkmarginblocks
- {\ifvoid\page_margin_box \else
+ {\ifvoid\b_page_margin \else
\page_margin_check_indeed
\fi}
@@ -139,24 +139,24 @@
\page_margin_prepare_box
\csname\??marginblocklocation\marginblockparameter\c!location\endcsname
\else
- \global\page_margin_box\emptybox
+ \global\b_page_margin\emptybox
\fi}
\def\page_margin_prepare_box
- {\setbox\page_margin_prepared_box\vbox
+ {\setbox\b_page_margin_prepared\vbox
{\forgetall
\splittopskip\topskip
- \ifvoid\page_margin_box\else
- \ifdim\ht\page_margin_box>\textheight
- \vsplit\page_margin_box to \textheight
+ \ifvoid\b_page_margin\else
+ \ifdim\ht\b_page_margin>\textheight
+ \vsplit\b_page_margin to \textheight
\else
- \unvbox\page_margin_box
+ \unvbox\b_page_margin
\fi
\fi}%
\page_margin_reshape
- \setbox\page_margin_prepared_box\vbox
+ \setbox\b_page_margin_prepared\vbox
{\marginblockparameter\c!before
- \box\page_margin_prepared_box
+ \box\b_page_margin_prepared
\marginblockparameter\c!after}}
\setvalue{\??marginblocklocation\v!left }{\page_margin_set_l_box}
@@ -170,30 +170,30 @@
\page_margin_set_l_box
\page_margin_set_r_box}
-\unexpanded\def\place_r_margin_block_yes
- {\setbox\page_margin_prepared_box\hbox to \rightmarginwidth
+\unexpanded\def\page_margin_place_block_r_yes
+ {\setbox\b_page_margin_prepared\hbox to \rightmarginwidth
{\marginblockparameter\c!left
- \box\page_margin_prepared_box
+ \box\b_page_margin_prepared
\marginblockparameter\c!right}%
- \vsmashbox\page_margin_prepared_box
- \box\page_margin_prepared_box}
+ \vsmashbox\b_page_margin_prepared
+ \box\b_page_margin_prepared}
-\unexpanded\def\place_l_margin_block_yes
- {\setbox\page_margin_prepared_box\hbox to \leftmarginwidth
+\unexpanded\def\page_margin_place_block_l_yes
+ {\setbox\b_page_margin_prepared\hbox to \leftmarginwidth
{\marginblockparameter\c!right
- \box\page_margin_prepared_box
+ \box\b_page_margin_prepared
\marginblockparameter\c!left}%
- \vsmashbox\page_margin_prepared_box
- \box\page_margin_prepared_box}
+ \vsmashbox\b_page_margin_prepared
+ \box\b_page_margin_prepared}
-\unexpanded\def\place_r_margin_block_nop{\hskip\rightmarginwidth}
-\unexpanded\def\place_l_margin_block_nop{\hskip\leftmarginwidth}
+\unexpanded\def\page_margin_place_block_r_nop{\hskip\rightmarginwidth}
+\unexpanded\def\page_margin_place_block_l_nop{\hskip\leftmarginwidth}
-\let\placerightmarginblock\place_r_margin_block_nop
-\let\placeleftmarginblock \place_l_margin_block_nop
+\let\placerightmarginblock\page_margin_place_block_r_nop
+\let\placeleftmarginblock \page_margin_place_block_l_nop
-\def\page_margin_set_r_box{\let\placerightmarginblock\place_r_margin_block_yes}
-\def\page_margin_set_l_box{\let\placeleftmarginblock \place_l_margin_block_yes}
+\def\page_margin_set_r_box{\let\placerightmarginblock\page_margin_place_block_r_yes}
+\def\page_margin_set_l_box{\let\placeleftmarginblock \page_margin_place_block_l_yes}
% margin floats (keyword 'margin' in option list)
@@ -203,15 +203,15 @@
\page_margin_process_float_nop}
\def\page_margin_process_float_yes#options%
- {\global\setbox\page_margin_box\vbox
+ {\global\setbox\b_page_margin\vbox
{\hsize\marginblockparameter\c!width
- \unvcopy\page_margin_box
- \ifvoid\page_margin_box\else
+ \unvcopy\b_page_margin
+ \ifvoid\b_page_margin\else
\expandafter\marginblockparameter\expandafter\c!inbetween
\fi
\box\floatbox
\filbreak}%
- \ifdim\ht\page_margin_box>\textheight
+ \ifdim\ht\b_page_margin>\textheight
% \dosavefloatinfo % no saving done anyway
\else
\doinsertfloatinfo
@@ -231,7 +231,7 @@
\fi}
\appendtoks
- \ifvoid\page_margin_box \else
+ \ifvoid\b_page_margin \else
\writestatus\m!layouts{beware: there are left-over margin floats!}%
\fi
\to \everystoptext
diff --git a/tex/context/base/page-mis.lua b/tex/context/base/page-mis.lua
index d220d0a9e..4f9d3c3e2 100644
--- a/tex/context/base/page-mis.lua
+++ b/tex/context/base/page-mis.lua
@@ -31,7 +31,7 @@ local function setnextpage()
elseif n > 0 then
-- upcoming page (realpageno)
end
- tex.setcount("global","page_postponed_blocks_next_page",n)
+ tex.setcount("global","c_page_postponed_blocks_next_page",n)
end
function commands.flushpostponedblocks(page)
diff --git a/tex/context/base/page-mis.mkiv b/tex/context/base/page-mis.mkiv
index d38068931..98fd78b5f 100644
--- a/tex/context/base/page-mis.mkiv
+++ b/tex/context/base/page-mis.mkiv
@@ -44,8 +44,8 @@
%D is somewhat easier and we also can erase buffers easier when
%D we keep a local cache, especially as we can flush per page.
-\newif \ifinpostponing % prevents nesting
-\newcount\page_postponed_blocks_next_page % set at the lua end
+\newif \ifinpostponing % prevents nesting
+\newcount\c_page_postponed_blocks_next_page % set at the lua end
\unexpanded\setvalue{\e!start\v!postponing}%
{\bgroup
@@ -79,12 +79,12 @@
\def\page_postponed_blocks_flush_indeed
{\ifinpostponing
% probably a nested flush
- \else\ifnum\page_postponed_blocks_next_page=\zerocount
+ \else\ifnum\c_page_postponed_blocks_next_page=\zerocount
% nothing in cache
- \else\ifnum\page_postponed_blocks_next_page<\zerocount
+ \else\ifnum\c_page_postponed_blocks_next_page<\zerocount
% generic cache
\page_postponed_blocks_flush
- \else\ifnum\page_postponed_blocks_next_page>\realpageno
+ \else\ifnum\c_page_postponed_blocks_next_page>\realpageno
% future content
\else
% pending content
diff --git a/tex/context/base/page-mul.mkiv b/tex/context/base/page-mul.mkiv
index b9e8daf7c..2806586b8 100644
--- a/tex/context/base/page-mul.mkiv
+++ b/tex/context/base/page-mul.mkiv
@@ -1586,9 +1586,9 @@
% to be reconsidered ... (in any case they need to be unexpandable sinze 2011.12.30)
-\unexpanded\def\columns_align_option_yes {\stretchcolumnstrue \inheritcolumnsfalse}% todo: new key
-\unexpanded\def\columns_align_option_no {\stretchcolumnsfalse\inheritcolumnsfalse}% todo: new key
-\unexpanded\def\columns_align_option_text{\stretchcolumnsfalse\inheritcolumnstrue }%
+\unexpanded\def\page_columns_align_option_yes {\stretchcolumnstrue \inheritcolumnsfalse}% todo: new key
+\unexpanded\def\page_columns_align_option_no {\stretchcolumnsfalse\inheritcolumnsfalse}% todo: new key
+\unexpanded\def\page_columns_align_option_text{\stretchcolumnsfalse\inheritcolumnstrue }%
\def\complexstartcolumns[#1]% %% \startcolumns
{\bgroup
@@ -1614,9 +1614,9 @@
\doifelse\@@klbalance\v!yes
\balancecolumnstrue
\balancecolumnsfalse
- \installalign\v!yes {\columns_align_option_yes }%
- \installalign\v!no {\columns_align_option_no }%
- \installalign\v!text{\columns_align_option_text}%
+ \installalign\v!yes {\page_columns_align_option_yes }%
+ \installalign\v!no {\page_columns_align_option_no }%
+ \installalign\v!text{\page_columns_align_option_text}%
\stretchcolumnsfalse
\inheritcolumnstrue
\doifsomething\@@klalign{\expanded{\setupalign[\@@klalign]}}%
@@ -1668,7 +1668,7 @@
\c!offset=\v!overlay,
\c!frame=\v!off]
-\newbox\columnspanbox \let\postprocesscolumnspanbox\gobbleoneargument
+\newbox\b_page_columns_span \let\postprocesscolumnspanbox\gobbleoneargument
\def\dostartcolumnspan[#1]%
{\bgroup
@@ -1684,15 +1684,15 @@
\EveryPar{\begstrut\EveryPar{}}} % also !
\def\dofinishcolumnsetspan
- {\setbox\columnspanbox\flushnextbox
- \ifinsidecolumns\wd\columnspanbox\hsize\fi
- \postprocesscolumnspanbox\columnspanbox
- \scratchdimen\ht\columnspanbox
- \setbox\columnspanbox\hbox % depth to be checked, probably option!
- {\localframed[\??ks][\c!offset=\v!overlay]{\box\columnspanbox}}%
- \ht\columnspanbox\scratchdimen
- \dp\columnspanbox\strutdp
- \wd\columnspanbox\hsize
+ {\setbox\b_page_columns_span\flushnextbox
+ \ifinsidecolumns\wd\b_page_columns_span\hsize\fi
+ \postprocesscolumnspanbox\b_page_columns_span
+ \scratchdimen\ht\b_page_columns_span
+ \setbox\b_page_columns_span\hbox % depth to be checked, probably option!
+ {\localframed[\??ks][\c!offset=\v!overlay]{\box\b_page_columns_span}}%
+ \ht\b_page_columns_span\scratchdimen
+ \dp\b_page_columns_span\strutdp
+ \wd\b_page_columns_span\hsize
\ifinsidecolumns
\ifnum\@@ksn>1
\setvsize
@@ -1700,19 +1700,19 @@
{\ifnum\currentcolumn>\@@ksn\else
\global\setbox\currenttopcolumnbox=\vbox
{\ifnum\currentcolumn=1
- \snaptogrid\vbox{\copy\columnspanbox}
+ \snaptogrid\vbox{\copy\b_page_columns_span}
\else
- \snaptogrid\vbox{\vphantom{\copy\columnspanbox}}
+ \snaptogrid\vbox{\vphantom{\copy\b_page_columns_span}}
\fi}%
\wd\currenttopcolumnbox\hsize
\global\advance\vsize -\ht\currenttopcolumnbox
\fi}
\global\pagegoal\vsize
\else
- \snaptogrid\vbox{\box\columnspanbox}
+ \snaptogrid\vbox{\box\b_page_columns_span}
\fi
\else
- \snaptogrid\vbox{\box\columnspanbox}
+ \snaptogrid\vbox{\box\b_page_columns_span}
\fi
\endgraf
\ifvmode\prevdepth\strutdp\fi
diff --git a/tex/context/base/page-one.mkiv b/tex/context/base/page-one.mkiv
index d958fc240..98d82f3a7 100644
--- a/tex/context/base/page-one.mkiv
+++ b/tex/context/base/page-one.mkiv
@@ -116,7 +116,7 @@
\def\OTRONEdopagecontents#1#2% \box<n> \unvbox<n> % this one will be redone (checked)
{\bgroup
- \notes_check_if_bottom_present
+ \strc_notes_check_if_bottom_present
\setbox0\vbox \ifconditional\c_notes_bottom_present to \textheight \fi
{\d_page_one_natural_depth\dp#2\relax
\dotopinsertions
diff --git a/tex/context/base/page-plg.mkiv b/tex/context/base/page-plg.mkiv
index 01f8f42c2..189228f17 100644
--- a/tex/context/base/page-plg.mkiv
+++ b/tex/context/base/page-plg.mkiv
@@ -193,11 +193,11 @@
\unexpanded\def\startpagelayout
{\bgroup
\catcode\endoflineasciicode\ignorecatcode
- \start_page_layout}
+ \page_layouts_start_layout}
\let\stoppagelayout\relax
-\def\start_page_layout[#1]#2\stoppagelayout
+\def\page_layouts_start_layout[#1]#2\stoppagelayout
{\egroup
\setvalue{\??layoutmethod#1}{#2}}
diff --git a/tex/context/base/page-txt.mkvi b/tex/context/base/page-txt.mkvi
index 4d33e6c20..8d2d9c1d3 100644
--- a/tex/context/base/page-txt.mkvi
+++ b/tex/context/base/page-txt.mkvi
@@ -79,9 +79,9 @@
\definelayoutelement[\v!bottom:\v!edge] [\v!bottom][\c!lefttext=,\c!middletext=,\c!righttext=]
\unexpanded\def\setuplayouttext
- {\dotripleempty\setup_layout_text}
+ {\dotripleempty\page_layouts_setup_text}
-\def\setup_layout_text[#vertical][#horizontal][#settings]%
+\def\page_layouts_setup_text[#vertical][#horizontal][#settings]%
{\ifthirdargument
\setuplayoutelement[#vertical:#horizontal][#settings]%
\else
@@ -90,38 +90,38 @@
\appendtoks
\ifx\currentlayoutelement\empty\else
- \synchronize_current_layout_element\currentlayoutelement % brr, can be vertical:horizontal
+ \page_layouts_synchronize_element\currentlayoutelement % brr, can be vertical:horizontal
\fi
\to \everysetuplayoutelement
-\def\reset_layout_element_status#vertical%
- {\expandafter\gdef\csname\??layouttextsreset#vertical\endcsname{\set_layout_element_status_normal#vertical}}
+\def\page_layouts_reset_element_status#vertical%
+ {\expandafter\gdef\csname\??layouttextsreset#vertical\endcsname{\page_layouts_set_element_status_normal#vertical}}
-\def\set_layout_element_status_normal#vertical%
+\def\page_layouts_set_element_status_normal#vertical%
{\global\expandafter\let\csname\namedlayoutelementhash#vertical\c!state\endcsname\v!normal
\global\expandafter\let\csname\??layouttextsreset#vertical\endcsname\relax
- \synchronize_current_layout_element{#vertical}}
+ \page_layouts_synchronize_element{#vertical}}
-\def\synchronize_current_layout_element#vertical%
+\def\page_layouts_synchronize_element#vertical%
{\xdef\previoustextstate{\csname\??layouttextssynchronize#vertical\endcsname}% can be a let
\edef\currenttextstate {\namedlayoutelementparameter{#vertical}\c!state}%
%\writestatus{>>}{[#vertical:\currenttextstate/\previoustextstate]}%
\ifx\currenttextstate\previoustextstate \else
- \synchronize_current_layout_element_indeed{#vertical}%
+ \page_layouts_synchronize_element_indeed{#vertical}%
\fi}
-\def\synchronize_current_layout_element_indeed#vertical%
+\def\page_layouts_synchronize_element_indeed#vertical%
{\ifx\currenttextstate \v!high \calculatevsizes\recalculatebackgrounds \else
\ifx\previoustextstate\v!high \calculatevsizes\recalculatebackgrounds \else
\ifx\currenttextstate \v!none \calculatevsizes\recalculatebackgrounds \else
\ifx\previoustextstate\v!none \calculatevsizes\recalculatebackgrounds \fi\fi\fi\fi
\letgvalue{\??layouttextssynchronize#vertical}\currenttextstate}
-\unexpanded\def\setuptop {\dotripleempty\setup_layout_text[\v!top ]}
-\unexpanded\def\setupheader{\dotripleempty\setup_layout_text[\v!header]}
-\unexpanded\def\setuptext {\dotripleempty\setup_layout_text[\v!text ]}
-\unexpanded\def\setupfooter{\dotripleempty\setup_layout_text[\v!footer]}
-\unexpanded\def\setupbottom{\dotripleempty\setup_layout_text[\v!bottom]}
+\unexpanded\def\setuptop {\dotripleempty\page_layouts_setup_text[\v!top ]}
+\unexpanded\def\setupheader{\dotripleempty\page_layouts_setup_text[\v!header]}
+\unexpanded\def\setuptext {\dotripleempty\page_layouts_setup_text[\v!text ]}
+\unexpanded\def\setupfooter{\dotripleempty\page_layouts_setup_text[\v!footer]}
+\unexpanded\def\setupbottom{\dotripleempty\page_layouts_setup_text[\v!bottom]}
%D We inherit some settings:
@@ -166,36 +166,36 @@
%D \showsetup{setupfootertexts}
%D \showsetup{setupbottomtexts}
-\unexpanded\def\setuptoptexts {\dosixtupleempty\setup_texts[\v!top ]}
-\unexpanded\def\setupheadertexts{\dosixtupleempty\setup_texts[\v!header ]}
-\unexpanded\def\setuptexttexts {\dosixtupleempty\setup_texts[\v!text ]}
-\unexpanded\def\setupfootertexts{\dosixtupleempty\setup_texts[\v!footer ]}
-\unexpanded\def\setupbottomtexts{\dosixtupleempty\setup_texts[\v!bottom ]}
+\unexpanded\def\setuptoptexts {\dosixtupleempty\page_layouts_setup_texts[\v!top ]}
+\unexpanded\def\setupheadertexts{\dosixtupleempty\page_layouts_setup_texts[\v!header ]}
+\unexpanded\def\setuptexttexts {\dosixtupleempty\page_layouts_setup_texts[\v!text ]}
+\unexpanded\def\setupfootertexts{\dosixtupleempty\page_layouts_setup_texts[\v!footer ]}
+\unexpanded\def\setupbottomtexts{\dosixtupleempty\page_layouts_setup_texts[\v!bottom ]}
% todo: \setuplayoutelementtext
% An alternative approach is to have more variables but that does not
% make the code less complex (probably more).
-\def\setup_texts[#vertical][#horizontal][#a][#b][#c][#d]%
+\def\page_layouts_setup_texts[#vertical][#horizontal][#a][#b][#c][#d]%
{\ifsixthargument
\edef\currentlayoutelement{#vertical:#horizontal}%
\setlayoutelementparameter\c!lefttext
- {\process_layout_element_double
+ {\page_layouts_process_element_double
\c!leftstyle \c!leftcolor \c!leftwidth {#a}%
\c!rightstyle\c!rightcolor\c!rightwidth{#d}}%
\setlayoutelementparameter\c!righttext
- {\process_layout_element_double
+ {\page_layouts_process_element_double
\c!rightstyle\c!rightcolor\c!rightwidth{#b}%
\c!leftstyle \c!leftcolor \c!leftwidth {#c}}%
\else\iffifthargument
\edef\currentlayoutelement{#vertical:\v!text}%
\setlayoutelementparameter\c!lefttext
- {\process_layout_element_double
+ {\page_layouts_process_element_double
\c!leftstyle \c!leftcolor \c!leftwidth {#horizontal}%
\c!rightstyle\c!rightcolor\c!rightwidth{#c}}%
\setlayoutelementparameter\c!righttext
- {\process_layout_element_double
+ {\page_layouts_process_element_double
\c!rightstyle\c!rightcolor\c!rightwidth{#a}%
\c!leftstyle \c!leftcolor \c!leftwidth {#b}}%
\else\iffourthargument
@@ -203,13 +203,13 @@
\doifelsenothing{\detokenize{#a}}
{\resetlayoutelementparameter\c!lefttext}
{\setlayoutelementparameter\c!lefttext
- {\process_layout_element_double
+ {\page_layouts_process_element_double
\c!leftstyle\c!leftcolor\c!leftwidth{#a}%
\c!leftstyle\c!leftcolor\c!leftwidth{#a}}}%
\doifelsenothing{\detokenize{#b}}
{\resetlayoutelementparameter\c!righttext}
{\setlayoutelementparameter\c!righttext
- {\process_layout_element_double
+ {\page_layouts_process_element_double
\c!rightstyle\c!rightcolor\c!rightwidth{#b}%
\c!rightstyle\c!rightcolor\c!rightwidth{#b}}}%
\else\ifthirdargument
@@ -217,13 +217,13 @@
\doifelsenothing{\detokenize{#horizontal}}
{\resetlayoutelementparameter\c!lefttext}
{\setlayoutelementparameter\c!lefttext
- {\process_layout_element_double
+ {\page_layouts_process_element_double
\c!leftstyle\c!leftcolor\c!leftwidth{#horizontal}%
\c!leftstyle\c!leftcolor\c!leftwidth{#horizontal}}}%
\doifelsenothing{\detokenize{#a}}
{\resetlayoutelementparameter\c!righttext}
{\setlayoutelementparameter\c!righttext
- {\process_layout_element_double
+ {\page_layouts_process_element_double
\c!rightstyle\c!rightcolor\c!rightwidth{#a}%
\c!rightstyle\c!rightcolor\c!rightwidth{#a}}}%
\else\ifsecondargument
@@ -233,7 +233,7 @@
\doifelsenothing{\detokenize{#horizontal}}
{\resetlayoutelementparameter\c!middletext}
{\setlayoutelementparameter\c!middletext
- {\process_layout_element_single\c!style\c!color\c!width{#horizontal}}}%
+ {\page_layouts_process_element_single\c!style\c!color\c!width{#horizontal}}}%
\else
\edef\currentlayoutelement{#vertical:\v!text}%
\resetlayoutelementparameter\c!lefttext
@@ -252,96 +252,100 @@
%D Left and right texts are swapped on odd and even pages, but
%D only when double sided typesetting is enabled.
-\unexpanded\def\process_layout_element_double
+\unexpanded\def\page_layouts_process_element_double
{\doifoddpageelse
- \process_layout_element_double_odd
- \process_layout_element_double_even}
+ \page_layouts_process_element_double_odd
+ \page_layouts_process_element_double_even}
-\def\process_layout_element_double_odd #lstyle#lcolor#lwidth#lcontent#rstyle#rcolor#rwidth#rcontent%
- {\process_layout_element_single#lstyle#lcolor#lwidth{#lcontent}}
+\def\page_layouts_process_element_double_odd #lstyle#lcolor#lwidth#lcontent#rstyle#rcolor#rwidth#rcontent%
+ {\page_layouts_process_element_single#lstyle#lcolor#lwidth{#lcontent}}
-\def\process_layout_element_double_even#lstyle#color#lwidth#lcontent#rstyle#rcolor#rwidth#rcontent%
- {\process_layout_element_single#rstyle#rcolor#rwidth{#rcontent}}
+\def\page_layouts_process_element_double_even#lstyle#color#lwidth#lcontent#rstyle#rcolor#rwidth#rcontent%
+ {\page_layouts_process_element_single#rstyle#rcolor#rwidth{#rcontent}}
%D The next macro will be cleaned up and made less messy and
%D dependent.
-\unexpanded\def\process_layout_element_single#style#color#width#content%
- {\edef\layout_element_content{\detokenize{#content}}%
- \ifx\layout_element_content\empty
+\let\m_page_layouts_element_content\empty
+
+\unexpanded\def\page_layouts_process_element_single#style#color#width#content%
+ {\edef\m_page_layouts_element_content{\detokenize{#content}}%
+ \ifx\m_page_layouts_element_content\empty
% should not happen too often
\else
- \process_layout_element_single_indeed#style#color#width{#content}%
+ \page_layouts_process_element_single_indeed#style#color#width{#content}%
\fi}
\setvalue{\??layouttextstrut\v!yes}{\setstrut\strut} % maybe more variants
-\def\process_layout_element_single_indeed#style#color#width#content%
+\def\page_layouts_process_element_single_indeed#style#color#width#content%
{\begingroup
\uselayoutelementstyleandcolor#style#color%
\csname\??layouttextstrut\layoutelementparameter\c!strut\endcsname
- \ifcsname\??layouttextspecial\layout_element_content\endcsname
- \csname\??layouttextspecial\layout_element_content\endcsname
+ \ifcsname\??layouttextspecial\m_page_layouts_element_content\endcsname
+ \csname\??layouttextspecial\m_page_layouts_element_content\endcsname
\else
\edef\currentlayoutelementwidth{\layoutelementparameter#width}%
\ifx\currentlayoutelementwidth\empty
- \expandafter\process_layout_element_single_normal
+ \expandafter\page_layouts_process_element_single_normal
\else
- \expandafter\process_layout_element_single_limited
+ \expandafter\page_layouts_process_element_single_limited
\fi{#content}%
\fi
\endgroup}
% {}{}{} prevents lookahead issues ... this will go away
-\def\process_layout_element_single_normal#content%
- {\doifelsemarking\layout_element_content
- {\getmarking[\layout_element_content][\v!first]}
+\def\page_layouts_process_element_single_normal#content%
+ {\doifelsemarking\m_page_layouts_element_content
+ {\getmarking[\m_page_layouts_element_content][\v!first]}
{\ignorecrlf#content{}{}{}}}
-\def\process_layout_element_single_limited#content%
+\def\page_layouts_process_element_single_limited#content%
{\doifelsemarking\ascii
- {\limitatetext{\getmarking[\layout_element_content][\v!first]}\currentlayoutelementwidth\unknown}
+ {\limitatetext{\getmarking[\m_page_layouts_element_content][\v!first]}\currentlayoutelementwidth\unknown}
{\ignorecrlf\limitatetext{#content{}{}{}}\currentlayoutelementwidth\unknown}}
-\setvalue{\??layouttextspecial\v!pagenumber}{\place_layout_page_number}
+\setvalue{\??layouttextspecial\v!pagenumber}{\page_layouts_place_page_number}
\setvalue{\??layouttextspecial\v!date }{\currentdate}
%D When specified, the texts are automatically limited in
%D length.
-\def\limitate_layout_element_text#width%
- {\edef\currentlayoutelementwidth{\layoutelementparameter#width}%
- \ifx\currentlayoutelementwidth\empty
- \expandafter\firstofoneargument
- \else
- \expandafter\limitate_layout_element_text_indeed
- \fi}
-
-\def\limitate_layout_element_text_indeed#content%
- {\limitatetext{#content}\currentlayoutelementwidth\unknown}
+% % where used ?
+%
+% \def\page_layouts_limitate_element_text#width%
+% {\edef\currentlayoutelementwidth{\layoutelementparameter#width}%
+% \ifx\currentlayoutelementwidth\empty
+% \expandafter\firstofoneargument
+% \else
+% \expandafter\page_layouts_limitate_element_text_indeed
+% \fi}
+%
+% \def\page_layouts_limitate_element_text_indeed#content%
+% {\limitatetext{#content}\currentlayoutelementwidth\unknown}
%D The placement of text is hooked into the token lists
%D associated to the area at hand.
-\appendtoks \place_layout_text_line\v!top \topheight \to \toptextcontent
-\appendtoks \place_layout_text_line\v!header\headerheight \to \headertextcontent
-\appendtoks \place_layout_text_line\v!text \textheight \to \texttextcontent
-\appendtoks \place_layout_text_line\v!footer\footerheight \to \footertextcontent
-\appendtoks \place_layout_text_line\v!bottom\bottomheight \to \bottomtextcontent
+\appendtoks \page_layouts_place_text_line\v!top \topheight \to \toptextcontent
+\appendtoks \page_layouts_place_text_line\v!header\headerheight \to \headertextcontent
+\appendtoks \page_layouts_place_text_line\v!text \textheight \to \texttextcontent
+\appendtoks \page_layouts_place_text_line\v!footer\footerheight \to \footertextcontent
+\appendtoks \page_layouts_place_text_line\v!bottom\bottomheight \to \bottomtextcontent
%D Texts can be disabled, moved up and ignored, depending in
%D the \type {status} variable. This is handled by the next
%D couple of macros.
-\newcount\layout_element_state_n
+\newcount\c_page_layouts_element_state_n
-\def\set_layout_element_status#vertical%
- {\layout_element_state_n=0\namedlayoutelementparameter#vertical\c!n\relax
- \ifcase\layout_element_state_n
+\def\page_layouts_set_element_status#vertical%
+ {\c_page_layouts_element_state_n=0\namedlayoutelementparameter#vertical\c!n\relax
+ \ifcase\c_page_layouts_element_state_n
\edef\textlinestatus{\namedlayoutelementparameter#vertical\c!state}%
\else
- \setxvalue{\namedlayoutelementhash#vertical\c!n}{\the\numexpr\layout_element_state_n+\minusone}%
+ \setxvalue{\namedlayoutelementhash#vertical\c!n}{\the\numexpr\c_page_layouts_element_state_n+\minusone}%
\let\textlinestatus\v!stop
\fi}
@@ -350,8 +354,8 @@
\doifinset\v!footer\floatspecification{\setxvalue{\namedlayoutelementhash\v!footer\c!n}{1}}%
\to \everybeforeflushedpagefloat
-\unexpanded\def\place_layout_text_line#vertical%
- {\set_layout_element_status#vertical%
+\unexpanded\def\page_layouts_place_text_line#vertical%
+ {\page_layouts_set_element_status#vertical%
\csname\??layouttextsline\ifcsname\??layouttextsline\textlinestatus\endcsname\textlinestatus\else\s!unknown\fi\endcsname#vertical}
\unexpanded\def\doifelselayouttextline#vertical% shown or not
@@ -376,39 +380,39 @@
\newconditional\resyncaftertextline
-\setvalue{\??layouttextsline\v!normal}{\place_layout_text_line_indeed}
-\setvalue{\??layouttextsline\empty }{\place_layout_text_line_indeed}
+\setvalue{\??layouttextsline\v!normal}{\page_layouts_place_text_line_indeed}
+\setvalue{\??layouttextsline\empty }{\page_layouts_place_text_line_indeed}
\letvalue{\??layouttextsline\v!none}\gobbletwoarguments
\letvalue{\??layouttextsline\v!stop}\gobbletwoarguments
\setvalue{\??layouttextsline\v!high}#vertical#height%
{\global\settrue\resyncaftertextline
- \reset_layout_element_status#vertical}
+ \page_layouts_reset_element_status#vertical}
\setvalue{\??layouttextsline\v!empty}#vertical#height%
- {\reset_layout_element_status#vertical}
+ {\page_layouts_reset_element_status#vertical}
\setvalue{\??layouttextsline\v!start}#vertical#height%
- {\reset_layout_element_status#vertical%
- \place_layout_text_line_indeed#vertical#height}
+ {\page_layouts_reset_element_status#vertical%
+ \page_layouts_place_text_line_indeed#vertical#height}
\setvalue{\??layouttextsline\v!nomarking}#vertical#height%
{\bgroup
- \reset_layout_element_status#vertical%
+ \page_layouts_reset_element_status#vertical%
\settrue\inhibitgetmarking
- \place_layout_text_line_indeed#vertical#height%
+ \page_layouts_place_text_line_indeed#vertical#height%
\egroup}
\setvalue{\??layouttextsline\s!unknown}#vertical#height%
{\global\settrue\resyncaftertextline
\begingroup % new
- \reset_layout_element_status#vertical%
+ \page_layouts_reset_element_status#vertical%
\csname\namedlayoutelementhash#vertical\textlinestatus\endcsname
\csname\namedlayoutelementhash#vertical\v!text \textlinestatus\endcsname
\csname\namedlayoutelementhash#vertical\v!margin\textlinestatus\endcsname
\csname\namedlayoutelementhash#vertical\v!edge \textlinestatus\endcsname
- \place_layout_text_line_indeed#vertical#height%
+ \page_layouts_place_text_line_indeed#vertical#height%
\endgroup}
%D The following macro has to be called after a page
@@ -422,37 +426,37 @@
\csname\??layouttextsreset\v!bottom\endcsname
\ifconditional\resyncaftertextline
\calculateglobalvsizes
- \recalculatebackgrounds
+ \page_backgrounds_recalculate
\global\setfalse\resyncaftertextline
\fi}
% \settext[header][text][middle][xxx][yyy]
\def\settextcontent
- {\doquintupleempty\set_text_content}
+ {\doquintupleempty\page_layouts_set_text_content}
-\def\set_text_content[#vertical][#horizontal][#one][#two][#three]% header text middle text/text
+\def\page_layouts_set_text_content[#vertical][#horizontal][#one][#two][#three]% header text middle text/text
{\iffifthargument
\setvalue{\namedlayoutelementhash{#vertical:#horizontal}\executeifdefined{\??layouttextcontent\c!text:#one}\c!middletext}%
- {\process_layout_element_double
+ {\page_layouts_process_element_double
\c!leftstyle \c!leftcolor \c!leftwidth {#two}%
\c!rightstyle\c!rightcolor\c!rightwidth{#three}}%
\else\iffourthargument
\setvalue{\namedlayoutelementhash{#vertical:#horizontal}\executeifdefined{\??layouttextcontent\c!text:#one}\c!middletext}%
- {\process_layout_element_double
+ {\page_layouts_process_element_double
\c!leftstyle \c!leftcolor \c!leftwidth {#two}%
\c!rightstyle\c!rightcolor\c!rightwidth{#two}}%
\else\ifthirdargument
\setvalue{\namedlayoutelementhash{#vertical:#horizontal}\c!middletext}%
- {\process_layout_element_double
+ {\page_layouts_process_element_double
\c!leftstyle \c!leftcolor \c!leftwidth {#one}%
\c!rightstyle\c!rightcolor\c!rightwidth{#one}}%
\fi\fi\fi}
\def\resettextcontent
- {\dotripleempty\reset_text_content}
+ {\dotripleempty\page_layouts_reset_text_content}
-\def\reset_text_content[#vertical][#horizontal][#tag]% header text middle
+\def\page_layouts_reset_text_content[#vertical][#horizontal][#tag]% header text middle
{\edef\currentlayoutelement{#vertical:#horizontal}%
\ifthirdargument
\letvalueempty{\layoutelementhash\executeifdefined{\??layouttextcontent\c!text:#tag}\c!middletext}%
@@ -472,15 +476,15 @@
\def\ignoredlinebreak{\unskip\space\ignorespaces}
-\def\place_layout_text_line_indeed#vertical#height%
+\def\page_layouts_place_text_line_indeed#vertical#height%
{\let\currentlayouttextline#vertical%
\ifdim#height>\zeropoint\relax % prevents pagenumbers when zero height
- \place_layout_text_line_left_or_right{#height}%
+ \page_layouts_place_text_line_left_or_right{#height}%
\fi}
-\def\place_layout_text_line_left_or_right#height%
+\def\page_layouts_place_text_line_left_or_right#height%
{\goleftonpage
- \setbox\layout_element_box\vbox to #height
+ \setbox\b_page_layouts_element\vbox to #height
{\vsize#height\relax
%\hsize\zeropoint % hack so that e.g. after=\hairline gives predictable results
\hsize\totaltextwidth
@@ -489,99 +493,99 @@
\let\crlf\ignoredlinebreak
\namedlayoutelementparameter\currentlayouttextline\c!before
\doifbothsidesoverruled
- \place_layout_text_line_right
- \place_layout_text_line_right
- \place_layout_text_line_left
+ \page_layouts_place_text_line_right
+ \page_layouts_place_text_line_right
+ \page_layouts_place_text_line_left
\namedlayoutelementparameter\currentlayouttextline\c!after
\kern\zeropoint}% keep the \dp, beware of \vtops, never change this!
- \dp\layout_element_box\zeropoint
- \box\layout_element_box
+ \dp\b_page_layouts_element\zeropoint
+ \box\b_page_layouts_element
\vskip-#height\relax}
-\let\extra_at_margin_left \plusone
-\let\extra_at_margin_right\plustwo
+\let\page_layouts_extra_at_margin_left \plusone
+\let\page_layouts_extra_at_margin_right\plustwo
-\let\place_layout_extra_text_left \relax % historic
-\let\place_layout_extra_text_right\relax % historic
+\let\page_layouts_place_extra_text_left \relax % historic
+\let\page_layouts_place_extra_text_right\relax % historic
-\def\place_layout_text_line_right
+\def\page_layouts_place_text_line_right
{\hbox
{\ifdim\leftedgewidth>\zeropoint
- \place_left_edge_layout_element\c!lefttext
+ \page_layouts_left_edge_element\c!lefttext
\fi
\ifdim\leftmarginwidth>\zeropoint
- \place_left_margin_layout_element\c!lefttext\extra_at_margin_left
+ \page_layouts_left_margin_element\c!lefttext\page_layouts_extra_at_margin_left
\fi
\ifdim\makeupwidth>\zeropoint
- \place_text_body_layout_element\c!lefttext\c!middletext\c!righttext\extra_at_margin_left
+ \page_layouts_text_body_element\c!lefttext\c!middletext\c!righttext\page_layouts_extra_at_margin_left
\fi
\ifdim\rightmarginwidth>\zeropoint
- \place_right_margin_layout_element\c!righttext\extra_at_margin_left
+ \page_layouts_right_margin_element\c!righttext\page_layouts_extra_at_margin_left
\fi
\ifdim\rightedgewidth>\zeropoint
- \place_right_edge_layout_element\c!lefttext
+ \page_layouts_right_edge_element\c!lefttext
\fi}}
-\def\place_layout_text_line_left
+\def\page_layouts_place_text_line_left
{\hbox
{\ifdim\leftedgewidth>\zeropoint
- \place_left_edge_layout_element\c!righttext
+ \page_layouts_left_edge_element\c!righttext
\fi
\ifdim\leftmarginwidth>\zeropoint
- \place_left_margin_layout_element\c!righttext\extra_at_margin_right
+ \page_layouts_left_margin_element\c!righttext\page_layouts_extra_at_margin_right
\fi
\ifdim\makeupwidth>\zeropoint
- \place_text_body_layout_element\c!righttext\c!middletext\c!lefttext\extra_at_margin_right
+ \page_layouts_text_body_element\c!righttext\c!middletext\c!lefttext\page_layouts_extra_at_margin_right
\fi
\ifdim\rightmarginwidth>\zeropoint
- \place_right_margin_layout_element\c!lefttext\extra_at_margin_right
+ \page_layouts_right_margin_element\c!lefttext\page_layouts_extra_at_margin_right
\fi
\ifdim\rightedgewidth>\zeropoint
- \place_right_edge_layout_element\c!righttext
+ \page_layouts_right_edge_element\c!righttext
\fi}}
-\def\place_left_edge_layout_element#parameter%
+\def\page_layouts_left_edge_element#parameter%
{\edef\currentlayoutelement{\currentlayouttextline:\v!edge}%
- \place_layout_element_indeed\leftedgewidth
+ \page_layouts_place_element_indeed\leftedgewidth
{\hss\layoutelementparameter#parameter}%
\hskip\leftedgedistance}
-\def\place_left_margin_layout_element#parameter#extrastate%
+\def\page_layouts_left_margin_element#parameter#extrastate%
{\edef\currentlayoutelement{\currentlayouttextline:\v!margin}%
- \place_layout_element_indeed\leftmarginwidth
+ \page_layouts_place_element_indeed\leftmarginwidth
{\hbox to \leftmarginwidth{\hss\layoutelementparameter#parameter}%
- \ifnum#extrastate=\extra_at_margin_left
+ \ifnum#extrastate=\page_layouts_extra_at_margin_left
\hskip-\leftmarginwidth
\hbox to \leftmarginwidth{\hss\layoutelementparameter\c!margintext}%
\fi}%
\hskip\leftmargindistance}
-\def\place_text_body_layout_element#left#middle#right#extrastate%
+\def\page_layouts_text_body_element#left#middle#right#extrastate%
{\edef\currentlayoutelement{\currentlayouttextline:\v!text}%
- \place_layout_element_indeed\makeupwidth
- {\hbox to \makeupwidth{\ifnum#extrastate=\extra_at_margin_left\place_layout_extra_text_left\fi\layoutelementparameter#left\hss}%
+ \page_layouts_place_element_indeed\makeupwidth
+ {\hbox to \makeupwidth{\ifnum#extrastate=\page_layouts_extra_at_margin_left\page_layouts_place_extra_text_left\fi\layoutelementparameter#left\hss}%
\hskip-\makeupwidth
\hbox to \makeupwidth{\hss\layoutelementparameter#middle\hss}%
\hskip-\makeupwidth
- \hbox to \makeupwidth{\hss\layoutelementparameter#right\ifnum#extrastate=\extra_at_margin_right\place_layout_extra_text_right\fi}}}
+ \hbox to \makeupwidth{\hss\layoutelementparameter#right\ifnum#extrastate=\page_layouts_extra_at_margin_right\page_layouts_place_extra_text_right\fi}}}
-\def\place_right_margin_layout_element#parameter#extrastate%
+\def\page_layouts_right_margin_element#parameter#extrastate%
{\edef\currentlayoutelement{\currentlayouttextline:\v!margin}%
\hskip\rightmargindistance
- \place_layout_element_indeed\rightmarginwidth
+ \page_layouts_place_element_indeed\rightmarginwidth
{\hbox to \rightmarginwidth{\layoutelementparameter#parameter\hss}%
- \ifnum#extrastate=\extra_at_margin_right
+ \ifnum#extrastate=\page_layouts_extra_at_margin_right
\hskip-\rightmarginwidth
\hbox to \rightmarginwidth{\layoutelementparameter\c!margintext\hss}%
\fi}}
-\def\place_right_edge_layout_element#parameter%
+\def\page_layouts_right_edge_element#parameter%
{\edef\currentlayoutelement{\currentlayouttextline:\v!edge}%
\hskip\rightedgedistance
- \place_layout_element_indeed\rightedgewidth
+ \page_layouts_place_element_indeed\rightedgewidth
{\layoutelementparameter#parameter\hss}}
-\def\place_layout_element_indeed#width#content%
+\def\page_layouts_place_element_indeed#width#content%
{\vbox % to \vsize
{\hsize#width\relax
\layoutelementparameter\c!before
@@ -633,24 +637,24 @@
%D \stoptyping
\unexpanded\def\definetext
- {\doseventupleempty\define_text}
+ {\doseventupleempty\page_layouts_define_text}
-\def\define_text[#tag][#vertical][#horizontal][#a][#b][#c][#d]%
+\def\page_layouts_define_text[#tag][#vertical][#horizontal][#a][#b][#c][#d]%
{\ifseventhargument
\setvalue{\namedlayoutelementhash{#vertical:#horizontal}#tag}%
- {\dosixtupleempty\setup_texts[#vertical][#horizontal][#a][#b][#c][#d]}%
+ {\dosixtupleempty\page_layouts_setup_texts[#vertical][#horizontal][#a][#b][#c][#d]}%
\else\ifsixthargument
\setvalue{\namedlayoutelementhash{#vertical}#tag}%
- {\dosixtupleempty\setup_texts[#vertical][#horizontal][#a][#b][#c]}%
+ {\dosixtupleempty\page_layouts_setup_texts[#vertical][#horizontal][#a][#b][#c]}%
\else\iffifthargument
\setvalue{\namedlayoutelementhash{#vertical:#horizontal}#tag}%
- {\dosixtupleempty\setup_texts[#vertical][#horizontal][#a][#b]}%
+ {\dosixtupleempty\page_layouts_setup_texts[#vertical][#horizontal][#a][#b]}%
\else\iffourthargument
\setvalue{\namedlayoutelementhash{#vertical}#tag}%
- {\dosixtupleempty\setup_texts[#vertical][#horizontal][#a]}%
+ {\dosixtupleempty\page_layouts_setup_texts[#vertical][#horizontal][#a]}%
\else
\setvalue{\namedlayoutelementhash{#vertical}#tag}%
- {\dosixtupleempty\setup_texts[#vertical][#horizontal]}%
+ {\dosixtupleempty\page_layouts_setup_texts[#vertical][#horizontal]}%
\fi\fi\fi\fi}
%D A few more page breakers:
@@ -683,74 +687,74 @@
% associated. This is a rather messy test but better than the MkII
% way where we use states and keep settings.
-\let\layout_page_number_location \relax
-\let\layout_page_number_location_v\relax
-\let\layout_page_number_location_h\relax
-\let\layout_page_number_location_x\relax
+\let\m_page_layouts_page_number_location_ \relax
+\let\m_page_layouts_page_number_location__v\relax
+\let\m_page_layouts_page_number_location__h\relax
+\let\m_page_layouts_page_number_location__x\relax
-\def\place_layout_page_number % also elsewhere .. beware, not \unexpanded else
+\def\page_layouts_place_page_number % also elsewhere .. beware, not \unexpanded else
{\placelocationpagenumber} % test below fails
-\def\reset_layout_page_number_location
- {\ifx\layout_page_number_location_v\relax\else
- \edef\currentlayoutelement{\layout_page_number_location_v:\layout_page_number_location_h}%
- \edef\previous_page_number_locator{\detokenizedlayoutelementparameter\layout_page_number_location_x}%
- \doif{\meaning\previous_page_number_locator}{\meaning\place_layout_page_number}
- {\resetlayoutelementparameter\layout_page_number_location_x}%
+\def\page_layouts_reset_page_number_location
+ {\ifx\m_page_layouts_page_number_location__v\relax\else
+ \edef\currentlayoutelement{\m_page_layouts_page_number_location__v:\m_page_layouts_page_number_location__h}%
+ \edef\page_layouts_previous_page_number_locator{\detokenizedlayoutelementparameter\m_page_layouts_page_number_location__x}%
+ \doif{\meaning\page_layouts_previous_page_number_locator}{\meaning\page_layouts_place_page_number}
+ {\resetlayoutelementparameter\m_page_layouts_page_number_location__x}%
\fi}
-\def\set_layout_page_number_location
- {\edef\currentlayoutelement{\layout_page_number_location_v:\layout_page_number_location_h}%
- \letlayoutelementparameter\layout_page_number_location_x\place_layout_page_number
- \ifx\layout_page_number_location_x\c!marginedgetext
- \let\place_layout_extra_text_left \place_layout_page_number_left
- \let\place_layout_extra_text_right\place_layout_page_number_right
+\def\page_layouts_set_page_number_location
+ {\edef\currentlayoutelement{\m_page_layouts_page_number_location__v:\m_page_layouts_page_number_location__h}%
+ \letlayoutelementparameter\m_page_layouts_page_number_location__x\page_layouts_place_page_number
+ \ifx\m_page_layouts_page_number_location__x\c!marginedgetext
+ \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\place_layout_extra_text_left \relax
- \let\place_layout_extra_text_right\relax
+ \let\page_layouts_place_extra_text_left \relax
+ \let\page_layouts_place_extra_text_right\relax
\fi}
-\def\identify_layout_page_number_location
- {\let\layout_page_number_location_v\v!footer
- \let\layout_page_number_location_h\v!text
- \let\layout_page_number_location_x\c!middletext
+\def\page_layouts_identify_page_number_location
+ {\let\m_page_layouts_page_number_location__v\v!footer
+ \let\m_page_layouts_page_number_location__h\v!text
+ \let\m_page_layouts_page_number_location__x\c!middletext
\processallactionsinset[\@@nmlocation]
- [ \v!header=>\let\layout_page_number_location_v\v!header,
- \v!footer=>\let\layout_page_number_location_v\v!footer,
- \v!middle=>\let\layout_page_number_location_h\v!text
- \let\layout_page_number_location_x\c!middletext,
- \v!left=>\let\layout_page_number_location_h\v!text
- \let\layout_page_number_location_x\c!lefttext,
- \v!right=>\let\layout_page_number_location_h\v!text
- \let\layout_page_number_location_x\c!righttext,
- \v!inleft=>\let\layout_page_number_location_h\v!margin
- \let\layout_page_number_location_x\c!lefttext,
- \v!inright=>\let\layout_page_number_location_h\v!margin
- \let\layout_page_number_location_x\c!righttext,
- \v!inmargin=>\let\layout_page_number_location_h\v!margin
- \def\layout_page_number_location_x{\ifdoublesided\c!margintext\else\c!righttext\fi},
- \v!margin=>\let\layout_page_number_location_h\v!margin
- \def\layout_page_number_location_x{\ifdoublesided\c!margintext\else\c!righttext\fi},
- \v!atmargin=>\let\layout_page_number_location_h\v!text
- \let\layout_page_number_location_x\c!marginedgetext,
- \v!marginedge=>\let\layout_page_number_location_h\v!text
- \let\layout_page_number_location_x\c!marginedgetext]}
+ [ \v!header=>\let\m_page_layouts_page_number_location__v\v!header,
+ \v!footer=>\let\m_page_layouts_page_number_location__v\v!footer,
+ \v!middle=>\let\m_page_layouts_page_number_location__h\v!text
+ \let\m_page_layouts_page_number_location__x\c!middletext,
+ \v!left=>\let\m_page_layouts_page_number_location__h\v!text
+ \let\m_page_layouts_page_number_location__x\c!lefttext,
+ \v!right=>\let\m_page_layouts_page_number_location__h\v!text
+ \let\m_page_layouts_page_number_location__x\c!righttext,
+ \v!inleft=>\let\m_page_layouts_page_number_location__h\v!margin
+ \let\m_page_layouts_page_number_location__x\c!lefttext,
+ \v!inright=>\let\m_page_layouts_page_number_location__h\v!margin
+ \let\m_page_layouts_page_number_location__x\c!righttext,
+ \v!inmargin=>\let\m_page_layouts_page_number_location__h\v!margin
+ \def\m_page_layouts_page_number_location__x{\ifdoublesided\c!margintext\else\c!righttext\fi},
+ \v!margin=>\let\m_page_layouts_page_number_location__h\v!margin
+ \def\m_page_layouts_page_number_location__x{\ifdoublesided\c!margintext\else\c!righttext\fi},
+ \v!atmargin=>\let\m_page_layouts_page_number_location__h\v!text
+ \let\m_page_layouts_page_number_location__x\c!marginedgetext,
+ \v!marginedge=>\let\m_page_layouts_page_number_location__h\v!text
+ \let\m_page_layouts_page_number_location__x\c!marginedgetext]}
\unexpanded\def\dosetpagenumberlocation
- {\ifx\@@nmlocation\layout_page_number_location
+ {\ifx\@@nmlocation\m_page_layouts_page_number_location_
% unchanged
\else
- \let\layout_page_number_location\@@nmlocation
- \reset_layout_page_number_location
+ \let\m_page_layouts_page_number_location_\@@nmlocation
+ \page_layouts_reset_page_number_location
\ifx\@@nmlocation\empty
% set otherwise
\else
- \identify_layout_page_number_location
- \set_layout_page_number_location
+ \page_layouts_identify_page_number_location
+ \page_layouts_set_page_number_location
\fi
\fi}
-\def\place_layout_page_number_left % historic
+\def\page_layouts_place_page_number_left % historic
{\begingroup
\setbox\scratchbox\normalhbox{\ignorespaces\layoutelementparameter\c!marginedgetext\removeunwantedspaces}%
\ifzeropt\wd\scratchbox\else
@@ -760,7 +764,7 @@
\fi
\endgroup}
-\def\place_layout_page_number_right % historic
+\def\page_layouts_place_page_number_right % historic
{\begingroup
\setbox\scratchbox\normalhbox{\ignorespaces\layoutelementparameter\c!marginedgetext\removeunwantedspaces}%
\ifzeropt\wd\scratchbox\else
@@ -776,15 +780,15 @@
% the next macros will be redone (less boxing)
-\newbox\layout_element_box
+\newbox\b_page_layouts_element
-\def\page_insert_elements
+\def\page_layouts_insert_elements
{\ifcase\pageornamentstate
- \place_layout_elements_indeed
+ \page_layouts_place_elements_indeed
\fi}
-\def\place_layout_elements_indeed
- {\setbox\layout_element_box\vbox
+\def\page_layouts_place_elements_indeed
+ {\setbox\b_page_layouts_element\vbox
{\dontcomplain
\calculatereducedvsizes
\swapmargins
@@ -794,7 +798,7 @@
\vskip\dimexpr\topheight+\topdistance\relax
\the\headertextcontent
\vskip\dimexpr\headerheight+\headerdistance\relax
- \positions_place_anchors
+ \anch_positions_place_anchors
\vskip-\textheight
\the\texttextcontent
\vskip\textheight
@@ -805,11 +809,11 @@
\the\bottomtextcontent
\vskip\bottomheight
\vfilll}%
- \smashbox\layout_element_box
- \box\layout_element_box}
+ \smashbox\b_page_layouts_element
+ \box\b_page_layouts_element}
\def\page_insert_body#1#2%
- {\setbox\layout_element_box\vbox
+ {\setbox\b_page_layouts_element\vbox
{\offinterlineskip
\calculatereducedvsizes
\calculatehsizes
@@ -830,10 +834,10 @@
\fi
\endgroup
\mkprocesspagecontents{#2}%
- \settextpagecontent\layout_element_box{#1}{#2}%
- \page_backgrounds_add_to_text\layout_element_box
- \page_grids_add_to_box\layout_element_box
- \box\layout_element_box
+ \settextpagecontent\b_page_layouts_element{#1}{#2}%
+ \page_backgrounds_add_to_text\b_page_layouts_element
+ \page_grids_add_to_box\b_page_layouts_element
+ \box\b_page_layouts_element
\begingroup
\ifdim\rightmarginwidth>\zeropoint
\kern\rightmargindistance
@@ -847,8 +851,8 @@
\fi
\endgroup
\hss}}%
- \smashbox\layout_element_box
- \box\layout_element_box}
+ \smashbox\b_page_layouts_element
+ \box\b_page_layouts_element}
%D The main text area has to be combined with some additional
%D (tracing) information.
diff --git a/tex/context/base/phys-dim.mkiv b/tex/context/base/phys-dim.mkiv
index 3a153281d..84c3c7a2a 100644
--- a/tex/context/base/phys-dim.mkiv
+++ b/tex/context/base/phys-dim.mkiv
@@ -125,34 +125,34 @@
%D \NC \type{___,___,_12,345,678.==} \NC \ruledhbox{\strut\digits{___,___,_12,345,678.==}} \NC \NR
%D \stoptabulate
-\newconstant\c_digits_order
-\newconstant\c_digits_method
-\newconstant\c_digits_sign % we has sized (text script scriptscript)
+\newconstant\c_phys_digits_order
+\newconstant\c_phys_digits_method
+\newconstant\c_phys_digits_sign % we has sized (text script scriptscript)
-\unexpanded\def\setdigitmethod#1{\c_digits_method #1\relax}
-\unexpanded\def\setdigitsign #1{\c_digits_sign #1\relax}
-\unexpanded\def\setdigitorder #1{\c_digits_order #1\relax}
+\unexpanded\def\setdigitmethod#1{\c_phys_digits_method #1\relax}
+\unexpanded\def\setdigitsign #1{\c_phys_digits_sign #1\relax}
+\unexpanded\def\setdigitorder #1{\c_phys_digits_order #1\relax}
\let\setdigitmode\setdigitmethod % compatibility
-\def\digits_normalized % we could calculate once and remember
- {\ifcase\c_digits_sign
+\def\phys_digits_normalized % we could calculate once and remember
+ {\ifcase\c_phys_digits_sign
\expandafter\secondoftwoarguments
\else\ifmmode
- \expandafter\expandafter\expandafter\digits_normalized_math
+ \expandafter\expandafter\expandafter\phys_digits_normalized_math
\else
- \expandafter\expandafter\expandafter\digits_normalized_text
+ \expandafter\expandafter\expandafter\phys_digits_normalized_text
\fi\fi}
-\def\digits_normalized_math#1#2%
+\def\phys_digits_normalized_math#1#2%
{\setbox\scratchbox\hbox{$\Ustack{#1}$}%
\hbox to \wd\scratchbox{\hss{$\Ustack{#2}$}\hss}}
-\def\digits_normalized_text#1#2%
+\def\phys_digits_normalized_text#1#2%
{\setbox\scratchbox\hbox{#1}%
\hbox to \wd\scratchbox{\hss#2\hss}}
-\def\digits_raised
+\def\phys_digits_raised
{\ifmmode
\expandafter\normalsuperscript
\else
@@ -160,19 +160,19 @@
\fi}
\unexpanded\def\digitszeropadding {\hphantom{0}}
-\unexpanded\def\digitsnegative {\digits_normalized{0}{\digits_raised{\textminus}}}
-\unexpanded\def\digitspositive {\digits_normalized{0}{\digits_raised{\textplus}}}
-\unexpanded\def\digitsnegative {\digits_normalized{0}{\mathematics{\negative}}}
-\unexpanded\def\digitspositive {\digits_normalized{0}{\mathematics{\positive}}}
-\unexpanded\def\digitsminus {\digits_normalized{0}{\mathematics{-}}}
-\unexpanded\def\digitsplus {\digits_normalized{0}{\mathematics{+}}}
+\unexpanded\def\digitsnegative {\phys_digits_normalized{0}{\phys_digits_raised{\textminus}}}
+\unexpanded\def\digitspositive {\phys_digits_normalized{0}{\phys_digits_raised{\textplus}}}
+\unexpanded\def\digitsnegative {\phys_digits_normalized{0}{\mathematics{\negative}}}
+\unexpanded\def\digitspositive {\phys_digits_normalized{0}{\mathematics{\positive}}}
+\unexpanded\def\digitsminus {\phys_digits_normalized{0}{\mathematics{-}}}
+\unexpanded\def\digitsplus {\phys_digits_normalized{0}{\mathematics{+}}}
\unexpanded\def\digitsspace {\hphantom{0}}
\unexpanded\def\digitsseparatorspace{\hphantom{.}}
\unexpanded\def\digitssignspace {\hphantom{\digitsminus}}
\unexpanded\def\digitshighspace {\hphantom{\digitspositive}}
-\unexpanded\def\digitspower #1{\times10\digits_raised{#1}}
-\unexpanded\def\digitspowerplus #1{\times10\digits_raised{\digitsplus#1}}
-\unexpanded\def\digitspowerminus #1{\times10\digits_raised{\digitsminus#1}}
+\unexpanded\def\digitspower #1{\times10\phys_digits_raised{#1}}
+\unexpanded\def\digitspowerplus #1{\times10\phys_digits_raised{\digitsplus#1}}
+\unexpanded\def\digitspowerminus #1{\times10\phys_digits_raised{\digitsminus#1}}
\unexpanded\def\digitsdigit #1{#1}
\unexpanded\def\normaldigitscommasymbol {,}
@@ -180,37 +180,41 @@
\let\normaldigitsseparatorspace\digitsseparatorspace
-\letvalue{digit_c_0}\normaldigitscommasymbol
-\letvalue{digit_p_0}\normaldigitsperiodsymbol
-\letvalue{digit_s_0}\normaldigitsseparatorspace
+\installcorenamespace{digitscomma}
+\installcorenamespace{digitsperiod}
+\installcorenamespace{digitsspace}
-\letvalue{digit_c_1}\normaldigitsperiodsymbol
-\letvalue{digit_p_1}\normaldigitscommasymbol
-\letvalue{digit_s_1}\normaldigitsseparatorspace
+\letvalue{\??digitscomma 0}\normaldigitscommasymbol
+\letvalue{\??digitsperiod0}\normaldigitsperiodsymbol
+\letvalue{\??digitsspace 0}\normaldigitsseparatorspace
-\letvalue{digit_c_2}\normaldigitscommasymbol
-\letvalue{digit_p_2}\normaldigitsperiodsymbol
-\letvalue{digit_s_2}\normaldigitsseparatorspace
+\letvalue{\??digitscomma 1}\normaldigitsperiodsymbol
+\letvalue{\??digitsperiod1}\normaldigitscommasymbol
+\letvalue{\??digitsspace 1}\normaldigitsseparatorspace
-\letvalue{digit_c_3}\thinspace
-\letvalue{digit_p_3}\normaldigitscommasymbol
-\letvalue{digit_s_3}\thinspace
+\letvalue{\??digitscomma 2}\normaldigitscommasymbol
+\letvalue{\??digitsperiod2}\normaldigitsperiodsymbol
+\letvalue{\??digitsspace 2}\normaldigitsseparatorspace
-\letvalue{digit_c_4}\thinspace
-\letvalue{digit_p_4}\normaldigitsperiodsymbol
-\letvalue{digit_s_4}\thinspace
+\letvalue{\??digitscomma 3}\thinspace
+\letvalue{\??digitsperiod3}\normaldigitscommasymbol
+\letvalue{\??digitsspace 3}\thinspace
-\letvalue{digit_c_5}\thickspace
-\letvalue{digit_p_5}\normaldigitscommasymbol
-\letvalue{digit_s_5}\thickspace
+\letvalue{\??digitscomma 4}\thinspace
+\letvalue{\??digitsperiod4}\normaldigitsperiodsymbol
+\letvalue{\??digitsspace 4}\thinspace
-\letvalue{digit_c_6}\thickspace
-\letvalue{digit_p_6}\normaldigitsperiodsymbol
-\letvalue{digit_s_6}\thickspace
+\letvalue{\??digitscomma 5}\thickspace
+\letvalue{\??digitsperiod5}\normaldigitscommasymbol
+\letvalue{\??digitsspace 5}\thickspace
-\unexpanded\def\digitscommasymbol {\csname digit_c_\number\c_digits_method\endcsname}
-\unexpanded\def\digitsperiodsymbol {\csname digit_p_\number\c_digits_method\endcsname}
-\unexpanded\def\digitsseparatorspace {\csname digit_s_\number\c_digits_method\endcsname}
+\letvalue{\??digitscomma 6}\thickspace
+\letvalue{\??digitsperiod6}\normaldigitsperiodsymbol
+\letvalue{\??digitsspace 6}\thickspace
+
+\unexpanded\def\digitscommasymbol {\csname\??digitscomma \number\c_phys_digits_method\endcsname}
+\unexpanded\def\digitsperiodsymbol {\csname\??digitsperiod\number\c_phys_digits_method\endcsname}
+\unexpanded\def\digitsseparatorspace {\csname\??digitsspace \number\c_phys_digits_method\endcsname}
\unexpanded\def\digitsfinalcomma {\digitscommasymbol } % more for tracing
\unexpanded\def\digitsfinalperiod {\digitsperiodsymbol} % more for tracing
@@ -219,21 +223,21 @@
%D The user macro:
-\unexpanded\def\digits_indeed#1%
+\unexpanded\def\phys_digits_indeed#1%
{\dontleavehmode
\begingroup
- \ctxcommand{digits(\!!bs\detokenize{#1}\!!es,"\ifcase\c_digits_order \v!normal\else\v!reverse\fi")}%
+ \ctxcommand{digits(\!!bs\detokenize{#1}\!!es,"\ifcase\c_phys_digits_order \v!normal\else\v!reverse\fi")}%
\endgroup
- \settrue\c_units_dospace}
+ \settrue\c_phys_units_dospace}
\unexpanded\def\digits
- {\doifnextbgroupelse\digits_argument\digits_spaced}
+ {\doifnextbgroupelse\phys_digits_argument\phys_digits_spaced}
-\def\digits_argument#1%
- {\digits_indeed{#1}}
+\def\phys_digits_argument#1%
+ {\phys_digits_indeed{#1}}
-\def\digits_spaced#1 % space delimited
- {\digits_indeed{#1}}
+\def\phys_digits_spaced#1 % space delimited
+ {\phys_digits_indeed{#1}}
%D \macros
%D {unit}
@@ -348,11 +352,11 @@
\let\setupunits\setupunit
-\newconstant \c_units_mode % 0=text 1=math 2=textinmath 3=mathintext
-\newconstant \c_units_state % 0=start 1=suffix 2=operator 3=unit 4=prefix 5=number
-\newconditional\c_units_quantity
-\newconditional\c_units_number
-\newconditional\c_units_dospace
+\newconstant \c_phys_units_mode % 0=text 1=math 2=textinmath 3=mathintext
+\newconstant \c_phys_units_state % 0=start 1=suffix 2=operator 3=unit 4=prefix 5=number
+\newconditional\c_phys_units_quantity
+\newconditional\c_phys_units_number
+\newconditional\c_phys_units_dospace
% [\unit {micro ohm}]\par % no space before unit
% [10\unit {micro ohm}]\par % no space before unit
@@ -368,7 +372,7 @@
\unexpanded\def\installunitsseparator#1#2%
{\setvalue{\??unitseparator#1}{#2}}
-\unexpanded\def\dounitsseparator
+\unexpanded\def\phys_units_separator
{\edef\currentunitsseparator{\unitparameter\c!separator}%
\csname\??unitseparator
\ifcsname\??unitseparator\currentunitsseparator\endcsname\currentunitsseparator\else\v!normal\fi
@@ -383,7 +387,7 @@
\unexpanded\def\installunitsspace#1#2%
{\setvalue{\??unitspace#1}{#2}}
-\unexpanded\def\dounitsspace
+\unexpanded\def\phys_units_space
{\unskip % weird, why is unskip needed
\edef\currentunitsspace{\unitparameter\c!space}%
\csname\??unitspace
@@ -399,16 +403,16 @@
\newtoks \everyunits % we keep the old \units command so we need a longer one
\appendtoks
- \setuevalue\currentunit{\units_direct{\currentunit}}
+ \setuevalue\currentunit{\phys_units_direct{\currentunit}}
\to \everydefineunit
-\unexpanded\def\units_direct#1%
+\unexpanded\def\phys_units_direct#1%
{\begingroup
\ifdim\lastskip>\zeropoint
- \settrue\c_units_dospace
+ \settrue\c_phys_units_dospace
\removelastskip
\fi
- \c_digits_method\unitparameter\c!method\relax
+ \c_phys_digits_method\unitparameter\c!method\relax
\ifmmode\else\dontleavehmode\fi
\edef\currentunit{#1}%
\edef\unitlanguage{\unitparameter\s!language}%
@@ -420,120 +424,120 @@
\edef\currentunitsalternative{\unitparameter\c!alternative}%
\ifmmode
\ifx\currentunitsalternative\v!text
- \expandafter\expandafter\expandafter\units_direct_text_in_math
+ \expandafter\expandafter\expandafter\phys_units_direct_text_in_math
\else
- \expandafter\expandafter\expandafter\units_direct_math
+ \expandafter\expandafter\expandafter\phys_units_direct_math
\fi
\else
\ifx\currentunitsalternative\v!mathematics
- \expandafter\expandafter\expandafter\units_direct_math_in_text
+ \expandafter\expandafter\expandafter\phys_units_direct_math_in_text
\else
- \expandafter\expandafter\expandafter\units_direct_text
+ \expandafter\expandafter\expandafter\phys_units_direct_text
\fi
\fi}
-\unexpanded\def\units_direct_text_in_math#1%
+\unexpanded\def\phys_units_direct_text_in_math#1%
{\mathtext{%
- \c_units_mode\plustwo
- \units_indeed{#1}%
- \units_finish
+ \c_phys_units_mode\plustwo
+ \phys_units_indeed{#1}%
+ \phys_units_finish
}%
\endgroup}
-\unexpanded\def\units_direct_math#1%
- {\c_units_mode\plusone
+\unexpanded\def\phys_units_direct_math#1%
+ {\c_phys_units_mode\plusone
\rm\tf % slow
\mathtf
- \units_indeed{#1}%
- \units_finish
+ \phys_units_indeed{#1}%
+ \phys_units_finish
\endgroup}
-\unexpanded\def\units_direct_text#1%
- {\units_indeed{#1}%
- \units_finish
+\unexpanded\def\phys_units_direct_text#1%
+ {\phys_units_indeed{#1}%
+ \phys_units_finish
\endgroup}
-\unexpanded\def\units_direct_math_in_text#1%
+\unexpanded\def\phys_units_direct_math_in_text#1%
{\removeunwantedspaces % brr
\startimath
- \c_units_mode\plusthree
+ \c_phys_units_mode\plusthree
\rm\tf
\mathtf
- \units_indeed{#1}%
- \units_finish
+ \phys_units_indeed{#1}%
+ \phys_units_finish
\stopimath
\endgroup}
-\unexpanded\def\units_direct_nested#1#2%
- {\units_indeed{#2}}
+\unexpanded\def\phys_units_direct_nested#1#2%
+ {\phys_units_indeed{#2}}
\appendtoks
- \let\units_direct\units_direct_nested
+ \let\phys_units_direct\phys_units_direct_nested
\to \everyunits
-\unexpanded\def\units_indeed#1%
+\unexpanded\def\phys_units_indeed#1%
{\ctxcommand{unit(\!!bs\detokenize{#1}\!!es,"\unitparameter\c!order")}}
-\unexpanded\def\unitsPUS#1#2#3{\units_next\prefixtext{#1}\unittext{#2}\unitsraise{\suffixtext{#3}}\c_units_state\plusone} % suffix
-\unexpanded\def\unitsPU #1#2{\units_next\prefixtext{#1}\unittext{#2}\c_units_state\plusthree} % unit
-\unexpanded\def\unitsPS #1#2{\units_next\prefixtext{#1}\unitsraise{\suffixtext{#2}}\c_units_state\plusone} % suffix
-\unexpanded\def\unitsUS #1#2{\units_next\unittext{#1}\unitsraise{\suffixtext{#2}}\c_units_state\plusone} % suffix
-\unexpanded\def\unitsP #1{\units_next\prefixtext{#1}1\c_units_state\plusfour} % prefix
-\unexpanded\def\unitsU #1{\units_next\unittext{#1}\c_units_state\plusthree} % unit
-\unexpanded\def\unitsS #1{\units_start{}\unitsraise{\suffixtext{#1}}\c_units_state\plusone} % suffix
-\unexpanded\def\unitsO #1{\units_start\operatortext{#1}\c_units_state\plustwo} % operator
-\unexpanded\def\unitsN #1{\units_start#1\c_units_state\plusfive} % number
-\unexpanded\def\unitsC #1{\removeunwantedspaces\unittext{#1}\c_units_state\plussix} % connected
-\unexpanded\def\unitsQ #1{\removeunwantedspaces\unitslower{#1}\c_units_state\zerocount} %
+\unexpanded\def\unitsPUS#1#2#3{\phys_units_next\prefixtext{#1}\unittext{#2}\unitsraise{\suffixtext{#3}}\c_phys_units_state\plusone} % suffix
+\unexpanded\def\unitsPU #1#2{\phys_units_next\prefixtext{#1}\unittext{#2}\c_phys_units_state\plusthree} % unit
+\unexpanded\def\unitsPS #1#2{\phys_units_next\prefixtext{#1}\unitsraise{\suffixtext{#2}}\c_phys_units_state\plusone} % suffix
+\unexpanded\def\unitsUS #1#2{\phys_units_next\unittext{#1}\unitsraise{\suffixtext{#2}}\c_phys_units_state\plusone} % suffix
+\unexpanded\def\unitsP #1{\phys_units_next\prefixtext{#1}1\c_phys_units_state\plusfour} % prefix
+\unexpanded\def\unitsU #1{\phys_units_next\unittext{#1}\c_phys_units_state\plusthree} % unit
+\unexpanded\def\unitsS #1{\phys_units_start{}\unitsraise{\suffixtext{#1}}\c_phys_units_state\plusone} % suffix
+\unexpanded\def\unitsO #1{\phys_units_start\operatortext{#1}\c_phys_units_state\plustwo} % operator
+\unexpanded\def\unitsN #1{\phys_units_start#1\c_phys_units_state\plusfive} % number
+\unexpanded\def\unitsC #1{\removeunwantedspaces\unittext{#1}\c_phys_units_state\plussix} % connected
+\unexpanded\def\unitsQ #1{\removeunwantedspaces\unitslower{#1}\c_phys_units_state\zerocount} %
% Fonts can have a celsius and lack a fahrenheit symbol and as we want
% to be consistent so we check for the counterparts as well. It's slow
% but ok. Of course we could go virtual instead.
-\def\text_fallback_prime {\textacute}
-\def\text_fallback_doubleprime{\textacute\kern-.25em\textacute}
-\def\text_fallback_celsius {°C}
-\def\text_fallback_fahrenheit {°F}
+\def\phys_units_text_prime {\textacute}
+\def\phys_units_text_doubleprime{\textacute\kern-.25em\textacute}
+\def\phys_units_text_celsius {°C}
+\def\phys_units_text_fahrenheit {°F}
\unexpanded\def\checkedtextprime
{\iffontchar\font"2032\relax\iffontchar\font"2033\relax
- ′\else\text_fallback_prime\fi\else\text_fallback_prime
+ ′\else\phys_units_text_prime\fi\else\phys_units_text_prime
\fi}
\unexpanded\def\checkedtextdoubleprime
{\iffontchar\font"2033\relax\iffontchar\font"2032\relax
- ″\else\text_fallback_doubleprime\fi\else\text_fallback_doubleprime
+ ″\else\phys_units_text_doubleprime\fi\else\phys_units_text_doubleprime
\fi}
\unexpanded\def\checkedtextcelsius
{\iffontchar\font"2103\relax\iffontchar\font"2109\relax
- ℉\else\text_fallback_celsius\fi\else\text_fallback_celsius
+ ℉\else\phys_units_text_celsius\fi\else\phys_units_text_celsius
\fi}
\unexpanded\def\checkedtextfahrenheit
{\iffontchar\font"2109\relax\iffontchar\font"2103\relax
- ℉\else\text_fallback_fahrenheit\fi\else\text_fallback_fahrenheit
+ ℉\else\phys_units_text_fahrenheit\fi\else\phys_units_text_fahrenheit
\fi}
\setelementnature[unit] [mixed]
\setelementnature[quantity][mixed]
-\let\units_finish\relax
+\let\phys_units_finish\relax
\unexpanded\def\unitsNstart
{\ifmmode \else
- \settrue\c_units_quantity
+ \settrue\c_phys_units_quantity
\dostarttagged\t!quantity\empty
- \settrue\c_units_number
+ \settrue\c_phys_units_number
\dostarttagged\t!number\empty
\fi}
\unexpanded\def\unitsNstop
- {\ifconditional\c_units_number
- \setfalse\c_units_number
+ {\ifconditional\c_phys_units_number
+ \setfalse\c_phys_units_number
\dostoptagged
\fi
- \c_units_state\plusfive}
+ \c_phys_units_state\plusfive}
\unexpanded\def\unitsNspace
{\space}
@@ -541,23 +545,23 @@
\unexpanded\def\unitsN#1%
{\unitsNstart#1\unitsNstop}
-\def\units_start
+\def\phys_units_start
{\ifmmode
\dostarttagged\t!mathaction\t!unit
\bgroup % make an mrow
\else
\dostarttagged\t!unit\empty
\fi
- \let\units_finish\units_stop
- \let\units_start\relax}
+ \let\phys_units_finish\phys_units_stop
+ \let\phys_units_start\relax}
-\def\units_stop
- {\ifconditional\c_units_number
- \setfalse\c_units_number
+\def\phys_units_stop
+ {\ifconditional\c_phys_units_number
+ \setfalse\c_phys_units_number
\dostoptagged
\fi
- \ifconditional\c_units_quantity
- \setfalse\c_units_quantity
+ \ifconditional\c_phys_units_quantity
+ \setfalse\c_phys_units_quantity
\dostoptagged
\fi
\dostoptagged
@@ -566,7 +570,7 @@
\fi}
\def\unitsraise
- {\ifcase\c_units_mode
+ {\ifcase\c_phys_units_mode
\expandafter\high
\or
\expandafter\normalsuperscript
@@ -577,7 +581,7 @@
\fi}
\def\unitslower
- {\ifcase\c_units_mode
+ {\ifcase\c_phys_units_mode
\expandafter\low
\or
\expandafter\normalsubscript
@@ -587,44 +591,44 @@
\expandafter\normalsubscript
\fi}
-\unexpanded\def\units_next
- {\ifcase\c_units_state % start
- \ifconditional\c_units_dospace
+\unexpanded\def\phys_units_next
+ {\ifcase\c_phys_units_state % start
+ \ifconditional\c_phys_units_dospace
% \ifdim\lastskip=\zeropoint
- \dounitsspace
+ \phys_units_space
% \else
% % too tricky ... we could remove and add
% \fi
\fi
\or % 1: suffix
- {\dounitsseparator}%
+ {\phys_units_separator}%
\or % 2: operator
\or % 3: unit
- {\dounitsseparator}%
+ {\phys_units_separator}%
\or % 4: prefix
\or % 5: number
- \dounitsspace
+ \phys_units_space
\or % 6: symbol (connected)
\fi
- \setfalse\c_units_dospace
- \units_start}
+ \setfalse\c_phys_units_dospace
+ \phys_units_start}
\unexpanded\def\unitsTIMES
- {\ifnum\c_units_state=\plusone % suffix
+ {\ifnum\c_phys_units_state=\plusone % suffix
\else
\unitssmallspace
\fi
\cdot} % or \times
\unexpanded\def\unitsOUTOF
- {\ifnum\c_units_state=\plusone % suffix
+ {\ifnum\c_phys_units_state=\plusone % suffix
\else
\unitssmallspace
\fi
:}
\unexpanded\def\unitsSOLIDUS
- {\ifnum\c_units_state=\plusone % suffix
+ {\ifnum\c_phys_units_state=\plusone % suffix
\unitsbackspace
\fi
{/}%
@@ -668,9 +672,9 @@
%D \stoptyping
\unexpanded\def\registerunit
- {\dodoubleempty\register_unit}
+ {\dodoubleempty\phys_units_register}
-\def\register_unit[#1][#2]%
+\def\phys_units_register[#1][#2]%
{\ctxcommand{registerunit(\!!bs#1\!!es,\!!bs#2\!!es)}}
%D You can generate a list as follows:
diff --git a/tex/context/base/ppchtex.mkiv b/tex/context/base/ppchtex.mkiv
index 7bba6f539..a14578ceb 100644
--- a/tex/context/base/ppchtex.mkiv
+++ b/tex/context/base/ppchtex.mkiv
@@ -2073,7 +2073,7 @@
\@@chemicalpostponed}
{\getpredefinedchemical{#1}}]}
-\newcount\chemicalstack % tzt \newwounter
+\newcount\chemicalstack
\setvalue{\s!chemical\c!x1}{0}
\setvalue{\s!chemical\c!y1}{0}
diff --git a/tex/context/base/scrn-bar.mkvi b/tex/context/base/scrn-bar.mkvi
index 3be46d915..d2915eb1b 100644
--- a/tex/context/base/scrn-bar.mkvi
+++ b/tex/context/base/scrn-bar.mkvi
@@ -78,10 +78,10 @@
\endgroup
\fi}
-\newdimen\scrn_bar_width
-\newdimen\scrn_bar_height
-\newdimen\scrn_bar_depth
-\newdimen\scrn_bar_distance
+\newdimen\d_scrn_bar_width
+\newdimen\d_scrn_bar_height
+\newdimen\d_scrn_bar_depth
+\newdimen\d_scrn_bar_distance
%D Interaction buttons, in fact a row of tiny buttons, are
%D typically only used for navigational purposed. The next
@@ -127,9 +127,9 @@
{\begingroup
%\let\menuparameter\interactionbarparameter
\setupcurrentinteractionbar[#settings]%
- \scrn_bar_width\interactionbarparameter\c!width
- \ifdim\scrn_bar_width=\zeropoint
- \scrn_bar_width1.5\emwidth
+ \d_scrn_bar_width\interactionbarparameter\c!width
+ \ifdim\d_scrn_bar_width=\zeropoint
+ \d_scrn_bar_width1.5\emwidth
\fi
\doifnothing{\interactionbarparameter\c!height}{\letinteractionbarparameter\c!height\v!broad}%
\doifnothing{\interactionbarparameter\c!depth }{\letinteractionbarparameter\c!depth\!!zeropoint}%%%
@@ -144,15 +144,15 @@
[ \v!page=>\advance\!!counta\plusfour,
\v!subpage=>\advance\!!counta\plusfour,
\s!unknown=>\advance\!!counta\plusone]%
- \ifdim\scrn_bar_width=\zeropoint
- \!!widtha\dimexpr2\emwidth+\scrn_bar_distance\relax
- \!!widthb\dimexpr\!!counta\!!widtha-\scrn_bar_distance\relax
+ \ifdim\d_scrn_bar_width=\zeropoint
+ \!!widtha\dimexpr2\emwidth+\d_scrn_bar_distance\relax
+ \!!widthb\dimexpr\!!counta\!!widtha-\d_scrn_bar_distance\relax
\else
- \!!widtha\scrn_bar_width
- \!!widthb\dimexpr\!!counta\scrn_bar_distance-\scrn_bar_distance\relax
+ \!!widtha\d_scrn_bar_width
+ \!!widthb\dimexpr\!!counta\d_scrn_bar_distance-\d_scrn_bar_distance\relax
\advance\!!widtha -\!!widthb
\divide\!!widtha \!!counta
- \!!widthb\scrn_bar_width
+ \!!widthb\d_scrn_bar_width
\fi
\hbox to \!!widthb
{\setnostrut
@@ -182,14 +182,14 @@
% todo: this will be \letblackruleparameter\c!width\!!widtha (faster)
\def\scrn_bar_alternative_a
- {\scrn_bar_width \interactionbarparameter\c!width
- \scrn_bar_distance\interactionbarparameter\c!distance
- \scrn_bar_height \interactionbarparameter\c!height
- \scrn_bar_depth \interactionbarparameter\c!depth
- \noindent\hbox to \scrn_bar_width \bgroup
+ {\d_scrn_bar_width \interactionbarparameter\c!width
+ \d_scrn_bar_distance\interactionbarparameter\c!distance
+ \d_scrn_bar_height \interactionbarparameter\c!height
+ \d_scrn_bar_depth \interactionbarparameter\c!depth
+ \noindent\hbox to \d_scrn_bar_width \bgroup
\dontcomplain
\setupblackrules[\c!height=\v!max,\c!depth=\v!max]%
- \!!widthb\dimexpr\scrn_bar_width-4\emwidth\relax
+ \!!widthb\dimexpr\d_scrn_bar_width-4\emwidth\relax
\processaction
[\interactionbarparameter\c!step]
[ \v!small=>\scratchcounter 20,
@@ -198,7 +198,7 @@
\s!unknown=>\scratchcounter 10]%
\!!widtha\dimexpr\!!widthb/\scratchcounter\relax
\setupblackrules[\c!width=\!!widtha]%
- \setbox\scratchbox\hbox to \scrn_bar_width
+ \setbox\scratchbox\hbox to \d_scrn_bar_width
{\hskip2\emwidth
\setbox\scratchbox\hbox{\blackrule[\c!color=\interactionbarparameter\c!backgroundcolor]}%
\dorecurse\scratchcounter
@@ -230,10 +230,10 @@
\def\scrn_bar_alternative_c
{\ifnum\lastpage>\plusone
- \scrn_bar_width\interactionbarparameter\c!width
- \hbox to \scrn_bar_width
+ \d_scrn_bar_width\interactionbarparameter\c!width
+ \hbox to \d_scrn_bar_width
{\setupblackrules[\c!height=\interactionbarparameter\c!height,\c!depth=\interactionbarparameter\c!depth,\c!width=\emwidth]%
- \scratchdimen\dimexpr(\scrn_bar_width-4\emwidth)/\numexpr\lastpage+\minusone\relax\relax
+ \scratchdimen\dimexpr(\d_scrn_bar_width-4\emwidth)/\numexpr\lastpage+\minusone\relax\relax
\!!widtha\numexpr\realpageno+\minusone\relax\scratchdimen
\!!widthb\numexpr\lastpage-\realpageno\relax\scratchdimen
\directgotospecbox\interactionbarparameter{\blackrule}[\v!firstpage]%
@@ -249,20 +249,20 @@
{\symbol[\ifcase#whereto\v!previous\or\v!somewhere\or\v!next\fi]}
\unexpanded\def\scrn_bar_goto_b#whereto%
- {\vrule\!!height\scrn_bar_height\!!depth\scrn_bar_depth\!!width\!!widtha\relax}
+ {\vrule\!!height\d_scrn_bar_height\!!depth\d_scrn_bar_depth\!!width\!!widtha\relax}
\unexpanded\def\scrn_bar_goto_c#whereto%
{\symbol[\ifcase#whereto\v!previous\or\v!somewhere\or\v!somewhere\or\v!somewhere\or\v!next\fi}
\unexpanded\def\scrn_bar_goto_d#whereto%
{\vrule \!!width\!!widtha \ifcase#whereto%
- \!!height \scrn_bar_height \!!depth \scrn_bar_depth \or
- \!!height.5\scrn_bar_height \!!depth.5\scrn_bar_depth \or
- \!!height \scrn_bar_height \!!depth \scrn_bar_depth \or
- \!!height.5\scrn_bar_height \!!depth.5\scrn_bar_depth \else
- \!!height \scrn_bar_height \!!depth \scrn_bar_depth \fi}
+ \!!height \d_scrn_bar_height \!!depth \d_scrn_bar_depth \or
+ \!!height.5\d_scrn_bar_height \!!depth.5\d_scrn_bar_depth \or
+ \!!height \d_scrn_bar_height \!!depth \d_scrn_bar_depth \or
+ \!!height.5\d_scrn_bar_height \!!depth.5\d_scrn_bar_depth \else
+ \!!height \d_scrn_bar_height \!!depth \d_scrn_bar_depth \fi}
-\newconstant\scrn_bar_mode
+\newconstant\c_scrn_bar_mode
\unexpanded\def\scrn_bar_goto_x#command%
{\doifelse{\interactionbarparameter\c!symbol}\v!yes
@@ -271,64 +271,64 @@
{\let\scrn_bar_goto_indeed\scrn_bar_goto_b}%
\dorecurse\nofsubpages
{\scratchcounter\numexpr\recurselevel+\firstsubpage+\minusone\relax
- \scrn_bar_mode
+ \c_scrn_bar_mode
\ifnum\scratchcounter<\realpageno \zerocount \else
\ifnum\scratchcounter=\realpageno \plusone \else
\plustwo \fi\fi
- \normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\scrn_bar_goto_indeed\scrn_bar_mode}[page(\the\scratchcounter)]}%
+ \normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\scrn_bar_goto_indeed\c_scrn_bar_mode}[page(\the\scratchcounter)]}%
#command}%
\unskip}
\def\scrn_bar_alternative_d
{\ifnum\nofsubpages>\plusone \doif{\structurecounterparameter\s!subpage\c!state}\v!start{%
- \scrn_bar_width \interactionbarparameter\c!width
- \scrn_bar_distance\interactionbarparameter\c!distance
- \scrn_bar_height \interactionbarparameter\c!height
- \scrn_bar_depth \interactionbarparameter\c!depth
- \!!widtha\scrn_bar_width
- \noindent\hbox{\scrn_bar_goto_x{\hskip\scrn_bar_distance}}%
+ \d_scrn_bar_width \interactionbarparameter\c!width
+ \d_scrn_bar_distance\interactionbarparameter\c!distance
+ \d_scrn_bar_height \interactionbarparameter\c!height
+ \d_scrn_bar_depth \interactionbarparameter\c!depth
+ \!!widtha\d_scrn_bar_width
+ \noindent\hbox{\scrn_bar_goto_x{\hskip\d_scrn_bar_distance}}%
}\fi}
\def\scrn_bar_alternative_e
{\ifnum\nofsubpages>\plusone \doif{\structurecounterparameter\s!subpage\c!state}\v!start{%
- \scrn_bar_width \interactionbarparameter\c!width
- \scrn_bar_distance\interactionbarparameter\c!distance
- \scrn_bar_height \interactionbarparameter\c!height
- \scrn_bar_depth \interactionbarparameter\c!depth
- \!!widthb\dimexpr\nofsubpages\scrn_bar_distance-\scrn_bar_distance\relax % (n-1)
- \!!widtha\dimexpr(\scrn_bar_width-\!!widthb)/\nofsubpages\relax
- \ifdim\!!widtha<\scrn_bar_distance
+ \d_scrn_bar_width \interactionbarparameter\c!width
+ \d_scrn_bar_distance\interactionbarparameter\c!distance
+ \d_scrn_bar_height \interactionbarparameter\c!height
+ \d_scrn_bar_depth \interactionbarparameter\c!depth
+ \!!widthb\dimexpr\nofsubpages\d_scrn_bar_distance-\d_scrn_bar_distance\relax % (n-1)
+ \!!widtha\dimexpr(\d_scrn_bar_width-\!!widthb)/\nofsubpages\relax
+ \ifdim\!!widtha<\d_scrn_bar_distance
\scrn_bar_alternative_f
\else
- \noindent\hbox to \scrn_bar_width{\scrn_bar_goto_x{\hss}\unskip}%
+ \noindent\hbox to \d_scrn_bar_width{\scrn_bar_goto_x{\hss}\unskip}%
\fi
}\fi}
\def\scrn_bar_alternative_f
{\ifnum\nofsubpages>\plusone \doif{\structurecounterparameter\s!subpage\c!state}\v!start{%
- \scrn_bar_width \interactionbarparameter\c!width
- \scrn_bar_distance\interactionbarparameter\c!distance
- \scrn_bar_height \interactionbarparameter\c!height
- \scrn_bar_depth \interactionbarparameter\c!depth
- \noindent \hbox to \scrn_bar_width \bgroup
+ \d_scrn_bar_width \interactionbarparameter\c!width
+ \d_scrn_bar_distance\interactionbarparameter\c!distance
+ \d_scrn_bar_height \interactionbarparameter\c!height
+ \d_scrn_bar_depth \interactionbarparameter\c!depth
+ \noindent \hbox to \d_scrn_bar_width \bgroup
\doloop
{\!!countc\numexpr(\nofsubpages/\recurselevel)+\plusone\relax % rounding
- \!!widthb\scrn_bar_distance
+ \!!widthb\d_scrn_bar_distance
\multiply\!!widthb \!!countc
- \advance\!!widthb -\scrn_bar_distance
- \!!widtha\scrn_bar_width
+ \advance\!!widthb -\d_scrn_bar_distance
+ \!!widtha\d_scrn_bar_width
\advance\!!widtha -\!!widthb
\divide\!!widtha \!!countc
- \ifdim\!!widtha<\scrn_bar_distance\else
+ \ifdim\!!widtha<\d_scrn_bar_distance\else
\!!countb\recurselevel
\exitloop
\fi}%
\ifnum\!!countc>\plusone
% this is not that well tested
\advance\!!countc \minustwo
- \!!widtha-\scrn_bar_distance
+ \!!widtha-\d_scrn_bar_distance
\!!widtha\!!countc\!!widtha
- \advance\!!widtha \scrn_bar_width
+ \advance\!!widtha \d_scrn_bar_width
\advance\!!countc \plusone
\divide\!!widtha \!!countc
\fi
@@ -345,7 +345,7 @@
\advance\!!countf \plusone
\ifnum\recurselevel=\firstsubpage\relax \!!doneatrue \fi
\ifnum\recurselevel=\lastsubpage \relax \!!doneatrue \fi
- \scrn_bar_mode
+ \c_scrn_bar_mode
\if!!donea
\ifnum\recurselevel<\realpageno
\zerocount
@@ -367,7 +367,7 @@
\plusthree
\fi
\fi
- \normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\scrn_bar_goto_indeed\scrn_bar_mode}[page(\recurselevel)]}%
+ \normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\scrn_bar_goto_indeed\c_scrn_bar_mode}[page(\recurselevel)]}%
\hss
\!!countf\zerocount}%
\unskip
diff --git a/tex/context/base/scrn-but.mkvi b/tex/context/base/scrn-but.mkvi
index dbb66e32e..24a0f8bcf 100644
--- a/tex/context/base/scrn-but.mkvi
+++ b/tex/context/base/scrn-but.mkvi
@@ -152,12 +152,12 @@
\expandafter\let\csname\??buttonlocation\s!default\endcsname\plusone % default
\expandafter\let\csname\??buttonlocation\s!empty \endcsname\plusone % default
-\newconditional\scrn_button_skipped
+\newconditional\c_scrn_button_skipped
\def\scrn_button_make#currentparameter#inheritedframed#letparameter#setparameter#text#action%
{\begingroup
\attribute\referenceattribute\attributeunsetvalue
- \global\setfalse\scrn_button_skipped
+ \global\setfalse\c_scrn_button_skipped
\chardef\locationboxpagestate\csname\??buttonlocation#currentparameter\c!samepage\endcsname % ?? bt: todo
\doifreferencefoundelse{#action}\scrn_button_make_yes\scrn_button_make_nop
#currentparameter%
@@ -214,7 +214,7 @@
{#inheritedframed{\ignorespaces#text\removeunwantedspaces}}
\def\scrn_button_make_skipped#currentparameter#inheritedframed#letparameter#setparameter#text%
- {\global\settrue\scrn_button_skipped}
+ {\global\settrue\c_scrn_button_skipped}
\def\scrn_button_make_normal#currentparameter#inheritedframed#letparameter#setparameter#text%
{\ctxlua{structures.references.injectcurrentset(nil,nil)}%
@@ -410,60 +410,60 @@
%D The no longer hard coded text areas offset compensation makes tuning
%D easier. After all, menus need some setup anyway.
-\newbox \scrn_menu_box
+\newbox \b_scrn_menu
-\newdimen\scrn_menu_next_distance
-\newdimen\scrn_menu_final_width
-\newdimen\scrn_menu_final_height
-\newdimen\scrn_menu_used_width
-\newdimen\scrn_menu_used_height
-\newdimen\scrn_menu_asked_width
-\newdimen\scrn_menu_asked_height
-\newdimen\scrn_menu_offset_top
-\newdimen\scrn_menu_offset_bottom
-\newdimen\scrn_menu_offset_left
-\newdimen\scrn_menu_offset_right
+\newdimen\d_scrn_menu_next_distance
+\newdimen\d_scrn_menu_final_width
+\newdimen\d_scrn_menu_final_height
+\newdimen\d_scrn_menu_used_width
+\newdimen\d_scrn_menu_used_height
+\newdimen\d_scrn_menu_asked_width
+\newdimen\d_scrn_menu_asked_height
+\newdimen\d_scrn_menu_offset_top
+\newdimen\d_scrn_menu_offset_bottom
+\newdimen\d_scrn_menu_offset_left
+\newdimen\d_scrn_menu_offset_right
-\newconditional\scrn_menu_zerodimensions
+\newconditional\c_scrn_menu_zerodimensions
\def\scrn_menu_set_used
- {\doassigncheckedframeoffset\scrn_menu_offset_left {\interactionmenuparameter\c!leftoffset }%
- \doassigncheckedframeoffset\scrn_menu_offset_right {\interactionmenuparameter\c!rightoffset }%
- \doassigncheckedframeoffset\scrn_menu_offset_top {\interactionmenuparameter\c!topoffset }%
- \doassigncheckedframeoffset\scrn_menu_offset_bottom{\interactionmenuparameter\c!bottomoffset}%
- \scrn_menu_asked_width \interactionmenuparameter\c!maxwidth
- \scrn_menu_asked_height \interactionmenuparameter\c!maxheight
- \scrn_menu_used_width\dimexpr
- \scrn_menu_asked_width + \scrn_menu_offset_left + \scrn_menu_offset_right
+ {\doassigncheckedframeoffset\d_scrn_menu_offset_left {\interactionmenuparameter\c!leftoffset }%
+ \doassigncheckedframeoffset\d_scrn_menu_offset_right {\interactionmenuparameter\c!rightoffset }%
+ \doassigncheckedframeoffset\d_scrn_menu_offset_top {\interactionmenuparameter\c!topoffset }%
+ \doassigncheckedframeoffset\d_scrn_menu_offset_bottom{\interactionmenuparameter\c!bottomoffset}%
+ \d_scrn_menu_asked_width \interactionmenuparameter\c!maxwidth
+ \d_scrn_menu_asked_height \interactionmenuparameter\c!maxheight
+ \d_scrn_menu_used_width\dimexpr
+ \d_scrn_menu_asked_width + \d_scrn_menu_offset_left + \d_scrn_menu_offset_right
\relax
- \scrn_menu_used_height\dimexpr
- \scrn_menu_asked_height + \scrn_menu_offset_top + \scrn_menu_offset_bottom
+ \d_scrn_menu_used_height\dimexpr
+ \d_scrn_menu_asked_height + \d_scrn_menu_offset_top + \d_scrn_menu_offset_bottom
\relax}
\def\scrn_menu_set_final
- {\scrn_menu_final_width \namedinteractionmenuparameter\askedinteractionmenulocation\c!maxwidth
- \scrn_menu_final_height\namedinteractionmenuparameter\askedinteractionmenulocation\c!maxheight}
+ {\d_scrn_menu_final_width \namedinteractionmenuparameter\askedinteractionmenulocation\c!maxwidth
+ \d_scrn_menu_final_height\namedinteractionmenuparameter\askedinteractionmenulocation\c!maxheight}
\def\scrn_menu_apply_final
- {\ifconditional\scrn_menu_zerodimensions
- \wd\scrn_menu_box\zeropoint
- \ht\scrn_menu_box\zeropoint
+ {\ifconditional\c_scrn_menu_zerodimensions
+ \wd\b_scrn_menu\zeropoint
+ \ht\b_scrn_menu\zeropoint
\else
- \wd\scrn_menu_box\scrn_menu_final_width
- \ht\scrn_menu_box\scrn_menu_final_height
+ \wd\b_scrn_menu\d_scrn_menu_final_width
+ \ht\b_scrn_menu\d_scrn_menu_final_height
\fi
- \dp\scrn_menu_box\zeropoint}
+ \dp\b_scrn_menu\zeropoint}
\def\scrn_menu_apply_used
- {\ifdim\scrn_menu_offset_left=\zeropoint \else
- \setbox\scrn_menu_box\hbox{\hskip-\scrn_menu_offset_left \box\scrn_menu_box}%
+ {\ifdim\d_scrn_menu_offset_left=\zeropoint \else
+ \setbox\b_scrn_menu\hbox{\hskip-\d_scrn_menu_offset_left \box\b_scrn_menu}%
\fi
- \ifdim\scrn_menu_offset_bottom=\zeropoint \else
- \setbox\scrn_menu_box\hbox{\lower \scrn_menu_offset_bottom \box\scrn_menu_box}%
+ \ifdim\d_scrn_menu_offset_bottom=\zeropoint \else
+ \setbox\b_scrn_menu\hbox{\lower \d_scrn_menu_offset_bottom \box\b_scrn_menu}%
\fi
- \wd\scrn_menu_box\scrn_menu_asked_width
- \ht\scrn_menu_box\scrn_menu_asked_height
- \dp\scrn_menu_box\zeropoint}
+ \wd\b_scrn_menu\d_scrn_menu_asked_width
+ \ht\b_scrn_menu\d_scrn_menu_asked_height
+ \dp\b_scrn_menu\zeropoint}
\setvalue{\??menualign\v!right }{\let\scrn_menu_left_align\raggedright}
\setvalue{\??menualign\v!left }{\let\scrn_menu_left_align\raggedleft}
@@ -500,9 +500,9 @@
{\begingroup
\xdef\askedinteractionmenulocation{#location}%
\scrn_menu_set_final
- \ifcase\scrn_menu_final_width \else \ifcase\scrn_menu_final_height \else
+ \ifcase\d_scrn_menu_final_width \else \ifcase\d_scrn_menu_final_height \else
\forgetall
- \global\scrn_menu_next_distance\zeropoint
+ \global\d_scrn_menu_next_distance\zeropoint
\let\scrn_menu_action\scrn_menu_package_indeed
\the\everysetmenucommands
\csname\??menupacker\namedinteractionmenuparameter\askedinteractionmenulocation\c!alternative\endcsname
@@ -513,15 +513,15 @@
\setvalue{\??menupacker\v!vertical}% all menus
{\let\scrn_menu_packager\scrn_menu_packager_vertical
- \setbox\scrn_menu_box\hbox{\scrn_menu_actions\askedinteractionmenulocation}%
+ \setbox\b_scrn_menu\hbox{\scrn_menu_actions\askedinteractionmenulocation}%
\scrn_menu_apply_final
- \box\scrn_menu_box}
+ \box\b_scrn_menu}
\setvalue{\??menupacker\v!horizontal}% all menus
{\let\scrn_menu_packager\scrn_menu_packager_horizontal
- \setbox\scrn_menu_box\vbox{\scrn_menu_actions\askedinteractionmenulocation}%
+ \setbox\b_scrn_menu\vbox{\scrn_menu_actions\askedinteractionmenulocation}%
\scrn_menu_apply_final
- \box\scrn_menu_box}
+ \box\b_scrn_menu}
% stop : skipped
% start: processed
@@ -545,8 +545,8 @@
\def\scrn_menu_packager_vertical
{\scrn_menu_set_used
- \hskip\scrn_menu_next_distance
- \setbox\scrn_menu_box\hbox to \scrn_menu_used_width
+ \hskip\d_scrn_menu_next_distance
+ \setbox\b_scrn_menu\hbox to \d_scrn_menu_used_width
{\ifx\currentinteractionmenustate\v!empty \else
\interactionmenuparameter\c!left
\scrn_menu_package_vertical{\strictinteractionmenuparameter\c!menu}%
@@ -554,19 +554,19 @@
\fi}%
\edef\currentinteractionmenudistance{\interactionmenuparameter\c!distance}%
\ifx\currentinteractionmenudistance\v!overlay
- \global\scrn_menu_next_distance\zeropoint
- \wd\scrn_menu_box\zeropoint
+ \global\d_scrn_menu_next_distance\zeropoint
+ \wd\b_scrn_menu\zeropoint
\else
- \global\scrn_menu_next_distance\currentinteractionmenudistance
+ \global\d_scrn_menu_next_distance\currentinteractionmenudistance
\scrn_menu_apply_used
\fi
- \box\scrn_menu_box}
+ \box\b_scrn_menu}
\def\scrn_menu_packager_horizontal
{\scrn_menu_set_used
- \vskip\scrn_menu_next_distance
+ \vskip\d_scrn_menu_next_distance
\scrn_menu_set_align
- \setbox\scrn_menu_box\vbox to \scrn_menu_used_height
+ \setbox\b_scrn_menu\vbox to \d_scrn_menu_used_height
{\ifx\currentinteractionmenustate\v!none \else
\scrn_menu_top_align
\interactionmenuparameter\c!before
@@ -576,15 +576,15 @@
\fi}%
\edef\currentinteractionmenudistance{\interactionmenuparameter\c!distance}%
\ifx\currentinteractionmenudistance\v!overlay
- \global\scrn_menu_next_distance\zeropoint
+ \global\d_scrn_menu_next_distance\zeropoint
\offinterlineskip
- \dp\scrn_menu_box\zeropoint
- \ht\scrn_menu_box\zeropoint
+ \dp\b_scrn_menu\zeropoint
+ \ht\b_scrn_menu\zeropoint
\else
- \global\scrn_menu_next_distance\currentinteractionmenudistance
+ \global\d_scrn_menu_next_distance\currentinteractionmenudistance
\scrn_menu_apply_used
\fi
- \box\scrn_menu_box}
+ \box\b_scrn_menu}
%D For a right menu, a sequence of calls to \type
%D {right_menu_button} is generated.
@@ -597,65 +597,65 @@
%D while the rest is positional info. The status variable is
%D 0, 1 or~2: not found, found and found but current page.
-\newcount \scrn_menu_position
-\newconstant \scrn_menu_page_mode % 0=notfound 1=found 2=currentpage
-\newconditional\scrn_menu_positioning
-\newtoks \scrn_menu_mp_data
+\newcount \c_scrn_menu_position
+\newconstant \c_scrn_menu_page_mode % 0=notfound 1=found 2=currentpage
+\newconditional\c_scrn_menu_positioning
+\newtoks \t_scrn_menu_mp_data
\def\scrn_menu_button_mp_template
{\askedinteractionmenulocation _menu_button(%
- \number\scrn_menu_position,%
- \number\scrn_menu_page_mode,%
- \MPpos{\askedinteractionmenulocation:\number\scrn_menu_position}%
+ \number\c_scrn_menu_position,%
+ \number\c_scrn_menu_page_mode,%
+ \MPpos{\askedinteractionmenulocation:\number\c_scrn_menu_position}%
);}
-\def\MPmenubuttons#1{\the\scrn_menu_mp_data}
+\def\MPmenubuttons#1{\the\t_scrn_menu_mp_data}
\appendtoks
- \global\scrn_menu_mp_data\emptytoks
+ \global\t_scrn_menu_mp_data\emptytoks
\to \everyshipout
\def\scrn_menu_whole_position % cannot happen in previous due to align
- {\setbox\scrn_menu_box\hbox \bgroup
- \hpos{menu:\askedinteractionmenulocation:\the\realpageno}{\box\scrn_menu_box}%
+ {\setbox\b_scrn_menu\hbox \bgroup
+ \hpos{menu:\askedinteractionmenulocation:\the\realpageno}{\box\b_scrn_menu}%
\egroup}
% removed: \restorestandardblank (vspacing) ... should happen elsewhere
\def\scrn_menu_package_vertical#content%
{\begingroup
- \global\scrn_menu_position\zerocount
+ \global\c_scrn_menu_position\zerocount
\def\scrn_menu_between_action_indeed{\interactionmenuparameter\c!inbetween}%
- \doifelse{\interactionmenuparameter\c!position}\v!yes\settrue\setfalse\scrn_menu_positioning
+ \doifelse{\interactionmenuparameter\c!position}\v!yes\settrue\setfalse\c_scrn_menu_positioning
\scrn_menu_set_align
- \setbox\scrn_menu_box\vbox to \scrn_menu_used_height \bgroup
- \hsize\scrn_menu_used_width
+ \setbox\b_scrn_menu\vbox to \d_scrn_menu_used_height \bgroup
+ \hsize\d_scrn_menu_used_width
\scrn_menu_left_align
\interactionmenuparameter\c!before\relax
\ignorespaces#content\unskip
\interactionmenuparameter\c!after
\scrn_menu_right_align
\egroup
- \ifconditional\scrn_menu_positioning
+ \ifconditional\c_scrn_menu_positioning
\scrn_menu_whole_position
\fi
- \box\scrn_menu_box
+ \box\b_scrn_menu
\endgroup}
\def\scrn_menu_package_horizontal#content%
{\begingroup
- \global\scrn_menu_position\zerocount
+ \global\c_scrn_menu_position\zerocount
\def\scrn_menu_between_action_indeed{\interactionmenuparameter\c!middle}%
- \doifelse{\interactionmenuparameter\c!position}\v!yes\settrue\setfalse\scrn_menu_positioning
- \setbox\scrn_menu_box\hbox to \scrn_menu_used_width \bgroup
+ \doifelse{\interactionmenuparameter\c!position}\v!yes\settrue\setfalse\c_scrn_menu_positioning
+ \setbox\b_scrn_menu\hbox to \d_scrn_menu_used_width \bgroup
\interactionmenuparameter\c!left\relax
\ignorespaces#content\unskip
\interactionmenuparameter\c!right
\egroup
- \ifconditional\scrn_menu_positioning
+ \ifconditional\c_scrn_menu_positioning
\scrn_menu_whole_position
\fi
- \box\scrn_menu_box
+ \box\b_scrn_menu
\endgroup}
\def\scrn_menu_action_start
@@ -663,7 +663,7 @@
\begingroup}
\def\scrn_menu_action_stop
- {\ifconditional\scrn_button_skipped \else
+ {\ifconditional\c_scrn_button_skipped \else
\scrn_menu_between_action_indeed
\fi
\endgroup
@@ -676,7 +676,7 @@
\unexpanded\def\scrn_menu_but_start[#action]#text\stopbut
{\scrn_menu_action_start
- \ifconditional\scrn_menu_positioning
+ \ifconditional\c_scrn_menu_positioning
\expandafter\scrn_button_make_position
\else
\expandafter\scrn_button_make
@@ -690,15 +690,15 @@
\scrn_menu_action_stop}
\def\scrn_button_make_position#currentparameter#inheritedframed#letparameter#setparameter#text#action%
- {\global\advance\scrn_menu_position\plusone
+ {\global\advance\c_scrn_menu_position\plusone
\doifreferencefoundelse{#action}% 0=not found, 1=same page, >1=elsewhere
- {\scrn_menu_page_mode\ifnum\currentreferencerealpage=\realpageno\plusone\else\plustwo\fi}%
- {\scrn_menu_page_mode\plustwo}%
+ {\c_scrn_menu_page_mode\ifnum\currentreferencerealpage=\realpageno\plusone\else\plustwo\fi}%
+ {\c_scrn_menu_page_mode\plustwo}%
\doglobal\appendetoks
\scrn_menu_button_mp_template
- \to \scrn_menu_mp_data
+ \to \t_scrn_menu_mp_data
\hpos
- {\askedinteractionmenulocation:\number\scrn_menu_position}%
+ {\askedinteractionmenulocation:\number\c_scrn_menu_position}%
{\scrn_button_make
#currentparameter%
#inheritedframed%
@@ -819,7 +819,7 @@
\unexpanded\def\scrn_menu_leftedge
{\hbox to \leftedgewidth \bgroup
\hsize\leftedgewidth
- \settrue\scrn_menu_zerodimensions
+ \settrue\c_scrn_menu_zerodimensions
\scrn_menu_insert\v!left
\egroup
\hskip-\leftedgewidth}
@@ -827,7 +827,7 @@
\unexpanded\def\scrn_menu_rightedge
{\hbox to \rightedgewidth \bgroup
\hsize\rightedgewidth
- \settrue\scrn_menu_zerodimensions
+ \settrue\c_scrn_menu_zerodimensions
\scrn_menu_insert\v!right
\egroup
\hskip-\rightedgewidth}
@@ -835,7 +835,7 @@
\unexpanded\def\scrn_menu_top
{\vbox to \topheight \bgroup
\vsize\topheight
- \settrue\scrn_menu_zerodimensions
+ \settrue\c_scrn_menu_zerodimensions
\scrn_menu_insert\v!top
\kern\zeropoint
\egroup
@@ -844,7 +844,7 @@
\unexpanded\def\scrn_menu_bottom
{\vbox to \bottomheight \bgroup
\vsize\bottomheight
- \settrue\scrn_menu_zerodimensions
+ \settrue\c_scrn_menu_zerodimensions
\scrn_menu_insert\v!bottom
\kern\zeropoint
\egroup
diff --git a/tex/context/base/scrn-fld.mkvi b/tex/context/base/scrn-fld.mkvi
index e5564a70c..7e9ae5b27 100644
--- a/tex/context/base/scrn-fld.mkvi
+++ b/tex/context/base/scrn-fld.mkvi
@@ -146,7 +146,7 @@
\installcommandhandler \??fieldcategory {fieldcategory} \??fieldcategory
\installcommandhandler \??fieldbody {fieldbody} \??fieldbody
-\newbox\scrn_field_box_body
+\newbox\b_scrn_field_body
\setupfieldcategory
[\c!alternative=\v!normal, % normal clone copy
@@ -202,7 +202,7 @@
\setupcurrentfieldbody[#settings]%
\fi
\scrn_field_body_typeset
- \box\scrn_field_box_body
+ \box\b_scrn_field_body
\egroup
\fi}
@@ -346,7 +346,7 @@
%D \ruledhbox{\fitfield[buttona]}
%D \stoptyping
-\newbox\scrn_field_box_fit_symbol
+\newbox\b_scrn_field_fit_symbol
\defineframed
[fitfieldframed]
@@ -362,12 +362,12 @@
{\iflocation
\begingroup
\edef\currentdefaultfieldvalue{\ctxcommand{getdefaultfieldvalue("#tag")}}%
- \setbox\scrn_field_box_fit_symbol\hbox{\symbol[\currentdefaultfieldvalue]}%
+ \setbox\b_scrn_field_fit_symbol\hbox{\symbol[\currentdefaultfieldvalue]}%
\fitfieldframed[#tag]
{\fieldbody[#tag]
- [\c!width=\wd\scrn_field_box_fit_symbol,
- \c!height=\ht\scrn_field_box_fit_symbol,
- \c!depth=\dp\scrn_field_box_fit_symbol,
+ [\c!width=\wd\b_scrn_field_fit_symbol,
+ \c!height=\ht\b_scrn_field_fit_symbol,
+ \c!depth=\dp\b_scrn_field_fit_symbol,
#settings]}%
\endgroup
\fi}
@@ -533,13 +533,13 @@
% opties: veld, label, kader, vertikaal/horizontaal
-\newbox\scrn_field_box_label
-\newbox\scrn_field_box_content
+\newbox\b_scrn_field_label
+\newbox\b_scrn_field_content
% lower framedoffset
\def\scrn_field_set_label_box
- {\setbox\scrn_field_box_label\hbox
+ {\setbox\b_scrn_field_label\hbox
{\reshapeframeboxtrue % else wrong dimensions % still needed?
\inheritedfieldlabelframedframed
{\currentfieldlabel}}}
@@ -548,7 +548,7 @@
% \hbox{\lower\@@fdfieldoffset\hbox{\typesetfield}}
\def\scrn_field_set_content_box
- {\setbox\scrn_field_box_content\hbox
+ {\setbox\b_scrn_field_content\hbox
{\reshapeframeboxtrue % else wrong dimensions (to be checked)
\doifnothing{\fieldcontentframedparameter\c!height}
{\ifconditional\fieldisvertical
@@ -574,24 +574,24 @@
\def\scrn_field_flush_vertical
{\vbox
- {\copy\scrn_field_box_label
+ {\copy\b_scrn_field_label
\fieldtotalframedparameter\c!inbetween
- \copy\scrn_field_box_content}}
+ \copy\b_scrn_field_content}}
\def\scrn_field_flush_horizontal
{\hbox
- {\vbox \ifdim\ht\scrn_field_box_content>\ht\scrn_field_box_label to \ht\scrn_field_box_content \fi
+ {\vbox \ifdim\ht\b_scrn_field_content>\ht\b_scrn_field_label to \ht\b_scrn_field_content \fi
{\fieldtotalframedparameter\c!before
- \copy\scrn_field_box_label
+ \copy\b_scrn_field_label
\fieldtotalframedparameter\c!after}%
\hskip\fieldtotalframedparameter\c!distance
- \vbox \ifdim\ht\scrn_field_box_label>\ht\scrn_field_box_content to \ht\scrn_field_box_label \fi
+ \vbox \ifdim\ht\b_scrn_field_label>\ht\b_scrn_field_content to \ht\b_scrn_field_label \fi
{\fieldtotalframedparameter\c!before
- \box\scrn_field_box_content
+ \box\b_scrn_field_content
\fieldtotalframedparameter\c!after}}}
\def\scrn_field_flush_content
- {\box\scrn_field_box_content}
+ {\box\b_scrn_field_content}
\def\scrn_field_analyze_setups
{\setfalse\fieldlabelshown
@@ -618,11 +618,11 @@
%D Common stuff (obsolete)
-\newcount\scrn_field_system_n
+\newcount\c_scrn_field_system_n
\def\nextsystemfield
- {\global\advance\scrn_field_system_n\plusone
- \def\currentsystemfield{sys::\number\scrn_field_system_n}}
+ {\global\advance\c_scrn_field_system_n\plusone
+ \def\currentsystemfield{sys::\number\c_scrn_field_system_n}}
%D \CONTEXT\ had tooltips right from the moment that it
%D supported fields. Due to the at that moment somewhat
@@ -638,9 +638,9 @@
%D before \tooltip[left]{inbetween}{a very nice tip} after\par
%D \stoptyping
-\newbox \scrn_tooltip_box_anchor
-\newbox \scrn_tooltip_box_text
-\newcount\scrn_tooltip_n
+\newbox \b_scrn_tooltip_anchor
+\newbox \b_scrn_tooltip_text
+\newcount\c_scrn_tooltip_n
\installcorenamespace{tooltip}
@@ -669,50 +669,50 @@
\def\scrn_tooltip_indeed[#settings]#anchortext#tiptext% a more modern aproach (push buttons)
{\dontleavehmode \hbox \bgroup
\dontcomplain
- \global\advance\scrn_tooltip_n\plusone
- \edef\currenttooltipname{tooltip:\number\scrn_tooltip_n}%
- \setbox\scrn_tooltip_box_anchor\hbox
+ \global\advance\c_scrn_tooltip_n\plusone
+ \edef\currenttooltipname{tooltip:\number\c_scrn_tooltip_n}%
+ \setbox\b_scrn_tooltip_anchor\hbox
{\strut#anchortext}%
\doifassignmentelse{#settings}
{\setupcurrenttooltip[#settings]}%
{\setupcurrenttooltip[\c!location=#settings]}%
- \setbox\scrn_tooltip_box_text\hbox
+ \setbox\b_scrn_tooltip_text\hbox
{\lettooltipparameter\c!location\empty
\inheritedtooltipframed{#tiptext}}%
\definesymbol
[\currenttooltipname:txt]
- [\copy\scrn_tooltip_box_text]%
+ [\copy\b_scrn_tooltip_text]%
\definefieldbody
[\currenttooltipname:txt]
[\c!type=push,
- \c!width=\wd\scrn_tooltip_box_text,
- \c!height=\ht\scrn_tooltip_box_text,
- \c!depth=\dp\scrn_tooltip_box_text,
+ \c!width=\wd\b_scrn_tooltip_text,
+ \c!height=\ht\b_scrn_tooltip_text,
+ \c!depth=\dp\b_scrn_tooltip_text,
\c!option=\v!hidden,
\c!values=\currenttooltipname:txt]%
- \setbox\scrn_tooltip_box_text\hbox
+ \setbox\b_scrn_tooltip_text\hbox
{\fieldbody[\currenttooltipname:txt]}%
- \setbox\scrn_tooltip_box_text\hbox
- {\strut\lower\dimexpr.25ex+\ht\scrn_tooltip_box_text\relax\box\scrn_tooltip_box_text}%
+ \setbox\b_scrn_tooltip_text\hbox
+ {\strut\lower\dimexpr.25ex+\ht\b_scrn_tooltip_text\relax\box\b_scrn_tooltip_text}%
\edef\currenttooltiplocation{\tooltipparameter\c!location}%
\ifx\currenttooltiplocation\v!left
- \hsmashed{\hskip\wd\scrn_tooltip_box_anchor\llap{\box\scrn_tooltip_box_text}}%
+ \hsmashed{\hskip\wd\b_scrn_tooltip_anchor\llap{\box\b_scrn_tooltip_text}}%
\else\ifx\currenttooltiplocation\v!middle
- \hsmashed to \wd\scrn_tooltip_box_anchor{\hss\box\scrn_tooltip_box_text\hss}%
+ \hsmashed to \wd\b_scrn_tooltip_anchor{\hss\box\b_scrn_tooltip_text\hss}%
\else
- \hsmashed{\box\scrn_tooltip_box_text}%
+ \hsmashed{\box\b_scrn_tooltip_text}%
\fi\fi
\definesymbol
[\currenttooltipname:but]
- [\hphantom{\copy\scrn_tooltip_box_anchor}]%
+ [\hphantom{\copy\b_scrn_tooltip_anchor}]%
\definefieldbody
[\currenttooltipname:but]
[\c!type=push,
\c!regionin=action(show{\currenttooltipname:txt}),
\c!regionout=action(hide{\currenttooltipname:txt}),
- \c!width=\wd\scrn_tooltip_box_anchor,
- \c!height=\ht\scrn_tooltip_box_anchor,
- \c!depth=\dp\scrn_tooltip_box_anchor]%
+ \c!width=\wd\b_scrn_tooltip_anchor,
+ \c!height=\ht\b_scrn_tooltip_anchor,
+ \c!depth=\dp\b_scrn_tooltip_anchor]%
\hsmashed{\fieldbody[\currenttooltipname:but]}%
\egroup
#anchortext}% when hyphenated the text wil stick out ... such are fields and we cannot use a link here
@@ -751,7 +751,7 @@
\fi
\getvalue{scrn_fieldstack:#tag}}
-\newbox\scrn_fieldstack_box
+\newbox\b_scrn_fieldstack_box
\def\scrn_fieldstack_add#tag#settings#symbol%
{\advance\scratchcounter\plusone
@@ -761,15 +761,15 @@
\else
\definefieldbody[\currentfieldstackname][\c!type=check,\c!values={#symbol,\empty},\c!default=]%
\fi
- \setbox\scrn_fieldstack_box\hbox{\symbol[#symbol]}%
+ \setbox\b_scrn_fieldstack_box\hbox{\symbol[#symbol]}%
\setcollector
[fieldstack]
{\fieldbody
[\currentfieldstackname]
[\c!option=\v!readonly,
- \c!width=\wd\scrn_fieldstack_box,
- \c!height=\ht\scrn_fieldstack_box,
- \c!depth=\dp\scrn_fieldstack_box,
+ \c!width=\wd\b_scrn_fieldstack_box,
+ \c!height=\ht\b_scrn_fieldstack_box,
+ \c!depth=\dp\b_scrn_fieldstack_box,
#settings]}}
\def\scrn_fieldstack_construct[#tag][#symbols][#settings]% start=n, 0 == leeg
@@ -802,7 +802,7 @@
%D \framed[background=WithTest]{toggle}
%D \stoptyping
-\newcount\scrn_rollbutton_n
+\newcount\c_scrn_rollbutton_n
\unexpanded\def\overlayrollbutton
{\dodoubleargument\scrn_rollbutton_overlay}
@@ -810,12 +810,12 @@
\def\scrn_rollbutton_overlay[#regionin][#regionout]%
{\iflocation
\bgroup
- \global\advance\scrn_rollbutton_n\plusone
+ \global\advance\c_scrn_rollbutton_n\plusone
\definesymbol
- [rollbutton:\number\scrn_rollbutton_n]
+ [rollbutton:\number\c_scrn_rollbutton_n]
[{\framed[\c!frame=\v!off,\c!width=\overlaywidth,\c!height=\overlayheight]{}}]%
\definefieldbody
- [rollbutton:\number\scrn_rollbutton_n]
+ [rollbutton:\number\c_scrn_rollbutton_n]
[\c!type=push,
\c!regionin={#regionin},
\c!regionout={#regionout},
@@ -850,7 +850,7 @@
% \stopTEXpage
% \stoptext
-\newcount\scrn_pushbutton_n
+\newcount\c_scrn_pushbutton_n
\unexpanded\def\definepushbutton % name optional setup
{\dodoubleempty\scrn_pushbutton_define}
@@ -868,7 +868,7 @@
\def\scrn_pushbutton_handle#tag#settings#reference%
{\bgroup
- \global\advance\scrn_pushbutton_n\plusone
+ \global\advance\c_scrn_pushbutton_n\plusone
\setupfield
[pushbutton]
[\c!frame=\v!overlay,
@@ -876,12 +876,12 @@
\c!clickout={#reference},
#settings]%
\definefield
- [pushbutton:\number\scrn_pushbutton_n]%
+ [pushbutton:\number\c_scrn_pushbutton_n]%
[push]
[pushbutton]
[pushsymbol:#tag:n,pushsymbol:#tag:r,pushsymbol:#tag:d]%
\fitfield
- [pushbutton:\number\scrn_pushbutton_n]%
+ [pushbutton:\number\c_scrn_pushbutton_n]%
\egroup}
\unexpanded\def\definepushsymbol
@@ -938,8 +938,8 @@
r=green,
d=blue]
-\newcount\scrn_rollbutton_n_button
-\newcount\scrn_rollbutton_n_symbol
+\newcount\c_scrn_rollbutton_n_button
+\newcount\c_scrn_rollbutton_n_symbol
\unexpanded\def\rollbutton
{\dodoubleempty\scrn_rollbutton}
@@ -961,8 +961,8 @@
\def\scrn_rollbutton[#tag][#settings]#text[#reference]%
{\dontleavehmode
\bgroup
- \doglobal\advance\scrn_rollbutton_n_button
- \doglobal\advance\scrn_rollbutton_n_symbol
+ \doglobal\advance\c_scrn_rollbutton_n_button
+ \doglobal\advance\c_scrn_rollbutton_n_symbol
\iffirstargument
\ifsecondargument
\edef\currentinteractionmenu{#tag}%
@@ -980,20 +980,20 @@
\let\scrn_rollbutton_symbol\scrn_rollbutton_symbol_b
\fi
% todo: share symbols, tricky since different dimensions
- \definesymbol[rollsymbol:\number\scrn_rollbutton_n_symbol:n][\scrn_rollbutton_symbol{n}{#text}]%
- \definesymbol[rollsymbol:\number\scrn_rollbutton_n_symbol:r][\scrn_rollbutton_symbol{r}{#text}]%
- \definesymbol[rollsymbol:\number\scrn_rollbutton_n_symbol:d][\scrn_rollbutton_symbol{d}{#text}]%
+ \definesymbol[rollsymbol:\number\c_scrn_rollbutton_n_symbol:n][\scrn_rollbutton_symbol{n}{#text}]%
+ \definesymbol[rollsymbol:\number\c_scrn_rollbutton_n_symbol:r][\scrn_rollbutton_symbol{r}{#text}]%
+ \definesymbol[rollsymbol:\number\c_scrn_rollbutton_n_symbol:d][\scrn_rollbutton_symbol{d}{#text}]%
\setupfield
[rollbutton]
[\c!frame=\v!off,
\c!offset=\v!overlay,
\c!clickout={#reference}]%
\definefield
- [rollbutton:\number\scrn_rollbutton_n_button][push][rollbutton]
- [rollsymbol:\number\scrn_rollbutton_n_symbol:n,%
- rollsymbol:\number\scrn_rollbutton_n_symbol:r,%
- rollsymbol:\number\scrn_rollbutton_n_symbol:d]%
- \fitfield[rollbutton:\number\scrn_rollbutton_n_button]%
+ [rollbutton:\number\c_scrn_rollbutton_n_button][push][rollbutton]
+ [rollsymbol:\number\c_scrn_rollbutton_n_symbol:n,%
+ rollsymbol:\number\c_scrn_rollbutton_n_symbol:r,%
+ rollsymbol:\number\c_scrn_rollbutton_n_symbol:d]%
+ \fitfield[rollbutton:\number\c_scrn_rollbutton_n_button]%
\egroup}
\unexpanded\def\scrn_rollbutton_symbol_indeed#getparameter#inheritedframed#setparameter#usestyleandcolor#what#text%
diff --git a/tex/context/base/scrn-hlp.mkvi b/tex/context/base/scrn-hlp.mkvi
index a6aa5b9f1..f5a78fb08 100644
--- a/tex/context/base/scrn-hlp.mkvi
+++ b/tex/context/base/scrn-hlp.mkvi
@@ -55,8 +55,8 @@
% also status
-\newbox \scrn_help_box
-\newcount\scrn_help_n
+\newbox \b_scrn_help_box
+\newcount\c_scrn_help_n
\definesystemattribute[help][public]
@@ -78,8 +78,8 @@
\unexpanded\def\scrn_help_argument#category%
{\def\currenthelp{#category}%
- \global\advance\scrn_help_n\plusone
- \edef\currenthelpname{help:\number\scrn_help_n}%
+ \global\advance\c_scrn_help_n\plusone
+ \edef\currenthelpname{help:\number\c_scrn_help_n}%
\doifelselocation
{\dosingleempty\scrn_help_argument_indeed}
{\dosingleempty\scrn_help_argument_ignore}}
@@ -88,20 +88,20 @@
{\edef\currenthelpreference{#reference}%
\dontleavehmode \hbox \bgroup
\dontcomplain
- \setbox\scrn_help_box\hbox{\strut#text}%
+ \setbox\b_scrn_help_box\hbox{\strut#text}%
\doregisterhelp{#target}%
\egroup % can be usernode instead
\goto
- {\helpsignal{\number\scrn_help_n}#target}%
- [\helpaction{\number\scrn_help_n}]}
+ {\helpsignal{\number\c_scrn_help_n}#target}%
+ [\helpaction{\number\c_scrn_help_n}]}
\def\scrn_help_argument_ignore[#reference]#text#target%
{#target}
\unexpanded\def\scrn_help_start#category%
{\def\currenthelp{#category}%
- \global\advance\scrn_help_n\plusone
- \edef\currenthelpname{help:\number\scrn_help_n}%
+ \global\advance\c_scrn_help_n\plusone
+ \edef\currenthelpname{help:\number\c_scrn_help_n}%
\dosingleempty\scrn_help_start_indeed}
\def\scrn_help_start_indeed[#reference]%
@@ -114,33 +114,33 @@
\fi}
\def\scrn_help_register#text%
- {\setbox\scrn_help_box\hbox{\inheritedhelpframed{#text}}%
+ {\setbox\b_scrn_help_box\hbox{\inheritedhelpframed{#text}}%
\definesymbol
[\currenthelpname]
- [\copy\scrn_help_box]%
+ [\copy\b_scrn_help_box]%
\definefieldbody
[\currenthelpname]
[\c!type=push,
- \c!width=\wd\scrn_help_box,
- \c!height=\ht\scrn_help_box,
- \c!depth=\dp\scrn_help_box,
+ \c!width=\wd\b_scrn_help_box,
+ \c!height=\ht\b_scrn_help_box,
+ \c!depth=\dp\b_scrn_help_box,
\c!option=\v!hidden,
\c!clickin=action(hide{\currenthelpname}),
\c!closepage=action(hide{\currenthelpname}),
\c!values=\currenthelpname]%
- \setbox\scrn_help_box\hbox
+ \setbox\b_scrn_help_box\hbox
{\fieldbody[\currenthelpname]}%
- \ctxcommand{registerhelp(\number\scrn_help_n,"\currenthelpreference",\number\scrn_help_box)}}
+ \ctxcommand{registerhelp(\number\c_scrn_help_n,"\currenthelpreference",\number\b_scrn_help_box)}}
\def\doifelsehelp
- {\ifcase\scrn_help_n
+ {\ifcase\c_scrn_help_n
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
\def\placehelp % was \helpdata
- {\ifinpagebody\ifcase\scrn_help_n\else
+ {\ifinpagebody\ifcase\c_scrn_help_n\else
\ctxcommand{collecthelp(255)}% rather hard coded ... bad
\fi\fi}
diff --git a/tex/context/base/scrn-pag.mkvi b/tex/context/base/scrn-pag.mkvi
index fc6215def..66f197ffd 100644
--- a/tex/context/base/scrn-pag.mkvi
+++ b/tex/context/base/scrn-pag.mkvi
@@ -31,7 +31,7 @@
\newdimen\canvasmaxwidth
\newdimen\canvasmaxheight
-\newconditional\scrn_canvas_tight_page
+\newconditional\c_scrn_canvas_tight_page
\def\scrn_canvas_calculate
{\begingroup
@@ -102,9 +102,9 @@
\global\canvasheight\currentinteractionscreenheight
\fi\fi\fi
\ifconditional\c_page_layouts_location_is_set
- \global\setfalse\scrn_canvas_tight_page
+ \global\setfalse\c_scrn_canvas_tight_page
\fi
- \ifconditional\scrn_canvas_tight_page
+ \ifconditional\c_scrn_canvas_tight_page
\global\canvasmaxwidth \paperwidth
\global\canvasmaxheight\paperheight
\else
@@ -146,8 +146,8 @@
\appendtoks
\doifcommonelse{\interactionscreenparameter\c!option}{\v!max,\v!fit}%
- {\global\settrue \scrn_canvas_tight_page}%
- {\global\setfalse\scrn_canvas_tight_page}%
+ {\global\settrue \c_scrn_canvas_tight_page}%
+ {\global\setfalse\c_scrn_canvas_tight_page}%
\to \everysetupinteractionscreen
\appendtoks
diff --git a/tex/context/base/scrn-wid.mkvi b/tex/context/base/scrn-wid.mkvi
index 26b06f759..7a595cf2d 100644
--- a/tex/context/base/scrn-wid.mkvi
+++ b/tex/context/base/scrn-wid.mkvi
@@ -60,9 +60,9 @@
% startattachment -> temp file
-\newbox\scrn_attachment_box_collect
-\newbox\scrn_attachment_box_link
-\newbox\scrn_attachment_box_symbol
+\newbox\b_scrn_attachment_collect
+\newbox\b_scrn_attachment_link
+\newbox\b_scrn_attachment_symbol
\installcorenamespace{attachment}
\installcorenamespace{attachmentlocation}
@@ -185,10 +185,10 @@
\else
\ctxcommand{presetsymbollist("\attachmentparameter\c!symbol")}%
% we cannot yet ask for the wd/ht/dp of an xform else we could use those
- \setbox\scrn_attachment_box_symbol\hbox{\symbol[\lastpredefinedsymbol]}%
- \ifx\currentattachmentwidth \v!fit\edef\currentattachmentwidth {\wd\scrn_attachment_box_symbol}\fi
- \ifx\currentattachmentheight\v!fit\edef\currentattachmentheight{\ht\scrn_attachment_box_symbol}\fi
- \ifx\currentattachmentdepth \v!fit\edef\currentattachmentdepth {\dp\scrn_attachment_box_symbol}\fi
+ \setbox\b_scrn_attachment_symbol\hbox{\symbol[\lastpredefinedsymbol]}%
+ \ifx\currentattachmentwidth \v!fit\edef\currentattachmentwidth {\wd\b_scrn_attachment_symbol}\fi
+ \ifx\currentattachmentheight\v!fit\edef\currentattachmentheight{\ht\b_scrn_attachment_symbol}\fi
+ \ifx\currentattachmentdepth \v!fit\edef\currentattachmentdepth {\dp\b_scrn_attachment_symbol}\fi
\fi
\ctxcommand{insertattachment{
tag = "\currentattachment",
@@ -210,11 +210,11 @@
name = "\attachmentparameter\c!name",
buffer = "\attachmentparameter\c!buffer",
}}%
- \setbox\scrn_attachment_box_link\hbox{\scrn_attachment_place}%
- \wd\scrn_attachment_box_link\currentattachmentwidth
- \ht\scrn_attachment_box_link\currentattachmentheight
- \dp\scrn_attachment_box_link\currentattachmentdepth
- \box\scrn_attachment_box_link}
+ \setbox\b_scrn_attachment_link\hbox{\scrn_attachment_place}%
+ \wd\b_scrn_attachment_link\currentattachmentwidth
+ \ht\b_scrn_attachment_link\currentattachmentheight
+ \dp\b_scrn_attachment_link\currentattachmentdepth
+ \box\b_scrn_attachment_link}
\setvalue{scrn_attachment_method_\v!hidden}%
{\ctxcommand{insertattachment{
@@ -226,7 +226,7 @@
\def\scrn_attachment_place
{\executeifdefined
{\??attachmentlocation\attachmentparameter\c!location}\hbox
- {\box\scrn_attachment_box_link}}
+ {\box\b_scrn_attachment_link}}
\setvalue{\??attachmentlocation\v!inmargin }{\inmargin }
\setvalue{\??attachmentlocation\v!leftedge }{\inleftedge }
@@ -237,17 +237,17 @@
\setvalue{\??attachmentlocation\v!none }{\scrn_attachment_collect}
\def\scrn_attachment_collect#content%
- {\global\setbox\scrn_attachment_box_collect\hbox\bgroup
- \ifvoid\scrn_attachment_box_collect\else
- \box\scrn_attachment_box_collect
+ {\global\setbox\b_scrn_attachment_collect\hbox\bgroup
+ \ifvoid\b_scrn_attachment_collect\else
+ \box\b_scrn_attachment_collect
\hskip\attachmentparameter\c!distance
\fi
#content%
\egroup}
\unexpanded\def\placeattachments
- {\ifvoid\scrn_attachment_box_collect\else
- \box\scrn_attachment_box_collect
+ {\ifvoid\b_scrn_attachment_collect\else
+ \box\b_scrn_attachment_collect
\fi}
\defineattachment[attachment]
@@ -356,10 +356,10 @@
\installcommandhandler \??comment {comment} \??comment
-\newbox\scrn_comment_box_collect
-\newbox\scrn_comment_box_rendering
-\newbox\scrn_comment_box_link
-\newbox\scrn_comment_box_symbol
+\newbox\b_scrn_comment_collect
+\newbox\b_scrn_comment_rendering
+\newbox\b_scrn_comment_link
+\newbox\b_scrn_comment_symbol
\setupcomment
[\c!state=\v!start,
@@ -430,13 +430,15 @@
\unexpanded\def\scrn_comment_stop
{}
+\installcorenamespace{commentmethods}
+
\def\scrn_comment_inject
- {\expandcheckedcsname{scrn_comment_method_}{\commentparameter\c!method}\v!normal}
+ {\expandcheckedcsname\??commentmethods{\commentparameter\c!method}\v!normal}
%D Beware: comments symbols don't scale in acrobat (cf. spec but somewhat
%D weird, esp because for instance attachment symbols do scale).
-\setvalue{scrn_comment_method_\v!normal}%
+\setvalue{\??commentmethods\v!normal}%
{\edef\currentcommentsymbol{\commentparameter\c!symbol}%
\edef\currentcommentwidth {\commentparameter\c!width }%
\edef\currentcommentheight{\commentparameter\c!height}%
@@ -448,10 +450,10 @@
\else
\ctxcommand{presetsymbollist("\commentparameter\c!symbol")}%
% we cannot yet ask for the wd/ht/dp of an xform else we could use those
- \setbox\scrn_comment_box_symbol\hbox{\symbol[\lastpredefinedsymbol]}%
- \ifx\currentcommentwidth \v!fit\edef\currentcommentwidth {\wd\scrn_comment_box_symbol}\fi
- \ifx\currentcommentheight\v!fit\edef\currentcommentheight{\ht\scrn_comment_box_symbol}\fi
- \ifx\currentcommentdepth \v!fit\edef\currentcommentdepth {\dp\scrn_comment_box_symbol}\fi
+ \setbox\b_scrn_comment_symbol\hbox{\symbol[\lastpredefinedsymbol]}%
+ \ifx\currentcommentwidth \v!fit\edef\currentcommentwidth {\wd\b_scrn_comment_symbol}\fi
+ \ifx\currentcommentheight\v!fit\edef\currentcommentheight{\ht\b_scrn_comment_symbol}\fi
+ \ifx\currentcommentdepth \v!fit\edef\currentcommentdepth {\dp\b_scrn_comment_symbol}\fi
\fi
\ctxcommand{insertcomment{
tag = "\currentcomment",
@@ -471,12 +473,12 @@
buffer = "\v!comment",
layer = "\commentparameter\c!textlayer"
}}%
- \wd\scrn_comment_box_link\currentcommentwidth
- \ht\scrn_comment_box_link\currentcommentheight
- \dp\scrn_comment_box_link\currentcommentdepth
+ \wd\b_scrn_comment_link\currentcommentwidth
+ \ht\b_scrn_comment_link\currentcommentheight
+ \dp\b_scrn_comment_link\currentcommentdepth
\scrn_comment_place}
-\setvalue{scrn_comment_method_\v!hidden}%
+\setvalue{\??commentmethods\v!hidden}%
{}
% todo: dedicated margin classes
@@ -484,7 +486,7 @@
\def\scrn_comment_place
{\executeifdefined
{\??commentlocation\commentparameter\c!location}\hbox
- {\hbox{\box\scrn_comment_box_link}}}
+ {\hbox{\box\b_scrn_comment_link}}}
\setvalue{\??commentlocation\v!inmargin }{\inmargin }
\setvalue{\??commentlocation\v!leftedge }{\inleftedge }
@@ -495,17 +497,17 @@
\setvalue{\??commentlocation\v!none }{\scrn_comment_collect}
\def\scrn_comment_collect#content%
- {\global\setbox\scrn_comment_box_collect\hbox\bgroup
- \ifvoid\scrn_comment_box_collect\else
- \box\scrn_comment_box_collect
+ {\global\setbox\b_scrn_comment_collect\hbox\bgroup
+ \ifvoid\b_scrn_comment_collect\else
+ \box\b_scrn_comment_collect
\hskip\commentparameter\c!distance
\fi
#content%
\egroup}
\unexpanded\def\placecomments
- {\ifvoid\scrn_comment_box_collect\else
- \box\scrn_comment_box_collect
+ {\ifvoid\b_scrn_comment_collect\else
+ \box\b_scrn_comment_collect
\fi}
\definecomment[comment]
diff --git a/tex/context/base/spac-adj.mkiv b/tex/context/base/spac-adj.mkiv
index 3a72d2a5a..447dd7229 100644
--- a/tex/context/base/spac-adj.mkiv
+++ b/tex/context/base/spac-adj.mkiv
@@ -28,9 +28,9 @@
\unexpanded\def\graphicvadjust % currently not enabled ... nasty bidi handling
{\enablegraphicvadjust % and no longer needed anyway
- \dowithnextboxcontentcs\forgetall\spacings_graphic_vadjust_finish\vbox}
+ \dowithnextboxcontentcs\forgetall\spac_vadjust_graphic_finish\vbox}
-\def\spacings_graphic_vadjust_finish
+\def\spac_vadjust_graphic_finish
{\vadjust
{\vbox attr \graphicvadjustattribute \plusone
{\unvbox\nextbox
@@ -41,9 +41,9 @@
\verticalstrut}}}
\unexpanded\def\fakedvadjust
- {\dowithnextboxcs\spacings_faked_vadjust_finish\vtop}
+ {\dowithnextboxcs\spac_vadjust_faked_finish\vtop}
-\def\spacings_faked_vadjust_finish
+\def\spac_vadjust_faked_finish
{\setbox\nextbox\hbox{\llap{\lower\strutdepth\box\nextbox}}%
\smashedbox\nextbox}
diff --git a/tex/context/base/spac-ali.mkiv b/tex/context/base/spac-ali.mkiv
index 34cddf952..943de1617 100644
--- a/tex/context/base/spac-ali.mkiv
+++ b/tex/context/base/spac-ali.mkiv
@@ -37,21 +37,22 @@
\installcorenamespace{aligncommand}
\installcorenamespace{alignhorizontal}
\installcorenamespace{alignvertical}
-\installcorenamespace{alignmentcache}
+\installcorenamespace{alignmentnormalcache}
+\installcorenamespace{alignmentraggedcache}
\newtoks\everyresetalign % todo
% We will not use bodydir and pagedir so we disable them. That way we get
% normal hyperlink support.
-\let\saved_normal_body_dir\normalbodydir
-\let\saved_normal_page_dir\normalpagedir
+\let\spac_directions_normal_body_dir\normalbodydir
+\let\spac_directions_normal_page_dir\normalpagedir
-\unexpanded\def\bodydir{\afterassignment\bodydir_indeed\saved_normal_body_dir} \let\normalbodydir\bodydir
-\unexpanded\def\pagedir{\afterassignment\pagedir_indeed\saved_normal_page_dir} \let\normalpagedir\pagedir
+\unexpanded\def\bodydir{\afterassignment\spac_directions_bodydir_indeed\spac_directions_normal_body_dir} \let\normalbodydir\bodydir
+\unexpanded\def\pagedir{\afterassignment\spac_directions_pagedir_indeed\spac_directions_normal_page_dir} \let\normalpagedir\pagedir
-\def\bodydir_indeed{\saved_normal_body_dir TLT\relax}
-\def\pagedir_indeed{\saved_normal_page_dir TLT\relax}
+\def\spac_directions_bodydir_indeed{\spac_directions_normal_body_dir TLT\relax}
+\def\spac_directions_pagedir_indeed{\spac_directions_normal_page_dir TLT\relax}
% This will become a more advanced layout controller soon:
@@ -61,35 +62,35 @@
\unexpanded\def\lefttoright
{\ifvmode
- \lefttoright_vmode
+ \spac_directions_lefttoright_vmode
\else
- \lefttoright_hmode
+ \spac_directions_lefttoright_hmode
\fi}
-\unexpanded\def\lefttoright_vmode
+\unexpanded\def\spac_directions_lefttoright_vmode
{\settrue\displaylefttoright
\settrue\inlinelefttoright
\textdir TLT\relax
\pardir TLT\relax}
-\unexpanded\def\lefttoright_hmode
+\unexpanded\def\spac_directions_lefttoright_hmode
{\settrue\inlinelefttoright
\textdir TLT\relax}
\unexpanded\def\righttoleft
{\ifvmode
- \righttoleft_vmode
+ \spac_directions_righttoleft_vmode
\else
- \righttoleft_hmode
+ \spac_directions_righttoleft_hmode
\fi}
-\unexpanded\def\righttoleft_vmode
+\unexpanded\def\spac_directions_righttoleft_vmode
{\setfalse\displaylefttoright
\setfalse\inlinelefttoright
\textdir TRT\relax
\pardir TRT\relax}
-\unexpanded\def\righttoleft_hmode
+\unexpanded\def\spac_directions_righttoleft_hmode
{\textdir TRT\relax
\setfalse\inlinelefttoright}
@@ -103,24 +104,24 @@
\unexpanded\def\synchronizelayoutdirection
{\ifconditional\layoutlefttoright
- \synchronizedirection_lr
+ \spac_directions_synchronize_lr
\else
- \synchronizedirection_rl
+ \spac_directions_synchronize_rl
\fi}
\unexpanded\def\synchronizedisplaydirection
{\ifconditional\displaylefttoright
- \synchronizedirection_lr
+ \spac_directions_synchronize_lr
\else
- \synchronizedirection_rl
+ \spac_directions_synchronize_rl
\fi}
-\def\synchronizedirection_lr
+\def\spac_directions_synchronize_lr
{\settrue\inlinelefttoright
\textdir TLT\relax
\pardir TLT\relax}
-\def\synchronizedirection_rl
+\def\spac_directions_synchronize_rl
{\setfalse\inlinelefttoright
\textdir TRT\relax
\pardir TRT\relax}
@@ -165,22 +166,23 @@
\let\dohyphens\relax
-\newcount\c_spacing_minimum_tolerance \c_spacing_minimum_tolerance = 1500
-\newcount\c_spacing_normal_tolerance \c_spacing_normal_tolerance = 3000
-\newcount\c_spacing_extreme_tolerance \c_spacing_extreme_tolerance = 4500
+\newconstant\c_spac_tolerance_default \c_spac_tolerance_default = 1500 % shouldn't that be 200
+\newconstant\c_spac_tolerance_minimum \c_spac_tolerance_minimum = 1500
+\newconstant\c_spac_tolerance_normal \c_spac_tolerance_normal = 3000
+\newconstant\c_spac_tolerance_extreme \c_spac_tolerance_extreme = 4500
-\def\spacing_raggedness_left {\plustwo\bodyfontsize}
-\def\spacing_raggedness_right {\plustwo\bodyfontsize}
-\def\spacing_raggedness_middle{\plussix\bodyfontsize} % overloaded below
+\def\spac_align_set_raggedness_left {\plustwo\bodyfontsize}
+\def\spac_align_set_raggedness_right {\plustwo\bodyfontsize}
+\def\spac_align_set_raggedness_middle{\plussix\bodyfontsize} % overloaded below
% oeps, hsize can be 0pt in which case we get a strange division
% was: 6\bodyfontsize, fails on: \placefigure{x $x=x$ x}{}
-\def\spacing_raggedness_middle{\ifdim\hsize=\zeropoint\plussix\bodyfontsize\else.5\hsize\fi}
+\def\spac_align_set_raggedness_middle{\ifdim\hsize=\zeropoint\plussix\bodyfontsize\else.5\hsize\fi}
\unexpanded\def\setraggedness#1% tricky .. we keep the global tolerance otherwise ... to be reconsidered
- {\ifnum\tolerance<\c_spacing_minimum_tolerance
- \tolerance\c_spacing_minimum_tolerance % small values have unwanted side effects
+ {\ifnum\tolerance<\c_spac_tolerance_minimum
+ \tolerance\c_spac_tolerance_minimum % small values have unwanted side effects
\else
% todo: take set value or none .. better done elsewhere (200 is normal)
\fi
@@ -188,44 +190,44 @@
\hyphenpenalty\dimexpr2.8\hsize/\dimexpr#1\relax\relax % 50 in raggedright/raggedleft
\fi}
-\unexpanded\def\ragged_command_tolerant
- {\tolerance\c_spacing_normal_tolerance}
+\unexpanded\def\spac_align_set_tolerant
+ {\tolerance\c_spac_tolerance_normal}
-\unexpanded\def\ragged_command_very_tolerant
- {\tolerance\c_spacing_extreme_tolerance}
+\unexpanded\def\spac_align_set_very_tolerant
+ {\tolerance\c_spac_tolerance_extreme}
-\unexpanded\def\ragged_command_stretch
+\unexpanded\def\spac_align_set_stretch
{\emergencystretch\bodyfontsize}
% Vertical
-\newconstant\c_spacing_state_vertical
+\newconstant\c_spac_align_state_vertical
-\unexpanded\def\spacing_vertical_none
+\unexpanded\def\spac_align_set_vertical_none
{\let\raggedtopcommand \relax
\let\raggedbottomcommand\relax}
-\unexpanded\def\spacing_vertical_lohi
+\unexpanded\def\spac_align_set_vertical_lohi
{\let\raggedtopcommand \vfilll
\let\raggedbottomcommand\vfilll}
-\unexpanded\def\spacing_vertical_low
+\unexpanded\def\spac_align_set_vertical_low
{\let\raggedtopcommand \vfilll
\let\raggedbottomcommand\relax}
-\unexpanded\def\spacing_vertical_high
+\unexpanded\def\spac_align_set_vertical_high
{\let\raggedtopcommand \relax
\let\raggedbottomcommand\vfilll}
-\def\spacing_flush_vertical
- {\ifcase\c_spacing_state_vertical
- \spacing_vertical_none
+\def\spac_align_flush_vertical
+ {\ifcase\c_spac_align_state_vertical
+ \spac_align_set_vertical_none
\or
- \spacing_vertical_lohi
+ \spac_align_set_vertical_lohi
\or
- \spacing_vertical_low
+ \spac_align_set_vertical_low
\or
- \spacing_vertical_high
+ \spac_align_set_vertical_high
\fi}
% Horizontal
@@ -236,193 +238,194 @@
\newconstant\raggedstatus % public
-\newconstant\c_spacing_state_horizontal
-\newconstant\c_spacing_state_broad
+\newconstant\c_spac_align_state_horizontal
+\newconstant\c_spac_align_state_broad
-\def\spacing_ragged_fill_amount {\plusone fil}
-\def\spacing_ragged_fill_amount_negative {\minusone fil}
-\def\spacing_ragged_fill_amount_double {\plustwo fil}
-\def\spacing_ragged_fill_amount_space {\plustwo fil} % can be added to xspace if we have a key
-\def\spacing_ragged_fill_amount_half {.5fil}
-\let\spacing_ragged_space_amount \interwordspace
-\def\spacing_ragged_space_amount_x {.5\emwidth}
+\def\v_spac_align_fill_amount {\plusone fil}
+\def\v_spac_align_fill_amount_negative {\minusone fil}
+\def\v_spac_align_fill_amount_double {\plustwo fil}
+\def\v_spac_align_fill_amount_space {\plustwo fil} % can be added to xspace if we have a key
+\def\v_spac_align_fill_amount_half {.5fil}
+\let\v_spac_align_space_amount \interwordspace
+\def\v_spac_align_space_amount_x {.5\emwidth}
\newskip\s_zero_plus_one_fil \s_zero_plus_one_fil = 0pt plus 1fil
\newskip\s_zero_plus_zero \s_zero_plus_zero = 0pt plus 0pt
% \!!plus ... slower than inline
-\unexpanded\def\spacing_horizontal_none
+\unexpanded\def\spac_align_set_horizontal_none % should also relax \updateraggedskips
{\raggedstatus\zerocount
\attribute\alignstateattribute\attributeunsetvalue
\leftskip \plusone\leftskip
\rightskip \plusone\rightskip
\spaceskip \zeropoint
\xspaceskip \zeropoint
- \parfillskip\s_zero_plus_one_fil} % new
+ \parfillskip\s_zero_plus_one_fil % new
+ \let\updateraggedskips\relax} % no need for adaption
-\unexpanded\def\spacing_horizontal_left
- {\setraggedness\spacing_raggedness_left
+\unexpanded\def\spac_align_set_horizontal_left
+ {\setraggedness\spac_align_set_raggedness_left
\raggedstatus\plusone
\attribute\alignstateattribute\plusone
- \leftskip \plusone\leftskip \!!plus\spacing_raggedness_left
+ \leftskip \plusone\leftskip \!!plus\spac_align_set_raggedness_left
\rightskip \plusone\rightskip\!!plus\zeropoint
- \spaceskip \spacing_ragged_space_amount
- \xspaceskip \spacing_ragged_space_amount_x
+ \spaceskip \v_spac_align_space_amount
+ \xspaceskip \v_spac_align_space_amount_x
\parfillskip\s_zero_plus_zero
\parindent \zeropoint
\relax}
-\unexpanded\def\spacing_horizontal_center
- {\setraggedness\spacing_raggedness_middle
+\unexpanded\def\spac_align_set_horizontal_center
+ {\setraggedness\spac_align_set_raggedness_middle
\raggedstatus\plustwo
\attribute\alignstateattribute\plustwo
- \leftskip \plusone\leftskip \!!plus\spacing_raggedness_middle
- \rightskip \plusone\rightskip\!!plus\spacing_raggedness_middle
- \spaceskip \spacing_ragged_space_amount
- \xspaceskip \spacing_ragged_space_amount_x
+ \leftskip \plusone\leftskip \!!plus\spac_align_set_raggedness_middle
+ \rightskip \plusone\rightskip\!!plus\spac_align_set_raggedness_middle
+ \spaceskip \v_spac_align_space_amount
+ \xspaceskip \v_spac_align_space_amount_x
\parfillskip\s_zero_plus_zero
\parindent \zeropoint
\relax}
-\unexpanded\def\spacing_horizontal_right
- {\setraggedness\spacing_raggedness_right
+\unexpanded\def\spac_align_set_horizontal_right
+ {\setraggedness\spac_align_set_raggedness_right
\raggedstatus\plusthree
\attribute\alignstateattribute\plusthree
\leftskip \plusone\leftskip \!!plus\zeropoint
- \rightskip \plusone\rightskip\!!plus\spacing_raggedness_right
- \spaceskip \spacing_ragged_space_amount
- \xspaceskip \spacing_ragged_space_amount_x
+ \rightskip \plusone\rightskip\!!plus\spac_align_set_raggedness_right
+ \spaceskip \v_spac_align_space_amount
+ \xspaceskip \v_spac_align_space_amount_x
\parfillskip\s_zero_plus_one_fil
%\parindent \parindent
\relax}
-\unexpanded\def\spacing_horizontal_very_left
+\unexpanded\def\spac_align_set_horizontal_very_left
{\raggedstatus\plusone
\attribute\alignstateattribute\plusone
- \leftskip \plusone\leftskip \!!plus\spacing_ragged_fill_amount
+ \leftskip \plusone\leftskip \!!plus\v_spac_align_fill_amount
\rightskip \plusone\rightskip\!!plus\zeropoint
- \spaceskip \spacing_ragged_space_amount
- \xspaceskip \spacing_ragged_space_amount_x
+ \spaceskip \v_spac_align_space_amount
+ \xspaceskip \v_spac_align_space_amount_x
\parfillskip\s_zero_plus_zero
\parindent \zeropoint
\relax}
-\unexpanded\def\spacing_horizontal_very_center
+\unexpanded\def\spac_align_set_horizontal_very_center
{\raggedstatus\plustwo
\attribute\alignstateattribute\plustwo
- \leftskip \plusone\leftskip \!!plus\spacing_ragged_fill_amount
- \rightskip \plusone\rightskip\!!plus\spacing_ragged_fill_amount
- \spaceskip \spacing_ragged_space_amount
- \xspaceskip \spacing_ragged_space_amount_x
+ \leftskip \plusone\leftskip \!!plus\v_spac_align_fill_amount
+ \rightskip \plusone\rightskip\!!plus\v_spac_align_fill_amount
+ \spaceskip \v_spac_align_space_amount
+ \xspaceskip \v_spac_align_space_amount_x
\parfillskip\s_zero_plus_zero
\parindent \zeropoint
\relax}
-\unexpanded\def\spacing_horizontal_very_right
+\unexpanded\def\spac_align_set_horizontal_very_right
{\raggedstatus\plusthree
\attribute\alignstateattribute\plusthree
\leftskip \plusone\leftskip \!!plus\zeropoint
- \rightskip \plusone\rightskip\!!plus\spacing_ragged_fill_amount
- \spaceskip \spacing_ragged_space_amount
- \xspaceskip \spacing_ragged_space_amount_x
+ \rightskip \plusone\rightskip\!!plus\v_spac_align_fill_amount
+ \spaceskip \v_spac_align_space_amount
+ \xspaceskip \v_spac_align_space_amount_x
\parfillskip\s_zero_plus_zero
%\parindent \parindent
\relax}
-\unexpanded\def\spacing_horizontal_wide_center
- {\setraggedness\spacing_raggedness_middle
+\unexpanded\def\spac_align_set_horizontal_wide_center
+ {\setraggedness\spac_align_set_raggedness_middle
\raggedstatus\plustwo
\attribute\alignstateattribute\plustwo
- \leftskip \plusone\leftskip \!!plus\spacing_ragged_fill_amount_half
- \rightskip \plusone\rightskip\!!plus\spacing_ragged_fill_amount_half
- \spaceskip \spacing_ragged_space_amount
- \xspaceskip \spacing_ragged_space_amount_x
+ \leftskip \plusone\leftskip \!!plus\v_spac_align_fill_amount_half
+ \rightskip \plusone\rightskip\!!plus\v_spac_align_fill_amount_half
+ \spaceskip \v_spac_align_space_amount
+ \xspaceskip \v_spac_align_space_amount_x
\parfillskip\s_zero_plus_zero
\parindent \zeropoint
\relax}
-\unexpanded\def\spacing_horizontal_centered_last_line
+\unexpanded\def\spac_align_set_horizontal_centered_last_line
{\raggedstatus\zerocount
\attribute\alignstateattribute\attributeunsetvalue
- \leftskip \plusone\leftskip \!!plus\spacing_ragged_fill_amount\relax
- \rightskip \plusone\rightskip\!!plus\spacing_ragged_fill_amount_negative\relax
+ \leftskip \plusone\leftskip \!!plus\v_spac_align_fill_amount\relax
+ \rightskip \plusone\rightskip\!!plus\v_spac_align_fill_amount_negative\relax
\spaceskip \zeropoint\relax
\xspaceskip \zeropoint\relax
- \parfillskip\zeropoint\!!plus\spacing_ragged_fill_amount_double\relax
+ \parfillskip\zeropoint\!!plus\v_spac_align_fill_amount_double\relax
\parindent \zeropoint
\relax}
-\unexpanded\def\spacing_horizontal_right_tt % a plain command
+\unexpanded\def\spac_align_set_horizontal_right_tt % a plain command
{\tttf % brrr
\raggedstatus\plusthree
\attribute\alignstateattribute\plusthree
\leftskip \plusone\leftskip \!!plus\zeropoint\relax
- \rightskip \plusone\rightskip\!!plus\spacing_raggedness_right\relax
+ \rightskip \plusone\rightskip\!!plus\spac_align_set_raggedness_right\relax
\spaceskip \zeropoint\relax
\xspaceskip \zeropoint\relax
\parfillskip\s_zero_plus_zero
%\parindent \parindent
\relax}
-\unexpanded\def\spacing_horizontal_extra
- {\xspaceskip\zeropoint\!!plus\spacing_ragged_fill_amount_space\relax}
+\unexpanded\def\spac_align_set_horizontal_extra
+ {\xspaceskip\zeropoint\!!plus\v_spac_align_fill_amount_space\relax}
-\def\spacing_flush_horizontal
- {\ifcase\c_spacing_state_horizontal
+\def\spac_align_flush_horizontal
+ {\ifcase\c_spac_align_state_horizontal
% 0
- \spacing_horizontal_none
+ \spac_align_set_horizontal_none
\or
% 1 center
- \ifcase\c_spacing_state_broad
- \spacing_horizontal_center
+ \ifcase\c_spac_align_state_broad
+ \spac_align_set_horizontal_center
\or
- \spacing_horizontal_very_center
+ \spac_align_set_horizontal_very_center
\or
- \spacing_horizontal_wide_center
+ \spac_align_set_horizontal_wide_center
\fi
\or
% 2 flush left
- \ifcase\c_spacing_state_broad
- \spacing_horizontal_right
+ \ifcase\c_spac_align_state_broad
+ \spac_align_set_horizontal_right
\else
- \spacing_horizontal_very_right
+ \spac_align_set_horizontal_very_right
\fi
\or
% 3 flush right
- \ifcase\c_spacing_state_broad
- \spacing_horizontal_left
+ \ifcase\c_spac_align_state_broad
+ \spac_align_set_horizontal_left
\else
- \spacing_horizontal_very_left
+ \spac_align_set_horizontal_very_left
\fi
\or
% 4 inner
\ifdoublesided
\signalinnerrealign
\fi
- \rightorleftpageaction\spacing_horizontal_right\spacing_horizontal_left
+ \rightorleftpageaction\spac_align_set_horizontal_right\spac_align_set_horizontal_left
\or
% 5 outer
\ifdoublesided
\signalouterrealign
\fi
- \rightorleftpageaction\c_spacing_state_horizontal_left\spacing_horizontal_right
+ \rightorleftpageaction\c_spac_align_state_horizontal_left\spac_align_set_horizontal_right
\or
% 6 oneliner
- \ifcase\c_spacing_state_broad
- \spacing_horizontal_right
+ \ifcase\c_spac_align_state_broad
+ \spac_align_set_horizontal_right
\else
- \spacing_horizontal_very_right
+ \spac_align_set_horizontal_very_right
\fi
\parfillskip\zeropoint
\or
% 7 centered last line
- \spacing_horizontal_centered_last_line
+ \spac_align_set_horizontal_centered_last_line
\fi}
% Page spacing:
-\newconstant\c_spacing_state_page
+\newconstant\c_spac_align_state_page
\def\bottomalignlimit{\plusthree\lineheight}
@@ -446,8 +449,8 @@
{\bottomraggednessmode#1%
\settopskip}
-\def\spacing_flush_page
- {\ifcase\c_spacing_state_page
+\def\spac_align_flush_page
+ {\ifcase\c_spac_align_state_page
% keep state
\or
\raggedbottom
@@ -459,10 +462,10 @@
% Directions
-\newconstant\c_spacing_state_direction
+\newconstant\c_spac_align_state_direction
-\def\spacing_flush_direction
- {\ifcase\c_spacing_state_direction
+\def\spac_align_flush_direction
+ {\ifcase\c_spac_align_state_direction
% keep state
\or
\lefttoright
@@ -474,192 +477,150 @@
% and as we cache we seldom call that one now so one can debate the
% speedup.
-\newtoks\t_spacing_set_alignment
+\newtoks\t_spac_align_collected
\let\raggedcommand \relax
\let\updateraggedskips\relax
-% \unexpanded\def\spacing_set_text_align#1% beware: #1=empty is ignored, keep that! assumes \forgetall ... needs checking
-% {\edef\askedraggedalign{#1}%
-% \ifx\askedraggedalign\empty
-% \spacing_set_text_align_nop
-% \else
-% \spacing_set_text_align_yes
-% \fi}
-
-% \def\spacing_set_text_align_nop % as we cache (empty) anyway, this one can go
-% {%\let\raggedtopcommand \relax
-% %\let\raggedbottomcommand\relax
-% \let\raggedbox \relax % why
-% \t_spacing_set_alignment
-% {\resetrealignsignal
-% \setfalse\raggedonelinerstate
-% \let\raggedtopcommand \relax
-% \let\raggedbottomcommand\relax}}
-
-% \def\spacing_set_text_align_yes % hm, we could hash settings ! nice experiment
-% {%\let\raggedtopcommand\empty
-% %\let\raggedbottomcommand\empty
-% \let\raggedbox\relax % why
-% % we inherit hyphenation and tolerance
-% \t_spacing_set_alignment \emptytoks
-% \c_spacing_state_broad \zerocount
-% \c_spacing_state_horizontal\zerocount
-% \c_spacing_state_vertical \zerocount
-% \c_spacing_state_direction \zerocount % what is default ?
-% \c_spacing_state_page \zerocount
-% \ifcsname\??aligncommand\askedraggedalign\endcsname
-% \csname\??aligncommand\askedraggedalign\endcsname
-% \else
-% \rawprocesscommacommand[\askedraggedalign]\spacing_set_text_align_collect
-% \fi
-% \normalexpanded{\t_spacing_set_alignment
-% {\resetrealignsignal % can go as it is alway set
-% \setfalse\raggedonelinerstate % bad
-% \the\t_spacing_set_alignment
-% \spacing_flush_horizontal
-% \spacing_flush_vertical
-% \spacing_flush_direction
-% \spacing_flush_page
-% }}} % kept
-
-\unexpanded\def\spacing_set_text_align#1% what to do with empty (and forgetall)
+\def\spac_align_add_to_cache#1%
{\edef\askedraggedalign{#1}%
\let\raggedbox\relax % why
% we inherit hyphenation and tolerance
- \t_spacing_set_alignment \emptytoks
- \c_spacing_state_broad \zerocount
- \c_spacing_state_horizontal\zerocount
- \c_spacing_state_vertical \zerocount
- \c_spacing_state_direction \zerocount % what is default ?
- \c_spacing_state_page \zerocount
+ \t_spac_align_collected \emptytoks
+ \c_spac_align_state_broad \zerocount
+ \c_spac_align_state_horizontal\zerocount
+ \c_spac_align_state_vertical \zerocount
+ \c_spac_align_state_direction \zerocount % what is default ?
+ \c_spac_align_state_page \zerocount
\ifcsname\??aligncommand\askedraggedalign\endcsname
\csname\??aligncommand\askedraggedalign\endcsname % not much gain in new method
\else
- \rawprocesscommacommand[\askedraggedalign]\spacing_set_text_align_collect
+ \rawprocesscommacommand[\askedraggedalign]\spac_align_collect
\fi
- \normalexpanded{\t_spacing_set_alignment
- {\resetrealignsignal % can go as it is alway set
+ \normalexpanded{\t_spac_align_collected
+ {% \resetrealignsignal % can go as it is alway set
\setfalse\raggedonelinerstate % bad
- \the\t_spacing_set_alignment
- \spacing_flush_horizontal
- \spacing_flush_vertical
- \spacing_flush_direction
- \spacing_flush_page
- }}} % kept
-
-\def\spacing_set_text_align_collect#1%
+ \the\t_spac_align_collected
+ \spac_align_flush_horizontal
+ \spac_align_flush_vertical
+ \spac_align_flush_direction
+ \spac_align_flush_page
+ }}% kept, nice for tracing
+ \edef\raggedcommand {\the\t_spac_align_collected }%
+ \edef\updateraggedskips{\spac_align_flush_horizontal}%
+ \global\expandafter\let\csname\??alignmentnormalcache#1\endcsname\raggedcommand
+ \global\expandafter\let\csname\??alignmentraggedcache#1\endcsname\updateraggedskips}
+
+\def\spac_align_collect#1%
{\csname\??aligncommand#1\endcsname}
-\def\spacing_alignment_add_to_cache#1%
- {\spacing_set_text_align{#1}
- \edef\raggedcommand{\the\t_spacing_set_alignment}%
- \global\expandafter\let\csname\??alignmentcache#1\endcsname\raggedcommand}
+% The local (key driven) setter:
+
+\unexpanded\def\spac_align_prepare#1% deferred
+ {\expandafter\let\expandafter\raggedcommand\csname\??alignmentnormalcache#1\endcsname
+ \ifx\raggedcommand\relax
+ \spac_align_add_to_cache{#1}%
+ \else
+ \expandafter\let\expandafter\updateraggedskips\csname\??alignmentraggedcache#1\endcsname
+ \fi}
+
+\let\dosetraggedcommand\spac_align_prepare % sort of public
% The regular align setter:
\unexpanded\def\setupalign
- {\dosingleempty\spacing_setup_align}
+ {\dosingleempty\spac_align_setup}
-\def\spacing_setup_align[#1]% immediate
- {\expandafter\let\expandafter\raggedcommand\csname\??alignmentcache#1\endcsname
+\def\spac_align_setup[#1]% immediate
+ {\expandafter\let\expandafter\raggedcommand\csname\??alignmentnormalcache#1\endcsname
\ifx\raggedcommand\relax
- \spacing_alignment_add_to_cache{#1}%
+ \spac_align_add_to_cache{#1}%
+ \else
+ \expandafter\let\expandafter\updateraggedskips\csname\??alignmentraggedcache#1\endcsname
\fi
- \let\updateraggedskips\raggedcommand
\raggedcommand}
-% the local (key driven) setter:
-
-\unexpanded\def\spacing_setup_aligned#1% deferred
- {\expandafter\let\expandafter\raggedcommand\csname\??alignmentcache#1\endcsname
- \ifx\raggedcommand\relax
- \spacing_alignment_add_to_cache{#1}%
- \fi
- \let\updateraggedskips\raggedcommand}
-
-\let\dosetraggedcommand\spacing_setup_aligned % sort of public
-
% The keywords:
\unexpanded\def\installalign#1#2% beware: commands must be unexpandable!
{\ifcsname\??aligncommand#1\endcsname \else
- \setvalue{\??aligncommand#1}{\t_spacing_set_alignment\expandafter{\the\t_spacing_set_alignment#2}}%
+ \setvalue{\??aligncommand#1}{\t_spac_align_collected\expandafter{\the\t_spac_align_collected#2}}%
\fi}
\letvalue{\??aligncommand\empty }\empty
-\setvalue{\??aligncommand\v!broad }{\c_spacing_state_broad \plusone }
-\setvalue{\??aligncommand\v!wide }{\c_spacing_state_broad \plustwo }
+\setvalue{\??aligncommand\v!broad }{\c_spac_align_state_broad \plusone }
+\setvalue{\??aligncommand\v!wide }{\c_spac_align_state_broad \plustwo }
-\setvalue{\??aligncommand\v!bottom }{\c_spacing_state_page \plusone }
-\setvalue{\??aligncommand\v!height }{\c_spacing_state_page \plustwo }
-\setvalue{\??aligncommand\v!line }{\c_spacing_state_page \plusthree
+\setvalue{\??aligncommand\v!bottom }{\c_spac_align_state_page \plusone }
+\setvalue{\??aligncommand\v!height }{\c_spac_align_state_page \plustwo }
+\setvalue{\??aligncommand\v!line }{\c_spac_align_state_page \plusthree
% this will become another keyword (undocumented anyway)
- \t_spacing_set_alignment\expandafter{\the\t_spacing_set_alignment\settrue\raggedonelinerstate}}
-
-\setvalue{\??aligncommand\v!high }{\c_spacing_state_vertical \plusthree}
-\setvalue{\??aligncommand\v!low }{\c_spacing_state_vertical \plustwo }
-\setvalue{\??aligncommand\v!lohi }{\c_spacing_state_vertical \plusone }
-
-\setvalue{\??aligncommand\v!flushright }{\c_spacing_state_horizontal\plusthree}
-\setvalue{\??aligncommand\v!flushleft }{\c_spacing_state_horizontal\plustwo }
-\setvalue{\??aligncommand\v!middle }{\c_spacing_state_horizontal\plusone }
-\setvalue{\??aligncommand\v!no }{\c_spacing_state_horizontal\plustwo }
-\setvalue{\??aligncommand\v!yes }{\c_spacing_state_horizontal\zerocount}
-\setvalue{\??aligncommand\v!width }{\c_spacing_state_horizontal\zerocount}
-\setvalue{\??aligncommand\v!normal }{\c_spacing_state_horizontal\zerocount}
-\setvalue{\??aligncommand\v!reset }{\c_spacing_state_page \zerocount
- \c_spacing_state_horizontal\zerocount}
-\setvalue{\??aligncommand\v!inner }{\c_spacing_state_horizontal\plusfour }
-\setvalue{\??aligncommand\v!outer }{\c_spacing_state_horizontal\plusfive }
-\setvalue{\??aligncommand\v!flushinner }{\c_spacing_state_horizontal\plusfive }
-\setvalue{\??aligncommand\v!flushouter }{\c_spacing_state_horizontal\plusfour }
-\setvalue{\??aligncommand\v!right }{\c_spacing_state_horizontal\plustwo }
-\setvalue{\??aligncommand\v!left }{\c_spacing_state_horizontal\plusthree}
-\setvalue{\??aligncommand\v!center }{\c_spacing_state_horizontal\plusone
- \c_spacing_state_broad \plustwo }
-\setvalue{\??aligncommand\v!disable }{\c_spacing_state_horizontal\plussix }
-\setvalue{\??aligncommand\v!last }{\c_spacing_state_horizontal\plusseven}
-
-
-\setvalue{\??aligncommand\v!lefttoright }{\c_spacing_state_direction \plusone }
-\setvalue{\??aligncommand\v!righttoleft }{\c_spacing_state_direction \plustwo }
-\setvalue{\??aligncommand l2r}{\c_spacing_state_direction \plusone }
-\setvalue{\??aligncommand r2l}{\c_spacing_state_direction \plustwo }
-
-\setvalue{\??aligncommand\v!table }{\c_spacing_state_vertical \plusthree
- \c_spacing_state_broad \plusone
- \c_spacing_state_horizontal\plustwo }
-
-\setvalue{\??aligncommand\v!lesshyphenation}{\t_spacing_set_alignment\expandafter{\the\t_spacing_set_alignment\lesshyphens}}
-\setvalue{\??aligncommand\v!morehyphenation}{\t_spacing_set_alignment\expandafter{\the\t_spacing_set_alignment\morehyphens}}
-
-\setvalue{\??aligncommand\v!hanging }{\t_spacing_set_alignment\expandafter{\the\t_spacing_set_alignment\fonts_protruding_enable }}
-\setvalue{\??aligncommand\v!nothanging }{\t_spacing_set_alignment\expandafter{\the\t_spacing_set_alignment\fonts_protruding_disable}}
-\setvalue{\??aligncommand\v!hz }{\t_spacing_set_alignment\expandafter{\the\t_spacing_set_alignment\fonts_expansion_enable }}
-\setvalue{\??aligncommand\v!nohz }{\t_spacing_set_alignment\expandafter{\the\t_spacing_set_alignment\fonts_expansion_disable }}
-\setvalue{\??aligncommand\v!spacing }{\t_spacing_set_alignment\expandafter{\the\t_spacing_set_alignment\enablespacehandling \enablekernhandling }}
-\setvalue{\??aligncommand\v!nospacing }{\t_spacing_set_alignment\expandafter{\the\t_spacing_set_alignment\disablespacehandling\disablekernhandling}}
-\setvalue{\??aligncommand\v!hyphenated }{\t_spacing_set_alignment\expandafter{\the\t_spacing_set_alignment\dohyphens}}
-\setvalue{\??aligncommand\v!nothyphenated }{\t_spacing_set_alignment\expandafter{\the\t_spacing_set_alignment\nohyphens}}
-
-\setvalue{\??aligncommand\v!tolerant }{\t_spacing_set_alignment\expandafter{\the\t_spacing_set_alignment\ragged_command_tolerant}}
-\setvalue{\??aligncommand\v!verytolerant }{\t_spacing_set_alignment\expandafter{\the\t_spacing_set_alignment\ragged_command_very_tolerant}}
-\setvalue{\??aligncommand\v!stretch }{\t_spacing_set_alignment\expandafter{\the\t_spacing_set_alignment\ragged_command_stretch}}
+ \t_spac_align_collected\expandafter{\the\t_spac_align_collected\settrue\raggedonelinerstate}}
+
+\setvalue{\??aligncommand\v!high }{\c_spac_align_state_vertical \plusthree}
+\setvalue{\??aligncommand\v!low }{\c_spac_align_state_vertical \plustwo }
+\setvalue{\??aligncommand\v!lohi }{\c_spac_align_state_vertical \plusone }
+
+\setvalue{\??aligncommand\v!flushright }{\c_spac_align_state_horizontal\plusthree}
+\setvalue{\??aligncommand\v!flushleft }{\c_spac_align_state_horizontal\plustwo }
+\setvalue{\??aligncommand\v!middle }{\c_spac_align_state_horizontal\plusone }
+\setvalue{\??aligncommand\v!no }{\c_spac_align_state_horizontal\plustwo }
+\setvalue{\??aligncommand\v!yes }{\c_spac_align_state_horizontal\zerocount}
+\setvalue{\??aligncommand\v!width }{\c_spac_align_state_horizontal\zerocount}
+\setvalue{\??aligncommand\v!normal }{\c_spac_align_state_horizontal\zerocount}
+\setvalue{\??aligncommand\v!reset }{\c_spac_align_state_page \zerocount
+ \c_spac_align_state_horizontal\zerocount}
+\setvalue{\??aligncommand\v!inner }{\c_spac_align_state_horizontal\plusfour }
+\setvalue{\??aligncommand\v!outer }{\c_spac_align_state_horizontal\plusfive }
+\setvalue{\??aligncommand\v!flushinner }{\c_spac_align_state_horizontal\plusfive }
+\setvalue{\??aligncommand\v!flushouter }{\c_spac_align_state_horizontal\plusfour }
+\setvalue{\??aligncommand\v!right }{\c_spac_align_state_horizontal\plustwo }
+\setvalue{\??aligncommand\v!left }{\c_spac_align_state_horizontal\plusthree}
+\setvalue{\??aligncommand\v!center }{\c_spac_align_state_horizontal\plusone
+ \c_spac_align_state_broad \plustwo }
+\setvalue{\??aligncommand\v!disable }{\c_spac_align_state_horizontal\plussix }
+\setvalue{\??aligncommand\v!last }{\c_spac_align_state_horizontal\plusseven}
+
+
+\setvalue{\??aligncommand\v!lefttoright }{\c_spac_align_state_direction \plusone }
+\setvalue{\??aligncommand\v!righttoleft }{\c_spac_align_state_direction \plustwo }
+\setvalue{\??aligncommand l2r}{\c_spac_align_state_direction \plusone }
+\setvalue{\??aligncommand r2l}{\c_spac_align_state_direction \plustwo }
+
+\setvalue{\??aligncommand\v!table }{\c_spac_align_state_vertical \plusthree
+ \c_spac_align_state_broad \plusone
+ \c_spac_align_state_horizontal\plustwo }
+
+\setvalue{\??aligncommand\v!lesshyphenation}{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\lesshyphens}}
+\setvalue{\??aligncommand\v!morehyphenation}{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\morehyphens}}
+
+\setvalue{\??aligncommand\v!hanging }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\font_protruding_enable }}
+\setvalue{\??aligncommand\v!nothanging }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\font_protruding_disable}}
+\setvalue{\??aligncommand\v!hz }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\font_expansion_enable }}
+\setvalue{\??aligncommand\v!nohz }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\font_expansion_disable }}
+\setvalue{\??aligncommand\v!spacing }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\enablespacehandling \enablekernhandling }}
+\setvalue{\??aligncommand\v!nospacing }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\disablespacehandling\disablekernhandling}}
+\setvalue{\??aligncommand\v!hyphenated }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\dohyphens}}
+\setvalue{\??aligncommand\v!nothyphenated }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\nohyphens}}
+
+\setvalue{\??aligncommand\v!tolerant }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\spac_align_set_tolerant}}
+\setvalue{\??aligncommand\v!verytolerant }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\spac_align_set_very_tolerant}}
+\setvalue{\??aligncommand\v!stretch }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\spac_align_set_stretch}}
% Visible commands:
-\let\notragged \spacing_horizontal_none
-\let\forgetragged \spacing_horizontal_none
-\let\raggedleft \spacing_horizontal_left
-\let\raggedcenter \spacing_horizontal_center
-\let\raggedright \spacing_horizontal_right
-\let\veryraggedleft \spacing_horizontal_very_left
-\let\veryraggedcenter\spacing_horizontal_very_center
-\let\veryraggedright \spacing_horizontal_very_right
-\let\raggedwidecenter\spacing_horizontal_wide_center
-\let\centeredlastline\spacing_horizontal_centered_last_line
-\let\ttraggedright \spacing_horizontal_right_tt % a plain command
+\let\notragged \spac_align_set_horizontal_none
+\let\raggedleft \spac_align_set_horizontal_left
+\let\raggedcenter \spac_align_set_horizontal_center
+\let\raggedright \spac_align_set_horizontal_right
+\let\veryraggedleft \spac_align_set_horizontal_very_left
+\let\veryraggedcenter\spac_align_set_horizontal_very_center
+\let\veryraggedright \spac_align_set_horizontal_very_right
+\let\raggedwidecenter\spac_align_set_horizontal_wide_center
+\let\centeredlastline\spac_align_set_horizontal_centered_last_line
+\let\ttraggedright \spac_align_set_horizontal_right_tt % a plain command
+
+\let\forgetragged \spac_align_set_horizontal_none
% Box commands.
@@ -668,7 +629,7 @@
\forgetall
\let\\=\endgraf
\ifdoublesided\signalinnerrealign\fi
- \doifrightpageelse\spacing_horizontal_right\spacing_horizontal_left
+ \doifrightpageelse\spac_align_set_horizontal_right\spac_align_set_horizontal_left
\let\next}
\unexpanded\def\obox#1#2#3%
@@ -676,26 +637,26 @@
\forgetall
\let\\=\endgraf
\ifdoublesided\signalouterrealign\fi
- \doifrightpageelse\c_spacing_state_horizontal_left\spacing_horizontal_right
+ \doifrightpageelse\c_spac_align_state_horizontal_left\spac_align_set_horizontal_right
\let\next}
\let\raggedbox\relax
\def\dosetraggedvbox#1% can be more keys
{\let\raggedbox\vbox
- \processcommacommand[#1]\dodosetraggedvbox}
+ \processcommacommand[#1]\spac_align_set_ragged_box}
\def\dosetraggedhbox#1% can be more keys
{\let\raggedbox\hbox
- \processcommacommand[#1]\dodosetraggedhbox}
+ \processcommacommand[#1]\spac_align_set_ragged_hbox}
-\def\dodosetraggedvbox#1%
+\def\spac_align_set_ragged_box#1%
{\ifcsname\??alignvertical#1\endcsname
\csname\??alignvertical#1\endcsname
\quitcommalist
\fi}
-\def\dodosetraggedhbox#1%
+\def\spac_align_set_ragged_hbox#1%
{\ifcsname\??alignhorizontal#1\endcsname
\csname\??alignhorizontal#1\endcsname
\quitcommalist
@@ -709,7 +670,7 @@
\setvalue{\??alignvertical \v!flushleft }{\let\raggedbox\rbox}
\setvalue{\??alignvertical \v!flushright}{\let\raggedbox\lbox}
\setvalue{\??alignvertical \v!center }{\let\raggedbox\cbox}
-\setvalue{\??alignvertical \v!no }{\def\raggedbox{\vbox\bgroup\spacing_horizontal_right\let\next=}]}
+\setvalue{\??alignvertical \v!no }{\def\raggedbox{\vbox\bgroup\spac_align_set_horizontal_right\let\next=}]}
% maybe \let's
@@ -746,16 +707,16 @@
% tracing:
-\def\spacing_show_par_data#1%
+\def\spac_show_par_data#1%
{\ifx#1\relax\else
\hbox{\string#1: \the#1}\endgraf
- \expandafter\spacing_show_par_data
+ \expandafter\spac_show_par_data
\fi}
\unexpanded\def\showpardata
{\edef\thepardata
{\hbox{font: \fontname\font}\endgraf
- \spacing_show_par_data
+ \spac_show_par_data
\interwordspace \interwordstretch \interwordshrink \emwidth \exheight \extraspace
\hsize \vsize
\leftskip \rightskip
@@ -898,9 +859,9 @@
% so, no funny boxing here
\unexpanded\def\wordright
- {\dosingleempty\spacing_word_right}
+ {\dosingleempty\spac_word_right}
-\def\spacing_word_right[#1]%
+\def\spac_word_right[#1]%
{% don't change
\groupedcommand
{\removeunwantedspaces
@@ -962,25 +923,3 @@
{\dodoubleargument\dodefinehbox}
\protect \endinput
-
-% \newskip\@@raggedskipa
-% \newskip\@@raggedskipb
-%
-% \newcount\c_spacing_minimum_tolerance \c_spacing_minimum_tolerance = 1500
-%
-% \unexpanded\def\setraggedness#1%
-% {\ifnum\tolerance<\c_spacing_minimum_tolerance % small values have
-% \tolerance\c_spacing_minimum_tolerance % unwanted side effects
-% \fi
-% \ifx\dohyphens\relax
-% % this code will be reconsidered / kind of fuzzy (and old)
-% \@@raggedskipa 2.5\hsize
-% \@@raggedskipb #1\relax
-% \divide\@@raggedskipa \@@raggedskipb
-% \hyphenpenalty\@@raggedskipa
-% \fi}
-
-% \installalign \v!inner {\setraggedparagraphmode\spacing_align_rl\spacing_align_rr}
-% \installalign \v!outer {\setraggedparagraphmode\spacing_align_rr\spacing_align_rl}
-% \installalign \v!flushouter {\setraggedparagraphmode\spacing_horizontal_left \spacing_horizontal_right}
-% \installalign \v!flushinner {\setraggedparagraphmode\spacing_horizontal_right\spacing_horizontal_left }
diff --git a/tex/context/base/spac-def.mkiv b/tex/context/base/spac-def.mkiv
index 333335630..4ecdc3f25 100644
--- a/tex/context/base/spac-def.mkiv
+++ b/tex/context/base/spac-def.mkiv
@@ -13,9 +13,9 @@
\writestatus{loading}{ConTeXt Spacing Macros / Definitions}
-\unprotect
+% todo: move resetters to other modules
-\newconstant\c_spacing_default_tolerance \c_spacing_default_tolerance 1500
+\unprotect
\def\forgeteverypar
{\everypar{\the\neverypar}}
@@ -38,8 +38,7 @@
\let\currentwhitespace\v!none}
\def\forgetbothskips
- {\tolerance\c_spacing_default_tolerance
- \leftskip\zeropoint
+ {\leftskip\zeropoint
\rightskip\zeropoint
\relax}
@@ -73,7 +72,7 @@
\appendtoks \updateraggedskips \to \everyfontswitch % under test
\prependtoks \let\par\endgraf \to \everybeforepagebody % see \fillinline
\appendtoks \simplesetupspacing \to \everydefinedfont
-
+
\setupwhitespace
[\v!none]
diff --git a/tex/context/base/spac-hor.mkiv b/tex/context/base/spac-hor.mkiv
index 3d5424229..86e77a423 100644
--- a/tex/context/base/spac-hor.mkiv
+++ b/tex/context/base/spac-hor.mkiv
@@ -31,7 +31,7 @@
%D need to check if the next paragraph has to be indented.
\def\presetindentation
- {\doifoutervmode{\ifindentfirstparagraph\else\indentation_variant_no\fi}}
+ {\doifoutervmode{\ifindentfirstparagraph\else\spac_indentation_variant_no\fi}}
% we need a better everypar model: for each option a switch, which we
% set to false with \forgetall and can enable when needed (context 4);
@@ -61,11 +61,11 @@
\processcommacommand[\currentindenting]\docomplexsetupindentingA % catch small, medium, etc
\processcommacommand[\currentindenting]\docomplexsetupindentingB % catch rest
\checkeverypar % only when non-empty #1
- \ifindentfirstparagraph\else\indentation_variant_no\fi
- \indentation_check_toggle}
+ \ifindentfirstparagraph\else\spac_indentation_variant_no\fi
+ \spac_indentation_check_toggle}
\def\docomplexsetupindentingA#1%
- {\ifcsname\??in:#1\endcsname
+ {\ifcsname\??indenting#1\endcsname
% case b
\else
\edef\currentindentation{#1}%
@@ -74,8 +74,8 @@
\fi}
\def\docomplexsetupindentingB#1%
- {\ifcsname\??in:#1\endcsname
- \csname\??in:#1\endcsname
+ {\ifcsname\??indenting#1\endcsname
+ \csname\??indenting#1\endcsname
\else
% case a
\fi}
@@ -88,8 +88,10 @@
% use \noindentation to suppress next indentation
+\installcorenamespace{indenting}
+
\unexpanded\def\defineindentingmethod[#1]#2%
- {\setvalue{\??in:#1}{#2}}
+ {\setvalue{\??indenting#1}{#2}}
\defineindentingmethod [\v!no] {\parindent\zeropoint}% was: \ctxparindent\noindent}
\defineindentingmethod [\v!not] {\parindent\zeropoint}% was: \ctxparindent\noindent}
@@ -130,64 +132,64 @@
\let\checkindentation\relax
-\def\indentation_remove
+\def\spac_indentation_remove
{\ifdim\parindent=\zeropoint \else
\begingroup
\setbox\scratchbox\lastbox
\endgroup
\fi}
-\def\indentation_kill_indeed
+\def\spac_indentation_kill_indeed
{\global\indentationfalse
- \indentation_remove}
+ \spac_indentation_remove}
-\def\indentation_do_toggle_indeed
+\def\spac_indentation_do_toggle_indeed
{\global\indentationfalse
- \global\let\checkindentation\indentation_no_toggle_indeed
- \indentation_remove}
+ \global\let\checkindentation\spac_indentation_no_toggle_indeed
+ \spac_indentation_remove}
-\def\indentation_no_toggle_indeed
+\def\spac_indentation_no_toggle_indeed
{\global\indentationtrue
- \global\let\checkindentation\indentation_do_toggle_indeed}
+ \global\let\checkindentation\spac_indentation_do_toggle_indeed}
-\def\indentation_do_indeed
+\def\spac_indentation_do_indeed
{\global\indentationtrue}
-\def\indentation_do_toggle
- {\global\let\checkindentation\indentation_do_toggle_indeed}
+\def\spac_indentation_do_toggle
+ {\global\let\checkindentation\spac_indentation_do_toggle_indeed}
-\def\indentation_no_toggle
- {\global\let\checkindentation\indentation_no_toggle_indeed}
+\def\spac_indentation_no_toggle
+ {\global\let\checkindentation\spac_indentation_no_toggle_indeed}
-\def\indentation_check_toggle
+\def\spac_indentation_check_toggle
{\ifcase\indentingtogglestate
% nothing
\or
- \indentation_no_toggle
+ \spac_indentation_no_toggle
\or
- \indentation_do_toggle
+ \spac_indentation_do_toggle
\fi}
-\def\indentation_variant_yes
- {\global\let\checkindentation\indentation_do_indeed}
+\def\spac_indentation_variant_yes
+ {\global\let\checkindentation\spac_indentation_do_indeed}
-\def\indentation_no_next_check
- {\indentation_remove
- \global\let\checkindentation\indentation_do_indeed}
+\def\spac_indentation_no_next_check
+ {\spac_indentation_remove
+ \global\let\checkindentation\spac_indentation_do_indeed}
-\def\indentation_variant_no % made global
+\def\spac_indentation_variant_no % made global
{\ifinpagebody \else
\global\indentationfalse
- \global\let\checkindentation\indentation_no_next_check
+ \global\let\checkindentation\spac_indentation_no_next_check
\fi}
\def\nonoindentation % bv bij floats
{\ifinpagebody \else
\global\indentationtrue
- \global\let\checkindentation\indentation_do_indeed
+ \global\let\checkindentation\spac_indentation_do_indeed
\fi}
-\def\indentation_variant_force
+\def\spac_indentation_variant_force
{\ifvmode \ifdim\parindent=\zeropoint \else
% was : \hskip\parindent
% can be: \indent
@@ -207,35 +209,40 @@
% public:
-\let\indentation \indentation_variant_force
-\let\noindentation\indentation_variant_no % public
-\let\doindentation\indentation_variant_yes % public
+\let\indentation \spac_indentation_variant_force
+\let\noindentation\spac_indentation_variant_no % public
+\let\doindentation\spac_indentation_variant_yes % public
\def\dontrechecknextindentation % public (in macros)
{\global\let\dorechecknextindentation\relax}
\let\dorechecknextindentation\relax % public (in macros)
-\def\indentation_check_next_indentation
+\def\spac_indentation_check_next_indentation
{\global\let\dorechecknextindentation\relax
- \doifnextcharelse\par\donothing\indentation_variant_no}
+ \doifnextcharelse\par\donothing\spac_indentation_variant_no} % messy check as next is seldom \par
-\def\indentation_variant_auto
- {\global\let\dorechecknextindentation\indentation_check_next_indentation}
+\def\spac_indentation_variant_auto
+ {\global\let\dorechecknextindentation\spac_indentation_check_next_indentation}
%D This one sets up the local indentation behaviour (i.e. either or not
%D a next paragraph will be indented).
-\def\dochecknextindentation#1% obsolete
- {\checknextindentation[\csname#1\c!indentnext\endcsname]}
+\installcorenamespace{indentnext}
\unexpanded\def\checknextindentation[#1]%
- {\csname\??in:c:\ifcsname\??in:c:#1\endcsname#1\else\s!empty\fi\endcsname}
+ {\csname\??indentnext\ifcsname\??indentnext#1\endcsname#1\fi\endcsname}
+
+\unexpanded\def\useindentnextparameter#1% new, the more efficient variant
+ {\edef\p_indentnext{#1\c!indentnext}%
+ \ifx\p_indentnext\empty\else
+ \csname\??indentnext\ifcsname\??indentnext\p_indentnext\endcsname\p_indentnext\fi\endcsname
+ \fi}
-\letvalue{\??in:c:\s!empty}\donothing
-\letvalue{\??in:c:\v!yes }\indentation_variant_yes
-\letvalue{\??in:c:\v!no }\indentation_variant_no
-\letvalue{\??in:c:\v!auto }\indentation_variant_auto
+\letvalue{\??indentnext }\donothing
+\letvalue{\??indentnext\v!yes }\spac_indentation_variant_yes
+\letvalue{\??indentnext\v!no }\spac_indentation_variant_no
+\letvalue{\??indentnext\v!auto }\spac_indentation_variant_auto
%D An example of usage:
%D
@@ -307,13 +314,15 @@
\unexpanded\def\newfrenchspacing{\setfrenchspacing{1050}}
\unexpanded\def\nonfrenchspacing{\resetfrenchspacing}
-\unexpanded\def\definespacingmethod[#1]#2{\setvalue{\??sg\??sg#1}{#2}}
+\installcorenamespace{spacingmethods}
+
+\unexpanded\def\definespacingmethod[#1]#2{\setvalue{\??spacingmethods#1}{#2}}
\definespacingmethod[\v!packed]{\newfrenchspacing}
\definespacingmethod[\v!broad ]{\nonfrenchspacing}
\def\complexsetupspacing[#1]%
- {\executeifdefined{\??sg\??sg#1}\relax
+ {\executeifdefined{\??spacingmethods#1}\relax
\updateraggedskips}
\def\simplesetupspacing
@@ -390,12 +399,12 @@
\unexpanded\def\removeunwantedspaces
{\ifhmode
- \expandafter \doremoveunwantedspace
+ \expandafter \spac_helpers_remove_unwantedspace
\fi}
-\def\doremoveunwantedspace
- {\ifnum\lastnodetype=\@@gluenode
- \unskip \expandafter\doremoveunwantedspace
+\def\spac_helpers_remove_unwantedspace
+ {\ifnum\lastnodetype=\gluenodecode
+ \unskip \expandafter\spac_helpers_remove_unwantedspace
\fi}
% \startbuffer
diff --git a/tex/context/base/spac-pag.mkiv b/tex/context/base/spac-pag.mkiv
index 9745a76ca..7107d9a22 100644
--- a/tex/context/base/spac-pag.mkiv
+++ b/tex/context/base/spac-pag.mkiv
@@ -52,12 +52,12 @@
\ifinpagebody
\ifdoublesided
\ifodd\realpageno\relax
- \system_twopass_set_found
+ \syst_twopass_set_found
\else
- \system_twopass_set_not_found
+ \syst_twopass_set_not_found
\fi
\else
- \system_twopass_set_found
+ \syst_twopass_set_found
\fi
\else\ifdoublesided
\findtwopassdata{#1}{\number#2}%
@@ -67,25 +67,25 @@
\pagestatemismatchtrue
\fi
\ifodd\twopassdata\relax
- \system_twopass_set_found
+ \syst_twopass_set_found
\else
- \system_twopass_set_not_found
+ \syst_twopass_set_not_found
\fi
\else
\ifodd\realpageno\relax
- \system_twopass_set_found
+ \syst_twopass_set_found
\else
- \system_twopass_set_not_found
+ \syst_twopass_set_not_found
\fi
\fi
\else
- \system_twopass_set_found
+ \syst_twopass_set_found
\fi\fi
\else
\ifodd\realpagestateno\relax
- \system_twopass_set_found
+ \syst_twopass_set_found
\else
- \system_twopass_set_not_found
+ \syst_twopass_set_not_found
\fi
\fi
\ifconditional\twopassdatafound
@@ -105,22 +105,22 @@
\pagestatemismatchtrue
\fi
\ifodd\twopassdata\relax
- \system_twopass_set_found
+ \syst_twopass_set_found
\else
- \system_twopass_set_not_found
+ \syst_twopass_set_not_found
\fi
\else
\ifodd\realpageno\relax
- \system_twopass_set_found
+ \syst_twopass_set_found
\else
- \system_twopass_set_not_found
+ \syst_twopass_set_not_found
\fi
\fi
\else
\ifodd\realpagestateno\relax
- \system_twopass_set_found
+ \syst_twopass_set_found
\else
- \system_twopass_set_not_found
+ \syst_twopass_set_not_found
\fi
\fi
\ifconditional\twopassdatafound
diff --git a/tex/context/base/spac-par.mkiv b/tex/context/base/spac-par.mkiv
index 0b0356f4c..af032a145 100644
--- a/tex/context/base/spac-par.mkiv
+++ b/tex/context/base/spac-par.mkiv
@@ -50,47 +50,47 @@
\let\insertparagraphintro\relax % hook into everypar
-\newtoks\t_spacings_paragraphs_intro_first
-\newtoks\t_spacings_paragraphs_intro_next
-\newtoks\t_spacings_paragraphs_intro_each
+\newtoks\t_spac_paragraphs_intro_first
+\newtoks\t_spac_paragraphs_intro_next
+\newtoks\t_spac_paragraphs_intro_each
-\newtoks\c_spacings_paragraphs_intro_first
-\newtoks\c_spacings_paragraphs_intro_next
-\newtoks\c_spacings_paragraphs_intro_each
+\newconditional\c_spac_paragraphs_intro_first
+\newconditional\c_spac_paragraphs_intro_next
+\newconditional\c_spac_paragraphs_intro_each
\unexpanded\def\setupparagraphintro
- {\dodoubleempty\spacings_paragraphs_intro}
+ {\dodoubleempty\spac_paragraphs_intro}
-\unexpanded\def\spacings_paragraphs_intro[#1][#2]%
- {\def\spacings_paragraphs_intro_step##1%
+\unexpanded\def\spac_paragraphs_intro[#1][#2]%
+ {\def\spac_paragraphs_intro_step##1%
{\csname\??paragraphintro\ifcsname\??paragraphintro##1\endcsname##1\fi\endcsname{#2}}%
- \processcommacommand[#1]\spacings_paragraphs_intro_step}
+ \processcommacommand[#1]\spac_paragraphs_intro_step}
\letvalue{\??paragraphintro\empty}\gobbleoneargument
\setvalue{\??paragraphintro\v!reset}#1%
- {\global\setfalse\c_spacings_paragraphs_intro_first
- \global\setfalse\c_spacings_paragraphs_intro_next
- \global\setfalse\c_spacings_paragraphs_intro_each
- \global\t_spacings_paragraphs_intro_first\emptytoks
- \global\t_spacings_paragraphs_intro_next \emptytoks
- \global\t_spacings_paragraphs_intro_each \emptytoks
+ {\global\setfalse\c_spac_paragraphs_intro_first
+ \global\setfalse\c_spac_paragraphs_intro_next
+ \global\setfalse\c_spac_paragraphs_intro_each
+ \global\t_spac_paragraphs_intro_first\emptytoks
+ \global\t_spac_paragraphs_intro_next \emptytoks
+ \global\t_spac_paragraphs_intro_each \emptytoks
\glet\insertparagraphintro\relax}
\setvalue{\??paragraphintro\v!first}#1%
- {\global\settrue\c_spacings_paragraphs_intro_first
- \global\t_spacings_paragraphs_intro_first\expandafter{\the\t_spacings_paragraphs_intro_first#1}%
- \glet\insertparagraphintro\spacings_paragraphs_flush_intro}
+ {\global\settrue\c_spac_paragraphs_intro_first
+ \global\t_spac_paragraphs_intro_first\expandafter{\the\t_spac_paragraphs_intro_first#1}%
+ \glet\insertparagraphintro\spac_paragraphs_flush_intro}
\setvalue{\??paragraphintro\v!next}#1%
- {\global\settrue\c_spacings_paragraphs_intro_next
- \global\t_spacings_paragraphs_intro_next\expandafter{\the\t_spacings_paragraphs_intro_next#1}%
- \glet\insertparagraphintro\spacings_paragraphs_flush_intro}
+ {\global\settrue\c_spac_paragraphs_intro_next
+ \global\t_spac_paragraphs_intro_next\expandafter{\the\t_spac_paragraphs_intro_next#1}%
+ \glet\insertparagraphintro\spac_paragraphs_flush_intro}
\setvalue{\??paragraphintro\v!each}#1%
- {\global\settrue\c_spacings_paragraphs_intro_each
- \global\t_spacings_paragraphs_intro_each\expandafter{\the\t_spacings_paragraphs_intro_each#1}%
- \glet\insertparagraphintro\spacings_paragraphs_flush_intro}
+ {\global\settrue\c_spac_paragraphs_intro_each
+ \global\t_spac_paragraphs_intro_each\expandafter{\the\t_spac_paragraphs_intro_each#1}%
+ \glet\insertparagraphintro\spac_paragraphs_flush_intro}
%D We can say:
%D
@@ -129,53 +129,53 @@
%D \stoptyping
\unexpanded\def\flushatparagraph#1%
- {\global\c_spacings_paragraphs_intro_first\plusone
- \global\t_spacings_paragraphs_intro_first\expandafter{\the\t_spacings_paragraphs_intro_first#1}%
- \glet\insertparagraphintro\spacings_paragraphs_flush_intro}
+ {\global\c_spac_paragraphs_intro_first\plusone
+ \global\t_spac_paragraphs_intro_first\expandafter{\the\t_spac_paragraphs_intro_first#1}%
+ \glet\insertparagraphintro\spac_paragraphs_flush_intro}
%D Here comes the flusher (we misuse the one level expansion of token
%D registers to feed a nice stream into the paragraph.)
-\unexpanded\def\spacings_paragraphs_flush_intro % we make sure that the token lists expand directly after another
+\unexpanded\def\spac_paragraphs_flush_intro % we make sure that the token lists expand directly after another
{\normalexpanded{% % so the first code is there twice
- \ifconditional\c_spacings_paragraphs_intro_each
- \ifconditional\c_spacings_paragraphs_intro_next
- \glet\insertparagraphintro\spacings_paragraphs_flush_intro_next
+ \ifconditional\c_spac_paragraphs_intro_each
+ \ifconditional\c_spac_paragraphs_intro_next
+ \glet\insertparagraphintro\spac_paragraphs_flush_intro_next
\else
- \glet\insertparagraphintro\spacings_paragraphs_flush_intro_each
+ \glet\insertparagraphintro\spac_paragraphs_flush_intro_each
\fi
- \ifconditional\c_spacings_paragraphs_intro_first
- \global\setfalse\c_spacings_paragraphs_intro_first
- \global\t_spacings_paragraphs_intro_first\emptytoks
- \the\t_spacings_paragraphs_intro_first
+ \ifconditional\c_spac_paragraphs_intro_first
+ \global\setfalse\c_spac_paragraphs_intro_first
+ \global\t_spac_paragraphs_intro_first\emptytoks
+ \the\t_spac_paragraphs_intro_first
\fi
- \the\t_spacings_paragraphs_intro_each
+ \the\t_spac_paragraphs_intro_each
\else
- \ifconditional\c_spacings_paragraphs_intro_next
- \glet\insertparagraphintro\spacings_paragraphs_flush_intro_next
+ \ifconditional\c_spac_paragraphs_intro_next
+ \glet\insertparagraphintro\spac_paragraphs_flush_intro_next
\fi
- \ifconditional\c_spacings_paragraphs_intro_first
- \global\setfalse\c_spacings_paragraphs_intro_first
- \global\t_spacings_paragraphs_intro_first\emptytoks
- \the\t_spacings_paragraphs_intro_first
+ \ifconditional\c_spac_paragraphs_intro_first
+ \global\setfalse\c_spac_paragraphs_intro_first
+ \global\t_spac_paragraphs_intro_first\emptytoks
+ \the\t_spac_paragraphs_intro_first
\fi
\fi}}
-\unexpanded\def\spacings_paragraphs_flush_intro_next
+\unexpanded\def\spac_paragraphs_flush_intro_next
{\normalexpanded{%
- \global\setfalse\c_spacings_paragraphs_intro_next
- \global\t_spacings_paragraphs_intro_next\emptytoks
- \ifconditional\c_spacings_paragraphs_intro_each
- \glet\insertparagraphintro\spacings_paragraphs_flush_intro_each
- \the\t_spacings_paragraphs_intro_next
- \the\t_spacings_paragraphs_intro_each
+ \global\setfalse\c_spac_paragraphs_intro_next
+ \global\t_spac_paragraphs_intro_next\emptytoks
+ \ifconditional\c_spac_paragraphs_intro_each
+ \glet\insertparagraphintro\spac_paragraphs_flush_intro_each
+ \the\t_spac_paragraphs_intro_next
+ \the\t_spac_paragraphs_intro_each
\else
\glet\insertparagraphintro\relax
- \the\t_spacings_paragraphs_intro_next
+ \the\t_spac_paragraphs_intro_next
\fi}}
-\unexpanded\def\spacings_paragraphs_flush_intro_each
- {\the\t_spacings_paragraphs_intro_each}
+\unexpanded\def\spac_paragraphs_flush_intro_each
+ {\the\t_spac_paragraphs_intro_each}
%D \macros
%D {flushatnextpar}
@@ -185,21 +185,21 @@
\let\flushpostponednodedata\relax % hook into everypar
-\newbox\b_spacings_postponed_data
+\newbox\b_spac_postponed_data
\unexpanded\def\flushatnextpar
{\begingroup
- \glet\flushpostponednodedata\spacings_flush_at_next_par_insert
- \dowithnextboxcs\spacings_flush_at_next_par_finish\hbox}
+ \glet\flushpostponednodedata\spac_postponed_flush
+ \dowithnextboxcs\spac_postponed_finish\hbox}
-\def\spacings_flush_at_next_par_finish
- {\global\setbox\b_spacings_postponed_data\hbox
- {\box\b_spacings_postponed_data\box\nextbox}%
+\def\spac_postponed_finish
+ {\global\setbox\b_spac_postponed_data\hbox
+ {\box\b_spac_postponed_data\box\nextbox}%
\endgroup}
-\def\spacings_flush_at_next_par_insert
- {\ifvoid\b_spacings_postponed_data\else
- \hbox{\smashedbox\b_spacings_postponed_data}%
+\def\spac_postponed_flush
+ {\ifvoid\b_spac_postponed_data\else
+ \hbox{\smashedbox\b_spac_postponed_data}%
\fi
\glet\flushpostponednodedata\relax}
diff --git a/tex/context/base/spac-ver.mkiv b/tex/context/base/spac-ver.mkiv
index 7fb66a0ab..5725ceb4f 100644
--- a/tex/context/base/spac-ver.mkiv
+++ b/tex/context/base/spac-ver.mkiv
@@ -91,26 +91,26 @@
%
% \def\presetnormallineheight % each bodyfont
% {\iflocalinterlinespace
-% \presetnormallineheight_regular
+% \spac_basics_set_lineheight_regular
% \else
-% \presetnormallineheight_checked
+% \spac_basics_set_lineheight_checked
% \fi}
%
-% \def\presetnormallineheight_regular
+% \def\spac_basics_set_lineheight_regular
% {\edef\normallineheight{\interlinespaceparameter\c!line}}
%
-% \def\presetnormallineheight_checked
+% \def\spac_basics_set_lineheight_checked
% {\edef\askedbodyfontinterlinespecs{\bodyfontvariable{\normalizedbodyfontsize\c!interlinespace}}%
% \ifcsname\askedbodyfontinterlinespecs\endcsname
-% \presetnormallineheight_specific
+% \spac_basics_set_lineheight_specific
% \else
-% \presetnormallineheight_regular
+% \spac_basics_set_lineheight_regular
% \fi}
%
-% \def\presetnormallineheight_specific
+% \def\spac_basics_set_lineheight_specific
% {\edef\askedbodyfontinterlinespace{\csname\bodyfontinterlinespecs\endcsname}%
% \ifx\askedbodyfontinterlinespace\empty
-% \presetnormallineheight_regular
+% \spac_basics_set_lineheight_regular
% \else
% \let\normallineheight\askedbodyfontinterlinespace
% \fi}
@@ -324,11 +324,11 @@
%D Made slightly more readable:
-\unexpanded\def\vglue {\afterassignment\spacing_vglue_indeed\scratchskip=}
-\unexpanded\def\hglue {\afterassignment\spacing_hglue_indeed\scratchskip=}
+\unexpanded\def\vglue {\afterassignment\spac_vglue_indeed\scratchskip=}
+\unexpanded\def\hglue {\afterassignment\spac_hglue_indeed\scratchskip=}
\unexpanded\def\topglue{\nointerlineskip\vglue-\topskip\vglue}
-\def\spacing_vglue_indeed
+\def\spac_vglue_indeed
{\par
\scratchdimen\prevdepth
\hrule\!!height\zeropoint
@@ -336,7 +336,7 @@
\vskip\scratchskip
\prevdepth\scratchdimen}
-\def\spacing_hglue_indeed
+\def\spac_hglue_indeed
{\dontleavehmode % \leavevmode
\scratchcounter\spacefactor
\vrule\!!width\zeropoint
@@ -358,7 +358,7 @@
\definecomplexorsimple\setupwhitespace
\def\simplesetupwhitespace
- {\doifnot\currentwhitespace\v!none\spacing_setup_whitespace}
+ {\doifnot\currentwhitespace\v!none\spac_whitespace_setup}
\def\complexsetupwhitespace[#1]%
{\edef\nextcurrentwhitespace{#1}%
@@ -366,30 +366,30 @@
\simplesetupwhitespace
\else
\let\currentwhitespace\nextcurrentwhitespace
- \spacing_setup_whitespace
+ \spac_whitespace_setup
\fi}
\newconstant\baselinegridmode % option in layout / 1=permit_half_lines
-\def\spacing_setup_whitespace % quick test for no list
+\def\spac_whitespace_setup % quick test for no list
{\ifcsname\??wz:\currentwhitespace\endcsname
\csname\??wz:\currentwhitespace\endcsname
\else
- \expandafter\processcommalist\expandafter[\currentwhitespace]\spacing_setup_whitespace_method % can be raw
+ \expandafter\processcommalist\expandafter[\currentwhitespace]\spac_whitespace_setup_method % can be raw
\fi\relax
\ifgridsnapping
- \spacing_setup_whitespace_grid
+ \spac_whitespace_setup_grid
\else
- \spacing_setup_whitespace_normal
+ \spac_whitespace_setup_normal
\fi
\parskip\ctxparskip}
-\def\spacing_setup_whitespace_normal
+\def\spac_whitespace_setup_normal
{\ifconditional\flexiblewhitespace \else
\ctxparskip1\ctxparskip
\fi}
-\def\spacing_setup_whitespace_grid
+\def\spac_whitespace_setup_grid
{\setfalse\flexiblewhitespace
\ifdim\ctxparskip>\zeropoint
\ctxparskip
@@ -421,7 +421,7 @@
\definewhitespacemethod [\s!default] {\simplesetupwhitespace}
-\def\spacing_setup_whitespace_method#1%
+\def\spac_whitespace_setup_method#1%
{\ifcsname\??wz:#1\endcsname
\csname\??wz:#1\endcsname
\else
@@ -430,7 +430,7 @@
% \definewhitespacemethod [\s!unknown] {\ctxparskip\commalistelement\relax}
%
-% \def\spacing_setup_whitespace_method#1%
+% \def\spac_whitespace_setup_method#1%
% {\csname\??wz:\ifcsname\??wz:#1\endcsname#1\else\s!unknown\endcsname\relax}
\unexpanded\def\nowhitespace{\vspacing[\v!nowhite]}
@@ -445,9 +445,9 @@
\newcount\packeddepth
\unexpanded\def\startpacked
- {\dosingleempty\spacing_start_packed}
+ {\dosingleempty\spac_start_packed}
-\def\spacing_start_packed[#1]% nesting afvangen
+\def\spac_start_packed[#1]% nesting afvangen
{\global\advance\packeddepth\plusone
\par
\ifnum\packeddepth=\plusone \ifvmode
@@ -868,9 +868,9 @@
%D Beware: using an unknown value results in char struts.
\unexpanded\def\setupstrut
- {\dosingleempty\spacing_setup_strut}
+ {\dosingleempty\spac_strut_setup}
-\def\spacing_setup_strut[#1]%
+\def\spac_strut_setup[#1]%
{\ifcsname\??ut:#1\endcsname
\csname\??ut:#1\endcsname % these are defined later
\else
@@ -924,24 +924,24 @@
{\relax\ifcase\strutht
% \ignorespaces % maybe
\else
- \spacing_begstrut
+ \spac_strut_beg
\fi}
-\def\spacing_begstrut
+\def\spac_strut_beg
{\ifconditional\sigstruts
- \spacing_begstrut_signal
+ \spac_strut_beg_signal
\else
- \spacing_begstrut_normal
+ \spac_strut_beg_normal
\fi
\ignorespaces}
-\def\spacing_begstrut_signal
+\def\spac_strut_beg_signal
{\noindent\horizontalstrut
\normalpenalty\plustenthousand
\normalhskip-\strutsignal
\normalhskip\strutsignal}
-\def\spacing_begstrut_normal
+\def\spac_strut_beg_normal
{\strut
\normalpenalty\plustenthousand
\normalhskip\zeropoint}
@@ -951,18 +951,18 @@
\ifcase\strutht
% \removeunwantedspaces % maybe
\else
- \spacing_endstrut
+ \spac_strut_end
\fi
\fi}
-\def\spacing_endstrut
+\def\spac_strut_end
{\ifconditional\sigstruts
- \spacing_endstrut_signal
+ \spac_strut_end_signal
\else
- \spacing_endstrut_normal
+ \spac_strut_end_normal
\fi}
-\def\spacing_endstrut_signal
+\def\spac_strut_end_signal
{\ifdim\lastskip=\strutsignal
\unskip
\unskip
@@ -974,7 +974,7 @@
\strut
\fi}
-\def\spacing_endstrut_normal
+\def\spac_strut_end_normal
{\removeunwantedspaces
\normalpenalty\plustenthousand
\normalhskip\zeropoint
@@ -1850,12 +1850,6 @@
\dostarttagged\t!line\empty
\GotoPar}
-\def\afterfirstobeyedline_indeed % tzt two pass, net als opsomming
- {\linesparameter\c!command
- \gdef\afterfirstobeyedline
- {\ifx\linesoption\v!packed\nobreak\fi
- \linesparameter\c!command}}%
-
\unexpanded\def\dostoplines
{\dostoptagged
\endgroup
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 8ec405f9f..edb16ac2f 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index ae59662a5..3da3b1812 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/status-mkiv.lua b/tex/context/base/status-mkiv.lua
index 5fd2f6b8a..524f8e602 100644
--- a/tex/context/base/status-mkiv.lua
+++ b/tex/context/base/status-mkiv.lua
@@ -380,6 +380,7 @@ return {
filename = "core-two",
marktype = "mkiv",
status = "okay",
+ comment = "maybe rename to core-two",
},
{
filename = "colo-ini",
diff --git a/tex/context/base/status-mkiv.tex b/tex/context/base/status-mkiv.tex
index 922df9ec1..c4ea94046 100644
--- a/tex/context/base/status-mkiv.tex
+++ b/tex/context/base/status-mkiv.tex
@@ -10,7 +10,8 @@
\setuphead
[subject]
- [style=\bfa]
+ [style=\bfa,
+ page=yes]
\setuppagenumbering
[location=]
@@ -27,7 +28,7 @@
will be done when we're satisfied with one scheme \stopitem
\startitem there will be additional columns in the table, like for namespace
so we need another round of checking then \stopitem
- \startitem the imp modules are not in the list and needs checking too \stopitem
+ \startitem the imp modules are not in the list and need checking too \stopitem
\startitem the s, x, m modules will be checked, redone and reorganized \stopitem
\startitem the lua code will be cleaned up upgraded as some is quite old
and experimental \stopitem
@@ -37,6 +38,10 @@
\startitem some commands can go from mult-def (and the xml file) \stopitem
\startitem check for setuphandler vs simplesetuphandler \stopitem
\startitem all showcomposition etc can go (we can redo that in lua if needed) \stopitem
+ \startitem for the moment we will go for \type {xxxx_} namespaces that (mostly) match
+ the filename but later we can replace these by longer names (via a script) so
+ module writers should {\bf not} use the core commands with \type{_} in the
+ name \stopitem
\stopitemize
\stopsubject
@@ -66,7 +71,7 @@
context.NC() context(i)
context.NC() context(module.filename)
context.NC() context(module.marktype)
- context.NC() if status == "unknown" then context.italic(status) else context(status) end
+ context.NC() if status == "unknown" then context.bold(status) else context(status) end
context.NC() context(module.comment)
context.NC() context.NR()
end
@@ -76,6 +81,51 @@
end
+ local namespaces = dofile("status-namespaces.lua")
+
+ local valid = table.tohash {
+ "toks", "attr", "page", "buff", "font", "colo", "phys", "supp", "typo", "strc",
+ "syst", "tabl", "spac", "scrn", "lang", "lxml", "mlib", "java", "pack", "math",
+ "symb", "grph", "anch", "luat", "mult", "back", "node", "meta", "module",
+ }
+
+ context.startsubject { title = "Valid prefixes" }
+
+ for namespace, data in table.sortedhash(namespaces) do
+ if valid[namespace] then
+ context.type(namespace)
+ end
+ context.par()
+ end
+
+ context.stopsubject()
+
+ context.startsubject { title = "Messy namespaces" }
+
+ for namespace, data in table.sortedhash(namespaces) do
+ if valid[namespace] then
+ else
+ context(namespace)
+ end
+ context.par()
+ end
+
+ context.stopsubject()
+
+ local registers = dofile("status-registers.lua")
+
+ context.startsubject { title = "Messy registers" }
+ for register, data in table.sortedhash(registers) do
+ context(register)
+ context.par()
+ for name in table.sortedhash(data) do
+ context.quad()
+ context.type(name)
+ context.par()
+ end
+ context.par()
+ end
+
\stopluacode
\stopsubject
diff --git a/tex/context/base/strc-blk.mkiv b/tex/context/base/strc-blk.mkiv
index a632b38fb..3bd5d04ed 100644
--- a/tex/context/base/strc-blk.mkiv
+++ b/tex/context/base/strc-blk.mkiv
@@ -46,7 +46,7 @@
\letvalue{\e!end#1}\relax}
\def\dobeginofblock[#1][#2]%
- {\normalexpanded{\buffers_pickup{@block@}{\e!begin#1}{\e!end#1}}
+ {\normalexpanded{\buff_pickup{@block@}{\e!begin#1}{\e!end#1}}
{}% before
{\ctxcommand{savestructureblock("#1","#2","@block@")}}}% after
diff --git a/tex/context/base/strc-des.mkiv b/tex/context/base/strc-des.mkiv
index a386b16cb..48102655a 100644
--- a/tex/context/base/strc-des.mkiv
+++ b/tex/context/base/strc-des.mkiv
@@ -116,8 +116,8 @@
\newbox \descriptionheadbox
\newskip \leftdescriptionskip
\newskip \rightdescriptionskip
-\newdimen \descriptionsheadwidth % replaces \!!widtha
-\newdimen \descriptionsheaddistance % replaces \!!widthb
+\newdimen \descriptionsheadwidth % replaces \!!widtha % TODO: proper namespace dimens
+\newdimen \descriptionsheaddistance % replaces \!!widthb % TODO: proper namespace dimens
\setvalue{@@description\v!left }{\@@descriptionhang\@@descriptionleftpure \@@descriptionlefthang \@@descriptionleftmargin }
\setvalue{@@description\v!right}{\@@descriptionhang\@@descriptionrightpure\@@descriptionrighthang\@@descriptionrightmargin}
@@ -386,9 +386,8 @@
\dostoptagged
\endgroup
\descriptionparameter\c!after % which currentdescription is taken here?
- \normalexpanded
- {\egroup % temporary hack
- \noexpand\checknextindentation[\descriptionparameter\c!indentnext]}%
+ \useindentnextparameter\descriptionparameter
+ \egroup
\dorechecknextindentation}
\def\@@dodescription
@@ -1111,35 +1110,35 @@
%D
%D \typebuffer \getbuffer
+\newcount\c_strc_indentedtexts_nesting
+\newdimen\d_strc_indentedtexts_width
+
\appendtoks
- \setuevalue {\e!start\currentindentedtext}{\start_indented_text{\currentindentedtext}\indented_text_nesting}%
- \setuevalue {\e!stop \currentindentedtext}{\stop_indented_text}%
+ \setuevalue {\e!start\currentindentedtext}{\strc_indentedtexts_start{\currentindentedtext}\c_strc_indentedtexts_nesting}%
+ \setuevalue {\e!stop \currentindentedtext}{\strc_indentedtexts_stop}%
% to be avoided ... might go away
- \setuevalue {\currentindentedtext}{\indented_text{\currentindentedtext}{0}}%
- \setuevalue {\v!sub\currentindentedtext}{\indented_text{\currentindentedtext}{1}}%
- \setuevalue{\v!sub\v!sub\currentindentedtext}{\indented_text{\currentindentedtext}{2}}%
+ \setuevalue {\currentindentedtext}{\strc_indentedtexts_direct{\currentindentedtext}{0}}%
+ \setuevalue {\v!sub\currentindentedtext}{\strc_indentedtexts_direct{\currentindentedtext}{1}}%
+ \setuevalue{\v!sub\v!sub\currentindentedtext}{\strc_indentedtexts_direct{\currentindentedtext}{2}}%
\to \everydefineindentedtext
-\newcount\indented_text_nesting
-\newdimen\indented_text_width
-
-\unexpanded\def\start_indented_text#1#2%
+\unexpanded\def\strc_indentedtexts_start#1#2%
{\par
\begingroup
- \indented_text_nesting#2\relax
+ \c_strc_indentedtexts_nesting#2\relax
\edef\currentindentedtext{#1}%
\indentedtextparameter\c!before
\doifnothing{\indentedtextparameter\c!sample}
{\setindentedtextparameter\c!sample{\indentedtextparameter\c!text}}%
\assignwidth
{\indentedtextparameter\c!width}
- {\indented_text_width}
+ {\d_strc_indentedtexts_width}
{\useindentedtextstyleandcolor\c!headstyle\c!headcolor
\indentedtextparameter\c!sample
\spr{\indentedtextparameter\c!separator}}
{\indentedtextparameter\c!distance}%
- \advance\indented_text_width \indentedtextparameter\c!distance
- \setbox\scratchbox\hbox to \indented_text_width
+ \advance\d_strc_indentedtexts_width \indentedtextparameter\c!distance
+ \setbox\scratchbox\hbox to \d_strc_indentedtexts_width
{\useindentedtextstyleandcolor\c!headstyle\c!headcolor
\strut
\indentedtextparameter\c!text
@@ -1147,21 +1146,21 @@
\spr{\indentedtextparameter\c!separator}%
\hskip\indentedtextparameter\c!distance}%
\parindent\zeropoint
- \hskip\indented_text_nesting\indented_text_width
- \advance\indented_text_nesting\plusone
+ \hskip\c_strc_indentedtexts_nesting\d_strc_indentedtexts_width
+ \advance\c_strc_indentedtexts_nesting\plusone
\dontleavehmode\box\scratchbox
- \hangindent\indented_text_nesting\indented_text_width
+ \hangindent\c_strc_indentedtexts_nesting\d_strc_indentedtexts_width
\useindentedtextstyleandcolor\c!style\c!color}
-\unexpanded\def\stop_indented_text
+\unexpanded\def\strc_indentedtexts_stop
{\indentedtextparameter\c!after
\par
\endgroup}
-\let\stopindentedtext\stop_indented_text
+\let\stopindentedtext\strc_indentedtexts_stop
-\unexpanded\def\indented_text#1#2#3\par % no longer clever grabpar trickery
- {\start_indented_text{#1}{#2}#3\stop_indented_text}
+\unexpanded\def\strc_indentedtexts_direct#1#2#3\par % no longer clever grabpar trickery
+ {\strc_indentedtexts_start{#1}{#2}#3\strc_indentedtexts_stop}
\setupindentedtext
[\c!style=\v!normal,
diff --git a/tex/context/base/strc-flt.mkvi b/tex/context/base/strc-flt.mkvi
index 0a0b6badd..b54287a20 100644
--- a/tex/context/base/strc-flt.mkvi
+++ b/tex/context/base/strc-flt.mkvi
@@ -38,7 +38,7 @@
\let\setupcaptions\setupfloatcaption
\def\dohandlenextfloatindent
- {\checknextindentation[\floatparameter\c!indentnext]%
+ {\useindentnextparameter\floatparameter
\dorechecknextindentation}
\setupcaptions
@@ -178,19 +178,19 @@
\def\dodefinefloatcommands[#1][#2]%
{\setuvalue {\e!place\e!listof#2}{\dodoubleempty\doplacelist[#1]}%
\setuvalue {\e!complete\e!listof#2}{\dotripleempty\dodocompletelist[#1][#2]}%
- \setuevalue {\e!place#1}{\float_place{#1}}%
- \setuevalue {\e!start\e!place#1}{\float_start_place{#1}}%
- \setuevalue {\e!stop\e!place#1}{\float_stop_place}%
- \setuevalue {\e!start#1\e!text}{\float_start_text{#1}}%
- \setuevalue {\e!stop#1\e!text}{\float_stop_text}%
+ \setuevalue {\e!place#1}{\strc_floats_place{#1}}%
+ \setuevalue {\e!start\e!place#1}{\strc_floats_start_place{#1}}%
+ \setuevalue {\e!stop\e!place#1}{\strc_floats_stop_place}%
+ \setuevalue {\e!start#1\e!text}{\strc_floats_start_text{#1}}%
+ \setuevalue {\e!stop#1\e!text}{\strc_floats_stop_text}%
% these will become obsolete:
- \setuevalue {\e!reserve#1}{\float_reserve{#1}}%
- \setuevalue{\e!start\e!reserve#1\e!text}{\float_start_reserve_text{#1}}%
- \setuevalue {\e!stop\e!reserve#1\e!text}{\float_stop_reserve_text}}
+ \setuevalue {\e!reserve#1}{\strc_floats_reserve{#1}}%
+ \setuevalue{\e!start\e!reserve#1\e!text}{\strc_floats_start_reserve_text{#1}}%
+ \setuevalue {\e!stop\e!reserve#1\e!text}{\strc_floats_stop_reserve_text}}
%D Fallback float body:
-\unexpanded\def\float_place_empty_box % \inheritedfloatframed
+\unexpanded\def\strc_floats_place_empty_box % \inheritedfloatframed
{\framed
[\c!frame=\v!on,
\c!width=\rootfloatparameter\c!width,
@@ -263,13 +263,12 @@
% end of todo
-\newbox \float_caption_box
-\newdimen\float_caption_height
-\newdimen\float_caption_depth
+\newbox \b_strc_floats_caption
+\newbox \b_strc_floats_content
+\newdimen\d_strc_floats_caption_height
+\newdimen\d_strc_floats_caption_depth
-\newbox \float_content_box
-
-\def\float_make_complete_caption
+\def\strc_floats_make_complete_caption
{\doifsomething{\floatcaptionparameter\c!spacebefore}{\blank[\floatcaptionparameter\c!spacebefore]}%
\synchronizedisplaydirection % temp hack, till we have a proper model
\noindent
@@ -287,12 +286,12 @@
\fi \fi
\fi
\ifnofloatcaption
- \global\float_caption_height\zeropoint
- \global\float_caption_depth \zeropoint
+ \global\d_strc_floats_caption_height\zeropoint
+ \global\d_strc_floats_caption_depth \zeropoint
\else
\usefloatcaptionstyleandcolor\c!textstyle\c!textcolor
- \global\float_caption_height\strutheight
- \global\float_caption_depth \strutdepth
+ \global\d_strc_floats_caption_height\strutheight
+ \global\d_strc_floats_caption_depth \strutdepth
\begstrut\thecurrentfloatcaption\endstrut\endgraf
\fi
\endgroup
@@ -301,7 +300,7 @@
% \newif\iftracecaptions
%
% \def\settracedcaptionbox
-% {\iftracecaptions\setbox\float_caption_box\ruledhbox{\box\float_caption_box}\fi}
+% {\iftracecaptions\setbox\b_strc_floats_caption\ruledhbox{\box\b_strc_floats_caption}\fi}
% \definefloat [figure-1] [figure]
% \definefloat [figure-2] [figure]
@@ -328,24 +327,24 @@
% \def\dosetcaptionthings
% {\doprocesslocalsetups{\floatcaptionparameter\c!setups}\relax}
-\def\check_float_caption_content
+\def\strc_floats_check_caption_content
{\ifnofloatcaption
\else
- \setbox\float_caption_box\hbox
+ \setbox\b_strc_floats_caption\hbox
{\settrialtypesetting
\notesenabledfalse
- \float_make_complete_caption}%
+ \strc_floats_make_complete_caption}%
% new, \placefigure{\xmlfirst{#1}{somecaption}}{} passes earlier empty check
% so here we misuse the scratch box; actually this means that the previous
% test can go away (some day, when i redo this module)
- \ifdim\wd\float_caption_box=\zeropoint
+ \ifdim\wd\b_strc_floats_caption=\zeropoint
\global\emptyfloatcaptiontrue
\ifnofloatnumber
\global\nofloatcaptiontrue
\fi
\else
\global\emptyfloatcaptionfalse
- \setbox\float_caption_box\hbox{\hskip\leftskip\box\float_caption_box}%
+ \setbox\b_strc_floats_caption\hbox{\hskip\leftskip\box\b_strc_floats_caption}%
\fi
\fi}
@@ -395,57 +394,57 @@
% we're really dealing with the float. Some day I'll root out
% the global settings.
-\def\float_set_current_tag#tag%
+\def\strc_floats_set_current_tag#tag%
{\edef\currentfloat{#tag}%
\ifx\currentfloat\empty
\let\currentfloat\v!figure % a bit of a hack
\fi
\let\currentfloatcaption\currentfloat}
-\def\float_reset_variables
+\def\strc_floats_reset_variables
{\global\emptyfloatcaptionfalse
\global\nofloatcaptionfalse
\global\nofloatnumberfalse}
% place
-\unexpanded\def\float_place#tag%
+\unexpanded\def\strc_floats_place#tag%
{\flushnotes
\flushsidefloats % here !
- \float_begin_group
- \float_set_current_tag{#tag}%
- \dodoubleempty\float_place_indeed}
+ \strc_floats_begin_group
+ \strc_floats_set_current_tag{#tag}%
+ \dodoubleempty\strc_floats_place_indeed}
-\def\float_place_indeed[#location][#reference]#caption%
- {\float_reset_variables
+\def\strc_floats_place_indeed[#location][#reference]#caption%
+ {\strc_floats_reset_variables
\edef\floatlocation{#location}%
\ifx\floatlocation\empty
\edef\floatlocation{\floatparameter\c!default}% beware of a clash between alignment locations
\fi
\setupcurrentfloatcaption[\c!reference={#reference},\c!title={#caption},\c!marking=,\c!list=,\c!bookmark=]%
- \doifinsetelse\v!split\floatlocation\place_next_float_box_split\place_next_float_box_normal}
+ \doifinsetelse\v!split\floatlocation\strc_floats_place_next_box_split\strc_floats_place_next_box_normal}
\unexpanded\def\placefloat
{\flushnotes
\flushsidefloats % here !
- \float_begin_group
- \dotripleempty\float_place_float}
+ \strc_floats_begin_group
+ \dotripleempty\strc_floats_place_float}
-\def\float_place_float[#tag]%
- {\float_set_current_tag{#tag}%
- \float_place_indeed}
+\def\strc_floats_place_float[#tag]%
+ {\strc_floats_set_current_tag{#tag}%
+ \strc_floats_place_indeed}
% start-stop
-\unexpanded\def\float_start_place#tag%
+\unexpanded\def\strc_floats_start_place#tag%
{\flushnotes
\flushsidefloats % here !
- \float_begin_group
- \float_set_current_tag{#tag}%
- \dosingleempty\float_start_place_indeed}
+ \strc_floats_begin_group
+ \strc_floats_set_current_tag{#tag}%
+ \dosingleempty\strc_floats_start_place_indeed}
-\def\float_start_place_indeed[#settings]% tricky ... saved not ok yet
- {\float_reset_variables
+\def\strc_floats_start_place_indeed[#settings]% tricky ... saved not ok yet
+ {\strc_floats_reset_variables
\edef\savedfloatlocation{\floatcaptionparameter\c!location}%
\setupcurrentfloatcaption[\c!location=,\c!reference=,\c!title=,\c!marking=,\c!list=,\c!bookmark=,#settings]%
\edef\floatlocation{\floatcaptionparameter\c!location}%
@@ -453,39 +452,39 @@
\ifx\floatlocation\empty
\edef\floatlocation{\floatparameter\c!default}%
\fi
- \doifinsetelse\v!split\floatlocation\place_next_float_box_split\place_next_float_box_normal
+ \doifinsetelse\v!split\floatlocation\strc_floats_place_next_box_split\strc_floats_place_next_box_normal
\bgroup
\ignorespaces}
-\unexpanded\def\float_stop_place
+\unexpanded\def\strc_floats_stop_place
{\removeunwantedspaces
\egroup}
\unexpanded\def\startplacefloat
{\flushnotes
\flushsidefloats % here !
- \float_begin_group
- \dodoubleempty\float_start_place_float}
+ \strc_floats_begin_group
+ \dodoubleempty\strc_floats_start_place_float}
-\def\float_start_place_float[#tag]%
- {\float_set_current_tag{#tag}%
- \float_start_place_indeed}
+\def\strc_floats_start_place_float[#tag]%
+ {\strc_floats_set_current_tag{#tag}%
+ \strc_floats_start_place_indeed}
-\let\stopplacefloat\float_stop_place
+\let\stopplacefloat\strc_floats_stop_place
% reserve
-\unexpanded\def\float_reserve#tag%
+\unexpanded\def\strc_floats_reserve#tag%
{\flushnotes
\flushsidefloats % here !
- \float_begin_group
- \float_set_current_tag{#tag}%
- \dotripleempty\float_reserve_indeed}
+ \strc_floats_begin_group
+ \strc_floats_set_current_tag{#tag}%
+ \dotripleempty\strc_floats_reserve_indeed}
-\def\float_reserve_indeed[#settings][#location][#reference]#caption% maybe check for #settings
- {\float_place_indeed[#location][#reference]{#caption}{\float_reserve_box{#settings}}}
+\def\strc_floats_reserve_indeed[#settings][#location][#reference]#caption% maybe check for #settings
+ {\strc_floats_place_indeed[#location][#reference]{#caption}{\strc_floats_reserve_box{#settings}}}
-\def\float_reserve_box#settings%
+\def\strc_floats_reserve_box#settings%
{\begingroup
\setupcurrentfloat[\c!frame=\v!on,#settings]%
\inheritedfloatframed{}%
@@ -493,47 +492,47 @@
% text
-\unexpanded\def\float_start_text#tag%
+\unexpanded\def\strc_floats_start_text#tag%
{\flushnotes % Here indeed?
\flushsidefloats % Here indeed?
- \float_begin_text_group
- \float_set_current_tag{#tag}%
- \dodoubleempty\float_start_text_indeed}
+ \strc_floats_begin_text_group
+ \strc_floats_set_current_tag{#tag}%
+ \dodoubleempty\strc_floats_start_text_indeed}
-\def\float_start_text_indeed[#location][#reference]%
- {\float_place_indeed[\v!text,#location,\v!left][#reference]}
+\def\strc_floats_start_text_indeed[#location][#reference]%
+ {\strc_floats_place_indeed[\v!text,#location,\v!left][#reference]}
-\unexpanded\def\float_stop_text
- {\float_stop_text_indeed}
+\unexpanded\def\strc_floats_stop_text
+ {\strc_floats_stop_text_indeed}
% reserved text
-\unexpanded\def\float_start_reserve_text#tag%
+\unexpanded\def\strc_floats_start_reserve_text#tag%
{\flushnotes
\flushsidefloats
- \float_begin_text_group
- \float_set_current_tag{#tag}%
- \dotripleempty\float_start_reserve_text_indeed}
+ \strc_floats_begin_text_group
+ \strc_floats_set_current_tag{#tag}%
+ \dotripleempty\strc_floats_start_reserve_text_indeed}
-\def\float_start_reserve_text_indeed[#settings][#location][#reference]#caption%
- {\float_place_indeed[\v!text,#location,\v!left][#reference]{#caption}{\float_reserve_box{#settings}}}
+\def\strc_floats_start_reserve_text_indeed[#settings][#location][#reference]#caption%
+ {\strc_floats_place_indeed[\v!text,#location,\v!left][#reference]{#caption}{\strc_floats_reserve_box{#settings}}}
-\unexpanded\def\float_stop_reserve_text
- {\float_stop_text_indeed}
+\unexpanded\def\strc_floats_stop_reserve_text
+ {\strc_floats_stop_text_indeed}
% special hack
-\def\float_begin_group {\begingroup}
-\def\float_end_group {\carryoverpar\endgroup}
-\def\float_end_split_group {\endgroup}
+\def\strc_floats_begin_group {\begingroup}
+\def\strc_floats_end_group {\carryoverpar\endgroup}
+\def\strc_floats_end_split_group {\endgroup}
-\def\float_begin_text_group {\begingroup\let\float_end_group\relax}
-\def\float_end_text_group {\endgroup}
+\def\strc_floats_begin_text_group {\begingroup\let\strc_floats_end_group\relax}
+\def\strc_floats_end_text_group {\endgroup}
% implementation
-\ifdefined\page_margin_float_before \else \let\page_margin_float_before \relax \fi
-\ifdefined\page_margin_float_set_hsize \else \let\page_margin_float_set_hsize\relax \fi
+\ifdefined\page_margin_strc_floats_before \else \let\page_margin_strc_floats_before \relax \fi
+\ifdefined\page_margin_strc_floats_set_hsize \else \let\page_margin_strc_floats_set_hsize\relax \fi
\def\flushfloatslist
{\v!left,\v!right,\v!inner,\v!outer,%
@@ -543,12 +542,12 @@
\v!innermargin,\v!outermargin,\v!inneredge,\v!outeredge,%
\v!text,\v!opposite}% \v!page
-\unexpanded\def\place_next_float_box_split
- {\let\splitfloatfinalizer\float_end_split_group
- \let\float_end_group\relax
- \splitfloat{\place_next_float_box_normal}}
+\unexpanded\def\strc_floats_place_next_box_split
+ {\let\splitfloatfinalizer\strc_floats_end_split_group
+ \let\strc_floats_end_group\relax
+ \splitfloat{\strc_floats_place_next_box_normal}}
-\unexpanded\def\place_next_float_box_normal
+\unexpanded\def\strc_floats_place_next_box_normal
{\ifsomefloatwaiting
% this was \checkwaitingfloats spread all over
\doifinsetelse\v!always\floatlocation
@@ -556,30 +555,30 @@
{\doifcommonelse\floatlocation\flushfloatslist\doflushfloats\donothing}%
% but which should be done before using box \floatbox
\fi
- \page_margin_float_before % todo: each float handler gets a before
+ \page_margin_strc_floats_before % todo: each float handler gets a before
\global\insidefloattrue
\dostarttagged\t!float\currentfloat
- \page_margin_float_set_hsize % todo: each float handler gets a set_hsize
+ \page_margin_strc_floats_set_hsize % todo: each float handler gets a set_hsize
\the\everyinsidefloat
- \float_analyze_variables_one
+ \strc_floats_analyze_variables_one
\dostarttagged\t!floatcontent\empty
\dowithnextboxcontent
- {\float_set_local_hsize
+ {\strc_floats_set_local_hsize
\floatparameter\c!inner
\postponenotes} % new
{\dostoptagged
- \float_finish_placement}
+ \strc_floats_finish_placement}
\vbox}
-\def\float_finish_placement
+\def\strc_floats_finish_placement
{\doifsomething{\floatparameter\c!criterium}
{\ifdim\wd\nextbox>\floatparameter\c!criterium\relax
\edef\forcedfloatmethod{\floatparameter\c!fallback}%
\ifx\forcedfloatmethod\empty\let\forcedfloatmethod\v!here\fi
\fi}%
- \float_check_extra_actions
- \float_analyze_variables_two
- \float_place_packaged_boxes
+ \strc_floats_check_extra_actions
+ \strc_floats_analyze_variables_two
+ \strc_floats_place_packaged_boxes
\dostoptagged % tricky ... needs checking
% we need to carry over the par because of side floats
\global\sidefloatdownshift \zeropoint
@@ -588,12 +587,12 @@
\doifinset\v!reset\floatlocation\forgetsidefloats
\doinhibitblank
\fi
- \float_end_group}
+ \strc_floats_end_group}
\setnewconstant\textfloatmethod\zerocount % 0=raw 1=safe (.99) 2=tight (-1pt)
\setnewconstant\floatrotation \zerocount % 0 90 180 270
-\def\float_analyze_variables_two
+\def\strc_floats_analyze_variables_two
{\doifcommonelse
{\floatlocation}
{\v!left,\v!right,\v!inner,\v!outer,%
@@ -612,7 +611,7 @@
\global\textfloatmethod\floatparameter\c!textmethod
\global\sidefloatalign\zerocount
\global\floatrotation\zerocount
- \float_calculate_skips
+ \strc_floats_calculate_skips
\ifparfloat
\processaction
[\floatparameter\c!sidealign]
@@ -657,7 +656,7 @@
% documenteren in details
-\def\float_analyze_variables_one
+\def\strc_floats_analyze_variables_one
{\doifelse{\floatparameter\c!local}\v!yes % fout keyword
\globalcenterfloatboxtrue
\globalcenterfloatboxfalse
@@ -676,7 +675,7 @@
\let\naturalfloatwidth \!!zeropoint
\let\naturalfloatdepth \!!zeropoint
-\def\float_set_natural_dimensions#box%
+\def\strc_floats_set_natural_dimensions#box%
{\xdef\naturalfloatheight{\the\ht#box}%
\xdef\naturalfloatwidth {\the\wd#box}%
\xdef\naturalfloatdepth {\the\dp#box}}
@@ -716,7 +715,7 @@
\newconditional\usesamefloatnumber
-\def\float_place_packaged_boxes
+\def\strc_floats_place_packaged_boxes
{\bgroup
\ifconditional\usesamefloatnumber
\globallet\currentfloatnumber \previousfloatnumber
@@ -748,14 +747,14 @@
%
\global\setfalse\usesamefloatnumber % one shot
% check float box
- \float_set_natural_dimensions\nextbox
+ \strc_floats_set_natural_dimensions\nextbox
\global\setbox\floatbox\vbox{\floatparameter\c!command{\box\nextbox}}%
- \float_set_natural_dimensions\floatbox
+ \strc_floats_set_natural_dimensions\floatbox
\ifdim\htdp\floatbox=\zeropoint
\showmessage\m!floatblocks{11}\empty
\global\setbox\floatbox\vbox
{\dostarttagged\t!floatcontent\empty
- \float_place_empty_box
+ \strc_floats_place_empty_box
\dostoptagged}%
\fi
% deal with lack of caption
@@ -767,11 +766,11 @@
\fi}% gets rid of the depth (unless tabulate)
\egroup
% place the float
- \float_set_box
- \float_get_box
+ \strc_floats_set_box
+ \strc_floats_get_box
\global\insidefloatfalse}
-\def\float_set_local_hsize
+\def\strc_floats_set_local_hsize
{\iflocalcenterfloatbox
\seteffectivehsize
\hsize\localhsize
@@ -827,24 +826,24 @@
\endgroup}
{\movedownsidefloat[#settings]}}
-\def\float_move_down#setting%
+\def\strc_floats_move_down#setting%
{\processaction
[#setting]%
- [ \v!line=>\float_move_down_line+,%
- +\v!line=>\float_move_down_line+,%
- -\v!line=>\float_move_down_line-,%
- \v!hang=>\float_move_down_hang\plusone,%
- +\v!hang=>\float_move_down_hang\plusone,%
- -\v!hang=>\float_move_down_hang\minusone]}
-
-\def\float_move_down_line#sign%
+ [ \v!line=>\strc_floats_move_down_line+,%
+ +\v!line=>\strc_floats_move_down_line+,%
+ -\v!line=>\strc_floats_move_down_line-,%
+ \v!hang=>\strc_floats_move_down_hang\plusone,%
+ +\v!hang=>\strc_floats_move_down_hang\plusone,%
+ -\v!hang=>\strc_floats_move_down_hang\minusone]}
+
+\def\strc_floats_move_down_line#sign%
{\if!!donea \else
\global\sidefloatdownshift\zeropoint
\!!doneatrue
\fi
\global\advance\sidefloatdownshift#sign\lineheight}
-\def\float_move_down_hang#lines%
+\def\strc_floats_move_down_hang#lines%
{\if!!doneb \else
\global\sidefloatsidelines\zerocount
\!!donebtrue
@@ -856,35 +855,35 @@
{\begingroup
\!!doneafalse
\!!donebfalse
- \normalexpanded{\dorepeatwithcommand[#settings]}\float_move_down
+ \normalexpanded{\dorepeatwithcommand[#settings]}\strc_floats_move_down
\endgroup}}
\unexpanded\def\hangsidefloat[#number]%
{\global\sidefloatsidelines#number\relax}
-\def\set_extra_float_action#rightpagelocation#leftpagelocation%
+\def\strc_floats_set_extra_action#rightpagelocation#leftpagelocation%
{\rightorleftpageaction
{\let\extrafloatlocation#rightpagelocation}%
{\let\extrafloatlocation#leftpagelocation}}
-\def\float_check_extra_actions
+\def\strc_floats_check_extra_actions
{\doifnotinset\v!text\floatlocation % fuzzy, text overloads left, since then it's a directive
{\let\extrafloatlocation\empty
% \sidefloatdownshift will be reset afterwards, and can
% already be set at this point
\processallactionsinset
[\floatlocation] % ininner/inouter : for old times sake
- [ \v!inner=>\set_extra_float_action\v!left \v!right,
- \v!outer=>\set_extra_float_action\v!right \v!left,
- \v!innermargin=>\set_extra_float_action\v!leftmargin \v!rightmargin,
- \v!outermargin=>\set_extra_float_action\v!rightmargin\v!leftmargin,
- \v!inneredge=>\set_extra_float_action\v!leftedge \v!rightedge,
- \v!outeredge=>\set_extra_float_action\v!rightedge \v!leftedge,
- \v!backspace=>\set_extra_float_action\v!backspace \v!cutspace,
- \v!cutspace=>\set_extra_float_action\v!cutspace \v!backspace,
- % \v!margin=>\set_extra_float_action\v!cutspace \v!backspace,
- \v!left=>\set_extra_float_action\v!left \v!left,
- \v!right=>\set_extra_float_action\v!right \v!right,
+ [ \v!inner=>\strc_floats_set_extra_action\v!left \v!right,
+ \v!outer=>\strc_floats_set_extra_action\v!right \v!left,
+ \v!innermargin=>\strc_floats_set_extra_action\v!leftmargin \v!rightmargin,
+ \v!outermargin=>\strc_floats_set_extra_action\v!rightmargin\v!leftmargin,
+ \v!inneredge=>\strc_floats_set_extra_action\v!leftedge \v!rightedge,
+ \v!outeredge=>\strc_floats_set_extra_action\v!rightedge \v!leftedge,
+ \v!backspace=>\strc_floats_set_extra_action\v!backspace \v!cutspace,
+ \v!cutspace=>\strc_floats_set_extra_action\v!cutspace \v!backspace,
+ % \v!margin=>\strc_floats_set_extra_action\v!cutspace \v!backspace,
+ \v!left=>\strc_floats_set_extra_action\v!left \v!left,
+ \v!right=>\strc_floats_set_extra_action\v!right \v!right,
\v!line=>, % only -n*line is handled (see ***)
\s!unknown=>{\movedownsidefloat[\commalistelement]}]%
\ifx\extrafloatlocation\empty \else
@@ -893,7 +892,7 @@
% pas op, maxbreedte niet instellen als plaats=links/rechts
-\def\float_set_local_dimensions
+\def\strc_floats_set_local_dimensions
{\global\sidefloatshift \zeropoint % duplicate
\global\sidefloatmaximum\zeropoint\relax % duplicate
\ifdim\sidefloatdownshift=\zeropoint\else
@@ -947,7 +946,7 @@
\newcount\noftopfloats \noftopfloats=2
\newcount\nofbotfloats \nofbotfloats=0
-\def\float_calculate_skip#target#skip%
+\def\strc_floats_calculate_skip#target#skip%
{\edef\askedfloatskip{#skip}%
\ifx\askedfloatskip\empty
\global#target\zeropoint
@@ -958,12 +957,12 @@
\global#target\ht\scratchbox
\fi\fi}
-\def\float_calculate_skips
+\def\strc_floats_calculate_skips
{\begingroup
- \float_calculate_skip\floattopskip {\rootfloatparameter\c!spacebefore}%
- \float_calculate_skip\floatbottomskip {\rootfloatparameter\c!spaceafter}%
- \float_calculate_skip\sidefloattopskip {\rootfloatparameter\c!sidespacebefore}%
- \float_calculate_skip\sidefloatbottomskip{\rootfloatparameter\c!sidespaceafter}%
+ \strc_floats_calculate_skip\floattopskip {\rootfloatparameter\c!spacebefore}%
+ \strc_floats_calculate_skip\floatbottomskip {\rootfloatparameter\c!spaceafter}%
+ \strc_floats_calculate_skip\sidefloattopskip {\rootfloatparameter\c!sidespacebefore}%
+ \strc_floats_calculate_skip\sidefloatbottomskip{\rootfloatparameter\c!sidespaceafter}%
\global\floatsideskip \rootfloatparameter\c!margin
\global\sidefloatleftshift \floatparameter\c!leftmargindistance
\global\sidefloatrightshift\floatparameter\c!rightmargindistance
@@ -1040,7 +1039,7 @@
\hsize\floattextwidth
\ignorespaces}
-\def\float_stop_text_indeed
+\def\strc_floats_stop_text_indeed
{\egroup
\doifnotinset\v!tall\floatlocation
{\ifdim\ht\floattext<\floatheight
@@ -1087,7 +1086,7 @@
\box\floatbox
\dostoptagged
\blank[\rootfloatparameter\c!spaceafter]%
- \float_end_text_group
+ \strc_floats_end_text_group
\doinsertfloatinfo}
\def\somefacefloat[#1]% links, rechts, midden, hoog, midden, laag
@@ -1155,7 +1154,7 @@
% minwidth=fit,width=max : no overshoot, as wide as graphic
-\def\float_align_content_indeed
+\def\strc_floats_align_content_indeed
{\alignstrutmode\zerocount
\doifnotcommon{\floatcaptionparameter\c!location}{\v!outermargin,\v!innermargin,\v!leftmargin,\v!rightmargin}
{\shiftalignedline
@@ -1163,40 +1162,40 @@
{\floatparameter\c!innermargin}{\floatparameter\c!outermargin}}%
\alignedline{\floatparameter\c!location}\v!middle}
-\def\float_align_caption_indeed
+\def\strc_floats_align_caption_indeed
{\alignstrutmode\zerocount
\shiftalignedline
{\floatcaptionparameter\c!leftmargin }{\floatcaptionparameter\c!rightmargin}%
{\floatcaptionparameter\c!innermargin}{\floatcaptionparameter\c!outermargin}%
\alignedline{\floatparameter\c!location}\v!middle}
-\def\float_set_page_variant
+\def\strc_floats_set_page_variant
{\bgroup
- \float_set_local_hsize
+ \strc_floats_set_local_hsize
\ifcase\floatrotation\else
\swapdimens\hsize\vsize
\fi
\forgetall
\postponenotes
\dontcomplain
- \setbox\float_content_box\vbox{\borderedfloatbox}%
- \let\float_align_content\float_align_content_indeed
- \let\float_align_caption\float_align_caption_indeed
- \check_float_caption_content
+ \setbox\b_strc_floats_content\vbox{\borderedfloatbox}%
+ \let\strc_floats_align_content\strc_floats_align_content_indeed
+ \let\strc_floats_align_caption\strc_floats_align_caption_indeed
+ \strc_floats_check_caption_content
\ifcase\floatparameter\c!method
\or % automatic
\ifnofloatcaption
- \prepare_no_float_caption
+ \strc_floats_prepare_no_caption
\page_backgrounds_add_local_to_box\floatbox % was \doglobal but not needed
\else
% todo: installable maken, variant/method=auto vs macro
- \prepare_page_float_caption
- \page_backgrounds_add_local_to_box\float_content_box
- \setbox\float_caption_box\hbox
- {\floatcaptionparameter\c!command{\box\float_caption_box}}%
- \moveboxontogrid\float_caption_box{\floatcaptionparameter\c!grid}\float_caption_height
- \page_backgrounds_add_local_to_box\float_caption_box
- \build_float_box
+ \strc_floats_prepare_page_caption
+ \page_backgrounds_add_local_to_box\b_strc_floats_content
+ \setbox\b_strc_floats_caption\hbox
+ {\floatcaptionparameter\c!command{\box\b_strc_floats_caption}}%
+ \moveboxontogrid\b_strc_floats_caption{\floatcaptionparameter\c!grid}\d_strc_floats_caption_height
+ \page_backgrounds_add_local_to_box\b_strc_floats_caption
+ \strc_floats_build_box
\fi
\or % semi automatic
\or % manual
@@ -1212,21 +1211,21 @@
\def\captionminwidth {15\bodyfontsize}
\def\captionovershoot {2em}
-\def\prepare_no_float_caption
+\def\strc_floats_prepare_no_caption
{\global\setbox\floatbox\vbox % pas op als wd groter dan hsize
- {\ifinsidecolumns\ifdim\wd\float_content_box>\hsize
- \let\float_align_content\relax
+ {\ifinsidecolumns\ifdim\wd\b_strc_floats_content>\hsize
+ \let\strc_floats_align_content\relax
\fi\fi
- \float_align_content{\copy\float_content_box}}}
+ \strc_floats_align_content{\copy\b_strc_floats_content}}}
-\def\prepare_page_float_caption
+\def\strc_floats_prepare_page_caption
{\dostarttagged\t!floatcaption\empty
\doifinsetelse{\floatcaptionparameter\c!location}{\v!top,\v!bottom}
{\doifinsetelse{\floatcaptionparameter\c!width}{\v!fit,\v!max}
{\doifelse{\floatcaptionparameter\c!minwidth}\v!fit
{\doifelse{\floatcaptionparameter\c!width}\v!max
{\dopreparestackcaptionmax}
- {\ifdim\wd\float_caption_box>\wd\float_content_box % wider caption
+ {\ifdim\wd\b_strc_floats_caption>\wd\b_strc_floats_content % wider caption
\doifelse{\floatcaptionparameter\c!width}\v!fit
{\dopreparestackcaptionaut}
{\dopreparestackcaptionwid}%
@@ -1240,79 +1239,79 @@
{\dopreparesidewidthcaption}}%
\dostoptagged}
-\def\float_caption_set_align
+\def\strc_floats_caption_set_align
{\normalexpanded{\noexpand\setupalign[\v!reset,\floatcaptionparameter\c!align]}}
\def\dopreparesideautocaption
- {\scratchdimen\dimexpr\hsize-\wd\float_content_box-\floatparameter\c!margin\relax % was \tfskipsize\relax
- \ifdim\wd\float_caption_box>\scratchdimen
- \ifdim\wd\float_caption_box<1.3\scratchdimen
+ {\scratchdimen\dimexpr\hsize-\wd\b_strc_floats_content-\floatparameter\c!margin\relax % was \tfskipsize\relax
+ \ifdim\wd\b_strc_floats_caption>\scratchdimen
+ \ifdim\wd\b_strc_floats_caption<1.3\scratchdimen
\scratchdimen0.8\scratchdimen
\fi
\fi
- \setbox\float_caption_box\vbox
- {\float_caption_set_align
+ \setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
\hsize\scratchdimen
- \float_make_complete_caption}}
+ \strc_floats_make_complete_caption}}
\def\dopreparesidewidthcaption
- {\setbox\float_caption_box\vbox
- {\float_caption_set_align
+ {\setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
\hsize\floatcaptionparameter\c!width
- \float_make_complete_caption}}
+ \strc_floats_make_complete_caption}}
\def\dopreparestackcaptionfix
- {\setbox\float_caption_box\vbox
- {\float_caption_set_align
+ {\setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
\hsize\floatcaptionparameter\c!minwidth % special effects
- \float_make_complete_caption}}
+ \strc_floats_make_complete_caption}}
\def\dopreparestackcaptionmax
- {\setbox\float_caption_box\vbox
- {\float_caption_set_align
- \hsize\wd\float_content_box
- \float_make_complete_caption}}
+ {\setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \hsize\wd\b_strc_floats_content
+ \strc_floats_make_complete_caption}}
\def\dopreparestackcaptionwid
- {\setbox\float_caption_box\vbox
- {\float_caption_set_align
+ {\setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
\hsize\floatcaptionparameter\c!width
- \float_make_complete_caption}}
+ \strc_floats_make_complete_caption}}
\def\dopreparestackcaptionmin
- {\setbox\float_caption_box\vbox
- {\float_caption_set_align
- \hsize\wd\float_content_box
+ {\setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \hsize\wd\b_strc_floats_content
\doifnothing{\floatcaptionparameter\c!align}\raggedcenter % on purpose overloads align !
- \float_make_complete_caption}}
+ \strc_floats_make_complete_caption}}
\def\dopreparestackcaptionaut
{\doifsomething{\floatcaptionparameter\c!align}
{\doifnotinset\v!middle{\floatcaptionparameter\c!align}%
{\let\captionovershoot\!!zeropoint}}%
- \edef\captionhsize{\the\wd\float_content_box}%
+ \edef\captionhsize{\the\wd\b_strc_floats_content}%
\ifdim\captionhsize>\hsize
% float is wider than \hsize
- \setbox\float_caption_box\vbox
+ \setbox\b_strc_floats_caption\vbox
{\settrialtypesetting
- \float_caption_set_align
+ \strc_floats_caption_set_align
\hsize\captionhsize
\notesenabledfalse
- \float_make_complete_caption}%
+ \strc_floats_make_complete_caption}%
\ifdim\ht\scratchbox>\lineheight % more lines
- \setbox\float_caption_box\vbox
- {\float_caption_set_align
+ \setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
\hsize\captionhsize
\advance\hsize -\captionovershoot\relax
\ifdim\hsize<\captionminwidth\relax
\hsize\captionhsize
\fi
- \float_make_complete_caption}%
+ \strc_floats_make_complete_caption}%
\else
- \setbox\float_caption_box\vbox
- {\float_caption_set_align
+ \setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
\hsize\captionhsize
- \float_make_complete_caption}%
+ \strc_floats_make_complete_caption}%
\fi
\else
% float is smaller of equal to \hsize
@@ -1327,29 +1326,29 @@
\advance\scratchdimen 3em % an average word length
\ifdim\scratchdimen<\hsize \hsize\scratchdimen \fi
\notesenabledfalse
- \float_make_complete_caption}%
+ \strc_floats_make_complete_caption}%
\ifdim\ht\scratchbox>\lineheight
% at least an average word longer than a line
- \setbox\float_caption_box\vbox
- {\float_caption_set_align
+ \setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
\scratchdimen\captionhsize
\advance\scratchdimen \captionovershoot
\ifdim\scratchdimen<\hsize \hsize\scratchdimen \fi
- \float_make_complete_caption}%
+ \strc_floats_make_complete_caption}%
\else
% just over a line, don't use an overshoot % % % todo: outer/inner and such
\doifcommonelse{\floatcaptionparameter\c!align}{\v!left,\v!right,\v!flushleft,\v!flushright}
- {\setbox\float_caption_box\vbox
- {\float_caption_set_align
+ {\setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
\hsize\captionhsize
% strange : \raggedcenter
- \float_make_complete_caption}}
+ \strc_floats_make_complete_caption}}
{% nicer
- \setbox\float_caption_box\vbox
- {\float_caption_set_align
+ \setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
\hsize\captionhsize
\doifnothing{\floatcaptionparameter\c!align}\raggedcenter% overloads
- \float_make_complete_caption}}%
+ \strc_floats_make_complete_caption}}%
\fi
\fi}
@@ -1360,21 +1359,21 @@
{\endgraf\nointerlineskip\floatcaptionparameter\c!inbetween\endgraf}
\def\dofloatboxdefaultbuilder % done
- {\float_align_content{\box\float_content_box}}
+ {\strc_floats_align_content{\box\b_strc_floats_content}}
\def\dofloatboxnextrightbuilder#1%
- {\ifparfloat \hbox \else \expandafter \float_align_content \fi
- {\tempfloatheight\ht\float_content_box
- \box\float_content_box
+ {\ifparfloat \hbox \else \expandafter \strc_floats_align_content \fi
+ {\tempfloatheight\ht\b_strc_floats_content
+ \box\b_strc_floats_content
\normalexpanded{\noexpand\doifnotinset{\v!hang}{\floatcaptionparameter\c!location}}{\dotfskip{\floatcaptionparameter\c!distance}}%
\vbox to\tempfloatheight{#1}}}
\def\dofloatboxnextleftbuilder#1%
- {\ifparfloat \hbox \else \expandafter \float_align_content \fi
- {\tempfloatheight\ht\float_content_box
+ {\ifparfloat \hbox \else \expandafter \strc_floats_align_content \fi
+ {\tempfloatheight\ht\b_strc_floats_content
\vbox to\tempfloatheight{#1}%
\normalexpanded{\noexpand\doifnotinset{\v!hang}{\floatcaptionparameter\c!location}}{\dotfskip{\floatcaptionparameter\c!distance}}%
- \box\float_content_box}}
+ \box\b_strc_floats_content}}
\def\dofloatboxnextouterbuilder
{\doifrightpagefloatelse\dofloatboxnextrightbuilder\dofloatboxnextleftbuilder}
@@ -1383,44 +1382,44 @@
{\doifrightpagefloatelse\dofloatboxnextleftbuilder\dofloatboxnextrightbuilder}
\def\dofloatboxnextrighthangbuilder#1%
- {\ifparfloat \hbox \else \expandafter \float_align_content \fi
- {\tempfloatheight\ht\float_content_box
- \box\float_content_box
+ {\ifparfloat \hbox \else \expandafter \strc_floats_align_content \fi
+ {\tempfloatheight\ht\b_strc_floats_content
+ \box\b_strc_floats_content
\vbox to\tempfloatheight{#1}}}
\def\dofloatboxnextlefthangbuilder#1%
- {\ifparfloat \hbox \else \expandafter \float_align_content \fi
- {\tempfloatheight\ht\float_content_box
+ {\ifparfloat \hbox \else \expandafter \strc_floats_align_content \fi
+ {\tempfloatheight\ht\b_strc_floats_content
\vbox to\tempfloatheight{#1}%
- \box\float_content_box}}
+ \box\b_strc_floats_content}}
\def\dodofloatboxnextrightmarginbuilder#1#2%
{\ifparfloat
\hbox\bgroup
- \tempfloatheight\ht\float_content_box
- \box\float_content_box
+ \tempfloatheight\ht\b_strc_floats_content
+ \box\b_strc_floats_content
\hsmash{\hskip#1\vbox to\tempfloatheight{#2}}%
\egroup
\else
\begingroup
- \tempfloatheight\ht\float_content_box
+ \tempfloatheight\ht\b_strc_floats_content
\everyrightofalignedline{\hsmash{\hskip#1\vbox to\tempfloatheight{#2}}}%
- \float_align_content{\box\float_content_box}%
+ \strc_floats_align_content{\box\b_strc_floats_content}%
\endgroup
\fi}
\def\dodofloatboxnextleftmarginbuilder#1#2%
{\ifparfloat
\hbox\bgroup
- \tempfloatheight\ht\float_content_box
- \hsmash{\hskip-\dimexpr#1+\wd\float_caption_box\relax\vbox to\tempfloatheight{#2}}%
- \box\float_content_box
+ \tempfloatheight\ht\b_strc_floats_content
+ \hsmash{\hskip-\dimexpr#1+\wd\b_strc_floats_caption\relax\vbox to\tempfloatheight{#2}}%
+ \box\b_strc_floats_content
\egroup
\else
\begingroup
- \tempfloatheight\ht\float_content_box
- \everyleftofalignedline{\hsmash{\hskip-\dimexpr#1+\wd\float_caption_box\relax\vbox to\tempfloatheight{#2}}}%
- \float_align_content{\box\float_content_box}%
+ \tempfloatheight\ht\b_strc_floats_content
+ \everyleftofalignedline{\hsmash{\hskip-\dimexpr#1+\wd\b_strc_floats_caption\relax\vbox to\tempfloatheight{#2}}}%
+ \strc_floats_align_content{\box\b_strc_floats_content}%
\endgroup
\fi}
@@ -1465,10 +1464,10 @@
\next}
\def\doflushfloatleftcaptionhang
- {\hsmash{\llap{\box\float_caption_box\dotfskip{\floatcaptionparameter\c!distance}}}}
+ {\hsmash{\llap{\box\b_strc_floats_caption\dotfskip{\floatcaptionparameter\c!distance}}}}
\def\doflushfloatrightcaptionhang
- {\hsmash{\rlap{\dotfskip{\floatcaptionparameter\c!distance}\box\float_caption_box}}}
+ {\hsmash{\rlap{\dotfskip{\floatcaptionparameter\c!distance}\box\b_strc_floats_caption}}}
\def\doflushfloatcaptionhang % expanded can go
{\expanded{\doifinsetelse{\v!righthanging}{\floatcaptionparameter\c!location}}
@@ -1481,7 +1480,7 @@
{\expanded{\doifinsetelse{\v!right}{\floatcaptiondirectives}}
{\doflushfloatrightcaptionhang}
{\doflushfloatleftcaptionhang}}}
- {\box\float_caption_box}}}}
+ {\box\b_strc_floats_caption}}}}
\def\dofloatboxhighbuilder
{\dofloatboxnextbuilder{\dofloatboxbetweenstack\doflushfloatcaptionhang\vfill}}
@@ -1490,7 +1489,7 @@
{\dofloatboxnextbuilder{\vfill\doflushfloatcaptionhang\dofloatboxbetweenstack}}
\def\dofloatboxmiddlebuilder
- {\dofloatboxnextbuilder{\vfill\box\float_caption_box\vfill}}
+ {\dofloatboxnextbuilder{\vfill\box\b_strc_floats_caption\vfill}}
% \definefloat
% [lefty][lefties][figure]
@@ -1508,107 +1507,107 @@
% \placelefty{}{} \input tufte \input tufte
% \stoptext
-\def\bothangfloat#1{\ruledvbox to \ht\float_content_box{#1\vss}}
-\def\tophangfloat#1{\ruledvbox to \ht\float_content_box{\vss#1}}
+\def\bothangfloat#1{\ruledvbox to \ht\b_strc_floats_content{#1\vss}}
+\def\tophangfloat#1{\ruledvbox to \ht\b_strc_floats_content{\vss#1}}
\def\dofloatboxnormaltopstackbuilder
{\expanded{\doifinset{\v!overlay}{\floatcaptionparameter\c!location}}\tophangfloat
- {\tempfloatwidth\wd\float_content_box
+ {\tempfloatwidth\wd\b_strc_floats_content
\ifparfloat
- \hbox{\locate_side_float {\box\float_caption_box}}%
+ \hbox{\strc_floats_locate_side_float{\box\b_strc_floats_caption}}%
\dofloatboxbetweenstack
- \hbox{\hbox {\box\float_content_box}}%
+ \hbox{\hbox{\box\b_strc_floats_content}}%
\else
\setfloathsize
- \hbox{\locate_text_float {\box\float_caption_box}}
+ \hbox{\strc_floats_locate_text_float{\box\b_strc_floats_caption}}
\dofloatboxbetweenstack
- \hbox{\float_align_content{\box\float_content_box}}%
+ \hbox{\strc_floats_align_content{\box\b_strc_floats_content}}%
\fi}}
\def\dofloatboxnormalbotstackbuilder
{\expanded{\doifinset{\v!overlay}{\floatcaptionparameter\c!location}}\bothangfloat
- {\tempfloatwidth\wd\float_content_box
+ {\tempfloatwidth\wd\b_strc_floats_content
\ifparfloat
- \hbox{\hbox {\box\float_content_box}}%
+ \hbox{\hbox{\box\b_strc_floats_content}}%
\dofloatboxbetweenstack
- \hbox{\locate_side_float {\box\float_caption_box}}%
+ \hbox{\strc_floats_locate_side_float{\box\b_strc_floats_caption}}%
\else
\setfloathsize
- \hbox{\float_align_content{\box\float_content_box}}%
+ \hbox{\strc_floats_align_content{\box\b_strc_floats_content}}%
\dofloatboxbetweenstack
- \hbox{\locate_text_float {\box\float_caption_box}}%
+ \hbox{\strc_floats_locate_text_float{\box\b_strc_floats_caption}}%
\fi}}
\def\dofloatboxgridtopstackbuilder
- {\dp\float_caption_box\strutdepth
+ {\dp\b_strc_floats_caption\strutdepth
\setbox\scratchbox\vbox
- {\tempfloatwidth\wd\float_content_box
+ {\tempfloatwidth\wd\b_strc_floats_content
\ifparfloat
- \locate_side_float {\box\float_caption_box}%
+ \strc_floats_locate_side_float{\box\b_strc_floats_caption}%
\vss\dofloatboxbetweenstack
- \hbox {\box\float_content_box}%
+ \hbox{\box\b_strc_floats_content}%
\else
\setfloathsize
- \locate_text_float {\box\float_caption_box}%
+ \strc_floats_locate_text_float{\box\b_strc_floats_caption}%
\vss\dofloatboxbetweenstack
- \float_align_content{\box\float_content_box}%
+ \strc_floats_align_content{\box\b_strc_floats_content}%
\fi}%
\getnoflines{\dimexpr\htdp\scratchbox-10\scaledpoint\relax}% get rid of inaccuracy
\vbox to \noflines\lineheight{\unvbox\scratchbox}}
\def\dofloatboxgridbotstackbuilder
- {\dp\float_caption_box\strutdepth
+ {\dp\b_strc_floats_caption\strutdepth
\setbox\scratchbox\vbox
- {\tempfloatwidth\wd\float_content_box
+ {\tempfloatwidth\wd\b_strc_floats_content
\ifparfloat
- \hbox {\box\float_content_box}%
+ \hbox{\box\b_strc_floats_content}%
\vss\dofloatboxbetweenstack
- \locate_side_float {\box\float_caption_box}%
+ \strc_floats_locate_side_float{\box\b_strc_floats_caption}%
\else
\setfloathsize
- \float_align_content{\box\float_content_box}%
+ \strc_floats_align_content{\box\b_strc_floats_content}%
\vss\dofloatboxbetweenstack
- \locate_text_float {\box\float_caption_box}%
+ \strc_floats_locate_text_float{\box\b_strc_floats_caption}%
\fi}%
\getnoflines{\dimexpr\htdp\scratchbox-10\scaledpoint\relax}% get rid of inaccuracy
\vbox to \noflines\lineheight{\unvbox\scratchbox}}
\def\dofloatboxstretchtopstackbuilder
- {\dp\float_caption_box\strutdepth
+ {\dp\b_strc_floats_caption\strutdepth
\setbox\scratchbox\vbox
- {\float_align_caption{\copy\float_caption_box}%
- \float_align_content {\copy\float_content_box }}%
+ {\strc_floats_align_caption{\copy\b_strc_floats_caption}%
+ \strc_floats_align_content {\copy\b_strc_floats_content }}%
\getnoflines{\dimexpr\htdp\scratchbox-10\scaledpoint\relax}% get rid of inaccuracy
\vbox to \noflines\lineheight
- {\tempfloatwidth\wd\float_content_box
+ {\tempfloatwidth\wd\b_strc_floats_content
\ifparfloat
- \locate_side_float {\box\float_caption_box}%
+ \strc_floats_locate_side_float{\box\b_strc_floats_caption}%
\vss\dofloatboxbetweenstack\vss
- \hbox {\box\float_content_box}%
+ \hbox{\box\b_strc_floats_content}%
\else
\setfloathsize
- \locate_text_float {\box\float_caption_box}%
+ \strc_floats_locate_text_float{\box\b_strc_floats_caption}%
\vss\dofloatboxbetweenstack\vss
- \float_align_content{\box\float_content_box}%
+ \strc_floats_align_content{\box\b_strc_floats_content}%
\fi}}
\def\dofloatboxstretchbotstackbuilder
- {\dp\float_caption_box\strutdepth
+ {\dp\b_strc_floats_caption\strutdepth
\setbox\scratchbox\vbox
- {\float_align_content {\copy\float_content_box }%
- \float_align_caption{\copy\float_caption_box}}%
+ {\strc_floats_align_content{\copy\b_strc_floats_content }%
+ \strc_floats_align_caption{\copy\b_strc_floats_caption}}%
\getnoflines{\dimexpr\htdp\scratchbox-10\scaledpoint\relax}% get rid of inaccuracy
\vbox to \noflines\lineheight
- {\tempfloatwidth\wd\float_content_box
+ {\tempfloatwidth\wd\b_strc_floats_content
\ifparfloat
- \hbox {\box\float_content_box}%
+ \hbox{\box\b_strc_floats_content}%
\vss\dofloatboxbetweenstack\vss
- \locate_side_float {\box\float_caption_box}
+ \strc_floats_locate_side_float{\box\b_strc_floats_caption}
\else
\setfloathsize
- \float_align_content{\box\float_content_box}%
+ \strc_floats_align_content{\box\b_strc_floats_content}%
\vss\dofloatboxbetweenstack\vss
- \locate_text_float {\box\float_caption_box}%
+ \strc_floats_locate_text_float{\box\b_strc_floats_caption}%
\fi}}
\def\dofloatboxtopbuilder
@@ -1625,14 +1624,14 @@
\v!stretch=>\let\next\dofloatboxstretchstackbuilder]%
\next}
-\def\relocatecaptionright#1{\float_align_caption{\hbox to \tempfloatwidth{\hss#1}}}
-\def\relocatecaptionleft #1{\float_align_caption{\hbox to \tempfloatwidth{#1\hss}}}
+\def\relocatecaptionright#1{\strc_floats_align_caption{\hbox to \tempfloatwidth{\hss#1}}}
+\def\relocatecaptionleft #1{\strc_floats_align_caption{\hbox to \tempfloatwidth{#1\hss}}}
\long\def\installfloatboxbuilder#1#2{\setvalue{\??floatbuilder#1}{#2}}
-\def\build_float_box
+\def\strc_floats_build_box
{\global\setbox\floatbox\vbox
- {\float_set_local_hsize
+ {\strc_floats_set_local_hsize
\forgetall
\let\floatcaptionarrangement\s!default
\def\docommand##1%
@@ -1640,8 +1639,8 @@
\processcommacommand[\floatcaptionparameter\c!location]\docommand
\executeifdefined{\??floatbuilder\floatcaptionarrangement}{\getvalue{\??floatbuilder\s!default}}}}
-\def\locate_text_float
- {\let\next\float_align_caption
+\def\strc_floats_locate_text_float
+ {\let\next\strc_floats_align_caption
\expanded{\processallactionsinset[\floatcaptionparameter\c!location]}
[ \v!left=>\let\next\relocatecaptionleft,
\v!right=>\let\next\relocatecaptionright,
@@ -1702,73 +1701,73 @@
\box\floatbox
\ifdone\hskip\effectiverightskip\fi\hss}}
-\def\float_set_paragraph_variant
+\def\strc_floats_set_paragraph_variant
{\bgroup
\forgetall
\postponenotes
\dontcomplain
%\showcomposition
- \setbox\float_content_box\vbox{\borderedfloatbox}%
- \page_backgrounds_add_local_to_box\float_content_box
+ \setbox\b_strc_floats_content\vbox{\borderedfloatbox}%
+ \page_backgrounds_add_local_to_box\b_strc_floats_content
\ifnofloatcaption
- \global\setbox\floatbox\vbox{\box\float_content_box}%
+ \global\setbox\floatbox\vbox{\box\b_strc_floats_content}%
\else
- \check_float_caption_content
- \prepare_side_float_caption
- \setbox\float_caption_box\hbox{\floatcaptionparameter\c!command{\box\float_caption_box}}%
- \moveboxontogrid\float_caption_box{\floatcaptionparameter\c!grid}\float_caption_height
- \page_backgrounds_add_local_to_box\float_caption_box
- \build_side_float_box
+ \strc_floats_check_caption_content
+ \strc_floats_prepare_side_caption
+ \setbox\b_strc_floats_caption\hbox{\floatcaptionparameter\c!command{\box\b_strc_floats_caption}}%
+ \moveboxontogrid\b_strc_floats_caption{\floatcaptionparameter\c!grid}\d_strc_floats_caption_height
+ \page_backgrounds_add_local_to_box\b_strc_floats_caption
+ \strc_floats_build_side_box
\fi
\egroup}
-\def\prepare_side_float_caption
+\def\strc_floats_prepare_side_caption
{\dostarttagged\t!floatcaption\empty
\doifelse{\floatcaptionparameter\c!width}\v!max
- {\setbox\float_caption_box\vbox
- {\float_caption_set_align
- \hsize\wd\float_content_box
- \float_make_complete_caption}}%
+ {\setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \hsize\wd\b_strc_floats_content
+ \strc_floats_make_complete_caption}}%
{\doifelse{\floatcaptionparameter\c!width}\v!fit
- {\ifdim\wd\float_caption_box>\wd\float_content_box\relax
- \setbox\float_caption_box\vbox
+ {\ifdim\wd\b_strc_floats_caption>\wd\b_strc_floats_content\relax
+ \setbox\b_strc_floats_caption\vbox
{\forgetall % needed?
- \hsize\wd\float_content_box
- \float_make_complete_caption}%
+ \hsize\wd\b_strc_floats_content
+ \strc_floats_make_complete_caption}%
\else
- \setbox\float_caption_box\hbox to \wd\float_content_box
- {\hss\hbox{\float_make_complete_caption}\hss}%
+ \setbox\b_strc_floats_caption\hbox to \wd\b_strc_floats_content
+ {\hss\hbox{\strc_floats_make_complete_caption}\hss}%
\fi}
- {\setbox\float_caption_box\vbox
- {\float_caption_set_align
- \hsize\floatcaptionparameter\c!width % \wd\float_content_box
- \float_make_complete_caption}}}%
+ {\setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \hsize\floatcaptionparameter\c!width % \wd\b_strc_floats_content
+ \strc_floats_make_complete_caption}}}%
\dostoptagged}
-\def\locate_side_float#1%
+\def\strc_floats_locate_side_float#1%
{\begingroup
\alignstrutmode\zerocount
\hsize\tempfloatwidth \forgetall
\alignedline{\floatparameter\c!location}\v!middle{#1}%
\endgroup}
-\def\build_side_float_box
- {\let\float_align_content\relax
- \let\float_align_caption\relax
- \build_float_box}
+\def\strc_floats_build_side_box
+ {\let\strc_floats_align_content\relax
+ \let\strc_floats_align_caption\relax
+ \strc_floats_build_box}
\newif\ifparfloat
-\def\float_set_box % todo : \global\setbox, currently messy
+\def\strc_floats_set_box % todo : \global\setbox, currently messy
{\ifvisible
\par
\edef\floatcaptiondirectives{\floatparameter\c!location,\floatcaptionparameter\c!location}%
\ifparfloat
- \float_set_paragraph_variant
+ \strc_floats_set_paragraph_variant
\else
- \float_set_page_variant
+ \strc_floats_set_page_variant
\fi
- \float_set_local_dimensions
+ \strc_floats_set_local_dimensions
\global\advance\totalnoffloats\plusone
\setbox\floatbox\hbox{\dosavefloatdata\box\floatbox}% still needed? we will do renumbering differently
\global\floatheight\htdp\floatbox
@@ -1821,7 +1820,7 @@
\def\setfloatmethodvariables#1% \floatmethod \floatlabel \floatrow \floatcolumn
{\ctxcommand{analysefloatmethod("#1")}}
-\def\float_get_box
+\def\strc_floats_get_box
{\ifvisible
\let\floatlabel \empty
\let\floatcolumn\empty
diff --git a/tex/context/base/strc-itm.mkvi b/tex/context/base/strc-itm.mkvi
index f4fb779fd..2ef345e4b 100644
--- a/tex/context/base/strc-itm.mkvi
+++ b/tex/context/base/strc-itm.mkvi
@@ -159,88 +159,88 @@
\unprotect
-\newconditional\c_itemgroups_sub
-\newconditional\c_itemgroups_head
-\newconditional\c_itemgroups_intro
-\newconditional\c_itemgroups_randomize
-\newconditional\c_itemgroups_auto_intro
-\newconditional\c_itemgroups_pack
-\newconditional\c_itemgroups_paragraph
-\newconditional\c_itemgroups_text
-\newconditional\c_itemgroups_text_saved
-\newconditional\c_itemgroups_first
-\newconditional\c_itemgroups_before
-\newconditional\c_itemgroups_after
-\newconditional\c_itemgroups_nowhite
-\newconditional\c_itemgroups_joined
-\newconditional\c_itemgroups_reverse
-\newconditional\c_itemgroups_continue
-\newconditional\c_itemgroups_fitting
-\newconditional\c_itemgroups_indented_first
-\newconditional\c_itemgroups_inline
-\newconditional\c_itemgroups_columns
-\newconditional\c_itemgroups_concat
-\newconditional\c_itemgroups_txt
-\newconditional\c_itemgroups_repeat
+\newconditional\c_strc_itemgroups_sub
+\newconditional\c_strc_itemgroups_head
+\newconditional\c_strc_itemgroups_intro
+\newconditional\c_strc_itemgroups_randomize
+\newconditional\c_strc_itemgroups_auto_intro
+\newconditional\c_strc_itemgroups_pack
+\newconditional\c_strc_itemgroups_paragraph
+\newconditional\c_strc_itemgroups_text
+\newconditional\c_strc_itemgroups_text_saved
+\newconditional\c_strc_itemgroups_first
+\newconditional\c_strc_itemgroups_before
+\newconditional\c_strc_itemgroups_after
+\newconditional\c_strc_itemgroups_nowhite
+\newconditional\c_strc_itemgroups_joined
+\newconditional\c_strc_itemgroups_reverse
+\newconditional\c_strc_itemgroups_continue
+\newconditional\c_strc_itemgroups_fitting
+\newconditional\c_strc_itemgroups_indented_first
+\newconditional\c_strc_itemgroups_inline
+\newconditional\c_strc_itemgroups_columns
+\newconditional\c_strc_itemgroups_concat
+\newconditional\c_strc_itemgroups_txt
+\newconditional\c_strc_itemgroups_repeat
% 0 = before/after
% 1 = between unless before
% 2 = between
-\newconstant \c_itemgroups_spacing_mode \c_itemgroups_spacing_mode\plustwo
-\newconditional\c_itemgroups_optimize \settrue\c_itemgroups_optimize
-\newconditional\c_itemgroups_auto_concat \settrue\c_itemgroups_auto_concat
+\newconstant \c_strc_itemgroups_spacing_mode \c_strc_itemgroups_spacing_mode\plustwo
+\newconditional\c_strc_itemgroups_optimize \settrue\c_strc_itemgroups_optimize
+\newconditional\c_strc_itemgroups_auto_concat \settrue\c_strc_itemgroups_auto_concat
-\newsignal \d_itemgroups_signal
+\newsignal \d_strc_itemgroups_signal
\newbox \b_itemgroups
-\newdimen \d_itemgroups_list_width
-\newdimen \d_itemgroups_asked_width
+\newdimen \d_strc_itemgroups_list_width
+\newdimen \d_strc_itemgroups_asked_width
-\newdimen \d_itemgroups_max_width % multipass
-\newcount \c_itemgroups_max_items % multipass
+\newdimen \d_strc_itemgroups_max_width % multipass
+\newcount \c_strc_itemgroups_max_items % multipass
-\newcount \c_itemgroups_n_of_lists
-\newcount \c_itemgroups_n_of_items
-\newcount \c_itemgroups_nesting
-\newcount \c_itemgroups_column_depth
+\newcount \c_strc_itemgroups_n_of_lists
+\newcount \c_strc_itemgroups_n_of_items
+\newcount \c_strc_itemgroups_nesting
+\newcount \c_strc_itemgroups_column_depth
-\def \v_itemgroups_counter {itemgroup:\currentparentitemgroup}
+\def \v_strc_itemgroups_counter {itemgroup:\currentparentitemgroup}
-\let \m_itemgroups_repeat_start \empty
-\def \v_itemgroups_unknown_symbol {?}
+\let \m_strc_itemgroups_repeat_start \empty
+\def \v_strc_itemgroups_unknown_symbol {?}
-\let \m_itemgroups_indenting \empty
-\let \m_itemgroups_destination \empty
+\let \m_strc_itemgroups_indenting \empty
+\let \m_strc_itemgroups_destination \empty
\let \currentitemlevel \!!zerocount % public
-\def \currentnofitems {\the\c_itemgroups_max_items}
-\def \currentitemnumber {\dorawsubstructurecounter[\v_itemgroups_counter][\currentitemlevel]} % public
+\def \currentnofitems {\the\c_strc_itemgroups_max_items}
+\def \currentitemnumber {\dorawsubstructurecounter[\v_strc_itemgroups_counter][\currentitemlevel]} % public
\newtoks \itemgroupcommands % maybe public
\def \currentitemgroupsymbol {n} % here we cannot use a _ in the name
\let \currentitemgroupconversionset \empty % here we cannot use a _ in the name
-\def\itemgroups_register_status
+\def\strc_itemgroups_register_status
{\iftrialtypesetting \else
- \ctxcommand{registeritemgroup("\currentitemgroup",\number\c_itemgroups_n_of_items,"\itemgroupparameter\c!maxwidth")}%
+ \ctxcommand{registeritemgroup("\currentitemgroup",\number\c_strc_itemgroups_n_of_items,"\itemgroupparameter\c!maxwidth")}%
\fi}
-\def\itemgroups_check_n_of_items % we could do this at the lua end and save a call (i.e. will be dimen and counter)
- {\c_itemgroups_max_items\ctxcommand{nofitems("\currentitemgroup",\number\c_itemgroups_n_of_lists)}\relax
- \d_itemgroups_max_width\ctxcommand{maxitemwidth("\currentitemgroup",\number\c_itemgroups_n_of_lists)}\scaledpoint
- \edef\currentnofitems{\the\c_itemgroups_max_items}}
+\def\strc_itemgroups_check_n_of_items % we could do this at the lua end and save a call (i.e. will be dimen and counter)
+ {\c_strc_itemgroups_max_items\ctxcommand{nofitems("\currentitemgroup",\number\c_strc_itemgroups_n_of_lists)}\relax
+ \d_strc_itemgroups_max_width\ctxcommand{maxitemwidth("\currentitemgroup",\number\c_strc_itemgroups_n_of_lists)}\scaledpoint
+ \edef\currentnofitems{\the\c_strc_itemgroups_max_items}}
% todo: \dodosetreference -> \dostructurecountercomponent (to be checked)
-\def\itemgroups_insert_reference % we will make a decent number helper
+\def\strc_itemgroups_insert_reference % we will make a decent number helper
{\iftrialtypesetting \else \ifx\currentitemreference \empty \else
- \itemgroups_insert_reference_indeed
+ \strc_itemgroups_insert_reference_indeed
\fi \fi}
-\def\itemgroups_insert_reference_indeed
+\def\strc_itemgroups_insert_reference_indeed
{\setnextinternalreference
\ctxlua {structures.references.setandgetattribute("\s!full", "\referenceprefix","\currentitemreference",
{
@@ -254,23 +254,23 @@
section = structures.sections.currentid(),
},
prefixdata = structures.helpers.simplify {
- prefix = "\structurecounterparameter\v_itemgroups_counter\c!prefix",
- separatorset = "\structurecounterparameter\v_itemgroups_counter\c!prefixseparatorset",
- conversion = \!!bs\structurecounterparameter\v_itemgroups_counter\c!prefixconversion\!!es,
- conversionset = "\structurecounterparameter\v_itemgroups_counter\c!prefixconversionset",
- set = "\structurecounterparameter\v_itemgroups_counter\c!prefixset",
- segments = "\structurecounterparameter\v_itemgroups_counter\c!prefixsegments",
+ prefix = "\structurecounterparameter\v_strc_itemgroups_counter\c!prefix",
+ separatorset = "\structurecounterparameter\v_strc_itemgroups_counter\c!prefixseparatorset",
+ conversion = \!!bs\structurecounterparameter\v_strc_itemgroups_counter\c!prefixconversion\!!es,
+ conversionset = "\structurecounterparameter\v_strc_itemgroups_counter\c!prefixconversionset",
+ set = "\structurecounterparameter\v_strc_itemgroups_counter\c!prefixset",
+ segments = "\structurecounterparameter\v_strc_itemgroups_counter\c!prefixsegments",
% segments = "\askedprefixsegments",
- connector = \!!bs\structurecounterparameter\v_itemgroups_counter\c!prefixconnector\!!es,
+ connector = \!!bs\structurecounterparameter\v_strc_itemgroups_counter\c!prefixconnector\!!es,
},
numberdata = structures.helpers.simplify {
- numbers = structures.counters.compact("\v_itemgroups_counter",nil,true),
- separatorset = "\structurecounterparameter\v_itemgroups_counter\c!numberseparatorset",
- conversion = "\structurecounterparameter\v_itemgroups_counter\c!numberconversion",
- conversionset = "\structurecounterparameter\v_itemgroups_counter\c!numberconversionset",
+ numbers = structures.counters.compact("\v_strc_itemgroups_counter",nil,true),
+ separatorset = "\structurecounterparameter\v_strc_itemgroups_counter\c!numberseparatorset",
+ conversion = "\structurecounterparameter\v_strc_itemgroups_counter\c!numberconversion",
+ conversionset = "\structurecounterparameter\v_strc_itemgroups_counter\c!numberconversionset",
% for the moment no stopper, we need to make references configurable first
- % stopper = \!!bs\structurecounterparameter\v_itemgroups_counter\c!numberstopper\!!es,
- segments = "\structurecounterparameter\v_itemgroups_counter\c!numbersegments",
+ % stopper = \!!bs\structurecounterparameter\v_strc_itemgroups_counter\c!numberstopper\!!es,
+ segments = "\structurecounterparameter\v_strc_itemgroups_counter\c!numbersegments",
},
})
}%
@@ -303,22 +303,22 @@
\setuevalue{\e!stop \currentitemgroup}{\stopitemgroup}%
\setuevalue{\e!setup\currentitemgroup\e!endsetup}{\setupitemgroup[\currentitemgroup]}% obsolete
\let\currentparentitemgroup\currentitemgroup
- \definestructurecounter[\v_itemgroups_counter]%
+ \definestructurecounter[\v_strc_itemgroups_counter]%
% beware ... we cannot use _ as the conversion set is not expanded
- \definestructureconversionset[\v_itemgroups_counter][\currentitemgroupconversionset][\currentitemgroupsymbol]%
+ \definestructureconversionset[\v_strc_itemgroups_counter][\currentitemgroupconversionset][\currentitemgroupsymbol]%
\to \everydefineitemgroup
%D Global states
-\def\itemgroups_store_continue_state#options#settings%
- {\setxvalue{\??itemgroupoption \currentitemgroup}{\itemgroups_process_options{#options}}%
+\def\strc_itemgroups_store_continue_state#options#settings%
+ {\setxvalue{\??itemgroupoption \currentitemgroup}{\strc_itemgroups_process_options{#options}}%
\setgvalue{\??itemgroupsetting\currentitemgroup}{\setupcurrentitemgroup [#settings]}}
-\def\itemgroups_fetch_continue_state
+\def\strc_itemgroups_fetch_continue_state
{\getvalue{\??itemgroupoption \currentitemgroup}%
\getvalue{\??itemgroupsetting\currentitemgroup}}
-\def\itemgroups_reset_continue_state
+\def\strc_itemgroups_reset_continue_state
{\letgvalue{\??itemgroupoption \currentitemgroup}\relax
\letgvalue{\??itemgroupsetting\currentitemgroup}\relax}
@@ -328,33 +328,33 @@
\definevspacing[\v!item @5] [penalty:5]
\definevspacing[\v!item @500] [penalty:500]
-\def\itemgroups_insert_break_when_needed#break%
- {\ifconditional\c_itemgroups_optimize
- \ifconditional\c_itemgroups_text \else
+\def\strc_itemgroups_insert_break_when_needed#break%
+ {\ifconditional\c_strc_itemgroups_optimize
+ \ifconditional\c_strc_itemgroups_text \else
#break\relax
\fi
\fi}
-\def\itemgroups_insert_breakallow {\itemgroups_insert_break_when_needed\itemgroups_insert_breakallow_indeed}
-\def\itemgroups_insert_breakno {\itemgroups_insert_break_when_needed\itemgroups_insert_breakno_indeed }
-\def\itemgroups_insert_break {\itemgroups_insert_break_when_needed\itemgroups_insert_break_indeed }
-\def\itemgroups_insert_nobreak {\itemgroups_insert_break_when_needed\itemgroups_insert_nobreak_indeed }
+\def\strc_itemgroups_insert_breakallow {\strc_itemgroups_insert_break_when_needed\strc_itemgroups_insert_breakallow_indeed}
+\def\strc_itemgroups_insert_breakno {\strc_itemgroups_insert_break_when_needed\strc_itemgroups_insert_breakno_indeed }
+\def\strc_itemgroups_insert_break {\strc_itemgroups_insert_break_when_needed\strc_itemgroups_insert_break_indeed }
+\def\strc_itemgroups_insert_nobreak {\strc_itemgroups_insert_break_when_needed\strc_itemgroups_insert_nobreak_indeed }
-\def\itemgroups_insert_breakallow_indeed{\vspacing[\v!item @0]}
-\def\itemgroups_insert_breakno_indeed {\vspacing[\v!item @10000]}
-\def\itemgroups_insert_break_indeed {\flushnotes
+\def\strc_itemgroups_insert_breakallow_indeed{\vspacing[\v!item @0]}
+\def\strc_itemgroups_insert_breakno_indeed {\vspacing[\v!item @10000]}
+\def\strc_itemgroups_insert_break_indeed {\flushnotes
\vspacing[\v!item @-5]}
-\def\itemgroups_insert_nobreak_indeed {\flushnotes
+\def\strc_itemgroups_insert_nobreak_indeed {\flushnotes
\ifinsidecolumns
\vspacing[\v!item @5]%
\else
\vspacing[\v!item @500]%
\fi}
-\unexpanded\def\itemgroups_process_options#options%
- {\processcommacommand[#options]\itemgroups_process_option} % expansion of options is handy for xml
+\unexpanded\def\strc_itemgroups_process_options#options%
+ {\processcommacommand[#options]\strc_itemgroups_process_option} % expansion of options is handy for xml
-\def\itemgroups_process_option#option%
+\def\strc_itemgroups_process_option#option%
{\edef\itemgroupconstantvalue{#option}%
\ifx\itemgroupconstantvalue\empty\else
\splitstring\itemgroupconstantvalue\at*\to\itemgroupfirst\and\itemgroupsecond
@@ -365,51 +365,51 @@
\ifcsname\??itemgroupkeyword\itemgroupsecond\endcsname
\csname\??itemgroupkeyword\itemgroupsecond\endcsname
\else
- \itemgroups_set_symbol\itemgroupconstantvalue
+ \strc_itemgroups_set_symbol\itemgroupconstantvalue
\fi
\fi}
-\def\itemgroups_process_set_option_pack
- {\ifcase\c_itemgroups_nesting \else
- \settrue\c_itemgroups_pack
+\def\strc_itemgroups_process_set_option_pack
+ {\ifcase\c_strc_itemgroups_nesting \else
+ \settrue\c_strc_itemgroups_pack
\fi}
\setvalue{\??itemgroupkeyword\!!zerocount}{} % ignore 0
-\setvalue{\??itemgroupkeyword\v!packed }{\itemgroups_process_set_option_pack}
-\setvalue{\??itemgroupkeyword\v!intro }{\settrue\c_itemgroups_intro} % here? not set to false
-\setvalue{\??itemgroupkeyword\v!autointro}{\settrue\c_itemgroups_auto_intro}
+\setvalue{\??itemgroupkeyword\v!packed }{\strc_itemgroups_process_set_option_pack}
+\setvalue{\??itemgroupkeyword\v!intro }{\settrue\c_strc_itemgroups_intro} % here? not set to false
+\setvalue{\??itemgroupkeyword\v!autointro}{\settrue\c_strc_itemgroups_auto_intro}
\setvalue{\??itemgroupkeyword\v!broad }{\ifx\itemgroupfirst\empty
\let\itemgroupfirst\!!plusone
\fi
\letitemgroupparameter\c!factor\itemgroupfirst}
-\setvalue{\??itemgroupkeyword\v!text }{\settrue\c_itemgroups_text
- \settrue\c_itemgroups_inline
- \settrue\c_itemgroups_joined
- \itemgroups_process_set_option_pack}
-\setvalue{\??itemgroupkeyword\v!columns }{\itemgroups_process_set_option_pack}
-\setvalue{\??itemgroupkeyword\v!before }{\settrue\c_itemgroups_before}
-\setvalue{\??itemgroupkeyword\v!after }{\settrue\c_itemgroups_after}
-\setvalue{\??itemgroupkeyword\v!nowhite }{\settrue\c_itemgroups_nowhite}
+\setvalue{\??itemgroupkeyword\v!text }{\settrue\c_strc_itemgroups_text
+ \settrue\c_strc_itemgroups_inline
+ \settrue\c_strc_itemgroups_joined
+ \strc_itemgroups_process_set_option_pack}
+\setvalue{\??itemgroupkeyword\v!columns }{\strc_itemgroups_process_set_option_pack}
+\setvalue{\??itemgroupkeyword\v!before }{\settrue\c_strc_itemgroups_before}
+\setvalue{\??itemgroupkeyword\v!after }{\settrue\c_strc_itemgroups_after}
+\setvalue{\??itemgroupkeyword\v!nowhite }{\settrue\c_strc_itemgroups_nowhite}
\setvalue{\??itemgroupkeyword\v!margin }{\setitemgroupparameter\c!width{-2em}} % signal
\setvalue{\??itemgroupkeyword\v!inmargin }{\setitemgroupparameter\c!width{-2em}} % signal
-\setvalue{\??itemgroupkeyword\v!atmargin }{\ifnum\c_itemgroups_nesting>\plusone
+\setvalue{\??itemgroupkeyword\v!atmargin }{\ifnum\c_strc_itemgroups_nesting>\plusone
\setitemgroupparameter\c!width{0em}%
\fi} % signal
-\setvalue{\??itemgroupkeyword\v!intext }{\settrue\c_itemgroups_inline}
-\setvalue{\??itemgroupkeyword\v!loose }{\setfalse\c_itemgroups_optimize}
-\setvalue{\??itemgroupkeyword\v!fit }{\settrue\c_itemgroups_fitting}
-\setvalue{\??itemgroupkeyword\v!nofit }{\setfalse\c_itemgroups_fitting}
-\setvalue{\??itemgroupkeyword\v!paragraph}{\settrue\c_itemgroups_paragraph
- \itemgroups_process_set_option_pack}
-\setvalue{\??itemgroupkeyword\v!joinedup }{\settrue\c_itemgroups_joined
- \itemgroups_process_set_option_pack}
+\setvalue{\??itemgroupkeyword\v!intext }{\settrue\c_strc_itemgroups_inline}
+\setvalue{\??itemgroupkeyword\v!loose }{\setfalse\c_strc_itemgroups_optimize}
+\setvalue{\??itemgroupkeyword\v!fit }{\settrue\c_strc_itemgroups_fitting}
+\setvalue{\??itemgroupkeyword\v!nofit }{\setfalse\c_strc_itemgroups_fitting}
+\setvalue{\??itemgroupkeyword\v!paragraph}{\settrue\c_strc_itemgroups_paragraph
+ \strc_itemgroups_process_set_option_pack}
+\setvalue{\??itemgroupkeyword\v!joinedup }{\settrue\c_strc_itemgroups_joined
+ \strc_itemgroups_process_set_option_pack}
\setvalue{\??itemgroupkeyword\v!serried }{\edef\itemgroupfirst{-\ifx\itemgroupfirst\empty1\else\itemgroupfirst\fi}%
\letitemgroupparameter\c!factor\itemgroupfirst}
\setvalue{\??itemgroupkeyword\v!stopper }{\letitemgroupparameter\c!placestopper\v!yes} % keep {}
-\setvalue{\??itemgroupkeyword\v!unpacked }{\setfalse\c_itemgroups_pack}
-\setvalue{\??itemgroupkeyword\v!repeat }{\settrue\c_itemgroups_repeat}
-\setvalue{\??itemgroupkeyword\v!reverse }{\settrue\c_itemgroups_reverse}
-\setvalue{\??itemgroupkeyword\v!columns }{\settrue\c_itemgroups_columns}
+\setvalue{\??itemgroupkeyword\v!unpacked }{\setfalse\c_strc_itemgroups_pack}
+\setvalue{\??itemgroupkeyword\v!repeat }{\settrue\c_strc_itemgroups_repeat}
+\setvalue{\??itemgroupkeyword\v!reverse }{\settrue\c_strc_itemgroups_reverse}
+\setvalue{\??itemgroupkeyword\v!columns }{\settrue\c_strc_itemgroups_columns}
\setvalue{\??itemgroupkeyword\v!one }{\letitemgroupparameter\c!n\plusone}
\setvalue{\??itemgroupkeyword\v!two }{\letitemgroupparameter\c!n\plustwo}
\setvalue{\??itemgroupkeyword\v!three }{\letitemgroupparameter\c!n\plusthree}
@@ -420,102 +420,102 @@
\c!beforehead=,\c!afterhead=\blank,%
\c!before=\blank,\c!inbetween=\blank,\c!after=\blank]}
-\def\itemgroups_initialize_local
- {\setfalse\c_itemgroups_inline
- \setfalse\c_itemgroups_concat
- \setfalse\c_itemgroups_txt
+\def\strc_itemgroups_initialize_local
+ {\setfalse\c_strc_itemgroups_inline
+ \setfalse\c_strc_itemgroups_concat
+ \setfalse\c_strc_itemgroups_txt
%
- \setfalse\c_itemgroups_reverse
- \setfalse\c_itemgroups_intro
- \setfalse\c_itemgroups_auto_intro
- \setfalse\c_itemgroups_before
- \setfalse\c_itemgroups_after
- \setfalse\c_itemgroups_nowhite
- \setfalse\c_itemgroups_randomize
- \setfalse\c_itemgroups_intro
- \setfalse\c_itemgroups_continue
+ \setfalse\c_strc_itemgroups_reverse
+ \setfalse\c_strc_itemgroups_intro
+ \setfalse\c_strc_itemgroups_auto_intro
+ \setfalse\c_strc_itemgroups_before
+ \setfalse\c_strc_itemgroups_after
+ \setfalse\c_strc_itemgroups_nowhite
+ \setfalse\c_strc_itemgroups_randomize
+ \setfalse\c_strc_itemgroups_intro
+ \setfalse\c_strc_itemgroups_continue
% this will be a constant
- \setfalse\c_itemgroups_head
- \setfalse\c_itemgroups_sub
- \setfalse\c_itemgroups_columns
+ \setfalse\c_strc_itemgroups_head
+ \setfalse\c_strc_itemgroups_sub
+ \setfalse\c_strc_itemgroups_columns
% to be checked
- \let\m_itemgroups_destination\empty
- \let\itemgroups_used_symbol\empty % ** start value
- \let\itemgroups_margin_symbol\empty
- \let\itemgroups_extra_symbol\empty
+ \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
%
\global\letitemgroupparameter\c!maxwidth\!!zerocount
}
-\setvalue{\??itemgroupfirst\v!intro }{\settrue\c_itemgroups_intro }
-\setvalue{\??itemgroupfirst\v!random }{\settrue\c_itemgroups_randomize}
-\setvalue{\??itemgroupfirst\v!continue}{\settrue\c_itemgroups_continue }
+\setvalue{\??itemgroupfirst\v!intro }{\settrue\c_strc_itemgroups_intro }
+\setvalue{\??itemgroupfirst\v!random }{\settrue\c_strc_itemgroups_randomize}
+\setvalue{\??itemgroupfirst\v!continue}{\settrue\c_strc_itemgroups_continue }
-\def\itemgroups_preset_stage_one#options%
- {\processcommacommand[#options]\itemgroups_preset_stage_one_indeed}
+\def\strc_itemgroups_preset_stage_one#options%
+ {\processcommacommand[#options]\strc_itemgroups_preset_stage_one_indeed}
-\def\itemgroups_preset_stage_one_indeed#option%
+\def\strc_itemgroups_preset_stage_one_indeed#option%
{\ifcsname\??itemgroupfirst#option\endcsname
\csname\??itemgroupfirst#option\endcsname
\fi}
\ifdefined\dotagsetitemgroup \else \let\dotagsetitemgroup\relax \fi
-\def\itemgroups_tag_start_group
+\def\strc_itemgroups_tag_start_group
{\dostarttagged\t!itemgroup\currentitemgroup
\dotagsetitemgroup}
-\def\itemgroups_tag_stop_group
+\def\strc_itemgroups_tag_stop_group
{\dostoptagged}
-\def\itemgroups_before_command
- {\ifconditional\c_itemgroups_nowhite
- \ifconditional\c_itemgroups_before
- \ifcase\c_itemgroups_nesting\or\itemgroupparameter\c!before\fi
+\def\strc_itemgroups_before_command
+ {\ifconditional\c_strc_itemgroups_nowhite
+ \ifconditional\c_strc_itemgroups_before
+ \ifcase\c_strc_itemgroups_nesting\or\itemgroupparameter\c!before\fi
\else
\nowhitespace
\fi
- \else\ifconditional\c_itemgroups_joined
+ \else\ifconditional\c_strc_itemgroups_joined
% \empty
\else
\itemgroupparameter\c!before
\fi\fi}
-\def\itemgroups_after_command
- {\ifconditional\c_itemgroups_nowhite
- \ifconditional\c_itemgroups_after
- \ifcase\c_itemgroups_nesting\or\itemgroupparameter\c!after\fi
+\def\strc_itemgroups_after_command
+ {\ifconditional\c_strc_itemgroups_nowhite
+ \ifconditional\c_strc_itemgroups_after
+ \ifcase\c_strc_itemgroups_nesting\or\itemgroupparameter\c!after\fi
\else
\nowhitespace
\fi
- \else\ifconditional\c_itemgroups_joined
+ \else\ifconditional\c_strc_itemgroups_joined
% \empty
\else
\itemgroupparameter\c!after
\fi\fi}
-\def\itemgroups_between_command
- {\ifconditional\c_itemgroups_nowhite
+\def\strc_itemgroups_between_command
+ {\ifconditional\c_strc_itemgroups_nowhite
\nowhitespace
- \else\ifconditional\c_itemgroups_joined
+ \else\ifconditional\c_strc_itemgroups_joined
% \empty
\else
\itemgroupparameter\c!inbetween
\fi\fi}
-\def\itemgroups_before_head_command
- {\ifconditional\c_itemgroups_nowhite
+\def\strc_itemgroups_before_head_command
+ {\ifconditional\c_strc_itemgroups_nowhite
\nowhitespace
- \else\ifconditional\c_itemgroups_joined
+ \else\ifconditional\c_strc_itemgroups_joined
% \empty
\else
\itemgroupparameter\c!beforehead
\fi\fi}
-\def\itemgroups_after_head_command
- {\ifconditional\c_itemgroups_nowhite
+\def\strc_itemgroups_after_head_command
+ {\ifconditional\c_strc_itemgroups_nowhite
\nowhitespace
- \else\ifconditional\c_itemgroups_joined
+ \else\ifconditional\c_strc_itemgroups_joined
% \empty
\else
\itemgroupparameter\c!afterhead
@@ -523,73 +523,73 @@
% compatible setup command:
-\let\normal_setup_itemgroup\setupitemgroup
+\let\strc_itemgroups_normal_setup\setupitemgroup
\unexpanded\def\setupitemgroup
- {\doquadrupleempty\itemgroups_setup}
+ {\doquadrupleempty\strc_itemgroups_setup}
-\def\itemgroups_setup[#category][#levels][#options][#settings]% category level|each options|settings settings|options
- {\edef\itemgroups_setup_what{#levels}%
+\def\strc_itemgroups_setup[#category][#levels][#options][#settings]% category level|each options|settings settings|options
+ {\edef\strc_itemgroups_setup_what{#levels}%
\iffourthargument
- \ifx\itemgroups_setup_what\v!each
- \itemgroups_setup_each{#category}{#options}%
- \itemgroups_setup_each{#category}{#settings}%
+ \ifx\strc_itemgroups_setup_what\v!each
+ \strc_itemgroups_setup_each{#category}{#options}%
+ \strc_itemgroups_setup_each{#category}{#settings}%
\else
- \itemgroups_setup_list{#levels}{#category}{#options}%
- \itemgroups_setup_list{#levels}{#category}{#settings}%
+ \strc_itemgroups_setup_list{#levels}{#category}{#options}%
+ \strc_itemgroups_setup_list{#levels}{#category}{#settings}%
\fi
\else\ifthirdargument
- \ifx\itemgroups_setup_what\v!each
- \itemgroups_setup_each{#category}{#options}%
+ \ifx\strc_itemgroups_setup_what\v!each
+ \strc_itemgroups_setup_each{#category}{#options}%
\else
- \itemgroups_setup_list{#levels}{#category}{#options}%
+ \strc_itemgroups_setup_list{#levels}{#category}{#options}%
\fi
\else\ifsecondargument
- \itemgroups_setup_each{#category}{#levels}%
+ \strc_itemgroups_setup_each{#category}{#levels}%
\else
- \normal_setup_itemgroup[#category]% == settings
+ \strc_itemgroups_normal_setup[#category]% == settings
\fi\fi\fi}
% can be made a bit faster
-\def\itemgroups_setup_each#category#whatever%
+\def\strc_itemgroups_setup_each#category#whatever%
{\doifassignmentelse{#whatever}
- {\normal_setup_itemgroup[#category][#whatever]}
- {\normal_setup_itemgroup[#category][\c!option={#whatever}]}}
+ {\strc_itemgroups_normal_setup[#category][#whatever]}
+ {\strc_itemgroups_normal_setup[#category][\c!option={#whatever}]}}
-\def\itemgroups_setup_list_level_a#category#whatever#level%
- {\normal_setup_itemgroup[#category:#level][#whatever]}
+\def\strc_itemgroups_setup_list_level_a#category#whatever#level%
+ {\strc_itemgroups_normal_setup[#category:#level][#whatever]}
-\def\itemgroups_setup_list_level_b#category#whatever#level%
- {\normal_setup_itemgroup[#category:#level][\c!option={#whatever}]}
+\def\strc_itemgroups_setup_list_level_b#category#whatever#level%
+ {\strc_itemgroups_normal_setup[#category:#level][\c!option={#whatever}]}
-\def\itemgroups_setup_list#subcategories#category#whatever%
+\def\strc_itemgroups_setup_list#subcategories#category#whatever%
{\doifassignmentelse{#whatever}
- {\processcommalist[#subcategories]{\itemgroups_setup_list_level_a{#category}{#whatever}}}
- {\processcommalist[#subcategories]{\itemgroups_setup_list_level_b{#category}{#whatever}}}}
+ {\processcommalist[#subcategories]{\strc_itemgroups_setup_list_level_a{#category}{#whatever}}}
+ {\processcommalist[#subcategories]{\strc_itemgroups_setup_list_level_b{#category}{#whatever}}}}
-\def\itemgroups_increment_item_counter
- {\ifconditional\c_itemgroups_sub \else \ifx\itemgroups_extra_symbol\empty
- \doincrementsubstructurecounter[\v_itemgroups_counter][\currentitemlevel]%
+\def\strc_itemgroups_increment_item_counter
+ {\ifconditional\c_strc_itemgroups_sub \else \ifx\strc_itemgroups_extra_symbol\empty
+ \doincrementsubstructurecounter[\v_strc_itemgroups_counter][\currentitemlevel]%
\fi\fi}
-\unexpanded\def\itemgroups_insert_item_counter
- {\ifconditional\c_itemgroups_repeat
- \ifcase\c_itemgroups_nesting
+\unexpanded\def\strc_itemgroups_insert_item_counter
+ {\ifconditional\c_strc_itemgroups_repeat
+ \ifcase\c_strc_itemgroups_nesting
% skip
\or
- \itemgroups_insert_item_counter_indeed % this could become an option
+ \strc_itemgroups_insert_item_counter_indeed % this could become an option
\else
- \itemgroups_insert_item_counter_indeed
+ \strc_itemgroups_insert_item_counter_indeed
\fi
\else
- \itemgroups_insert_item_counter_indeed
+ \strc_itemgroups_insert_item_counter_indeed
\fi}
-\def\itemgroups_insert_item_counter_indeed
+\def\strc_itemgroups_insert_item_counter_indeed
{\begingroup
\setupstructurecounter
- [\v_itemgroups_counter]
+ [\v_strc_itemgroups_counter]
[%\c!prefix=\v!no,
\c!prefix=\itemgroupparameter\c!prefix,
\c!prefixstopper=\itemgroupparameter\c!prefixstopper,
@@ -600,94 +600,94 @@
\c!prefixsegments=\itemgroupparameter\c!prefixsegments,
\c!prefixconnector=\itemgroupparameter\c!prefixconnector,
\c!criterium=\itemgroupparameter\c!criterium,
- \c!numberorder=\ifconditional\c_itemgroups_reverse\v!reverse\else\v!normal\fi,
+ \c!numberorder=\ifconditional\c_strc_itemgroups_reverse\v!reverse\else\v!normal\fi,
\c!numberstopper=\expdoif{\itemgroupparameter\c!placestopper}\v!yes{\itemgroupparameter\c!stopper},
%\c!numberseparatorset=,
- \c!numberconversionset=\v_itemgroups_counter, % itemgroup:\currentparentitemgroup,
+ \c!numberconversionset=\v_strc_itemgroups_counter, % itemgroup:\currentparentitemgroup,
%\c!numberconversion=\currentitemgroupsymbol,
- \c!numbersegments=\ifx\m_itemgroups_repeat_start\empty\else\m_itemgroups_repeat_start:\fi\currentitemlevel]%
- \convertedstructurecounter[\v_itemgroups_counter]% [\number\currentitemlevel]%
- \itemgroups_insert_reference
+ \c!numbersegments=\ifx\m_strc_itemgroups_repeat_start\empty\else\m_strc_itemgroups_repeat_start:\fi\currentitemlevel]%
+ \convertedstructurecounter[\v_strc_itemgroups_counter]% [\number\currentitemlevel]%
+ \strc_itemgroups_insert_reference
\endgroup}
-\def\itemgroups_set_symbol#symbol%
- {\edef\itemgroups_tmp_symbol{#symbol}%
- \ifx\itemgroups_tmp_symbol\empty \else
- \doifsymboldefinedelse\itemgroups_tmp_symbol
- \itemgroups_set_symbol_symbol
- {\doifconversiondefinedelse\itemgroups_tmp_symbol
- \itemgroups_set_symbol_conversion
+\def\strc_itemgroups_set_symbol#symbol%
+ {\edef\strc_itemgroups_tmp_symbol{#symbol}%
+ \ifx\strc_itemgroups_tmp_symbol\empty \else
+ \doifsymboldefinedelse\strc_itemgroups_tmp_symbol
+ \strc_itemgroups_set_symbol_symbol
+ {\doifconversiondefinedelse\strc_itemgroups_tmp_symbol
+ \strc_itemgroups_set_symbol_conversion
\donothing}%
\fi}
-\def\itemgroups_set_symbol_symbol
- {\let\currentitemgroupsymbol\itemgroups_tmp_symbol
- \itemgroups_store_global_symbol\currentitemgroupsymbol
- \itemgroups_store_local_symbol\v_itemgroups_unknown_symbol
- \let\itemgroups_used_symbol\itemgroups_set_symbol_symbol_item
- \let\itemgroups_asked_symbol\empty}
-
-\def\itemgroups_set_symbol_conversion
- {\let\currentitemgroupsymbol\itemgroups_tmp_symbol
- \itemgroups_store_global_symbol\currentitemgroupsymbol
- \itemgroups_store_local_symbol\itemgroups_insert_item_counter
- \let\itemgroups_used_symbol\itemgroups_set_symbol_conversion_item
- \let\itemgroups_asked_symbol\empty}
-
-\def\itemgroups_set_symbol_symbol_item
+\def\strc_itemgroups_set_symbol_symbol
+ {\let\currentitemgroupsymbol\strc_itemgroups_tmp_symbol
+ \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}
+
+\def\strc_itemgroups_set_symbol_conversion
+ {\let\currentitemgroupsymbol\strc_itemgroups_tmp_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}
+
+\def\strc_itemgroups_set_symbol_symbol_item
{\symbol[\currentitemgroupsymbol]}
-\def\itemgroups_set_symbol_conversion_item
- {\ifconditional\c_itemgroups_text
+\def\strc_itemgroups_set_symbol_conversion_item
+ {\ifconditional\c_strc_itemgroups_text
% maybe block stopper here, but one can as well clone an itemgroup then
\itemgroupparameter\c!lefttext
- \itemgroups_fetch_local_symbol
+ \strc_itemgroups_fetch_local_symbol
\itemgroupparameter\c!righttext
\else
\itemgroupparameter\c!left
- \itemgroups_fetch_local_symbol
+ \strc_itemgroups_fetch_local_symbol
\itemgroupparameter\c!right
\fi}
-\def\itemgroups_calculate_list_width#level%
+\def\strc_itemgroups_calculate_list_width#level%
{\let\savedcurrentitemgroup\currentitemgroup
\edef\currentitemgroup{\currentparentitemgroup:\number#level}%
- \ifdim\d_itemgroups_max_width>\zeropoint
- \d_itemgroups_list_width\d_itemgroups_max_width
+ \ifdim\d_strc_itemgroups_max_width>\zeropoint
+ \d_strc_itemgroups_list_width\d_strc_itemgroups_max_width
\else\ifnum\itemgroupparameter\c!factor>\zerocount
- \d_itemgroups_list_width\itemgroupparameter\c!step\relax
- \ifdim\d_itemgroups_list_width=\zeropoint \d_itemgroups_list_width=.5em\fi
- \multiply\d_itemgroups_list_width \itemgroupparameter\c!factor
- \advance\d_itemgroups_list_width\itemgroupparameter\c!width\relax
+ \d_strc_itemgroups_list_width\itemgroupparameter\c!step\relax
+ \ifdim\d_strc_itemgroups_list_width=\zeropoint \d_strc_itemgroups_list_width=.5em\fi
+ \multiply\d_strc_itemgroups_list_width \itemgroupparameter\c!factor
+ \advance\d_strc_itemgroups_list_width\itemgroupparameter\c!width\relax
\else
- \d_itemgroups_list_width\itemgroupparameter\c!width\relax
+ \d_strc_itemgroups_list_width\itemgroupparameter\c!width\relax
\fi\fi
- \advance\d_itemgroups_list_width\itemgroupparameter\c!distance\relax
+ \advance\d_strc_itemgroups_list_width\itemgroupparameter\c!distance\relax
\let\currentitemgroup\savedcurrentitemgroup}
\unexpanded\def\startitemgroup
- {\dotripleempty\itemgroups_start}
+ {\dotripleempty\strc_itemgroups_start}
-\def\itemgroups_start[#category][#options][#settings]%
+\def\strc_itemgroups_start[#category][#options][#settings]%
{\begingroup % (1)
\def\currentitemgroup{#category}% no nested mixing of itemgroups
\let\currentparentitemgroup\currentitemgroup
- \global\advance\c_itemgroups_nesting\plusone
- \def\currentitemlevel{\number\c_itemgroups_nesting}%
+ \global\advance\c_strc_itemgroups_nesting\plusone
+ \def\currentitemlevel{\number\c_strc_itemgroups_nesting}%
\normalexpanded{\chaintocurrentitemgroup{\currentparentitemgroup:\currentitemlevel}}%
\edef\currentitemgroup{\currentparentitemgroup:\currentitemlevel}%
%
\ifthirdargument
- \itemgroups_start_indeed[#options][#settings]%
+ \strc_itemgroups_start_indeed[#options][#settings]%
\else\ifsecondargument
\doifassignmentelse{#options}
- {\itemgroups_start_indeed[][#options]}
- {\itemgroups_start_indeed[#options][]}%
+ {\strc_itemgroups_start_indeed[][#options]}
+ {\strc_itemgroups_start_indeed[#options][]}%
\else
- \itemgroups_start_indeed[][]%
+ \strc_itemgroups_start_indeed[][]%
\fi\fi}
-\def\itemgroups_start_indeed[#options][#settings]%
+\def\strc_itemgroups_start_indeed[#options][#settings]%
{\edef\itemgroupoptions{\itemgroupparameter\c!option}%
\edef\itemgroupextraoptions{#options}%
\ifx\itemgroupoptions\empty
@@ -712,137 +712,137 @@
\letvalue{\??itemgroupalign\v!middle }\hfil
\letvalue{\??itemgroupalign\v!center }\hfil
-\def\itemgroups_left_sym_filler
+\def\strc_itemgroups_left_sym_filler
{\csname\??itemgroupalign\itemgroupparameter\c!symalign\endcsname}
% symbols + states
-\def\itemgroups_store_global_symbol#symbol%
+\def\strc_itemgroups_store_global_symbol#symbol%
{\letgvalue{\??itemgroupglobal\currentitemlevel}#symbol}
-\def\itemgroups_store_local_symbol#symbol%
+\def\strc_itemgroups_store_local_symbol#symbol%
{\letgvalue{\??itemgrouplocal\currentitemlevel}#symbol}
-\def\itemgroups_fetch_global_symbol
+\def\strc_itemgroups_fetch_global_symbol
{\getvalue{\??itemgroupglobal\currentitemlevel}}
-\def\itemgroups_fetch_local_symbol
+\def\strc_itemgroups_fetch_local_symbol
{\getvalue{\??itemgrouplocal\currentitemlevel}}
-\def\itemgroups_setup_symbol_default
- {\edef\itemgroups_asked_symbol{\itemgroupparameter\c!symbol}%
- \itemgroups_store_global_symbol\empty}
+\def\strc_itemgroups_setup_symbol_default
+ {\edef\strc_itemgroups_asked_symbol{\itemgroupparameter\c!symbol}%
+ \strc_itemgroups_store_global_symbol\empty}
-\def\itemgroups_setup_symbol_continue
+\def\strc_itemgroups_setup_symbol_continue
{\ifcsname\??itemgroupglobal\currentitemlevel\endcsname
- \let\itemgroups_asked_symbol\itemgroups_fetch_global_symbol
+ \let\strc_itemgroups_asked_symbol\strc_itemgroups_fetch_global_symbol
\else
- \let\itemgroups_asked_symbol\currentitemlevel
+ \let\strc_itemgroups_asked_symbol\currentitemlevel
\fi}
-\def\itemgroups_setup_symbol_asked
- {\edef\itemgroups_asked_symbol{\itemgroupparameter\c!symbol}}
+\def\strc_itemgroups_setup_symbol_asked
+ {\edef\strc_itemgroups_asked_symbol{\itemgroupparameter\c!symbol}}
\unexpanded\def\redostartitemgroup#settings% k/v
{\begingroup % (2)
\the\itemgroupcommands
- \let\c_itemgroups_text_saved\c_itemgroups_text
- \itemgroups_initialize_local
- \itemgroups_preset_stage_one\itemgroupoptions
+ \let\c_strc_itemgroups_text_saved\c_strc_itemgroups_text
+ \strc_itemgroups_initialize_local
+ \strc_itemgroups_preset_stage_one\itemgroupoptions
\ifhmode
- \ifconditional\c_itemgroups_auto_concat
- \ifdim\lastskip=\d_itemgroups_signal
- \settrue\c_itemgroups_concat
+ \ifconditional\c_strc_itemgroups_auto_concat
+ \ifdim\lastskip=\d_strc_itemgroups_signal
+ \settrue\c_strc_itemgroups_concat
\fi
\fi
- \ifconditional\c_itemgroups_text_saved \else
- \ifconditional\c_itemgroups_text \else
+ \ifconditional\c_strc_itemgroups_text_saved \else
+ \ifconditional\c_strc_itemgroups_text \else
\par
\fi
\fi
\fi
\iftrialtypesetting
- \savestructurecounter[\v_itemgroups_counter]%
+ \savestructurecounter[\v_strc_itemgroups_counter]%
\fi
- \global\advance\c_itemgroups_n_of_lists\plusone
- \c_itemgroups_n_of_items\zerocount
- \itemgroups_check_n_of_items
+ \global\advance\c_strc_itemgroups_n_of_lists\plusone
+ \c_strc_itemgroups_n_of_items\zerocount
+ \strc_itemgroups_check_n_of_items
\ifx\itemgroupoptions\empty
- \itemgroups_setup_symbol_default
- \itemgroups_reset_continue_state
+ \strc_itemgroups_setup_symbol_default
+ \strc_itemgroups_reset_continue_state
\setupcurrentitemgroup[#settings]%
\else
- \itemgroups_process_options\itemgroupoptions
+ \strc_itemgroups_process_options\itemgroupoptions
\setupcurrentitemgroup[#settings]%
- \ifconditional\c_itemgroups_continue
- \itemgroups_setup_symbol_continue
- \itemgroups_fetch_continue_state
+ \ifconditional\c_strc_itemgroups_continue
+ \strc_itemgroups_setup_symbol_continue
+ \strc_itemgroups_fetch_continue_state
\else
- \itemgroups_setup_symbol_asked
- \itemgroups_store_continue_state\itemgroupoptions{#settings}%
+ \strc_itemgroups_setup_symbol_asked
+ \strc_itemgroups_store_continue_state\itemgroupoptions{#settings}%
\fi
\fi
- \ifnum\c_itemgroups_nesting=\plusone % NIEUW
+ \ifnum\c_strc_itemgroups_nesting=\plusone % NIEUW
\doadaptleftskip {\itemgroupparameter\c!margin}%
\doadaptleftskip {\itemgroupparameter\c!leftmargin}%
\doadaptrightskip{\itemgroupparameter\c!rightmargin}%
\fi
\dosetraggedcommand{\itemgroupparameter\c!align}\raggedcommand
- \edef\m_itemgroups_indenting{\itemgroupparameter\c!indenting}%
- \ifnum\c_itemgroups_nesting>\zerocount
- \settrue\c_itemgroups_first
- \ifconditional\c_itemgroups_continue \else
+ \edef\m_strc_itemgroups_indenting{\itemgroupparameter\c!indenting}%
+ \ifnum\c_strc_itemgroups_nesting>\zerocount
+ \settrue\c_strc_itemgroups_first
+ \ifconditional\c_strc_itemgroups_continue \else
\dorestartsubstructurecounter
- [\v_itemgroups_counter]%
+ [\v_strc_itemgroups_counter]%
[\currentitemlevel]%
{\the\numexpr\itemgroupparameter\c!start-\plusone\relax}%
\fi
\fi
- \ifx\itemgroups_used_symbol\empty
- \itemgroups_set_symbol\itemgroups_asked_symbol % ** default value
- \ifx\itemgroups_used_symbol\empty
+ \ifx\strc_itemgroups_used_symbol\empty
+ \strc_itemgroups_set_symbol\strc_itemgroups_asked_symbol % ** default value
+ \ifx\strc_itemgroups_used_symbol\empty
\let\currentitemgroupsymbol\currentitemlevel % ** fall back
\fi
\fi
- \ifconditional\c_itemgroups_auto_intro\ifnum\prevgraf<\plusthree
- \settrue\c_itemgroups_intro
+ \ifconditional\c_strc_itemgroups_auto_intro\ifnum\prevgraf<\plusthree
+ \settrue\c_strc_itemgroups_intro
\fi\fi
- \ifconditional\c_itemgroups_paragraph
- \ifnum\c_itemgroups_nesting>\plusone
+ \ifconditional\c_strc_itemgroups_paragraph
+ \ifnum\c_strc_itemgroups_nesting>\plusone
\letitemgroupparameter\c!inbetween\empty
\fi
\fi
- \ifconditional\c_itemgroups_pack
+ \ifconditional\c_strc_itemgroups_pack
\letitemgroupparameter\c!inbetween\empty
\fi
- \ifconditional\c_itemgroups_columns
- \ifinsidecolumns\else\ifcase\c_itemgroups_column_depth
- \global\c_itemgroups_column_depth\c_itemgroups_nesting % global ?
- \itemgroups_before_command
- \itemgroups_tag_start_group
- \itemgroups_start_columns
+ \ifconditional\c_strc_itemgroups_columns
+ \ifinsidecolumns\else\ifcase\c_strc_itemgroups_column_depth
+ \global\c_strc_itemgroups_column_depth\c_strc_itemgroups_nesting % global ?
+ \strc_itemgroups_before_command
+ \strc_itemgroups_tag_start_group
+ \strc_itemgroups_start_columns
\fi\fi
\fi
- \ifconditional\c_itemgroups_fitting
- \ifdim\d_itemgroups_max_width>\zeropoint
- \letitemgroupparameter\c!width\d_itemgroups_max_width
+ \ifconditional\c_strc_itemgroups_fitting
+ \ifdim\d_strc_itemgroups_max_width>\zeropoint
+ \letitemgroupparameter\c!width\d_strc_itemgroups_max_width
\fi
\fi
- \itemgroups_calculate_list_width\c_itemgroups_nesting
- \ifdim\d_itemgroups_list_width>\zeropoint\relax
- \ifconditional\c_itemgroups_inline\else
- \advance\leftskip\d_itemgroups_list_width\relax
+ \strc_itemgroups_calculate_list_width\c_strc_itemgroups_nesting
+ \ifdim\d_strc_itemgroups_list_width>\zeropoint\relax
+ \ifconditional\c_strc_itemgroups_inline\else
+ \advance\leftskip\d_strc_itemgroups_list_width\relax
\fi
\fi
- \ifx\m_itemgroups_repeat_start\empty
+ \ifx\m_strc_itemgroups_repeat_start\empty
\let\currentitemgroupconversionset\currentitemgroupsymbol
\else
\edef\currentitemgroupconversionset{\currentitemgroupconversionset,\currentitemgroupsymbol}%
\fi
- \d_itemgroups_asked_width\itemgroupparameter\c!width\relax
+ \d_strc_itemgroups_asked_width\itemgroupparameter\c!width\relax
\startcollectitems}
-\def\itemgroups_start_columns
+\def\strc_itemgroups_start_columns
{\startcolumns
[\c!n=\itemgroupparameter\c!n,
\c!height=,
@@ -850,55 +850,55 @@
\c!balance=\v!yes,
\c!align=\v!no]}
-\def\itemgroups_stop_columns
+\def\strc_itemgroups_stop_columns
{\stopcolumns}
\unexpanded\def\stopitemgroup
{\stopcollectitems
- \ifconditional\c_itemgroups_text
+ \ifconditional\c_strc_itemgroups_text
\removeunwantedspaces
\space
\ignorespaces
\else
\par
\fi
- \itemgroups_register_status
- \ifconditional\c_itemgroups_first \else
+ \strc_itemgroups_register_status
+ \ifconditional\c_strc_itemgroups_first \else
\dostoptagged
\dostoptagged
% \endgroup % (3)
\fi
- \ifnum\c_itemgroups_column_depth=\c_itemgroups_nesting\relax
- \itemgroups_stop_columns
- \global\c_itemgroups_column_depth\zerocount % global ?
- \itemgroups_tag_stop_group
- \itemgroups_after_command
+ \ifnum\c_strc_itemgroups_column_depth=\c_strc_itemgroups_nesting\relax
+ \strc_itemgroups_stop_columns
+ \global\c_strc_itemgroups_column_depth\zerocount % global ?
+ \strc_itemgroups_tag_stop_group
+ \strc_itemgroups_after_command
\dontrechecknextindentation
- \else\ifnum\c_itemgroups_nesting=\plusone
- \itemgroups_insert_breakallow
- \itemgroups_tag_stop_group
- \itemgroups_after_command
- \checknextindentation[\itemgroupparameter\c!indentnext]%
+ \else\ifnum\c_strc_itemgroups_nesting=\plusone
+ \strc_itemgroups_insert_breakallow
+ \strc_itemgroups_tag_stop_group
+ \strc_itemgroups_after_command
+ \useindentnextparameter\itemgroupparameter
\else
% nieuw, not yet nobreak handling
- \itemgroups_tag_stop_group
- \ifcase\c_itemgroups_spacing_mode
- \itemgroups_after_command
+ \strc_itemgroups_tag_stop_group
+ \ifcase\c_strc_itemgroups_spacing_mode
+ \strc_itemgroups_after_command
\or
- \itemgroups_after_command
+ \strc_itemgroups_after_command
\fi
\dontrechecknextindentation
\fi\fi
% new test, needed in sidefloats (surfaced in volker's proceedings)
\iftrialtypesetting
- \restorestructurecounter[\v_itemgroups_counter]%
- \global\advance\c_itemgroups_n_of_lists\minusone
+ \restorestructurecounter[\v_strc_itemgroups_counter]%
+ \global\advance\c_strc_itemgroups_n_of_lists\minusone
\fi
- \global\advance\c_itemgroups_nesting\minusone
- \xdef\currentitemlevel{\number\c_itemgroups_nesting}%
+ \global\advance\c_strc_itemgroups_nesting\minusone
+ \xdef\currentitemlevel{\number\c_strc_itemgroups_nesting}%
\endgroup % (2)
\endgroup % (1)
- \ifconditional\c_itemgroups_text \else
+ \ifconditional\c_strc_itemgroups_text \else
\par % hm, already done
\fi
\dorechecknextindentation}
@@ -906,170 +906,171 @@
% The items.
\unexpanded\def\startitemgroupitem
- {\dosingleempty\itemgroups_start_item}
+ {\dosingleempty\strc_itemgroups_start_item}
-\def\itemgroups_start_item_first
- {\setfalse\c_itemgroups_first
+\def\strc_itemgroups_start_item_first
+ {\setfalse\c_strc_itemgroups_first
% \begingroup % (3)
- \ifcase\c_itemgroups_nesting
+ \ifcase\c_strc_itemgroups_nesting
% 0
\or
- \itemgroups_start_item_first_one % 1
+ \strc_itemgroups_start_item_first_one % 1
\else
- \itemgroups_start_item_first_two % 2+
+ \strc_itemgroups_start_item_first_two % 2+
\fi}
-\def\itemgroups_start_item_first_one
- {\ifcase\c_itemgroups_column_depth
- \ifconditional\c_itemgroups_intro\itemgroups_insert_breakno\fi
- \itemgroups_before_command
- \itemgroups_tag_start_group
- \ifconditional\c_itemgroups_intro\itemgroups_insert_breakno\fi
+\def\strc_itemgroups_start_item_first_one
+ {\ifcase\c_strc_itemgroups_column_depth
+ \ifconditional\c_strc_itemgroups_intro\strc_itemgroups_insert_breakno\fi
+ \strc_itemgroups_before_command
+ \strc_itemgroups_tag_start_group
+ \ifconditional\c_strc_itemgroups_intro\strc_itemgroups_insert_breakno\fi
\fi}
-\def\itemgroups_start_item_first_two
- {\ifconditional\c_itemgroups_paragraph\else
- \edef\previtemlevel{\the\numexpr\c_itemgroups_nesting-\plusone}%
- \ifcase\c_itemgroups_spacing_mode
- \itemgroups_before_command
+\def\strc_itemgroups_start_item_first_two
+ {\ifconditional\c_strc_itemgroups_paragraph\else
+ \edef\previtemlevel{\the\numexpr\c_strc_itemgroups_nesting-\plusone}%
+ \ifcase\c_strc_itemgroups_spacing_mode
+ \strc_itemgroups_before_command
\or
- \doifelsenothing\itemgroups_before_command % should possibly expand to empty
+ \doifelsenothing\strc_itemgroups_before_command % should possibly expand to empty
{\nameditemgroupparameter{\currentparentitemgroup:\previtemlevel}\c!inbetween}%
- \itemgroups_before_command
+ \strc_itemgroups_before_command
\else
\nameditemgroupparameter{\currentparentitemgroup:\previtemlevel}\c!inbetween
\fi
- \itemgroups_tag_start_group
+ \strc_itemgroups_tag_start_group
\fi}
-\def\itemgroups_start_item_next
+\def\strc_itemgroups_start_item_next
{\dostoptagged % ok? what do we stop here?
\dostoptagged % ok? what do we stop here?
- \ifconditional\c_itemgroups_text
+ \ifconditional\c_strc_itemgroups_text
\ifhmode
% WS: make the distance between items customizable, think about better default values -> see itemize-1.tex
- \itemgroups_set_text_item_distance% HH: moved out and made configurable (sort of)
+ \strc_itemgroups_set_text_item_distance% HH: moved out and made configurable (sort of)
\removeunwantedspaces
- \hskip\m_itemgroups_text_distance\relax
+ \hskip\m_strc_itemgroups_text_distance\relax
\fi
\else
- \itemgroups_between_command
+ \strc_itemgroups_between_command
\fi}
-\unexpanded\def\itemgroups_start_item[#reference]% we can reuse more
+\unexpanded\def\strc_itemgroups_start_item[#reference]% we can reuse more
{\def\currentitemreference{#reference}%
- \ifconditional\c_itemgroups_text
+ \ifconditional\c_strc_itemgroups_text
% begin of item
\else
\par
\fi
- \ifconditional\c_itemgroups_concat
- \itemgroups_insert_breakno
+ \ifconditional\c_strc_itemgroups_concat
+ \strc_itemgroups_insert_breakno
\fi
- \itemgroups_increment_item_counter
- \ifconditional\c_itemgroups_first
- \itemgroups_start_item_first
+ \strc_itemgroups_increment_item_counter
+ \ifconditional\c_strc_itemgroups_first
+ \strc_itemgroups_start_item_first
\else
- \itemgroups_start_item_next
+ \strc_itemgroups_start_item_next
\fi
- \ifconditional\c_itemgroups_concat
+ \ifconditional\c_strc_itemgroups_concat
\vskip-\dimexpr\lastskip+\lineheight\relax
\nobreak
- \setfalse\c_itemgroups_concat
+ \setfalse\c_strc_itemgroups_concat
\fi
\dostarttagged\t!item\empty
\dostarttagged\t!itemtag\empty
- \itemgroups_insert_item
+ \strc_itemgroups_insert_item
\dostoptagged
- \ifconditional\c_itemgroups_pack
+ \ifconditional\c_strc_itemgroups_pack
\setupwhitespace[\v!none]%
\fi
\itemgroupparameter\c!inner % will become obsolete (better use setups)
- \itemgroups_margin_symbol
- \let\itemgroups_margin_symbol\relax
+ \strc_itemgroups_margin_symbol
+ \let\strc_itemgroups_margin_symbol\relax
\dostarttagged\t!itemcontent\empty
\strut
\nobreak % else problems with intext items
- \hskip\d_itemgroups_signal % concat
+ \hskip\d_strc_itemgroups_signal % concat
\itemgroupparameter\c!command}
\unexpanded\def\stopitemgroupitem
- {\ifconditional\c_itemgroups_text
+ {\ifconditional\c_strc_itemgroups_text
% nothing
\else
\endgraf
\fi}
\unexpanded\def\startitemgrouphead
- {\dosingleempty\itemgroups_start_head}
+ {\dosingleempty\strc_itemgroups_start_head}
-\unexpanded\def\itemgroups_start_head[#reference]%
- {\ifconditional\c_itemgroups_first \else
- \itemgroups_insert_breakallow
+\unexpanded\def\strc_itemgroups_start_head[#reference]%
+ {\ifconditional\c_strc_itemgroups_first \else
+ \strc_itemgroups_insert_breakallow
\fi
- \ifconditional\c_itemgroups_pack \else
- \itemgroups_before_head_command
+ \ifconditional\c_strc_itemgroups_pack \else
+ \strc_itemgroups_before_head_command
\fi
- \ifconditional\c_itemgroups_first
- \ifconditional\c_itemgroups_intro \else
- \ifcase\c_itemgroups_nesting
- \itemgroups_insert_breakallow
+ \ifconditional\c_strc_itemgroups_first
+ \ifconditional\c_strc_itemgroups_intro \else
+ \ifcase\c_strc_itemgroups_nesting
+ \strc_itemgroups_insert_breakallow
\fi
\fi
\fi
- \itemgroups_start_item[#reference]%
- \groupedcommand\itemgroups_start_head_indeed\itemgroups_stop_head_indeed}
+ \strc_itemgroups_start_item[#reference]%
+ \groupedcommand\strc_itemgroups_start_head_indeed\strc_itemgroups_stop_head_indeed}
\unexpanded\def\stopitemgrouphead
{\stopitemgroupitem}
-\unexpanded\def\itemgroups_start_head_indeed
- {\useitemgroupstyleandcolor\c!headstyle\c!headcolor\ignorespaces}
+\unexpanded\def\strc_itemgroups_start_head_indeed
+ {\settrue\c_strc_itemgroups_head
+ \useitemgroupstyleandcolor\c!headstyle\c!headcolor\ignorespaces}
-\unexpanded\def\itemgroups_stop_head_indeed
+\unexpanded\def\strc_itemgroups_stop_head_indeed
{\removeunwantedspaces
- \ifconditional\c_itemgroups_text
+ \ifconditional\c_strc_itemgroups_text
\space
\ignorespaces
\else
\par
\fi
- \itemgroups_insert_breakno
- \ifconditional\c_itemgroups_pack\else\itemgroups_after_head_command\fi
- \itemgroups_insert_breakno
+ \strc_itemgroups_insert_breakno
+ \ifconditional\c_strc_itemgroups_pack\else\strc_itemgroups_after_head_command\fi
+ \strc_itemgroups_insert_breakno
\noindentation}
% Simple commands.
-\unexpanded\def\itemgroups_start_do_item
+\unexpanded\def\strc_itemgroups_start_do_item
{\startitemgroupitem}
-\unexpanded\def\itemgroups_start_no_item % ?
+\unexpanded\def\strc_itemgroups_start_no_item % ?
{\startitemgroupitem}
-\unexpanded\def\itemgroups_start_button[#destination]%
- {\edef\m_itemgroups_destination{#destination}%
+\unexpanded\def\strc_itemgroups_start_button[#destination]%
+ {\edef\m_strc_itemgroups_destination{#destination}%
\startitemgroupitem}
-\unexpanded\def\itemgroups_start_symbol#text%
- {\def\itemgroups_extra_symbol{#text}%
+\unexpanded\def\strc_itemgroups_start_symbol#text%
+ {\def\strc_itemgroups_extra_symbol{#text}%
\startitemgroupitem}
-\unexpanded\def\itemgroups_start_dummy
- {\itemgroups_start_symbol\strut\strut}
+\unexpanded\def\strc_itemgroups_start_dummy
+ {\strc_itemgroups_start_symbol\strut\strut}
-\unexpanded\def\itemgroups_start_subitem
- {\settrue\c_itemgroups_sub
+\unexpanded\def\strc_itemgroups_start_subitem
+ {\settrue\c_strc_itemgroups_sub
\startitemgroupitem}
-\unexpanded\def\itemgroups_start_edge#text%
- {\itemgroups_start_symbol
- {\itemgroups_calculate_list_width\c_itemgroups_nesting
- \hbox to \d_itemgroups_list_width
+\unexpanded\def\strc_itemgroups_start_edge#text%
+ {\strc_itemgroups_start_symbol
+ {\strc_itemgroups_calculate_list_width\c_strc_itemgroups_nesting
+ \hbox to \d_strc_itemgroups_list_width
{#text\hskip\itemgroupparameter\c!distance}}}
-\unexpanded\def\itemgroups_start_margin#text%
- {\def\itemgroups_margin_symbol
+\unexpanded\def\strc_itemgroups_start_margin#text%
+ {\def\strc_itemgroups_margin_symbol % brrr
{\llap
{\begingroup
\useitemgroupstyleandcolor\c!marstyle\c!marcolor
@@ -1078,21 +1079,21 @@
\hskip\dimexpr\leftskip+\leftmargindistance\relax}}%
\startitemgroupitem}
-\unexpanded\def\itemgroups_start_text#text%
- {\def\itemgroups_extra_symbol{#text}%
- \settrue\c_itemgroups_txt
+\unexpanded\def\strc_itemgroups_start_text#text%
+ {\def\strc_itemgroups_extra_symbol{#text}%
+ \settrue\c_strc_itemgroups_txt
\startitemgroupitem}
-\unexpanded\def\itemgroup_start_head
- {\settrue\c_itemgroups_head
- \startitemgrouphead}
+% \unexpanded\def\strc_itemgroups_start_head
+% {\settrue\c_strc_itemgroups_head
+% \startitemgrouphead}
-\unexpanded\def\itemgroups_start_items
- {\dosingleempty\itemgroups_start_items_indeed}
+\unexpanded\def\strc_itemgroups_start_items
+ {\dosingleempty\strc_itemgroups_start_items_indeed}
-\unexpanded\def\itemgroups_start_items_indeed[#whatever]% something got lost
- {\itemgroups_start_edge
- {\dorecurse{0\itemgroupparameter\c!items}{\itemgroups_used_symbol\hss}%
+\unexpanded\def\strc_itemgroups_start_items_indeed[#whatever]% something got lost
+ {\strc_itemgroups_start_edge
+ {\dorecurse{0\itemgroupparameter\c!items}{\strc_itemgroups_used_symbol\hss}%
\unskip}}
\unexpanded\def\startspecialitemgroupitem[#name]%
@@ -1101,256 +1102,255 @@
\unexpanded\def\stopspecialitemgroupitem
{\stopitemgroupitem}
-\letvalue{\??itemgroupstart\v!item}\itemgroups_start_do_item
-\letvalue{\??itemgroupstart\v!sub }\itemgroups_start_subitem
-\letvalue{\??itemgroupstart\v!sym }\itemgroups_start_symbol
-\letvalue{\??itemgroupstart\v!ran }\itemgroups_start_edge
-\letvalue{\??itemgroupstart\v!its }\itemgroups_start_items
-\letvalue{\??itemgroupstart\v!mar }\itemgroups_start_margin
+\letvalue{\??itemgroupstart\v!item}\strc_itemgroups_start_do_item
+\letvalue{\??itemgroupstart\v!sub }\strc_itemgroups_start_subitem
+\letvalue{\??itemgroupstart\v!sym }\strc_itemgroups_start_symbol
+\letvalue{\??itemgroupstart\v!ran }\strc_itemgroups_start_edge
+\letvalue{\??itemgroupstart\v!its }\strc_itemgroups_start_items
+\letvalue{\??itemgroupstart\v!mar }\strc_itemgroups_start_margin
\def\optimizelistitemsbreak
- {\ifcase\c_itemgroups_column_depth \ifconditional\c_itemgroups_optimize
- \ifcase \c_itemgroups_max_items \else
- \ifnum\c_itemgroups_max_items=\plusthree
- \ifnum\c_itemgroups_n_of_items>\plusone
- \itemgroups_insert_nobreak
+ {\ifcase\c_strc_itemgroups_column_depth \ifconditional\c_strc_itemgroups_optimize
+ \ifcase \c_strc_itemgroups_max_items \else
+ \ifnum\c_strc_itemgroups_max_items=\plusthree
+ \ifnum\c_strc_itemgroups_n_of_items>\plusone
+ \strc_itemgroups_insert_nobreak
\fi
- \else\ifnum\c_itemgroups_max_items>\plusthree
- \ifnum\c_itemgroups_n_of_items=\plustwo
- \ifconditional\c_itemgroups_intro
- \itemgroups_insert_breakno
+ \else\ifnum\c_strc_itemgroups_max_items>\plusthree
+ \ifnum\c_strc_itemgroups_n_of_items=\plustwo
+ \ifconditional\c_strc_itemgroups_intro
+ \strc_itemgroups_insert_breakno
\else
- \itemgroups_insert_nobreak
+ \strc_itemgroups_insert_nobreak
\fi
- \else\ifnum\c_itemgroups_max_items=\c_itemgroups_n_of_items\relax
- \itemgroups_insert_nobreak
- \else\ifnum\c_itemgroups_n_of_items>\plustwo
- \itemgroups_insert_break
+ \else\ifnum\c_strc_itemgroups_max_items=\c_strc_itemgroups_n_of_items\relax
+ \strc_itemgroups_insert_nobreak
+ \else\ifnum\c_strc_itemgroups_n_of_items>\plustwo
+ \strc_itemgroups_insert_break
\else
- \ifconditional\c_itemgroups_intro\else\itemgroups_insert_break\fi
+ \ifconditional\c_strc_itemgroups_intro\else\strc_itemgroups_insert_break\fi
\fi\fi\fi
\fi\fi
\fi
\fi\fi}
-\def\itemgroups_handle_text_item
+\def\strc_itemgroups_handle_text_item
{\scratchdimen\wd\b_itemgroups
\advance \scratchdimen \itemgroupparameter\c!distance\relax
- \ifdim\scratchdimen>\d_itemgroups_list_width
- \advance\scratchdimen -\d_itemgroups_list_width
+ \ifdim\scratchdimen>\d_strc_itemgroups_list_width
+ \advance\scratchdimen -\d_strc_itemgroups_list_width
\else
\scratchdimen\zeropoint
\fi
- \llap{\hbox to \d_itemgroups_list_width{\ifconditional\c_itemgroups_sub\llap{+\enspace}\fi\box\b_itemgroups\hss}}% was: \hfill
+ \llap{\hbox to \d_strc_itemgroups_list_width{\ifconditional\c_strc_itemgroups_sub\llap{+\enspace}\fi\box\b_itemgroups\hss}}% was: \hfill
\hskip\scratchdimen}
-\def\itemgroups_handle_lapped_item_positive
+\def\strc_itemgroups_handle_lapped_item_positive
{\llap
- {\hbox to \d_itemgroups_list_width
- {\ifconditional\c_itemgroups_sub
+ {\hbox to \d_strc_itemgroups_list_width
+ {\ifconditional\c_strc_itemgroups_sub
\llap{+\enspace}%
\fi
- \itemgroups_left_sym_filler
+ \strc_itemgroups_left_sym_filler
\box\b_itemgroups % can already have a forced widt, only factor handled here
\hfil
\hskip\itemgroupparameter\c!distance}}}
-\def\itemgroups_handle_lapped_item_negative
+\def\strc_itemgroups_handle_lapped_item_negative
{\llap
- {\ifconditional\c_itemgroups_sub
+ {\ifconditional\c_strc_itemgroups_sub
\llap{+\enspace}%
\fi
\box\b_itemgroups
\hskip\leftmargindistance}}
-\def\itemgroups_handle_groups_text_item
+\def\strc_itemgroups_handle_groups_text_item
{\hbox
- {\ifconditional\c_itemgroups_sub
+ {\ifconditional\c_strc_itemgroups_sub
+\enspace
\fi
\box\b_itemgroups
\hskip\interwordspace}%
\nobreak}
-\def\itemgroups_handle_groups_inline_item
- {\hbox to \d_itemgroups_list_width
- {\ifconditional\c_itemgroups_sub
+\def\strc_itemgroups_handle_groups_inline_item
+ {\hbox to \d_strc_itemgroups_list_width
+ {\ifconditional\c_strc_itemgroups_sub
\llap{+\enspace}%
\fi
\box\b_itemgroups
\hss}} % was: \hfill
-\unexpanded\def\itemgroups_start_head_sym#text%
- {\def\itemgroups_extra_symbol{#text}%
- \settrue\c_itemgroups_head
- \itemgroups_start_head}
+\unexpanded\def\strc_itemgroups_start_head_sym#text%
+ {\def\strc_itemgroups_extra_symbol{#text}%
+ \settrue\c_strc_itemgroups_head
+ \strc_itemgroups_start_head}
-\def\itemgroups_make_symbol_box
+\def\strc_itemgroups_make_symbol_box
{\setbox\b_itemgroups\hbox
- {\ifconditional\c_itemgroups_head
- \ifx\itemgroups_extra_symbol\empty
+ {\ifconditional\c_strc_itemgroups_head
+ \ifx\strc_itemgroups_extra_symbol\empty
\useitemgroupstyleandcolor\c!headstyle\c!headcolor
- \itemgroups_used_symbol
+ \strc_itemgroups_used_symbol
\else
\useitemgroupstyleandcolor\c!symstyle\c!symcolor
- \itemgroups_extra_symbol
- \let\itemgroups_extra_symbol\empty
+ \strc_itemgroups_extra_symbol
+ \let\strc_itemgroups_extra_symbol\empty
\fi
\else
- \ifx\itemgroups_extra_symbol\empty
+ \ifx\strc_itemgroups_extra_symbol\empty
\useitemgroupstyleandcolor\c!style\c!color
- \itemgroups_used_symbol
+ \strc_itemgroups_used_symbol
\else
\useitemgroupstyleandcolor\c!symstyle\c!symcolor
- \itemgroups_extra_symbol
- \let\itemgroups_extra_symbol\empty
+ \strc_itemgroups_extra_symbol
+ \let\strc_itemgroups_extra_symbol\empty
\fi
\fi}}
-\def\itemgroups_make_fitting_box
+\def\strc_itemgroups_make_fitting_box
{\ifdim\wd\b_itemgroups>\itemgroupparameter\c!maxwidth\scaledpoint\relax % brr, sp
\normalexpanded{\global\setitemgroupparameter{\c!maxwidth}{\number\wd\b_itemgroups}}%
\fi
- \ifdim\d_itemgroups_max_width>\zeropoint
+ \ifdim\d_strc_itemgroups_max_width>\zeropoint
\setbox\b_itemgroups\simplealignedbox
- {\dimexpr\d_itemgroups_max_width+\itemgroupparameter\c!distance\relax}
+ {\dimexpr\d_strc_itemgroups_max_width+\itemgroupparameter\c!distance\relax}
{\itemgroupparameter\c!itemalign}
{\box\b_itemgroups\hskip\itemgroupparameter\c!distance}%
\fi}
-\def\itemgroups_make_aligned_box
+\def\strc_itemgroups_make_aligned_box
{\doifsomething{\itemgroupparameter\c!itemalign}
{\setbox\b_itemgroups\simplealignedbox
- {\dimexpr\d_itemgroups_asked_width+\itemgroupparameter\c!distance\relax}
+ {\dimexpr\d_strc_itemgroups_asked_width+\itemgroupparameter\c!distance\relax}
{\itemgroupparameter\c!itemalign}
{\box\b_itemgroups\hskip\itemgroupparameter\c!distance}}}
-\def\itemgroups_make_destination_box
- {\iftrialtypesetting \else \ifx\m_itemgroups_destination\empty \else
- \setbox\b_itemgroups\hbox{\directgotobox{\box\b_itemgroups}[\m_itemgroups_destination]}%
+\def\strc_itemgroups_make_destination_box
+ {\iftrialtypesetting \else \ifx\m_strc_itemgroups_destination\empty \else
+ \setbox\b_itemgroups\hbox{\directgotobox{\box\b_itemgroups}[\m_strc_itemgroups_destination]}%
\fi\fi}
-\def\itemgroups_check_indenting
- {\setfalse\c_itemgroups_indented_first
- \ifx\m_itemgroups_indenting\empty \else
- \normalexpanded{\setupindenting[\v!reset,\v!yes,\m_itemgroups_indenting]}%
+\def\strc_itemgroups_check_indenting
+ {\setfalse\c_strc_itemgroups_indented_first
+ \ifx\m_strc_itemgroups_indenting\empty \else
+ \normalexpanded{\setupindenting[\v!reset,\v!yes,\m_strc_itemgroups_indenting]}%
\ifindentfirstparagraph
\doifnot{\itemgroupparameter\c!alignsymbol}\v!yes
- {\settrue\c_itemgroups_indented_first}%
+ {\settrue\c_strc_itemgroups_indented_first}%
\fi
\fi}
-\def\itemgroups_check_for_repeated
- {\ifconditional\c_itemgroups_repeat
- \ifx\m_itemgroups_repeat_start\empty
+\def\strc_itemgroups_check_for_repeated
+ {\ifconditional\c_strc_itemgroups_repeat
+ \ifx\m_strc_itemgroups_repeat_start\empty
\let\m_current_itemgroups_repeat_start\currentitemlevel
\fi
\setbox\b_itemgroups\hbox to \wd\b_itemgroups
- {\hskip-\d_itemgroups_asked_width
+ {\hskip-\d_strc_itemgroups_asked_width
\box\b_itemgroups}% what a hack !
\fi}
-\def\itemgroups_insert_item
- {\ifconditional\c_itemgroups_text
+\def\strc_itemgroups_insert_item
+ {\ifconditional\c_strc_itemgroups_text
% begin of item
\else
\par
\fi
- \advance\c_itemgroups_n_of_items\plusone
+ \advance\c_strc_itemgroups_n_of_items\plusone
\optimizelistitemsbreak
- \itemgroups_check_indenting
+ \strc_itemgroups_check_indenting
\dontleavehmode
- \ifconditional\c_itemgroups_indented_first
+ \ifconditional\c_strc_itemgroups_indented_first
\hskip-\parindent
\fi
- \itemgroups_make_symbol_box
- \itemgroups_make_destination_box
- \ifconditional\c_itemgroups_fitting
- \itemgroups_make_fitting_box
- \else\ifdim\d_itemgroups_asked_width>\zeropoint
- \itemgroups_make_aligned_box
+ \strc_itemgroups_make_symbol_box
+ \strc_itemgroups_make_destination_box
+ \ifconditional\c_strc_itemgroups_fitting
+ \strc_itemgroups_make_fitting_box
+ \else\ifdim\d_strc_itemgroups_asked_width>\zeropoint
+ \strc_itemgroups_make_aligned_box
\fi\fi
- \let\m_itemgroups_destination\empty
+ \let\m_strc_itemgroups_destination\empty
\ht\b_itemgroups\strutheight % just in case a symbols is not yet available in
\dp\b_itemgroups\strutdepth % the current run (more a mkii mp side artifact)
- \itemgroups_check_for_repeated
- \ifdim\d_itemgroups_asked_width<\zeropoint\relax
- \itemgroups_handle_lapped_item_negative
+ \strc_itemgroups_check_for_repeated
+ \ifdim\d_strc_itemgroups_asked_width<\zeropoint\relax
+ \strc_itemgroups_handle_lapped_item_negative
\else
- \ifdim\d_itemgroups_asked_width=\zeropoint\relax
- \itemgroups_calculate_list_width\plusone
+ \ifdim\d_strc_itemgroups_asked_width=\zeropoint\relax
+ \strc_itemgroups_calculate_list_width\plusone
\else
- \itemgroups_calculate_list_width\c_itemgroups_nesting
+ \strc_itemgroups_calculate_list_width\c_strc_itemgroups_nesting
\fi
- \ifconditional\c_itemgroups_text
- \itemgroups_handle_groups_text_item
- \else\ifconditional\c_itemgroups_inline
- \itemgroups_handle_groups_inline_item
- \else\ifconditional\c_itemgroups_txt
- \itemgroups_handle_text_item
+ \ifconditional\c_strc_itemgroups_text
+ \strc_itemgroups_handle_groups_text_item
+ \else\ifconditional\c_strc_itemgroups_inline
+ \strc_itemgroups_handle_groups_inline_item
+ \else\ifconditional\c_strc_itemgroups_txt
+ \strc_itemgroups_handle_text_item
\else
- \itemgroups_handle_lapped_item_positive
+ \strc_itemgroups_handle_lapped_item_positive
\fi\fi\fi
\fi
- \setfalse\c_itemgroups_head
- \setfalse\c_itemgroups_sub
- \ifconditional\c_itemgroups_indented_first
+ \setfalse\c_strc_itemgroups_head
+ \setfalse\c_strc_itemgroups_sub
+ \ifconditional\c_strc_itemgroups_indented_first
\hskip\parindent
\fi
\ignorespaces}
-\def\itemgroups_start_item_nop
+\def\strc_itemgroups_start_item_nop
{\let\currentitemreference\empty
- \itemgroups_increment_item_counter
- \advance\c_itemgroups_n_of_items\plusone
+ \strc_itemgroups_increment_item_counter
+ \advance\c_strc_itemgroups_n_of_items\plusone
\setbox\b_itemgroups\hbox
{\useitemgroupstyleandcolor\c!style\c!color
- \itemgroups_used_symbol}%
- \itemgroups_check_for_repeated
+ \strc_itemgroups_used_symbol}%
+ \strc_itemgroups_check_for_repeated
\ignorespaces}
\setvalue{\??itemgroupdistance\c!textdistance:\v!none}%
- {\let\m_itemgroups_text_distance\zeropoint}
+ {\let\m_strc_itemgroups_text_distance\zeropoint}
-\unexpanded\def\itemgroups_set_text_item_distance
- {\edef\m_itemgroups_text_distance{\itemgroupparameter\c!textdistance}%
- \ifx\m_itemgroups_text_distance\empty
+\unexpanded\def\strc_itemgroups_set_text_item_distance
+ {\edef\m_strc_itemgroups_text_distance{\itemgroupparameter\c!textdistance}%
+ \ifx\m_strc_itemgroups_text_distance\empty
%
- \else\ifcsname\??itemgroupdistance\c!textdistance:\m_itemgroups_text_distance\endcsname
- \csname\??itemgroupdistance\c!textdistance:\m_itemgroups_text_distance\endcsname
+ \else\ifcsname\??itemgroupdistance\c!textdistance:\m_strc_itemgroups_text_distance\endcsname
+ \csname\??itemgroupdistance\c!textdistance:\m_strc_itemgroups_text_distance\endcsname
\else
- \itemgroups_set_text_item_distance_indeed
+ \strc_itemgroups_set_text_item_distance_indeed
\fi\fi}
-\def\itemgroups_set_text_item_distance_indeed
+\def\strc_itemgroups_set_text_item_distance_indeed
{\assignvalue
- \m_itemgroups_text_distance
- \m_itemgroups_text_distance
+ \m_strc_itemgroups_text_distance
+ \m_strc_itemgroups_text_distance
{.5\interwordspace\!!plus.5\emwidth}%
{\interwordspace \!!plus \emwidth}%
{\emwidth \!!plus \interwordstretch\!!minus\interwordshrink}}
-\unexpanded\def\itemgroups_default_command
+\unexpanded\def\strc_itemgroups_default_command
{\EveryPar{\ignorespaces}% needed ?
\ignorespaces}
%D Special case:
-\unexpanded\def\itemgroups_head#text\par
+\unexpanded\def\strc_itemgroups_head#text\par
{\startitemgrouphead{#text}}
%D The local commands:
\appendtoks
- \let\item \itemgroups_start_do_item
- \let\noitem \itemgroups_start_no_item
- \let\itm \itemgroups_start_do_item
- \let\but \itemgroups_start_button
- \let\nop \itemgroups_start_dummy
- \let\txt \itemgroups_start_text
- \let\head \itemgroups_head
- \let\headsym \itemgroups_start_head_sym
- \let\starthead \startitemgrouphead
+ \let\item \strc_itemgroups_start_do_item
+ \let\noitem \strc_itemgroups_start_no_item
+ \let\itm \strc_itemgroups_start_do_item
+ \let\but \strc_itemgroups_start_button
+ \let\nop \strc_itemgroups_start_dummy
+ \let\txt \strc_itemgroups_start_text
+ \let\head \strc_itemgroups_head
+ \let\headsym \strc_itemgroups_start_head_sym
\let\startitem \startitemgroupitem
\let\stopitem \stopitemgroupitem
\let\starthead \startitemgrouphead
@@ -1362,14 +1362,14 @@
\ifx\currentinterface \v!english \else
\appendtoks
- \expandafter\let\csname\v!item \endcsname\itemgroups_start_do_item
- \expandafter\let\csname\v!sub \endcsname\itemgroups_start_subitem
- \expandafter\let\csname\v!sym \endcsname\itemgroups_start_symbol
- \expandafter\let\csname\v!ran \endcsname\itemgroups_start_edge
- \expandafter\let\csname\v!head \endcsname\itemgroups_head
- \expandafter\let\csname\v!its \endcsname\itemgroups_start_items
- \expandafter\let\csname\v!mar \endcsname\itemgroups_start_margin
- \expandafter\let\csname\v!txt \endcsname\itemgroups_start_text
+ \expandafter\let\csname\v!item \endcsname\strc_itemgroups_start_do_item
+ \expandafter\let\csname\v!sub \endcsname\strc_itemgroups_start_subitem
+ \expandafter\let\csname\v!sym \endcsname\strc_itemgroups_start_symbol
+ \expandafter\let\csname\v!ran \endcsname\strc_itemgroups_start_edge
+ \expandafter\let\csname\v!head \endcsname\strc_itemgroups_head
+ \expandafter\let\csname\v!its \endcsname\strc_itemgroups_start_items
+ \expandafter\let\csname\v!mar \endcsname\strc_itemgroups_start_margin
+ \expandafter\let\csname\v!txt \endcsname\strc_itemgroups_start_text
\expandafter\let\csname\e!start\v!item\endcsname\startitemgroupitem
\expandafter\let\csname\e!stop \v!item\endcsname\stopitemgroupitem
\expandafter\let\csname\e!start\v!head\endcsname\startitemgrouphead
@@ -1401,57 +1401,57 @@
% better collectitems als conditional and a real plugin mechanism (some day)
-\newcount\c_itemgroups_collected_stored
-\newcount\c_itemgroups_collected_done
-\newcount\c_itemgroups_collected_current
+\newcount\c_strc_itemgroups_collected_stored
+\newcount\c_strc_itemgroups_collected_done
+\newcount\c_strc_itemgroups_collected_current
-\@EA\def\@EA\itemgroups_collected_store\@EA#\@EA1\csname\e!stop\v!item\endcsname % use grabuntil
- {\advance\c_itemgroups_collected_stored\plusone
- \setvalue{\??itemgroupstack\number\c_itemgroups_collected_stored}{\startitemgroupitem#1\stopitemgroupitem}}
+\@EA\def\@EA\strc_itemgroups_collected_store\@EA#\@EA1\csname\e!stop\v!item\endcsname % use grabuntil
+ {\advance\c_strc_itemgroups_collected_stored\plusone
+ \setvalue{\??itemgroupstack\number\c_strc_itemgroups_collected_stored}{\startitemgroupitem#1\stopitemgroupitem}}
-\def\itemgroups_collected_flush
- {\ifconditional\c_itemgroups_randomize
- \getrandomcount\c_itemgroups_collected_current\plusone\c_itemgroups_collected_stored
+\def\strc_itemgroups_collected_flush
+ {\ifconditional\c_strc_itemgroups_randomize
+ \getrandomcount\c_strc_itemgroups_collected_current\plusone\c_strc_itemgroups_collected_stored
\else
- \advance\c_itemgroups_collected_current\plusone
+ \advance\c_strc_itemgroups_collected_current\plusone
\fi
- \doifdefined{\??itemgroupstack\number\c_itemgroups_collected_current}
- {\getvalue{\??itemgroupstack\number\c_itemgroups_collected_current}%
- \letbeundefined{\??itemgroupstack\number\c_itemgroups_collected_current}%
- \advance\c_itemgroups_collected_done\plusone}%
- \ifnum\c_itemgroups_collected_done<\c_itemgroups_collected_stored
- \expandafter\itemgroups_collected_flush
+ \doifdefined{\??itemgroupstack\number\c_strc_itemgroups_collected_current}
+ {\getvalue{\??itemgroupstack\number\c_strc_itemgroups_collected_current}%
+ \letbeundefined{\??itemgroupstack\number\c_strc_itemgroups_collected_current}%
+ \advance\c_strc_itemgroups_collected_done\plusone}%
+ \ifnum\c_strc_itemgroups_collected_done<\c_strc_itemgroups_collected_stored
+ \expandafter\strc_itemgroups_collected_flush
\fi}
\unexpanded\def\stopcollectitems
- {\ifconditional\c_itemgroups_randomize
- \c_itemgroups_collected_done \zerocount
- \c_itemgroups_collected_current\zerocount
- \ifnum\c_itemgroups_collected_stored>\zerocount
- \doubleexpandafter\itemgroups_collected_flush
+ {\ifconditional\c_strc_itemgroups_randomize
+ \c_strc_itemgroups_collected_done \zerocount
+ \c_strc_itemgroups_collected_current\zerocount
+ \ifnum\c_strc_itemgroups_collected_stored>\zerocount
+ \doubleexpandafter\strc_itemgroups_collected_flush
\fi
\fi}
\unexpanded\def\startcollectitems
- {\ifconditional\c_itemgroups_randomize
- \c_itemgroups_collected_stored\zerocount
- \letvalue{\e!start\v!item}\itemgroups_collected_store
+ {\ifconditional\c_strc_itemgroups_randomize
+ \c_strc_itemgroups_collected_stored\zerocount
+ \letvalue{\e!start\v!item}\strc_itemgroups_collected_store
\fi}
%D Left-overs:
\unexpanded\def\item
- {\itemgroups_item_alone}
+ {\strc_itemgroups_item_alone}
-\def\itemgroups_item_alone[#category]#text\par
+\def\strc_itemgroups_item_alone[#category]#text\par
{\doifsomethingelse{#category}{\startitemgroup[#category]}{\startitemgroup[\v!itemize]}%
\startitem#text\stopitem
\stopitemgroup}
\unexpanded\def\head
- {\itemgroups_head_alone}
+ {\strc_itemgroups_head_alone}
-\def\itemgroups_head_alone[#category]#head\par#body\par
+\def\strc_itemgroups_head_alone[#category]#head\par#body\par
{\doifsomethingelse{#category}{\startitemgroup[#category]}{\startitemgroup[\v!itemize]}%
\starthead{#head}#body\stophead
\stopitemgroup}
@@ -1510,7 +1510,7 @@
\c!criterium=\v!all, % permits 0 and negative numbers
%\c!option=,
\c!textdistance=\v!big,
- \c!command=\itemgroups_default_command,
+ \c!command=\strc_itemgroups_default_command,
\c!indenting=\v!next,
%\c!alignsymbol=v!no,
\c!symbol=\currentitemlevel,
diff --git a/tex/context/base/strc-mar.mkiv b/tex/context/base/strc-mar.mkiv
index dd18421f7..19fc30c31 100644
--- a/tex/context/base/strc-mar.mkiv
+++ b/tex/context/base/strc-mar.mkiv
@@ -50,19 +50,19 @@
\newtoks \everymarking
-\unexpanded\def\relatemarking {\dodoubleempty \marking_relate }
-\unexpanded\def\setmarking {\dosingleargument\marking_set } \let\marking\setmarking
-\unexpanded\def\resetmarking {\dosingleargument\marking_reset }
-\unexpanded\def\synchronizemarking{\dotripleargument\marking_synchronize}
+\unexpanded\def\relatemarking {\dodoubleempty \strc_markings_relate }
+\unexpanded\def\setmarking {\dosingleargument\strc_markings_set } \let\marking\setmarking
+\unexpanded\def\resetmarking {\dosingleargument\strc_markings_reset }
+\unexpanded\def\synchronizemarking{\dotripleargument\strc_markings_synchronize}
\appendtoks
\ctxcommand{definemarking("\currentmarking",{ parent = "\currentmarkingparent" })}%
\to \everydefinemarking
-\def\marking_relate[#1][#2]%
+\def\strc_markings_relate[#1][#2]%
{\ctxcommand{relatemarking("#1","#2")}}
-\def\marking_set[#1]#2%
+\def\strc_markings_set[#1]#2%
{\ifconditional\inhibitsetmarking
% nothing
\else
@@ -71,17 +71,17 @@
{\ctxcommand{setmarking("#1",\!!bs\detokenize{#2}\!!es)}}%
\fi}
-\def\marking_reset[#1]%
+\def\strc_markings_reset[#1]%
{\ctxcommand{resetmarking("#1")}}
-\def\marking_synchronize[#1][#2][#3]% #1=class #2=boxnumber (some day also name) #3=options, maybe second argument table
+\def\strc_markings_synchronize[#1][#2][#3]% #1=class #2=boxnumber (some day also name) #3=options, maybe second argument table
{\ifvoid#2\else\ctxcommand{synchronizemarking("#1",\number#2,"#3")}\fi}
\def\doifelsemarking#1%
{\ctxcommand{doifelsemarking("#1")}}
% \appendtoks
-% \marking_synchronize[\v!page][\normalpagebox][\v!keep]% keep if no marks
+% \strc_markings_synchronize[\v!page][\normalpagebox][\v!keep]% keep if no marks
% \to \everybeforepagebody
% defaults
@@ -96,15 +96,15 @@
\unexpanded\def\getmarking
{\ifconditional\inhibitgetmarking
- \expandafter\dotripleargument\expandafter\marking_get_nop
+ \expandafter\dotripleargument\expandafter\strc_markings_get_nop
\else
- \expandafter\dotripleargument\expandafter\marking_get_yes
+ \expandafter\dotripleargument\expandafter\strc_markings_get_yes
\fi}
-\def\marking_get_nop[#1][#2][#3]%
+\def\strc_markings_get_nop[#1][#2][#3]%
{}
-\def\marking_get_yes[#1][#2][#3]%
+\def\strc_markings_get_yes[#1][#2][#3]%
{\doif{\namedmarkingparameter{#1}\c!state}\v!start
{\begingroup
\setsystemmode\v!marking
diff --git a/tex/context/base/strc-mat.mkiv b/tex/context/base/strc-mat.mkiv
index 095afb0bb..2f834a790 100644
--- a/tex/context/base/strc-mat.mkiv
+++ b/tex/context/base/strc-mat.mkiv
@@ -519,7 +519,7 @@
\dostoptagged
\dostoptagged
\nonoindentation
- \checknextindentation[\formulaparameter\c!indentnext]%
+ \useindentnextparameter\formulaparameter
\egroup
\hangafter\minusone % added for side floats
\hangindent\zeropoint % added for side floats
@@ -613,7 +613,7 @@
\unexpanded\def\stopsubformulas
{\nonoindentation
- \checknextindentation[\subformulaparameter\c!indentnext]%
+ \useindentnextparameter\subformulaparameter
\the\everyresetformulas % to be checked
\global\setfalse\insidesubformulas
\dorechecknextindentation} % here ?
diff --git a/tex/context/base/strc-not.mkiv b/tex/context/base/strc-not.mkiv
index 6e5e0ad96..0a32cb5e7 100644
--- a/tex/context/base/strc-not.mkiv
+++ b/tex/context/base/strc-not.mkiv
@@ -511,14 +511,14 @@
\newconditional\c_notes_bottom_present
-\def\notes_check_if_bottom_present_indeed
+\def\strc_notes_check_if_bottom_present_indeed
{\ifnum\noteparameter\s!notepos=\plustwo
\settrue\c_notes_bottom_present
\fi}
-\def\notes_check_if_bottom_present
+\def\strc_notes_check_if_bottom_present
{\setfalse\c_notes_bottom_present
- \processnotes{\ifconditional\c_notes_bottom_present\else\notes_check_if_bottom_present_indeed\fi}}
+ \processnotes{\ifconditional\c_notes_bottom_present\else\strc_notes_check_if_bottom_present_indeed\fi}}
% D When \type{n} exceeds~1, footnotes are typeset in
% D multi||columns, using the algoritm presented on page~397
diff --git a/tex/context/base/strc-ref.mkvi b/tex/context/base/strc-ref.mkvi
index 98cb7e46c..ff9ecbaf7 100644
--- a/tex/context/base/strc-ref.mkvi
+++ b/tex/context/base/strc-ref.mkvi
@@ -89,17 +89,17 @@
%D \reference[here]{some text}
%D \stoptyping
-\unexpanded\def\textreference {\dosingleargument\do_text_reference}
-\unexpanded\def\pagereference {\dosingleargument\do_page_reference}
-\unexpanded\def\reference {\dosingleargument\do_full_reference}
-\unexpanded\def\setreference {\dodoubleargument\do_set_reference }
+\unexpanded\def\textreference {\dosingleargument\strc_references_text_reference}
+\unexpanded\def\pagereference {\dosingleargument\strc_references_page_reference}
+\unexpanded\def\reference {\dosingleargument\strc_references_full_reference}
+\unexpanded\def\setreference {\dodoubleargument\strc_references_set_reference }
%D These are implemented in a low level form as:
-\def\do_text_reference [#labels]{\set_named_reference\s!text{#labels}{}}
-\def\do_page_reference [#labels]{\set_named_reference\s!page{#labels}{}{}}
-\def\do_full_reference [#labels]{\set_named_reference\s!full{#labels}{}}
-\def\do_set_reference[#labels][#settings]{\set_named_reference\s!user{#labels}{#settings}{}}
+\def\strc_references_text_reference [#labels]{\strc_references_set_named_reference\s!text{#labels}{}}
+\def\strc_references_page_reference [#labels]{\strc_references_set_named_reference\s!page{#labels}{}{}}
+\def\strc_references_full_reference [#labels]{\strc_references_set_named_reference\s!full{#labels}{}}
+\def\strc_references_set_reference[#labels][#settings]{\strc_references_set_named_reference\s!user{#labels}{#settings}{}}
%D Actually there is not much difference between a text and a
%D full reference, but it's the concept that counts. The low
@@ -116,14 +116,14 @@
\def\dofinishsomereference#kind{\executeifdefined{dofinish#{kind}reference}\gobbletwoarguments}
-\def\set_named_reference
+\def\strc_references_set_named_reference
{\ifreferencing
- \expandafter\set_named_reference_indeed
+ \expandafter\strc_references_set_named_reference_indeed
\else
\expandafter\gobblefourarguments
\fi}
-\def\set_named_reference_indeed#kind#labels#userdata#text% labels userdata text -> todo: userdata
+\def\strc_references_set_named_reference_indeed#kind#labels#userdata#text% labels userdata text -> todo: userdata
{\ifreferencing
% we could have a more efficient one for page references but for the moment
% we don't care too much
@@ -184,7 +184,7 @@
\dontleavehmode\hbox attr \destinationattribute\lastdestinationattribute{}%
\fi}
-\def\set_page_only_destination_attribute#labels% could in fact be fully expandable
+\def\strc_references_set_page_only_destination_attribute#labels% could in fact be fully expandable
{\ifreferencing
\edef\currentreferencelabels{#labels}%
\ifx\currentreferencelabels\empty
@@ -206,8 +206,8 @@
\lastdestinationattribute\attributeunsetvalue
\fi}
-\def\set_page_only_destination_box_attribute#cs#labels%
- {\set_page_only_destination_attribute{#labels}%
+\def\strc_references_set_page_only_destination_box_attribute#cs#labels%
+ {\strc_references_set_page_only_destination_attribute{#labels}%
\ifnum\lastdestinationattribute>\zerocount
\edef#cs{attr \destinationattribute\number\lastdestinationattribute}%
\else
@@ -409,9 +409,9 @@
%D true.
\unexpanded\def\definereference
- {\dodoubleempty\do_define_reference}
+ {\dodoubleempty\strc_references_define_reference}
-\def\do_define_reference[#name][#specification]%
+\def\strc_references_define_reference[#name][#specification]%
{\ctxlua{structures.references.define("\referenceprefix","#name",\!!bs\detokenize{#specification}\!!es)}}
\unexpanded\def\resetreference[#name]%
@@ -626,9 +626,9 @@
\newtoks \everysetupreferencing
\unexpanded\def\setupreferencing
- {\dosingleargument\do_setup_referencing}
+ {\dosingleargument\strc_references_setup_referencing}
-\def\do_setup_referencing[#settings]%
+\def\strc_references_setup_referencing[#settings]%
{\getparameters[\??rf][\c!prefix=\s!unknown,#settings]%
\the\everysetupreferencing}
@@ -730,24 +730,24 @@
%D and~\type{[} becomes active (and when asked for, typeset
%D in a different color and typeface).
-% \unexpanded\def\in {\mathortext\donormalmathin \reference_in}
-% \unexpanded\def\at {\mathortext\donormalmathat \reference_at}
-% \unexpanded\def\about{\mathortext\donormalmathabout\reference_about}
-% \unexpanded\def\from {\mathortext\donormalmathfrom \reference_from}
-% \unexpanded\def\over {\mathortext\donormalmathover \reference_about}
+% \unexpanded\def\in {\mathortext\donormalmathin \strc_references_in}
+% \unexpanded\def\at {\mathortext\donormalmathat \strc_references_at}
+% \unexpanded\def\about{\mathortext\donormalmathabout\strc_references_about}
+% \unexpanded\def\from {\mathortext\donormalmathfrom \strc_references_from}
+% \unexpanded\def\over {\mathortext\donormalmathover \strc_references_about}
-% \definecommand in {\reference_in}
-% \definecommand at {\reference_at}
-% \definecommand about {\reference_about}
-% \definecommand from {\reference_from}
-% \definecommand over {\reference_about} % needed here, else math problems
+% \definecommand in {\strc_references_in}
+% \definecommand at {\strc_references_at}
+% \definecommand about {\strc_references_about}
+% \definecommand from {\strc_references_from}
+% \definecommand over {\strc_references_about} % needed here, else math problems
\appendtoks
- \ifdefined\in \let\normalmathin \in \unexpanded\def\in {\mathortext\normalmathin \reference_in } \else \let\in \reference_in \fi
- \ifdefined\at \let\normalmathat \at \unexpanded\def\at {\mathortext\normalmathat \reference_at } \else \let\at \reference_at \fi
- \ifdefined\about \let\normalmathabout\about \unexpanded\def\about{\mathortext\normalmathabout\reference_about} \else \let\about\reference_about \fi
- \ifdefined\from \let\normalmathfrom \from \unexpanded\def\from {\mathortext\normalmathfrom \reference_from } \else \let\from \reference_from \fi
- \ifdefined\over \let\normalmathover \over \unexpanded\def\over {\mathortext\normalmathover \reference_about} \else \let\over \reference_about \fi
+ \ifdefined\in \let\normalmathin \in \unexpanded\def\in {\mathortext\normalmathin \strc_references_in } \else \let\in \strc_references_in \fi
+ \ifdefined\at \let\normalmathat \at \unexpanded\def\at {\mathortext\normalmathat \strc_references_at } \else \let\at \strc_references_at \fi
+ \ifdefined\about \let\normalmathabout\about \unexpanded\def\about{\mathortext\normalmathabout\strc_references_about} \else \let\about\strc_references_about \fi
+ \ifdefined\from \let\normalmathfrom \from \unexpanded\def\from {\mathortext\normalmathfrom \strc_references_from } \else \let\from \strc_references_from \fi
+ \ifdefined\over \let\normalmathover \over \unexpanded\def\over {\mathortext\normalmathover \strc_references_about} \else \let\over \strc_references_about \fi
\to \everydump
\def\filterreference #key{\ctxcommand{filterreference("#key")}} % no checking, expanded
@@ -764,9 +764,9 @@
%D using \type{\ref}.
\unexpanded\def\getreference % checking, unexpanded
- {\dodoubleargument\do_get_reference}
+ {\dodoubleargument\strc_references_get_reference}
-\def\do_get_reference[#key][#label]% #key = number page title text default realpage ...
+\def\strc_references_get_reference[#key][#label]% #key = number page title text default realpage ...
{\ifsecondargument
\doifreferencefoundelse{#label}{\ctxcommand{filterreference("#key")}}\dummyreference
\else
@@ -777,7 +777,7 @@
%D Special cases:
-\unexpanded\def\reference_about[#label]%
+\unexpanded\def\strc_references_about[#label]%
{\dontleavehmode
\begingroup
\let\crlf\space
@@ -802,18 +802,18 @@
% 2 = before
% 3 = after
-\def\do_by_reference_page_state#unknown#before#current#after%
+\def\strc_references_by_reference_page_state#unknown#before#current#after%
{\ifcase\referencepagestate\relax#unknown\or#current\or#before\or#after\fi}
\unexpanded\def\somewhere#backward#foreward#dummy[#label]% #dummy gobbles space around #foreward
{\doifreferencefoundelse{#label}% usage needs checking (useless)
- {\goto{\do_by_reference_page_state{#label}{#backward}{}{#foreward}}[#label]}
+ {\goto{\strc_references_by_reference_page_state{#label}{#backward}{}{#foreward}}[#label]}
{[#label]}}
\unexpanded\def\atpage[#label]% todo
{\doifreferencefoundelse{#label}% kind of inefficient as \goto also analyzes
{\goto
- {\do_by_reference_page_state
+ {\strc_references_by_reference_page_state
{\labeltexts\v!page\dummyreference}%
{\labeltext\v!hencefore}%
{\labeltexts\v!atpage\currentreferencepage}%
@@ -824,7 +824,7 @@
\unexpanded\def\referencesymbol
{\hbox{\strut\high
{\setupsymbolset[\interactionparameter\c!symbolset]%
- \symbol[\do_by_reference_page_state\v!somewhere\v!nowhere\v!previous\v!next]}}}
+ \symbol[\strc_references_by_reference_page_state\v!somewhere\v!nowhere\v!previous\v!next]}}}
%D The other alternatives just conform their names: only the
%D label, only the text, or the label and the text.
@@ -885,18 +885,18 @@
\glet\rightofreference\relax
\to \everyresetinatreference
-\def\start_goto_reference
+\def\strc_references_start_goto
{\dontleavehmode
\begingroup}
-\def\stop_goto_reference
+\def\strc_references_stop_goto
{\the\everyresetinatreference
\endgroup}
-\def\pickup_goto_reference
- {\dodoublegroupempty\do_pickup_goto_reference}
+\def\strc_references_pickup_goto
+ {\dodoublegroupempty\strc_references_pickup_goto_indeed}
-\def\do_pickup_goto_reference#left#right#dummy[#label]% #dummy gobbles spaces (really needed)
+\def\strc_references_pickup_goto_indeed#left#right#dummy[#label]% #dummy gobbles spaces (really needed)
{\leftreferencetoks
\iffirstargument
{#left}%
@@ -916,10 +916,10 @@
{\goto{\referencesequence}[#label]}
{\let\currentreferencecontent\dummyreference
\goto{\referencesequence}[#label]}%
- \stop_goto_reference}
+ \strc_references_stop_goto}
-\unexpanded\def\reference_in{\start_goto_reference\let\currentreferencecontent\currentreferencedefault\pickup_goto_reference}
-\unexpanded\def\reference_at{\start_goto_reference\let\currentreferencecontent\currentreferencepage \pickup_goto_reference}
+\unexpanded\def\strc_references_in{\strc_references_start_goto\let\currentreferencecontent\currentreferencedefault\strc_references_pickup_goto}
+\unexpanded\def\strc_references_at{\strc_references_start_goto\let\currentreferencecontent\currentreferencepage \strc_references_pickup_goto}
%D \macros
%D {definereferenceformat}
@@ -969,7 +969,7 @@
\installcommandhandler \??referenceformat {referenceformat} \??referenceformat
\appendtoks
- \setuevalue\currentreferenceformat{\execute_reference_format{\currentreferenceformat}}%
+ \setuevalue\currentreferenceformat{\strc_references_apply_format{\currentreferenceformat}}%
\to \everydefinereferenceformat
\setupreferenceformat
@@ -983,8 +983,8 @@
\c!setups=,
\c!color=]
-\unexpanded\def\execute_reference_format#name%
- {\start_goto_reference
+\unexpanded\def\strc_references_apply_format#name%
+ {\strc_references_start_goto
\edef\currentreferenceformat{#name}%
\gdef\leftofreference {\referenceformatparameter\c!left }%
\gdef\rightofreference {\referenceformatparameter\c!right }%
@@ -1025,7 +1025,7 @@
%
\let\leftofreferencecontent \empty
\let\rightofreferencecontent\empty
- \pickup_goto_reference}
+ \strc_references_pickup_goto}
\def\autoreferencelabeltextflag{*} % a proper key like 'auto' or 'name' can clash with a label key
@@ -1317,16 +1317,16 @@
%D specified. This is logical when one keeps in mind that a
%D valid \URL\ can also be a mail address.
-\unexpanded\def\useurl {\doquadrupleempty\do_use_url } % so that they can be used in expanded arguments
-\unexpanded\def\usefile{\dotripleargument\do_use_file} % so that they can be used in expanded arguments
+\unexpanded\def\useurl {\doquadrupleempty\strc_references_use_url } % so that they can be used in expanded arguments
+\unexpanded\def\usefile{\dotripleargument\strc_references_use_file} % so that they can be used in expanded arguments
\let\useURL \useurl
\let\useexternaldocument\usefile
-\def\do_use_url[#label][#url][#file][#description]%
+\def\strc_references_use_url[#label][#url][#file][#description]%
{\ctxcommand{useurl("#label",\!!bs\detokenize{#url}\!!es,\!!bs\detokenize{#file}\!!es,\!!bs\detokenize{#description}\!!es)}}
-\def\do_use_file[#label][#file][#description]%
+\def\strc_references_use_file[#label][#file][#description]%
{\ctxcommand{usefile("#label",\!!bs\detokenize{#file}\!!es,\!!bs\detokenize{#description}\!!es)}}
\def\doifurldefinedelse #label{\ctxcommand{doifurldefinedelse ("#label")}}
@@ -1383,10 +1383,10 @@
%D
%D We keep this for compatibility reasons, hence the hackery.
-\unexpanded\def\reference_from
- {\dosingleempty\do_do_special_from}
+\unexpanded\def\strc_references_from
+ {\dosingleempty\strc_references_do_special_from}
-\def\do_do_special_from[#label]%
+\def\strc_references_do_special_from[#label]%
{\dontleavehmode
\goto{\ctxlua{structures.references.from("#label")}}[fileorurl(#label)]}
@@ -1430,9 +1430,9 @@
{\dodoubleargument\getparameters[\??pr]}
\unexpanded\def\defineprogram
- {\dotripleargument\do_define_program}
+ {\dotripleargument\strc_references_define_program}
-\def\do_define_program[#name][#program][#description]%
+\def\strc_references_define_program[#name][#program][#description]%
{\ctxlua{structures.references.programs.define("#name","#program","#description")}}
\def\program[#name]% incompatible, more consistent, hardy used anyway
@@ -1477,9 +1477,9 @@
%D \showsetup{gotopage}
\unexpanded\def\definepage
- {\dodoubleargument\do_define_page}
+ {\dodoubleargument\strc_references_define_page}
-\def\do_define_page[#name][#target]%
+\def\strc_references_define_page[#name][#target]%
{\definereference[#name][page(#target)]}
\def\gotopage#text[#target]%
@@ -1527,9 +1527,9 @@
%D to, that is, when one clicks on the title.
\def\coupledocument
- {\doquadrupleempty\do_couple_document}
+ {\doquadrupleempty\strc_references_couple_document}
-\def\do_couple_document[#name][#file][#sections][#description]%
+\def\strc_references_couple_document[#name][#file][#sections][#description]%
{\ifthirdargument
% this will be done differently (when it's needed)
\fi}
@@ -1691,9 +1691,9 @@
}}
\unexpanded\def\setupreferencestructureprefix
- {\dotripleempty\do_setup_reference_structure_prefix}
+ {\dotripleempty\strc_references_setup_reference_structure_prefix}
-\def\do_setup_reference_structure_prefix[#kind][#category][#settings]%
+\def\strc_references_setup_reference_structure_prefix[#kind][#category][#settings]%
{\ifthirdargument
\getparameters[\??rf:\c!prefix:#kind:#category][#settings]%
\else\ifsecondargument
diff --git a/tex/context/base/strc-ren.mkiv b/tex/context/base/strc-ren.mkiv
index c08db36d5..ebf5d5bfe 100644
--- a/tex/context/base/strc-ren.mkiv
+++ b/tex/context/base/strc-ren.mkiv
@@ -340,7 +340,7 @@
\egroup
\egroup
\ifconditional\headisdisplay % \ifdisplaysectionhead
- \checknextindentation[\headparameter\c!indentnext]%
+ \useindentnextparameter\headparameter
\else
\nonoindentation % recently added, was a bug
\fi}
diff --git a/tex/context/base/strc-sec.mkiv b/tex/context/base/strc-sec.mkiv
index cac338af6..695a90bc2 100644
--- a/tex/context/base/strc-sec.mkiv
+++ b/tex/context/base/strc-sec.mkiv
@@ -447,8 +447,8 @@
[#3]%
\reportcurrentstructure}
-\unexpanded\def\placeheadtext {\dosingleempty\place_head_text } % use with care
-\unexpanded\def\placeheadnumber{\dosingleempty\place_head_number} % use with care
+\unexpanded\def\placeheadtext {\dosingleempty\strc_sections_place_head_text } % use with care
+\unexpanded\def\placeheadnumber{\dosingleempty\strc_sections_place_head_number} % use with care
\ifdefined\setupheadcomponentfont \else
@@ -460,7 +460,7 @@
\fi
-\def\place_head_text[#1]%
+\def\strc_sections_place_head_text[#1]%
{\dontleavehmode
\begingroup
\edef\currenthead{#1}%
@@ -470,7 +470,7 @@
\endgraf
\endgroup}
-\def\place_head_number[#1]%
+\def\strc_sections_place_head_number[#1]%
{\dontleavehmode
\begingroup
\edef\currenthead{#1}%
@@ -799,20 +799,20 @@
% experimental
-\newconditional\auto_structure_level
+\newconditional\c_strc_sections_auto_levels
\appendtoks
- \settrue\auto_structure_levels
+ \settrue\c_strc_sections_auto_levels
\to \everyenableelements
\def\setautostructurelevel
- {\ifconditional\auto_structure_level
+ {\ifconditional\c_strc_sections_auto_levels
\ctxcommand{autonextstructurelevel(\number\currentheadlevel)}%
- \global\setfalse\auto_structure_level
+ \global\setfalse\c_strc_sections_auto_levels
\fi}
\def\triggerautostructurelevel
- {\global\settrue\auto_structure_level}
+ {\global\settrue\c_strc_sections_auto_levels}
\def\finalizeautostructurelevels
{\ctxcommand{autofinishstructurelevels()}}
diff --git a/tex/context/base/supp-box.mkiv b/tex/context/base/supp-box.mkiv
index 97c93c7bf..0e3f95492 100644
--- a/tex/context/base/supp-box.mkiv
+++ b/tex/context/base/supp-box.mkiv
@@ -104,30 +104,30 @@
\newcount\c_boxes_register
\unexpanded\def\smashbox
- {\afterassignment\boxes_smash_boxes_register\c_boxes_register}
+ {\afterassignment\syst_boxes_smash_boxes_register\c_boxes_register}
-\def\boxes_smash_boxes_register
+\def\syst_boxes_smash_boxes_register
{\wd\c_boxes_register\zeropoint
\ht\c_boxes_register\zeropoint
\dp\c_boxes_register\zeropoint}
\unexpanded\def\hsmashbox
- {\afterassignment\boxes_hsmashed_boxes_register\c_boxes_register}
+ {\afterassignment\syst_boxes_hsmashed_boxes_register\c_boxes_register}
-\def\boxes_hsmashed_boxes_register
+\def\syst_boxes_hsmashed_boxes_register
{\wd\c_boxes_register\zeropoint}
\unexpanded\def\vsmashbox
- {\afterassignment\boxes_vsmashed_boxes_register\c_boxes_register}
+ {\afterassignment\syst_boxes_vsmashed_boxes_register\c_boxes_register}
-\def\boxes_vsmashed_boxes_register
+\def\syst_boxes_vsmashed_boxes_register
{\ht\c_boxes_register\zeropoint
\dp\c_boxes_register\zeropoint}
\unexpanded\def\smashedbox
- {\afterassignment\boxes_smashed_boxes_register\c_boxes_register}
+ {\afterassignment\syst_boxes_smashed_boxes_register\c_boxes_register}
-\unexpanded\def\boxes_smashed_boxes_register
+\unexpanded\def\syst_boxes_smashed_boxes_register
{\wd\c_boxes_register\zeropoint
\ht\c_boxes_register\zeropoint
\dp\c_boxes_register\zeropoint
@@ -142,23 +142,23 @@
%D and smashed alternatives. The later ones reduce all
%D dimensions to zero.
-\unexpanded\def\hsmash {\bgroup\dowithnextboxcs\boxes_hsmashed_nextbox\normalhbox}
-\unexpanded\def\vsmash {\bgroup\dowithnextboxcs\boxes_vsmashed_nextbox\normalvbox}
-\unexpanded\def\hsmashed{\bgroup\dowithnextboxcs\boxes_smashed_nextbox \normalhbox}
-\unexpanded\def\vsmashed{\bgroup\dowithnextboxcs\boxes_smashed_nextbox \normalvbox}
+\unexpanded\def\hsmash {\bgroup\dowithnextboxcs\syst_boxes_hsmashed_nextbox\normalhbox}
+\unexpanded\def\vsmash {\bgroup\dowithnextboxcs\syst_boxes_vsmashed_nextbox\normalvbox}
+\unexpanded\def\hsmashed{\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox \normalhbox}
+\unexpanded\def\vsmashed{\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox \normalvbox}
-\unexpanded\def\boxes_hsmashed_nextbox
+\unexpanded\def\syst_boxes_hsmashed_nextbox
{\wd\nextbox\zeropoint
\box\nextbox
\egroup}
-\unexpanded\def\boxes_vsmashed_nextbox
+\unexpanded\def\syst_boxes_vsmashed_nextbox
{\ht\nextbox\zeropoint
\dp\nextbox\zeropoint
\box\nextbox
\egroup}
-\unexpanded\def\boxes_smashed_nextbox
+\unexpanded\def\syst_boxes_smashed_nextbox
{\ht\nextbox\zeropoint
\dp\nextbox\zeropoint
\wd\nextbox\zeropoint
@@ -175,15 +175,15 @@
%D \smashedvbox to ... {...}
%D \stoptyping
-\unexpanded\def\smashedhbox{\normalhbox\bgroup\dowithnextboxcs\boxes_smashed_nextbox\normalhbox}
-\unexpanded\def\smashedvbox{\normalvbox\bgroup\dowithnextboxcs\boxes_smashed_nextbox\normalvbox}
+\unexpanded\def\smashedhbox{\normalhbox\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox\normalhbox}
+\unexpanded\def\smashedvbox{\normalvbox\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox\normalvbox}
%D First we define a helper. We use a \LUATEX\ feature in order to avoid
%D mathpalettes.
\newcount\c_boxes_math_style
-\unexpanded\def\boxes_math_set_nextbox#1%
+\unexpanded\def\syst_boxes_math_set_nextbox#1%
{\c_boxes_math_style\mathstyle
\setbox\nextbox\normalhbox{$\mathsurround\zeropoint\triggermathstyle\c_boxes_math_style{#1}$}}
@@ -197,58 +197,58 @@
\unexpanded\def\smash
{\begingroup
- \futurelet\nexttoken\boxes_smash}
+ \futurelet\nexttoken\syst_boxes_smash}
-\def\boxes_smash
+\def\syst_boxes_smash
{\ifx\nexttoken[%
- \expandafter\boxes_smash_yes
+ \expandafter\syst_boxes_smash_yes
\else
- \expandafter\boxes_smash_nop
+ \expandafter\syst_boxes_smash_nop
\fi}
-\def\boxes_smash_nop
+\def\syst_boxes_smash_nop
{\edef\m_boxes_smash_options{hd}%
- \futurelet\nexttoken\boxes_smash_indeed}
+ \futurelet\nexttoken\syst_boxes_smash_indeed}
-\def\boxes_smash_yes[#1]%
+\def\syst_boxes_smash_yes[#1]%
{\edef\m_boxes_smash_options{#1}%
- \futurelet\nexttoken\boxes_smash_indeed}
+ \futurelet\nexttoken\syst_boxes_smash_indeed}
-\def\boxes_smash_indeed
+\def\syst_boxes_smash_indeed
{\ifmmode
- \expandafter\boxes_smash_math
+ \expandafter\syst_boxes_smash_math
\else\ifx\nexttoken\bgroup
- \doubleexpandafter\boxes_smash_hbox
+ \doubleexpandafter\syst_boxes_smash_hbox
\else
- \doubleexpandafter\boxes_smash_text
+ \doubleexpandafter\syst_boxes_smash_text
\fi\fi}
-\def\boxes_smash_math#1%
- {\boxes_math_set_nextbox{#1}%
- \boxes_smash_process}
+\def\syst_boxes_smash_math#1%
+ {\syst_boxes_math_set_nextbox{#1}%
+ \syst_boxes_smash_process}
-\def\boxes_smash_hbox
- {\dowithnextboxcs\boxes_smash_process\normalhbox}
+\def\syst_boxes_smash_hbox
+ {\dowithnextboxcs\syst_boxes_smash_process\normalhbox}
-\def\boxes_smash_text#1%
+\def\syst_boxes_smash_text#1%
{\setbox\nextbox\normalhbox{#1}%
- \boxes_smash_process}
+ \syst_boxes_smash_process}
-\def\boxes_smash_process
- {\expandafter\boxes_smash_process_option\m_boxes_smash_options\relax
+\def\syst_boxes_smash_process
+ {\expandafter\syst_boxes_smash_process_option\m_boxes_smash_options\relax
\box\nextbox
\endgroup}
-\def\boxes_s_w{\wd\nextbox\zeropoint}
-\def\boxes_s_h{\ht\nextbox\zeropoint}
-\def\boxes_s_d{\dp\nextbox\zeropoint}
-\def\boxes_s_t{\ht\nextbox\zeropoint}
-\def\boxes_s_b{\dp\nextbox\zeropoint}
+\def\syst_boxes_s_w{\wd\nextbox\zeropoint}
+\def\syst_boxes_s_h{\ht\nextbox\zeropoint}
+\def\syst_boxes_s_d{\dp\nextbox\zeropoint}
+\def\syst_boxes_s_t{\ht\nextbox\zeropoint}
+\def\syst_boxes_s_b{\dp\nextbox\zeropoint}
-\def\boxes_smash_process_option#1%
+\def\syst_boxes_smash_process_option#1%
{\ifx#1\relax\else
\csname boxes_s_#1\endcsname
- \expandafter\boxes_smash_process_option
+ \expandafter\syst_boxes_smash_process_option
\fi}
%D \starttabulate[|l|l|]
@@ -269,50 +269,50 @@
%D thereby \type {\mathchoice}, the next macro looks ugly.
%D We also take care of non||braced arguments.
-\unexpanded\def\phantom {\begingroup\futurelet\nexttoken\boxes_phantom_indeed }
-\unexpanded\def\vphantom{\begingroup\futurelet\nexttoken\boxes_phantom_indeed_v}
-\unexpanded\def\hphantom{\begingroup\futurelet\nexttoken\boxes_phantom_indeed_h}
+\unexpanded\def\phantom {\begingroup\futurelet\nexttoken\syst_boxes_phantom_indeed }
+\unexpanded\def\vphantom{\begingroup\futurelet\nexttoken\syst_boxes_phantom_indeed_v}
+\unexpanded\def\hphantom{\begingroup\futurelet\nexttoken\syst_boxes_phantom_indeed_h}
-\def\boxes_phantom_math #1{\boxes_math_set_nextbox{#1}\boxes_phantom_make }
-\def\boxes_phantom_math_v#1{\boxes_math_set_nextbox{#1}\boxes_phantom_make_v}
-\def\boxes_phantom_math_h#1{\boxes_math_set_nextbox{#1}\boxes_phantom_make_h}
+\def\syst_boxes_phantom_math #1{\syst_boxes_math_set_nextbox{#1}\syst_boxes_phantom_make }
+\def\syst_boxes_phantom_math_v#1{\syst_boxes_math_set_nextbox{#1}\syst_boxes_phantom_make_v}
+\def\syst_boxes_phantom_math_h#1{\syst_boxes_math_set_nextbox{#1}\syst_boxes_phantom_make_h}
-\def\boxes_phantom_hbox {\dowithnextboxcs\boxes_phantom_make \normalhbox} % always hbox
-\def\boxes_phantom_hbox_v{\dowithnextboxcs\boxes_phantom_make_v\normalhbox} % always hbox
-\def\boxes_phantom_hbox_h{\dowithnextboxcs\boxes_phantom_make_h\normalhbox} % always hbox
+\def\syst_boxes_phantom_hbox {\dowithnextboxcs\syst_boxes_phantom_make \normalhbox} % always hbox
+\def\syst_boxes_phantom_hbox_v{\dowithnextboxcs\syst_boxes_phantom_make_v\normalhbox} % always hbox
+\def\syst_boxes_phantom_hbox_h{\dowithnextboxcs\syst_boxes_phantom_make_h\normalhbox} % always hbox
-\def\boxes_phantom_text #1{\setbox\nextbox\normalhbox{#1}\boxes_phantom_make } % always hbox
-\def\boxes_phantom_text_v#1{\setbox\nextbox\normalhbox{#1}\boxes_phantom_make_v} % always hbox
-\def\boxes_phantom_text_h#1{\setbox\nextbox\normalhbox{#1}\boxes_phantom_make_h} % always hbox
+\def\syst_boxes_phantom_text #1{\setbox\nextbox\normalhbox{#1}\syst_boxes_phantom_make } % always hbox
+\def\syst_boxes_phantom_text_v#1{\setbox\nextbox\normalhbox{#1}\syst_boxes_phantom_make_v} % always hbox
+\def\syst_boxes_phantom_text_h#1{\setbox\nextbox\normalhbox{#1}\syst_boxes_phantom_make_h} % always hbox
-\def\boxes_phantom_indeed
+\def\syst_boxes_phantom_indeed
{\ifmmode
- \expandafter\boxes_phantom_math
+ \expandafter\syst_boxes_phantom_math
\else\ifx\nexttoken\bgroup
- \doubleexpandafter\boxes_phantom_hbox
+ \doubleexpandafter\syst_boxes_phantom_hbox
\else
- \doubleexpandafter\boxes_phantom_text
+ \doubleexpandafter\syst_boxes_phantom_text
\fi\fi}
-\def\boxes_phantom_indeed_v
+\def\syst_boxes_phantom_indeed_v
{\ifmmode
- \expandafter\boxes_phantom_math_v
+ \expandafter\syst_boxes_phantom_math_v
\else\ifx\nexttoken\bgroup
- \doubleexpandafter\boxes_phantom_hbox_v
+ \doubleexpandafter\syst_boxes_phantom_hbox_v
\else
- \doubleexpandafter\boxes_phantom_text_v
+ \doubleexpandafter\syst_boxes_phantom_text_v
\fi\fi}
-\def\boxes_phantom_indeed_h
+\def\syst_boxes_phantom_indeed_h
{\ifmmode
- \expandafter\boxes_phantom_math_h
+ \expandafter\syst_boxes_phantom_math_h
\else\ifx\nexttoken\bgroup
- \doubleexpandafter\boxes_phantom_hbox_h
+ \doubleexpandafter\syst_boxes_phantom_hbox_h
\else
- \doubleexpandafter\boxes_phantom_text_h
+ \doubleexpandafter\syst_boxes_phantom_text_h
\fi\fi}
-\def\boxes_phantom_make
+\def\syst_boxes_phantom_make
{\setbox\scratchbox\emptyhbox
\ht\scratchbox\ht\nextbox
\dp\scratchbox\dp\nextbox
@@ -320,14 +320,14 @@
\box\scratchbox
\endgroup}
-\def\boxes_phantom_make_v
+\def\syst_boxes_phantom_make_v
{\setbox\scratchbox\emptyhbox
\ht\scratchbox\ht\nextbox
\dp\scratchbox\dp\nextbox
\box\scratchbox
\endgroup}
-\def\boxes_phantom_make_h
+\def\syst_boxes_phantom_make_h
{\setbox\scratchbox\emptyhbox
\wd\scratchbox\wd\nextbox
\box\scratchbox
@@ -597,45 +597,45 @@
%D the box.
\unexpanded\def\dowithnextbox#1%
- {\def\boxes_with_next_box{#1}%
- \afterassignment\boxes_with_next_box_indeed
+ {\def\syst_boxes_with_next_box{#1}%
+ \afterassignment\syst_boxes_with_next_box_indeed
\setbox\nextbox}
-\def\boxes_with_next_box_indeed
- {\aftergroup\boxes_with_next_box}
+\def\syst_boxes_with_next_box_indeed
+ {\aftergroup\syst_boxes_with_next_box}
\unexpanded\def\dowithnextboxcs#1%
- {\let\boxes_with_next_box#1%
- \afterassignment\boxes_with_next_box_indeed
+ {\let\syst_boxes_with_next_box#1%
+ \afterassignment\syst_boxes_with_next_box_indeed
\setbox\nextbox}
%D So in fact we get:
%D
%D \starttyping
-%D \setbox\nextbox { \aftergroup\boxes_with_next_box ... }
+%D \setbox\nextbox { \aftergroup\syst_boxes_with_next_box ... }
%D \stoptyping
%D
%D or
%D
%D \starttyping
-%D \setbox\nextbox { ... } \boxes_with_next_box
+%D \setbox\nextbox { ... } \syst_boxes_with_next_box
%D \stoptyping
%D
%D A slower but more versatile implementation is:
%D
%D \starttyping
%D \long\def\dowithnextbox#1#2%
-%D {\long\def\boxes_with_next_box{#1}%
+%D {\long\def\syst_boxes_with_next_box{#1}%
%D \ifx#2\normalhbox
-%D \afterassignment\boxes_with_next_box_indeed
+%D \afterassignment\syst_boxes_with_next_box_indeed
%D \else\ifx#2\normalvbox
-%D \afterassignment\boxes_with_next_box_indeed
+%D \afterassignment\syst_boxes_with_next_box_indeed
%D \else\ifx#2\normalvtop
-%D \afterassignment\boxes_with_next_box_indeed
+%D \afterassignment\syst_boxes_with_next_box_indeed
%D \else\ifx#2\normalvcenter
-%D \afterassignment\boxes_with_next_box_indeed
+%D \afterassignment\syst_boxes_with_next_box_indeed
%D \else
-%D \afterassignment\boxes_with_next_box
+%D \afterassignment\syst_boxes_with_next_box
%D \fi\fi\fi\fi
%D \setbox\nextbox#2}
%D \stoptyping
@@ -670,19 +670,19 @@
%D {\em todo: Search source for potential usage!}
\unexpanded\def\dowithnextboxcontent#1#2% inside, after
- {\def\boxes_with_next_box_one{#2}%
- \def\boxes_with_next_box_two{#1}%
- \afterassignment\boxes_with_next_box_content_indeed
+ {\def\syst_boxes_with_next_box_one{#2}%
+ \def\syst_boxes_with_next_box_two{#1}%
+ \afterassignment\syst_boxes_with_next_box_content_indeed
\setbox\nextbox}
\unexpanded\def\dowithnextboxcontentcs#1#2% inside, after
- {\let\boxes_with_next_box_one#2%
- \let\boxes_with_next_box_two#1%
- \afterassignment\boxes_with_next_box_content_indeed
+ {\let\syst_boxes_with_next_box_one#2%
+ \let\syst_boxes_with_next_box_two#1%
+ \afterassignment\syst_boxes_with_next_box_content_indeed
\setbox\nextbox}
-\def\boxes_with_next_box_content_indeed
- {\boxes_with_next_box_two\aftergroup\boxes_with_next_box_one}
+\def\syst_boxes_with_next_box_content_indeed
+ {\syst_boxes_with_next_box_two\aftergroup\syst_boxes_with_next_box_one}
%D \macros
%D {llap, rlap, tlap, blap, clap}
@@ -886,15 +886,15 @@
{\global\setbox\tmpshapebox\vbox{\vskip-\lineheight\unvcopy\oldshapebox}}
\def\dodoreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip
- {\ifnum\lastnodetype=\@@gluenode
+ {\ifnum\lastnodetype=\gluenodecode
\shapeskip\lastskip
\global\setbox\tmpshapebox\normalvbox{#4\unvbox\tmpshapebox}%
\unskip
- \else\ifnum\lastnodetype=\@@kernnode
+ \else\ifnum\lastnodetype=\kernnodecode
\shapekern\lastkern
\global\setbox\tmpshapebox\normalvbox{#3\unvbox\tmpshapebox}%
\unkern
- \else\ifnum\lastnodetype=\@@penaltynode
+ \else\ifnum\lastnodetype=\penaltynodecode
\shapepenalty\lastpenalty
\global\setbox\tmpshapebox\normalvbox{#2\unvbox\tmpshapebox}%
\unpenalty
@@ -1175,16 +1175,16 @@
\forgetall % otherwise indentation and so
\let\limitatetext\firstofthreearguments
\fakecompoundhyphen % dangerous ! ! ! ! ! ! ! ! !
- \dowithnextboxcs\boxes_limitate_text\normalhbox}
+ \dowithnextboxcs\syst_boxes_limitate_text\normalhbox}
-\def\boxes_limitate_text#1% #2
- {\doifelsenothing{#1}\boxes_limitate_text_nop\boxes_limitate_text_yes{#1}} % {#2}
+\def\syst_boxes_limitate_text#1% #2
+ {\doifelsenothing{#1}\syst_boxes_limitate_text_nop\syst_boxes_limitate_text_yes{#1}} % {#2}
-\def\boxes_limitate_text_nop#1#2%
+\def\syst_boxes_limitate_text_nop#1#2%
{\unhbox\nextbox
\egroup}
-\def\boxes_limitate_text_yes#1#2%
+\def\syst_boxes_limitate_text_yes#1#2%
{\nopenalties
\scratchdimen#1\relax
\ifdim\scratchdimen<\zeropoint\relax % we'll take the last line
@@ -1386,9 +1386,9 @@
\unexpanded\def\sbox
{\normalvbox\bgroup
- \dowithnextboxcs\boxes_sbox_finish\normalvbox}
+ \dowithnextboxcs\syst_boxes_sbox_finish\normalvbox}
-\unexpanded\def\boxes_sbox_finish
+\unexpanded\def\syst_boxes_sbox_finish
{\setbox\nextbox\normalhbox
{\strut
\dp\nextbox\zeropoint
@@ -1406,9 +1406,9 @@
\unexpanded\def\struttedbox
{\normalhbox\bgroup
- \dowithnextboxcs\boxes_struttedbox_finish\normalhbox}
+ \dowithnextboxcs\syst_boxes_struttedbox_finish\normalhbox}
-\def\boxes_struttedbox_finish
+\def\syst_boxes_struttedbox_finish
{\ht\nextbox\strutdepth
\ht\nextbox\strutheight
\box\nextbox
@@ -1422,9 +1422,9 @@
%D equals strutdepth.
\unexpanded\def\topskippedbox
- {\normalhbox\bgroup\dowithnextboxcs\boxes_topskippedbox_finish\normalhbox}
+ {\normalhbox\bgroup\dowithnextboxcs\syst_boxes_topskippedbox_finish\normalhbox}
-\def\boxes_topskippedbox_finish
+\def\syst_boxes_topskippedbox_finish
{\edef\m_boxes_tmp{\ifdim\strutdepth=\dp\nextbox\dp\nextbox\the\dp\nextbox\fi}%
\lower\topskip\normalhbox{\raise\strutheight\box\nextbox}%
\m_boxes_tmp
@@ -1862,28 +1862,28 @@
%
% \unexpanded\def\processboxes#1%
% {\bgroup
-% \def\boxes_process_indeed{#1}% #1 can be redefined halfway
+% \def\syst_boxes_process_indeed{#1}% #1 can be redefined halfway
% \setbox\processbox\emptybox
-% \afterassignment\boxes_process
+% \afterassignment\syst_boxes_process
% \let\nexttoken}
%
-% \def\boxes_process
+% \def\syst_boxes_process
% {\ifx\nexttoken\bgroup
-% \expandafter\boxes_process_yes
+% \expandafter\syst_boxes_process_yes
% \else
-% \expandafter\boxes_process_nop
+% \expandafter\syst_boxes_process_nop
% \fi}
%
-% \def\boxes_process_yes
-% {\dowithnextboxcs\boxes_process_content\normalhbox\bgroup}
+% \def\syst_boxes_process_yes
+% {\dowithnextboxcs\syst_boxes_process_content\normalhbox\bgroup}
%
-% \def\boxes_process_content
+% \def\syst_boxes_process_content
% {\removeunwantedspaces
-% \boxes_process_indeed % takes \nextbox makes \processbox
-% \afterassignment\boxes_process
+% \syst_boxes_process_indeed % takes \nextbox makes \processbox
+% \afterassignment\syst_boxes_process
% \let\nexttoken}
%
-% \unexpanded\def\boxes_process_nop
+% \unexpanded\def\syst_boxes_process_nop
% {\removeunwantedspaces
% \box\processbox
% \nexttoken % messy as we are still in the group
@@ -1893,19 +1893,19 @@
\unexpanded\def\processboxes#1%
{\bgroup
- \def\boxes_process_indeed{#1}% #1 can be redefined halfway
+ \def\syst_boxes_process_indeed{#1}% #1 can be redefined halfway
\setbox\processbox\emptybox
- \doifnextbgroupelse\boxes_process_yes\boxes_process_nop}
+ \doifnextbgroupelse\syst_boxes_process_yes\syst_boxes_process_nop}
-\def\boxes_process_yes
- {\dowithnextboxcs\boxes_process_content\normalhbox}
+\def\syst_boxes_process_yes
+ {\dowithnextboxcs\syst_boxes_process_content\normalhbox}
-\def\boxes_process_content
+\def\syst_boxes_process_content
{\removeunwantedspaces
- \boxes_process_indeed % takes \nextbox makes \processbox
- \doifnextbgroupelse\boxes_process_yes\boxes_process_nop}
+ \syst_boxes_process_indeed % takes \nextbox makes \processbox
+ \doifnextbgroupelse\syst_boxes_process_yes\syst_boxes_process_nop}
-\unexpanded\def\boxes_process_nop
+\unexpanded\def\syst_boxes_process_nop
{\removeunwantedspaces
\box\processbox
\egroup}
@@ -1929,7 +1929,7 @@
%D
%D \leavevmode\getbuffer
-\def\boxes_overlay_process
+\def\syst_boxes_overlay_process
{%\removeunwantedspaces % already done
\scratchdepth\dp\ifdim\dp\nextbox>\dp\processbox\nextbox\else\processbox\fi
\ifdim\ht\nextbox>\ht\processbox
@@ -1948,7 +1948,7 @@
\unexpanded\def\startoverlay
{\bgroup
\let\stopoverlay\egroup
- \processboxes\boxes_overlay_process}
+ \processboxes\syst_boxes_overlay_process}
\let\stopoverlay\relax
@@ -1966,9 +1966,9 @@
\unexpanded\def\fakebox
{\bgroup
- \afterassignment\boxes_fakebox_finish\scratchcounter}
+ \afterassignment\syst_boxes_fakebox_finish\scratchcounter}
-\def\boxes_fakebox_finish
+\def\syst_boxes_fakebox_finish
{\setbox\scratchbox\ifhbox\scratchcounter\emptyhbox\else\emptyvbox\fi
\wd\scratchbox\wd\scratchcounter
\ht\scratchbox\ht\scratchcounter
@@ -1992,15 +1992,15 @@
%D middle and right. These box types can be used to typeset
%D paragraphs.
-\def\boxes_lrc_process#1{\bgroup\forgetall\let\\\endgraf#1\let\next}
+\def\syst_boxes_lrc_process#1{\bgroup\forgetall\let\\\endgraf#1\let\next}
-\unexpanded\def\lbox#1#{\normalvbox#1\boxes_lrc_process\raggedleft }
-\unexpanded\def\cbox#1#{\normalvbox#1\boxes_lrc_process\raggedcenter}
-\unexpanded\def\rbox#1#{\normalvbox#1\boxes_lrc_process\raggedright }
+\unexpanded\def\lbox#1#{\normalvbox#1\syst_boxes_lrc_process\raggedleft }
+\unexpanded\def\cbox#1#{\normalvbox#1\syst_boxes_lrc_process\raggedcenter}
+\unexpanded\def\rbox#1#{\normalvbox#1\syst_boxes_lrc_process\raggedright }
-\unexpanded\def\ltop#1#{\normalvtop#1\boxes_lrc_process\raggedleft }
-\unexpanded\def\ctop#1#{\normalvtop#1\boxes_lrc_process\raggedcenter}
-\unexpanded\def\rtop#1#{\normalvtop#1\boxes_lrc_process\raggedright }
+\unexpanded\def\ltop#1#{\normalvtop#1\syst_boxes_lrc_process\raggedleft }
+\unexpanded\def\ctop#1#{\normalvtop#1\syst_boxes_lrc_process\raggedcenter}
+\unexpanded\def\rtop#1#{\normalvtop#1\syst_boxes_lrc_process\raggedright }
%D The alternatives \type {\tbox} and \type {\bbox} can be used
%D to properly align boxes, like in:
@@ -2022,10 +2022,10 @@
%D
%D \getbuffer
-\unexpanded\def\tbox{\normalhbox\bgroup\dowithnextboxcs\boxes_tbox_finish\normalhbox}
-\unexpanded\def\bbox{\normalhbox\bgroup\dowithnextboxcs\boxes_bbox_finish\normalhbox}
+\unexpanded\def\tbox{\normalhbox\bgroup\dowithnextboxcs\syst_boxes_tbox_finish\normalhbox}
+\unexpanded\def\bbox{\normalhbox\bgroup\dowithnextboxcs\syst_boxes_bbox_finish\normalhbox}
-\def\boxes_tbox_finish
+\def\syst_boxes_tbox_finish
{\scratchdepth\dimexpr\ht\nextbox+\dp\nextbox-\ht\strutbox\relax
\ht\nextbox\ht\strutbox
\dp\nextbox\scratchdepth
@@ -2035,7 +2035,7 @@
\box\nextbox
\egroup}
-\def\boxes_bbox_finish
+\def\syst_boxes_bbox_finish
{\scratchheight\dimexpr\ht\nextbox+\dp\nextbox-\dp\strutbox\relax
\dp\nextbox\dp\strutbox
\ht\nextbox\scratchheight
@@ -2164,28 +2164,28 @@
\newdimen\boxhdisplacement
\newdimen\boxvdisplacement
-\unexpanded\def\rightbox {\normalhbox\bgroup\dowithnextboxcs\boxes_rightbox_finish \placedbox}
-\unexpanded\def\leftbox {\normalhbox\bgroup\dowithnextboxcs\boxes_leftbox_finish \placedbox}
-\unexpanded\def\topbox {\normalhbox\bgroup\dowithnextboxcs\boxes_topbox_finish \placedbox}
-\unexpanded\def\bottombox {\normalhbox\bgroup\dowithnextboxcs\boxes_bottombox_finish \placedbox}
-\unexpanded\def\lefttopbox {\normalhbox\bgroup\dowithnextboxcs\boxes_lefttopbox_finish \placedbox}
-\unexpanded\def\righttopbox {\normalhbox\bgroup\dowithnextboxcs\boxes_righttopbox_finish \placedbox}
-\unexpanded\def\leftbottombox {\normalhbox\bgroup\dowithnextboxcs\boxes_leftbottombox_finish \placedbox}
-\unexpanded\def\rightbottombox{\normalhbox\bgroup\dowithnextboxcs\boxes_rightbottombox_finish\placedbox}
+\unexpanded\def\rightbox {\normalhbox\bgroup\dowithnextboxcs\syst_boxes_rightbox_finish \placedbox}
+\unexpanded\def\leftbox {\normalhbox\bgroup\dowithnextboxcs\syst_boxes_leftbox_finish \placedbox}
+\unexpanded\def\topbox {\normalhbox\bgroup\dowithnextboxcs\syst_boxes_topbox_finish \placedbox}
+\unexpanded\def\bottombox {\normalhbox\bgroup\dowithnextboxcs\syst_boxes_bottombox_finish \placedbox}
+\unexpanded\def\lefttopbox {\normalhbox\bgroup\dowithnextboxcs\syst_boxes_lefttopbox_finish \placedbox}
+\unexpanded\def\righttopbox {\normalhbox\bgroup\dowithnextboxcs\syst_boxes_righttopbox_finish \placedbox}
+\unexpanded\def\leftbottombox {\normalhbox\bgroup\dowithnextboxcs\syst_boxes_leftbottombox_finish \placedbox}
+\unexpanded\def\rightbottombox{\normalhbox\bgroup\dowithnextboxcs\syst_boxes_rightbottombox_finish\placedbox}
\let\topleftbox \lefttopbox
\let\toprightbox \righttopbox
\let\bottomleftbox \leftbottombox
\let\bottomrightbox\rightbottombox
-\def\boxes_rightbox_finish
+\def\syst_boxes_rightbox_finish
{\global\boxhdisplacement\boxoffset
\global\boxvdisplacement.5\ht\nextbox
\global\advance\boxvdisplacement-.5\dp\nextbox
\boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box\nextbox
\egroup}
-\def\boxes_rightbox_finish
+\def\syst_boxes_rightbox_finish
{\global\boxhdisplacement-\wd\nextbox
\global\advance\boxhdisplacement-\boxoffset
\global\boxvdisplacement.5\ht\nextbox
@@ -2193,21 +2193,21 @@
\boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box\nextbox
\egroup}
-\def\boxes_topbox_finish
+\def\syst_boxes_topbox_finish
{\global\boxhdisplacement-.5\wd\nextbox
\global\boxvdisplacement-\dp\nextbox
\global\advance\boxvdisplacement-\boxoffset
\boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box\nextbox
\egroup}
-\def\boxes_bottombox_finish
+\def\syst_boxes_bottombox_finish
{\global\boxhdisplacement-.5\wd\nextbox
\global\boxvdisplacement\ht\nextbox
\global\advance\boxvdisplacement\boxoffset
\boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box\nextbox
\egroup}
-\def\boxes_lefttopbox_finish
+\def\syst_boxes_lefttopbox_finish
{\global\boxhdisplacement-\wd\nextbox
\global\advance\boxhdisplacement-\boxoffset
\global\boxvdisplacement-\dp\nextbox
@@ -2215,14 +2215,14 @@
\boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box\nextbox
\egroup}
-\def\boxes_righttopbox_finish
+\def\syst_boxes_righttopbox_finish
{\global\boxhdisplacement\boxoffset
\global\boxvdisplacement-\dp\nextbox
\global\advance\boxvdisplacement-\boxoffset
\boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box\nextbox
\egroup}
-\def\boxes_leftbottombox_finish
+\def\syst_boxes_leftbottombox_finish
{\global\boxhdisplacement-\wd\nextbox
\global\advance\boxhdisplacement-\boxoffset
\global\boxvdisplacement\ht\nextbox
@@ -2230,40 +2230,40 @@
\boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box\nextbox
\egroup}
-\def\boxes_rightbottombox_finish
+\def\syst_boxes_rightbottombox_finish
{\global\boxhdisplacement\boxoffset
\global\boxvdisplacement\ht\nextbox
\global\advance\boxvdisplacement\boxoffset
\boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box\nextbox
\egroup}
-\unexpanded\def\middlebox {\normalhbox\bgroup\dowithnextboxcs\boxes_middlebox_finish \placedbox}
-\unexpanded\def\baselinemiddlebox{\normalhbox\bgroup\dowithnextboxcs\boxes_baselinemiddlebox_finish\placedbox}
-\unexpanded\def\baselineleftbox {\normalhbox\bgroup\dowithnextboxcs\boxes_baselineleftbox_finish \placedbox}
-\unexpanded\def\baselinerightbox {\normalhbox\bgroup\dowithnextboxcs\boxes_baselinerightbox_finish \placedbox}
+\unexpanded\def\middlebox {\normalhbox\bgroup\dowithnextboxcs\syst_boxes_middlebox_finish \placedbox}
+\unexpanded\def\baselinemiddlebox{\normalhbox\bgroup\dowithnextboxcs\syst_boxes_baselinemiddlebox_finish\placedbox}
+\unexpanded\def\baselineleftbox {\normalhbox\bgroup\dowithnextboxcs\syst_boxes_baselineleftbox_finish \placedbox}
+\unexpanded\def\baselinerightbox {\normalhbox\bgroup\dowithnextboxcs\syst_boxes_baselinerightbox_finish \placedbox}
-\def\boxes_middlebox_finish
+\def\syst_boxes_middlebox_finish
{\global\boxhdisplacement-.5\wd\nextbox
\global\boxvdisplacement.5\ht\nextbox
\global\advance\boxvdisplacement-.5\dp\nextbox
\boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box\nextbox
\egroup}
-\def\boxes_baselinemiddlebox_finish
+\def\syst_boxes_baselinemiddlebox_finish
{\global\boxhdisplacement-.5\wd\nextbox
\global\advance\boxhdisplacement-\boxoffset
\global\boxvdisplacement-\boxoffset
\boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box\nextbox
\egroup}
-\def\boxes_baselineleftbox_finish
+\def\syst_boxes_baselineleftbox_finish
{\global\boxhdisplacement-\wd\nextbox
\global\advance\boxhdisplacement-\boxoffset
\global\boxvdisplacement-\boxoffset
\boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box\nextbox
\egroup}
-\def\boxes_baselinerightbox_finish
+\def\syst_boxes_baselinerightbox_finish
{\global\boxhdisplacement\boxoffset
\global\boxvdisplacement-\boxoffset
\boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box\nextbox
@@ -2288,9 +2288,9 @@
%D See core-tbl.tex for an example of its usage:
\unexpanded\def\toplinebox
- {\dowithnextboxcs\boxes_toplinebox_finish\tbox}
+ {\dowithnextboxcs\syst_boxes_toplinebox_finish\tbox}
-\def\boxes_toplinebox_finish
+\def\syst_boxes_toplinebox_finish
{\ifdim\dp\nextbox>\strutdepth
\scratchdimen\dp\nextbox
\advance\scratchdimen-\strutdepth
@@ -2423,20 +2423,20 @@
%D \hsmash{\raisebox{100pt}\normalhbox{test}}
%D \stoptyping
-\unexpanded\def\raisebox#1{\bgroup\afterassignment\boxes_raise_indeed\scratchdimen#1} % so both 10pt and {10pt} is accepted
-\unexpanded\def\lowerbox#1{\bgroup\afterassignment\boxes_lower_indeed\scratchdimen#1} % so both 10pt and {10pt} is accepted
+\unexpanded\def\raisebox#1{\bgroup\afterassignment\syst_boxes_raise_indeed\scratchdimen#1} % so both 10pt and {10pt} is accepted
+\unexpanded\def\lowerbox#1{\bgroup\afterassignment\syst_boxes_lower_indeed\scratchdimen#1} % so both 10pt and {10pt} is accepted
-\def\boxes_raise_indeed{\dowithnextboxcs\boxes_raise_finish}
-\def\boxes_lower_indeed{\dowithnextboxcs\boxes_lower_finish}
+\def\syst_boxes_raise_indeed{\dowithnextboxcs\syst_boxes_raise_finish}
+\def\syst_boxes_lower_indeed{\dowithnextboxcs\syst_boxes_lower_finish}
-\def\boxes_raise_finish#1%
+\def\syst_boxes_raise_finish#1%
{\setbox\nextbox\normalhbox{\raise\scratchdimen\box\nextbox}%
\ht\nextbox\strutht
\dp\nextbox\strutdp
\box\nextbox
\egroup}
-\def\boxes_lower_finish#1%
+\def\syst_boxes_lower_finish#1%
{\setbox\nextbox\normalhbox{\lower\scratchdimen\box\nextbox}%
\ht\nextbox\strutht
\dp\nextbox\strutdp
@@ -2447,9 +2447,9 @@
\unexpanded\def\halfwaybox
{\normalhbox\bgroup
- \dowithnextboxcs\boxes_halfwaybox_finish\normalhbox}
+ \dowithnextboxcs\syst_boxes_halfwaybox_finish\normalhbox}
-\def\boxes_halfwaybox_finish
+\def\syst_boxes_halfwaybox_finish
{\dp\nextbox\zeropoint
\lower.5\ht\nextbox\box\nextbox
\egroup}
@@ -2483,9 +2483,9 @@
\unexpanded\def\vcenter
{\normalvbox\bgroup
- \dowithnextboxcs\boxes_vcenter_finish\normalvbox}
+ \dowithnextboxcs\syst_boxes_vcenter_finish\normalvbox}
-\def\boxes_vcenter_finish
+\def\syst_boxes_vcenter_finish
{\normalhbox{$\verynormalvcenter{\box\nextbox}$}%
\egroup}
@@ -2501,9 +2501,9 @@
\unexpanded\def\frozenhbox
{\normalhbox\bgroup
- \dowithnextboxcs\boxes_frozenhbox_finish\normalhbox}
+ \dowithnextboxcs\syst_boxes_frozenhbox_finish\normalhbox}
-\def\boxes_frozenhbox_finish
+\def\syst_boxes_frozenhbox_finish
{\normalhbox{\normalhbox{\box\nextbox}}%
\egroup}
diff --git a/tex/context/base/supp-vis.mkiv b/tex/context/base/supp-vis.mkiv
index 37a92f24b..1b0253162 100644
--- a/tex/context/base/supp-vis.mkiv
+++ b/tex/context/base/supp-vis.mkiv
@@ -398,9 +398,9 @@
\unexpanded\def\ruledhbox
{\normalhbox\bgroup
- \dowithnextboxcs\ruledhbox_finish\normalhbox}
+ \dowithnextboxcs\supp_visualizers_hbox_finish\normalhbox}
-\def\ruledhbox_finish
+\def\supp_visualizers_hbox_finish
{\makeruledbox\nextbox
\box\nextbox
\egroup}
@@ -420,9 +420,9 @@
\unexpanded\def\ruledvbox
{\normalvbox\bgroup
- \dowithnextboxcs\ruledvbox_finish\normalvbox}
+ \dowithnextboxcs\supp_visualizers_vbox_finish\normalvbox}
-\def\ruledvbox_finish
+\def\supp_visualizers_vbox_finish
{\makeruledbox\nextbox
\box\nextbox
\egroup}
@@ -442,9 +442,9 @@
\unexpanded\def\ruledvtop
{\normalvtop\bgroup
- \dowithnextboxcs\ruledvtop_finish\normalvtop}
+ \dowithnextboxcs\supp_visualizers_vtop_finish\normalvtop}
-\def\ruledvtop_finish
+\def\supp_visualizers_vtop_finish
{\makeruledbox\nextbox
\box\nextbox
\egroup}
@@ -464,9 +464,9 @@
\unexpanded\def\ruledvcenter
{\normalvbox\bgroup
\dontinterfere
- \dowithnextboxcs\ruledvcenter_finish\normalvbox}
+ \dowithnextboxcs\supp_visualizers_vcenter_finish\normalvbox}
-\def\ruledvcenter_finish
+\def\supp_visualizers_vcenter_finish
{\scratchdimen.5\dimexpr\ht\nextbox+\dp\nextbox\relax
\ht\nextbox\scratchdimen
\dp\nextbox\scratchdimen
@@ -499,21 +499,21 @@
%D variant that does not need the~\type{=}, but we stick to:
\unexpanded\def\ruledbox
- {\dowithnextboxcs\ruledbox_finish}
+ {\dowithnextboxcs\supp_visualizers_box_finish}
-\def\ruledbox_finish
+\def\supp_visualizers_box_finish
{\makeruledbox\nextbox\box\nextbox}
% \def\setruledbox#1=%
% {\dowithnextbox{\makeruledbox\nextbox\setbox#1\nextbox}}
\def\setruledbox#1=% not nice, better
- {\afterassignment\setruledbox_indeed\scratchcounter}
+ {\afterassignment\supp_visualizers_setruledbox_indeed\scratchcounter}
-\def\setruledbox_indeed
- {\dowithnextboxcs\setruledbox_finish}
+\def\supp_visualizers_setruledbox_indeed
+ {\dowithnextboxcs\supp_visualizers_setruledbox_finish}
-\def\setruledbox_finish
+\def\supp_visualizers_setruledbox_finish
{\makeruledbox\nextbox
\setbox\scratchcounter\nextbox}
@@ -931,7 +931,7 @@
%D stretch could be drawing the mid line over a length of the
%D stretch, in positive or negative direction.
-\def\ruledhskip_indeed
+\def\supp_visualizers_hskip_indeed
{\relax
\dontinterfere
\dontcomplain
@@ -1000,7 +1000,7 @@
\unexpanded\def\ruledhskip
{\bgroup
- \afterassignment\ruledhskip_indeed
+ \afterassignment\supp_visualizers_hskip_indeed
\scratchskip=}
%D The visual skip is located at a feasible point. Normally
@@ -1183,7 +1183,7 @@
%D visualized a bit different, because we want to see them
%D anyhow.
-\def\ruledhkern_indeed
+\def\supp_visualizers_hkern_indeed
{\dontinterfere
\dontcomplain
\baselinerulefalse
@@ -1230,7 +1230,7 @@
\unexpanded\def\ruledhkern#1%
{\bgroup
\let\afterwards#1%
- \afterassignment\ruledhkern_indeed
+ \afterassignment\supp_visualizers_hkern_indeed
\scratchskip=}
%D After having seen the horizontal ones, the vertical kerns
@@ -1257,7 +1257,7 @@
%D Like before, we have to postpone \type{\prevdepth}. If we
%D leave out this trick, we got ourselves some wrong spacing.
-\def\ruledvkern_finish
+\def\supp_visualizers_vkern_finish
{\nextdepth\prevdepth
\dontinterfere
\dontcomplain
@@ -1305,13 +1305,13 @@
\box0
\prevdepth\nextdepth} % not \dp0=\nextdepth
-\def\ruledvkern_indeed
+\def\supp_visualizers_vkern_indeed
{\ifdim\pagegoal=\maxdimen
\ifinner
- \ruledvkern_finish
+ \supp_visualizers_vkern_finish
\fi
\else
- \ruledvkern_finish
+ \supp_visualizers_vkern_finish
\fi
\afterwards\scratchskip
\egroup}
@@ -1319,7 +1319,7 @@
\unexpanded\def\ruledvkern#1%
{\bgroup
\let\afterwards#1\relax
- \afterassignment\ruledvkern_indeed
+ \afterassignment\supp_visualizers_vkern_indeed
\scratchskip=}
\unexpanded\def\ruledkern
@@ -1360,7 +1360,7 @@
%D
%D \ShowBufferedExample
-\def\ruledhglue_indeed
+\def\supp_visualizers_hglue_indeed
{\leavevmode
\scratchcounter\spacefactor
\visualvrule\!!width\zeropoint
@@ -1371,7 +1371,7 @@
\unexpanded\def\ruledhglue
{\bgroup
- \afterassignment\ruledhglue_indeed\scratchskip=}
+ \afterassignment\supp_visualizers_hglue_indeed\scratchskip=}
%D \startbuffer
%D first line
@@ -1390,7 +1390,7 @@
%D
%D \ShowBufferedExample
-\def\ruledvglue_indeed
+\def\supp_visualizers_vglue_indeed
{\endgraf % \par
\nextdepth\prevdepth
\visualhrule\!!height\zeropoint
@@ -1401,7 +1401,7 @@
\unexpanded\def\ruledvglue
{\bgroup
- \afterassignment\ruledvglue_indeed\scratchskip=}
+ \afterassignment\supp_visualizers_vglue_indeed\scratchskip=}
%D \macros
%D {ruledmkern,ruledmskip}
@@ -1412,7 +1412,7 @@
%D subtle matter, we've used a very simple, not overloaded way
%D to show them.
-\def\ruledmkern_finish#1%
+\def\supp_visualizers_mkern_finish#1%
{\dontinterfere
\dontcomplain
\setbox\boxrulescratchbox\normalhbox
@@ -1460,13 +1460,13 @@
\unexpanded\def\ruledmkern
{\bgroup
- \afterassignment\ruledmkern_indeed
+ \afterassignment\supp_visualizers_mkern_indeed
\scratchmuskip=}
-\def\ruledmkern_indeed
+\def\supp_visualizers_mkern_indeed
{\investigatemuskip\scratchmuskip
\flexiblefalse
- \ruledmkern_finish\normalmkern}
+ \supp_visualizers_mkern_finish\normalmkern}
%D \startbuffer
%D $a \mskip3mu = \mskip3mu
@@ -1477,14 +1477,14 @@
%D
%D \ShowBufferedExample
-\def\ruledmskip_indeed
+\def\supp_visualizers_mskip_indeed
{\investigatemuskip\scratchmuskip
\flexibletrue
- \ruledmkern_finish\normalmskip}
+ \supp_visualizers_mkern_finish\normalmskip}
\unexpanded\def\ruledmskip
{\bgroup
- \afterassignment\ruledmskip_indeed
+ \afterassignment\supp_visualizers_mskip_indeed
\scratchmuskip=}
%D \macros
@@ -1555,7 +1555,7 @@
%D test \ruledhpenalty1000 \ruledhpenalty-1000
%D test
-\def\ruled_penalty_box#1#2#3#4#5#6%
+\def\supp_visualizers_penalty_box#1#2#3#4#5#6%
{\setbox#1\normalhbox
{\ifnum#2=\zerocount \else
\edef\sign{\ifnum#2>\zerocount +\else-\fi}%
@@ -1588,10 +1588,10 @@
\unexpanded\def\ruledhpenalty
{\bgroup
- \afterassignment\ruledhpenalty_indeed
+ \afterassignment\supp_visualizers_hpenalty_indeed
\scratchcounter=}
-\def\ruledhpenalty_indeed
+\def\supp_visualizers_hpenalty_indeed
{\dontinterfere
\dontcomplain
\investigatecount\scratchcounter
@@ -1603,7 +1603,7 @@
\!!depth8\testrulewidth
\!!width\ifzero\zeropoint\else4\testrulewidth\fi
\ifpositive\else\normalhss\fi}%
- \ruled_penalty_box{2}{\scratchcounter}{0}{8}{-3.5}{4.5}%
+ \supp_visualizers_penalty_box{2}{\scratchcounter}{0}{8}{-3.5}{4.5}%
\normalpenalty\plustenthousand
\setbox0\normalhbox
{\normalhskip-4\testrulewidth
@@ -1638,10 +1638,10 @@
\unexpanded\def\ruledvpenalty
{\bgroup
- \afterassignment\ruledvpenalty_indeed
+ \afterassignment\supp_visualizers_vpenalty_indeed
\scratchcounter=}
-\def\ruledvpenalty_indeed
+\def\supp_visualizers_vpenalty_indeed
{\ifdim\pagegoal=\maxdimen \else
\nextdepth\prevdepth
\dontinterfere
@@ -1658,7 +1658,7 @@
\!!height\ifnegative.5\else4\fi\testrulewidth
\!!dept \ifpositive.5\else4\fi\testrulewidth
\!!width 8\testrulewidth}%
- \ruled_penalty_box{2}{\scratchcounter}{4}{4}{.5}{.5}%
+ \supp_visualizers_penalty_box{2}{\scratchcounter}{4}{4}{.5}{.5}%
\setbox0\normalhbox
{\normalhskip-4\testrulewidth
\ifnegative
diff --git a/tex/context/base/symb-ini.mkiv b/tex/context/base/symb-ini.mkiv
index 0285a5641..7e5f34b2e 100644
--- a/tex/context/base/symb-ini.mkiv
+++ b/tex/context/base/symb-ini.mkiv
@@ -46,11 +46,11 @@
\installcorenamespace{symbol}
\installcorenamespace{symbolset}
-\newtoks\t_symbols_setups
+\newtoks\t_symb_setups
-\let\m_symbols_current_set\empty
+\let\m_symb_current_set\empty
-\newconditional\c_symbols_found
+\newconditional\c_symb_found
\newtoks\everysymbol
@@ -58,15 +58,15 @@
%D subsystem for resolving values.
\unexpanded\def\definesymbol
- {\dotripleempty\symbols_define}
+ {\dotripleempty\symb_define}
-\def\symbols_define[#1][#2][#3]% class name meaning
+\def\symb_define[#1][#2][#3]% class name meaning
{\ifthirdargument
\setvalue{\??symbol#1:#2}{#3}%
\doifsomething{#1}{\addvalue{\??symbolset#1}{#2}}%
\else
- \setvalue{\??symbol\m_symbols_current_set:#1}{#2}%
- \addvalue{\??symbolset\m_symbols_current_set}{#1}%
+ \setvalue{\??symbol\m_symb_current_set:#1}{#2}%
+ \addvalue{\??symbolset\m_symb_current_set}{#1}%
\fi}
\letvalue{\??symbolset}\empty
@@ -88,39 +88,39 @@
% Test test \symbol{whatever} test \symbol{whatever}.
\unexpanded\def\symbol % This one always gobbles spaces,
- {\dodoubleempty\symbols_place} % so never change it again!
+ {\dodoubleempty\symb_place} % so never change it again!
-\def\symbols_place % so we also handle \symbol{name}
+\def\symb_place % so we also handle \symbol{name}
{\iffirstargument % which is nicer with following spaces
- \expandafter\symbols_place_normal
+ \expandafter\symb_place_normal
\else
- \expandafter\symbols_place_special
+ \expandafter\symb_place_special
\fi}
-\def\symbols_place_normal[#1][#2]%
- {\setfalse\c_symbols_found
+\def\symb_place_normal[#1][#2]%
+ {\setfalse\c_symb_found
\ifsecondargument
\edef\currentsymbol{#2}%
\ifcsname\??symbol#1:#2\endcsname
- \symbols_place_indeed{#1:#2}%
+ \symb_place_indeed{#1:#2}%
\fi
\else
\edef\currentsymbol{#1}%
\fi
- \ifconditional\c_symbols_found \else
- \the\t_symbols_setups
- \ifconditional\c_symbols_found \else
- \symbols_place_retry\currentsymbol
+ \ifconditional\c_symb_found \else
+ \the\t_symb_setups
+ \ifconditional\c_symb_found \else
+ \symb_place_retry\currentsymbol
\fi
\fi}
-\def\symbols_place_special[#1][#2]#3%
+\def\symb_place_special[#1][#2]#3%
{\firstargumenttrue
\secondargumentfalse
- \symbols_place_normal[#3][]}
+ \symb_place_normal[#3][]}
-\def\symbols_place_indeed#1% \relax's prevent lookahead problems
- {\settrue\c_symbols_found
+\def\symb_place_indeed#1% \relax's prevent lookahead problems
+ {\settrue\c_symb_found
\begingroup
\the\everysymbol
\csname\??symbol#1\endcsname\relax
@@ -131,21 +131,21 @@
\def\directsymbol#1#2% no \relax, there can be an argument, see lists
{\csname\??symbol\ifcsname\??symbol#1:#2\endcsname#1:#2\fi\endcsname}
-\def\symbols_fetch
- {\ifconditional\c_symbols_found
+\def\symb_fetch
+ {\ifconditional\c_symb_found
\expandafter\gobbleoneargument
\else
- \expandafter\symbols_fetch_indeed
+ \expandafter\symb_fetch_indeed
\fi}
-\def\symbols_fetch_indeed#1%
+\def\symb_fetch_indeed#1%
{\ifcsname\??symbol#1:\currentsymbol\endcsname
- \symbols_place_indeed{#1:\currentsymbol}%
+ \symb_place_indeed{#1:\currentsymbol}%
\fi}
-\def\symbols_place_retry#1%
+\def\symb_place_retry#1%
{\ifcsname\??symbol:#1\endcsname
- \symbols_place_indeed{:#1}%
+ \symb_place_indeed{:#1}%
\else
#1%
\fi}
@@ -164,22 +164,22 @@
\def\defaultsymbolheight{1.25ex}
\unexpanded\def\figuresymbol
- {\dodoubleempty\symbols_figure}
+ {\dodoubleempty\symb_figure}
\ifdefined\externalfigure \else \def\externalfigure[#1][#2]{#1} \fi
\ifdefined\resetexternalfigures \else \let\resetexternalfigures\relax \fi
-\def\symbols_figure[#1][% #2]%
+\def\symb_figure[#1][% #2]%
{\externalfigure[#1][\c!reset=\v!yes,\c!symbol=\v!yes,\c!height=\defaultsymbolheight,}% #2]}
\appendtoks \resetexternalfigures \to \everysymbol
\unexpanded\def\definefiguresymbol
- {\dotripleempty\symbols_figure_define}
+ {\dotripleempty\symb_figure_define}
-\def\symbols_figure_define[#1][#2][#3]%
+\def\symb_figure_define[#1][#2][#3]%
{\ifsecondargument
- \definesymbol[#1][{\symbols_figure[#2][#3]}]%
+ \definesymbol[#1][{\symb_figure[#2][#3]}]%
\fi}
%D \macros
@@ -187,30 +187,30 @@
%D
%D A handy private one:
-\def\symbols_fetch_first
- {\ifconditional\c_symbols_found
+\def\symb_fetch_first
+ {\ifconditional\c_symb_found
\expandafter\gobbleoneargument
\else
- \expandafter\symbols_fetch_first_indeed
+ \expandafter\symb_fetch_first_indeed
\fi}
-\def\symbols_fetch_first_indeed#1%
- {\doifinsymbolset{#1}\currentsymbol{\settrue\c_symbols_found}}
+\def\symb_fetch_first_indeed#1%
+ {\doifinsymbolset{#1}\currentsymbol{\settrue\c_symb_found}}
-\def\symbols_fetch_second#1%
- {\doifinsymbolset\empty\currentsymbol{\settrue\c_symbols_found}}
+\def\symb_fetch_second#1%
+ {\doifinsymbolset\empty\currentsymbol{\settrue\c_symb_found}}
\def\doifsymboldefinedelse#1%
{\begingroup
\edef\currentsymbol{#1}%
- \let\symbols_fetch\symbols_fetch_first
- \setfalse\c_symbols_found
- \the\t_symbols_setups
- \ifconditional\c_symbols_found
+ \let\symb_fetch\symb_fetch_first
+ \setfalse\c_symb_found
+ \the\t_symb_setups
+ \ifconditional\c_symb_found
\endgroup\expandafter\firstoftwoarguments
\else
- \symbols_fetch_second\currentsymbol
- \ifconditional\c_symbols_found
+ \symb_fetch_second\currentsymbol
+ \ifconditional\c_symb_found
\endgroup\doubleexpandafter\firstoftwoarguments
\else
\endgroup\doubleexpandafter\secondoftwoarguments
@@ -248,20 +248,20 @@
%D \showsetup{startsymbolset}
\unexpanded\def\startsymbolset[#1]%
- {\pushmacro\m_symbols_current_set
- \def\m_symbols_current_set{#1}}
+ {\pushmacro\m_symb_current_set
+ \def\m_symb_current_set{#1}}
\unexpanded\def\stopsymbolset
- {\popmacro\m_symbols_current_set}
+ {\popmacro\m_symb_current_set}
\unexpanded\def\setupsymbolset[#1]%
- {\prependtoksonce\symbols_fetch{#1}\to\t_symbols_setups}
+ {\prependtoksonce\symb_fetch{#1}\to\t_symb_setups}
\unexpanded\def\resetsymbolset
- {\t_symbols_setups\emptytoks}
+ {\t_symb_setups\emptytoks}
\unexpanded\def\forcesymbolset[#1]%
- {\t_symbols_setups{\symbols_fetch{#1}}}
+ {\t_symb_setups{\symb_fetch{#1}}}
%D \macros
%D {showsymbolset}
diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv
index bb2423e5d..4c02939ad 100644
--- a/tex/context/base/syst-aux.mkiv
+++ b/tex/context/base/syst-aux.mkiv
@@ -246,16 +246,16 @@
{\let\charactertoken=#1% = needed here
\def\!!stringa{#2}%
\def\!!stringb{#3}%
- \futurelet\nexttoken\inspect_next_character}
+ \futurelet\nexttoken\syst_helpers_inspect_next_character}
-\def\inspect_next_character
+\def\syst_helpers_inspect_next_character
{\ifx\nexttoken\blankspace
- \expandafter\reinspect_next_character
+ \expandafter\syst_helpers_reinspect_next_character
\else
- \expandafter\inspect_next_character_indeed
+ \expandafter\syst_helpers_inspect_next_character_indeed
\fi}
-\def\inspect_next_character_indeed
+\def\syst_helpers_inspect_next_character_indeed
{\ifx\nexttoken\charactertoken
\expandafter\!!stringa
\else
@@ -280,95 +280,95 @@
\newif\if_next_blank_space_token
-\let\next_optional_character_token=[
+\let\syst_helpers_next_optional_character_token=[
\unexpanded\def\doifnextoptionalelse#1#2%
- {\def\next_optional_command_yes{#1}%
- \def\next_optional_command_nop{#2}%
+ {\def\syst_helpers_next_optional_command_yes{#1}%
+ \def\syst_helpers_next_optional_command_nop{#2}%
\let\if_next_blank_space_token\iffalse
- \futurelet\nexttoken\inspect_next_optional_character}
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
\unexpanded\def\doifnextoptionalcselse#1#2% \cs \cs (upto 10% faster)
- {\let\next_optional_command_yes#1%
- \let\next_optional_command_nop#2%
+ {\let\syst_helpers_next_optional_command_yes#1%
+ \let\syst_helpers_next_optional_command_nop#2%
\let\if_next_blank_space_token\iffalse
- \futurelet\nexttoken\inspect_next_optional_character}
+ \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\inspect_next_optional_character
+\def\syst_helpers_inspect_next_optional_character
{\ifx\nexttoken\blankspace
- \expandafter\reinspect_next_optional_character
+ \expandafter\syst_helpers_reinspect_next_optional_character
\else
- \expandafter\inspect_next_optional_character_indeed
+ \expandafter\syst_helpers_inspect_next_optional_character_indeed
\fi}
-\def\inspect_next_optional_character_indeed
- {\ifx\nexttoken\next_optional_character_token
- \expandafter\next_optional_command_yes
+\def\syst_helpers_inspect_next_optional_character_indeed
+ {\ifx\nexttoken\syst_helpers_next_optional_character_token
+ \expandafter\syst_helpers_next_optional_command_yes
\else
- \expandafter\next_optional_command_nop
+ \expandafter\syst_helpers_next_optional_command_nop
\fi}
-\let\next_bgroup_character_token\bgroup
+\let\syst_helpers_next_bgroup_character_token\bgroup
\unexpanded\def\doifnextbgroupelse#1#2%
- {\def\next_bgroup_command_yes{#1}%
- \def\next_bgroup_command_nop{#2}%
+ {\def\syst_helpers_next_bgroup_command_yes{#1}%
+ \def\syst_helpers_next_bgroup_command_nop{#2}%
\let\if_next_blank_space_token\iffalse
- \futurelet\nexttoken\inspect_next_bgroup_character}
+ \futurelet\nexttoken\syst_helpers_inspect_next_bgroup_character}
-\def\inspect_next_bgroup_character
+\def\syst_helpers_inspect_next_bgroup_character
{\ifx\nexttoken\blankspace
- \expandafter\reinspect_next_bgroup_character
+ \expandafter\syst_helpers_reinspect_next_bgroup_character
\else
- \expandafter\inspect_next_bgroup_character_indeed
+ \expandafter\syst_helpers_inspect_next_bgroup_character_indeed
\fi}
-\def\inspect_next_bgroup_character_indeed
- {\ifx\nexttoken\next_bgroup_character_token
- \expandafter\next_bgroup_command_yes
+\def\syst_helpers_inspect_next_bgroup_character_indeed
+ {\ifx\nexttoken\syst_helpers_next_bgroup_character_token
+ \expandafter\syst_helpers_next_bgroup_command_yes
\else
- \expandafter\next_bgroup_command_nop
+ \expandafter\syst_helpers_next_bgroup_command_nop
\fi}
-\let\next_parenthesis_character_token(
+\let\syst_helpers_next_parenthesis_character_token(
\unexpanded\def\doifnextparenthesiselse#1#2%
- {\def\next_parenthesis_command_yes{#1}%
- \def\next_parenthesis_command_nop{#2}%
+ {\def\syst_helpers_next_parenthesis_command_yes{#1}%
+ \def\syst_helpers_next_parenthesis_command_nop{#2}%
\let\if_next_blank_space_token\iffalse
- \futurelet\nexttoken\inspect_next_parenthesis_character}
+ \futurelet\nexttoken\syst_helpers_inspect_next_parenthesis_character}
-\def\inspect_next_parenthesis_character
+\def\syst_helpers_inspect_next_parenthesis_character
{\ifx\nexttoken\blankspace
- \expandafter\reinspect_next_parenthesis_character
+ \expandafter\syst_helpers_reinspect_next_parenthesis_character
\else
- \expandafter\inspect_next_parenthesis_character_indeed
+ \expandafter\syst_helpers_inspect_next_parenthesis_character_indeed
\fi}
-\def\inspect_next_parenthesis_character_indeed
- {\ifx\nexttoken\next_parenthesis_character_token
- \expandafter\next_parenthesis_command_yes
+\def\syst_helpers_inspect_next_parenthesis_character_indeed
+ {\ifx\nexttoken\syst_helpers_next_parenthesis_character_token
+ \expandafter\syst_helpers_next_parenthesis_command_yes
\else
- \expandafter\next_parenthesis_command_nop
+ \expandafter\syst_helpers_next_parenthesis_command_nop
\fi}
%D The next one is handy in predictable situations:
\unexpanded\def\doiffastoptionalcheckelse#1#2%
- {\def\next_optional_command_yes{#1}%
- \def\next_optional_command_nop{#2}%
- \futurelet\nexttoken\do_if_fast_optional_check_else}
+ {\def\syst_helpers_next_optional_command_yes{#1}%
+ \def\syst_helpers_next_optional_command_nop{#2}%
+ \futurelet\nexttoken\syst_helpers_do_if_fast_optional_check_else}
\unexpanded\def\doiffastoptionalcheckcselse#1#2% \cs \cs
- {\let\next_optional_command_yes#1%
- \let\next_optional_command_nop#2%
- \futurelet\nexttoken\do_if_fast_optional_check_else}
+ {\let\syst_helpers_next_optional_command_yes#1%
+ \let\syst_helpers_next_optional_command_nop#2%
+ \futurelet\nexttoken\syst_helpers_do_if_fast_optional_check_else}
-\def\do_if_fast_optional_check_else
- {\ifx\nexttoken\next_optional_character_token
- \expandafter\next_optional_command_yes
+\def\syst_helpers_do_if_fast_optional_check_else
+ {\ifx\nexttoken\syst_helpers_next_optional_character_token
+ \expandafter\syst_helpers_next_optional_command_yes
\else
- \expandafter\next_optional_command_nop
+ \expandafter\syst_helpers_next_optional_command_nop
\fi}
%D This macro uses some auxiliary macros. Although we were able
@@ -386,23 +386,23 @@
%D \type{\:} becomes a delimiter of the longer named
%D \type{\reinspectnextcharacter}.
-% try: \expandafter\def\firstofoneargument{\reinspect_next_character} {...}
+% try: \expandafter\def\firstofoneargument{\syst_helpers_reinspect_next_character} {...}
\let\next\:
\def\:{\let\blankspace= } \:
-\def\:{\reinspect_next_character}
-\expandafter\def\: {\let\if_next_blank_space_token\iftrue\futurelet\nexttoken\inspect_next_character}
+\def\:{\syst_helpers_reinspect_next_character}
+\expandafter\def\: {\let\if_next_blank_space_token\iftrue\futurelet\nexttoken\syst_helpers_inspect_next_character}
-\def\:{\reinspect_next_optional_character}
-\expandafter\def\: {\let\if_next_blank_space_token\iftrue\futurelet\nexttoken\inspect_next_optional_character}
+\def\:{\syst_helpers_reinspect_next_optional_character}
+\expandafter\def\: {\let\if_next_blank_space_token\iftrue\futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\def\:{\reinspect_next_bgroup_character}
-\expandafter\def\: {\let\if_next_blank_space_token\iftrue\futurelet\nexttoken\inspect_next_bgroup_character}
+\def\:{\syst_helpers_reinspect_next_bgroup_character}
+\expandafter\def\: {\let\if_next_blank_space_token\iftrue\futurelet\nexttoken\syst_helpers_inspect_next_bgroup_character}
-\def\:{\reinspect_next_parenthesis_character}
-\expandafter\def\: {\let\if_next_blank_space_token\iftrue\futurelet\nexttoken\inspect_next_parenthesis_character}
+\def\:{\syst_helpers_reinspect_next_parenthesis_character}
+\expandafter\def\: {\let\if_next_blank_space_token\iftrue\futurelet\nexttoken\syst_helpers_inspect_next_parenthesis_character}
\let\:\next
@@ -547,14 +547,14 @@
\unexpanded\def\doifalldefinedelse#1%
{\begingroup
\donetrue % we could use a reserved one and avoid the group
- \processcommalist[#1]\do_if_all_defined_else
+ \processcommalist[#1]\syst_helpers_do_if_all_defined_else
\ifdone
\endgroup\expandafter\firstoftwoarguments
\else
\endgroup\expandafter\secondoftwoarguments
\fi}
-\def\do_if_all_defined_else#1%
+\def\syst_helpers_do_if_all_defined_else#1%
{\ifcsname#1\endcsname\else
\donefalse
\expandafter\quitcommalist % added
@@ -683,30 +683,30 @@
% !5yes=\doifnotinset{}{}{yes}
% !6yes=\doifnotinset{aaa}{}{yes}
-\def\right_optional_bracket{]}
+\def\v_syst_helpers_right_optional_bracket{]}
-\def\do_quit_if_item_in_set_else#1],\relax{\firstoftwoarguments}
-\def\do_quit_if_item_in_set #1],\relax{\firstofoneargument}
-\def\do_quit_if_item_not_in_set #1],\relax{\gobbleoneargument}
+\def\syst_helpers_do_quit_if_item_in_set_else#1],\relax{\firstoftwoarguments}
+\def\syst_helpers_do_quit_if_item_in_set #1],\relax{\firstofoneargument}
+\def\syst_helpers_do_quit_if_item_not_in_set #1],\relax{\gobbleoneargument}
-\def\re_do_if_in_set_else{\expandafter\do_check_if_item_in_set_else\!!stringb,],\relax}
-\def\re_do_if_in_set {\expandafter\do_check_if_item_in_set \!!stringb,],\relax}
-\def\re_do_if_not_in_set {\expandafter\do_check_if_item_not_in_set \!!stringb,],\relax}
+\def\syst_helpers_re_do_if_in_set_else{\expandafter\syst_helpers_do_check_if_item_in_set_else\!!stringb,],\relax}
+\def\syst_helpers_re_do_if_in_set {\expandafter\syst_helpers_do_check_if_item_in_set \!!stringb,],\relax}
+\def\syst_helpers_re_do_if_not_in_set {\expandafter\syst_helpers_do_check_if_item_not_in_set \!!stringb,],\relax}
\unexpanded\def\doifinsetelse#1% make this two step too
{\edef\!!stringa{#1}%
\ifx\!!stringa\empty
\expandafter\thirdofthreearguments
\else
- \expandafter\do_if_in_set_else
+ \expandafter\syst_helpers_do_if_in_set_else
\fi}
-\def\do_if_in_set_else#1%
+\def\syst_helpers_do_if_in_set_else#1%
{\edef\!!stringb{#1}%
\ifx\!!stringb\empty
\expandafter\secondoftwoarguments
\else
- \expandafter\re_do_if_in_set_else
+ \expandafter\syst_helpers_re_do_if_in_set_else
\fi}
\unexpanded\def\doifinset#1%
@@ -714,15 +714,15 @@
\ifx\!!stringa\empty
\expandafter\gobbletwoarguments
\else
- \expandafter\do_if_in_set
+ \expandafter\syst_helpers_do_if_in_set
\fi}
-\def\do_if_in_set#1%
+\def\syst_helpers_do_if_in_set#1%
{\edef\!!stringb{#1}%
\ifx\!!stringb\empty
\expandafter\gobbleoneargument
\else
- \expandafter\re_do_if_in_set
+ \expandafter\syst_helpers_re_do_if_in_set
\fi}
\unexpanded\def\doifnotinset#1%
@@ -730,81 +730,81 @@
\ifx\!!stringa\empty
\expandafter\secondoftwoarguments
\else
- \expandafter\do_if_not_in_set
+ \expandafter\syst_helpers_do_if_not_in_set
\fi}
-\def\do_if_not_in_set#1%
+\def\syst_helpers_do_if_not_in_set#1%
{\edef\!!stringb{#1}%
\ifx\!!stringb\empty
\expandafter\firstofoneargument
\else
- \expandafter\re_do_if_not_in_set % ...]{true}
+ \expandafter\syst_helpers_re_do_if_not_in_set % ...]{true}
\fi}
-\def\do_check_if_item_in_set_else#1,#2% #2 eats up preceding space
+\def\syst_helpers_do_check_if_item_in_set_else#1,#2% #2 eats up preceding space
{\edef\!!stringb{#1}%
\ifx\!!stringb\empty
- \expandafter\do_check_if_item_in_set_else
+ \expandafter\syst_helpers_do_check_if_item_in_set_else
\else
- \expandafter\do_do_check_if_item_in_set_else
+ \expandafter\syst_helpers_do_do_check_if_item_in_set_else
\fi#2}
-\def\do_do_check_if_item_in_set_else
- {\ifx\!!stringb\right_optional_bracket
+\def\syst_helpers_do_do_check_if_item_in_set_else
+ {\ifx\!!stringb\v_syst_helpers_right_optional_bracket
\expandafter\thirdofthreearguments
\else
- \expandafter\do_do_do_check_if_item_in_set_else
+ \expandafter\syst_helpers_do_do_do_check_if_item_in_set_else
\fi}
-\def\do_do_do_check_if_item_in_set_else
+\def\syst_helpers_do_do_do_check_if_item_in_set_else
{\ifx\!!stringa\!!stringb
- \expandafter\do_quit_if_item_in_set_else
+ \expandafter\syst_helpers_do_quit_if_item_in_set_else
\else
- \expandafter\do_check_if_item_in_set_else
+ \expandafter\syst_helpers_do_check_if_item_in_set_else
\fi}
-\def\do_check_if_item_in_set#1,#2% #2 eats up preceding space
+\def\syst_helpers_do_check_if_item_in_set#1,#2% #2 eats up preceding space
{\edef\!!stringb{#1}%
\ifx\!!stringb\empty
- \expandafter\do_check_if_item_in_set
+ \expandafter\syst_helpers_do_check_if_item_in_set
\else
- \expandafter\do_do_check_if_item_in_set
+ \expandafter\syst_helpers_do_do_check_if_item_in_set
\fi#2}
-\def\do_do_check_if_item_in_set
- {\ifx\!!stringb\right_optional_bracket
+\def\syst_helpers_do_do_check_if_item_in_set
+ {\ifx\!!stringb\v_syst_helpers_right_optional_bracket
\expandafter\gobbletwoarguments
\else
- \expandafter\do_do_do_check_if_item_in_set
+ \expandafter\syst_helpers_do_do_do_check_if_item_in_set
\fi}
-\def\do_do_do_check_if_item_in_set
+\def\syst_helpers_do_do_do_check_if_item_in_set
{\ifx\!!stringa\!!stringb
- \expandafter\do_quit_if_item_in_set
+ \expandafter\syst_helpers_do_quit_if_item_in_set
\else
- \expandafter\do_check_if_item_in_set
+ \expandafter\syst_helpers_do_check_if_item_in_set
\fi}
-\def\do_check_if_item_not_in_set#1,#2% #2 eats up preceding space
+\def\syst_helpers_do_check_if_item_not_in_set#1,#2% #2 eats up preceding space
{\edef\!!stringb{#1}%
\ifx\!!stringb\empty
- \expandafter\do_check_if_item_not_in_set
+ \expandafter\syst_helpers_do_check_if_item_not_in_set
\else
- \expandafter\do_do_check_if_item_not_in_set
+ \expandafter\syst_helpers_do_do_check_if_item_not_in_set
\fi#2}
-\def\do_do_check_if_item_not_in_set
- {\ifx\!!stringb\right_optional_bracket
+\def\syst_helpers_do_do_check_if_item_not_in_set
+ {\ifx\!!stringb\v_syst_helpers_right_optional_bracket
\expandafter\secondoftwoarguments
\else
- \expandafter\do_do_do_check_if_item_not_in_set
+ \expandafter\syst_helpers_do_do_do_check_if_item_not_in_set
\fi}
-\def\do_do_do_check_if_item_not_in_set
+\def\syst_helpers_do_do_do_check_if_item_not_in_set
{\ifx\!!stringa\!!stringb
- \expandafter\do_quit_if_item_not_in_set
+ \expandafter\syst_helpers_do_quit_if_item_not_in_set
\else
- \expandafter\do_check_if_item_not_in_set
+ \expandafter\syst_helpers_do_check_if_item_not_in_set
\fi}
%D \macros
@@ -835,41 +835,41 @@
% !9yes=\doifcommonelse{,a,}{,,,a,}{yes}{nop}
% !9yes=\doifcommonelse{,,a,}{,,,a,}{yes}{nop}
-\def\do_quit_if_common_else#1],\relax#2],\relax{\firstoftwoarguments}
+\def\syst_helpers_do_quit_if_common_else#1],\relax#2],\relax{\firstoftwoarguments}
-\def\do_check_if_common_else_one#1,#2%
+\def\syst_helpers_do_check_if_common_else_one#1,#2%
{\edef\!!stringc{#1}%
- \ifx\!!stringc\right_optional_bracket
+ \ifx\!!stringc\v_syst_helpers_right_optional_bracket
\expandafter\thirdofthreearguments
\else
- \expandafter\do_common_check
+ \expandafter\syst_helpers_do_common_check
\fi#2}
-\def\do_check_if_common_else_two#1,#2% we can do an empty #1 check too
+\def\syst_helpers_do_check_if_common_else_two#1,#2% we can do an empty #1 check too
{\edef\commalistelement{#1}%
- \ifx\commalistelement\right_optional_bracket
- \expandafter\re_do_check_if_common_else_one
+ \ifx\commalistelement\v_syst_helpers_right_optional_bracket
+ \expandafter\syst_helpers_re_do_check_if_common_else_one
\else
- \expandafter\do_do_check_if_common_else_two
+ \expandafter\syst_helpers_do_do_check_if_common_else_two
\fi#2}
-\def\do_do_check_if_common_else_two
+\def\syst_helpers_do_do_check_if_common_else_two
{\ifx\commalistelement\empty
- \expandafter\do_check_if_common_else_two
+ \expandafter\syst_helpers_do_check_if_common_else_two
\else
- \expandafter\do_do_do_check_if_common_else_two
+ \expandafter\syst_helpers_do_do_do_check_if_common_else_two
\fi}
-\def\do_do_do_check_if_common_else_two
+\def\syst_helpers_do_do_do_check_if_common_else_two
{\ifx\!!stringc\commalistelement
- \expandafter\do_quit_if_common_else
+ \expandafter\syst_helpers_do_quit_if_common_else
\else
- \expandafter\do_check_if_common_else_two
+ \expandafter\syst_helpers_do_check_if_common_else_two
\fi}
-\def\re_do_check_if_common_else_one#1{\do_check_if_common_else_one}
+\def\syst_helpers_re_do_check_if_common_else_one#1{\syst_helpers_do_check_if_common_else_one}
-\def\do_do_if_common_else#1#2#3#4%
+\def\syst_helpers_do_do_if_common_else#1#2#3#4%
{\edef\!!stringa{#3}%
\edef\!!stringb{#4}%
\ifx\!!stringa\empty
@@ -877,19 +877,19 @@
\else\ifx\!!stringb\empty
\expandafter\expandafter\expandafter\secondoftwoarguments
\else
- \expandafter\expandafter\expandafter\do_do_do_if_common_else
+ \expandafter\expandafter\expandafter\syst_helpers_do_do_do_if_common_else
\fi\fi
#1#2}
-\def\do_common_check
- {\expandafter\do_check_if_common_else_two\!!stringb,],\relax}%
+\def\syst_helpers_do_common_check
+ {\expandafter\syst_helpers_do_check_if_common_else_two\!!stringb,],\relax}%
-\def\do_do_do_if_common_else
- {\expandafter\do_check_if_common_else_one\!!stringa,],\relax}
+\def\syst_helpers_do_do_do_if_common_else
+ {\expandafter\syst_helpers_do_check_if_common_else_one\!!stringa,],\relax}
-\unexpanded\def\doifcommonelse{\do_do_if_common_else\firstoftwoarguments\secondoftwoarguments}
-\unexpanded\def\doifcommon {\do_do_if_common_else\firstofoneargument \gobbleoneargument }
-\unexpanded\def\doifnotcommon {\do_do_if_common_else\gobbleoneargument \firstofoneargument }
+\unexpanded\def\doifcommonelse{\syst_helpers_do_do_if_common_else\firstoftwoarguments\secondoftwoarguments}
+\unexpanded\def\doifcommon {\syst_helpers_do_do_if_common_else\firstofoneargument \gobbleoneargument }
+\unexpanded\def\doifnotcommon {\syst_helpers_do_do_if_common_else\gobbleoneargument \firstofoneargument }
%D \macros
%D {processcommalist,processcommacommand,quitcommalist,
@@ -925,70 +925,70 @@
\newcount\commalevel
-\def\do_do_do_process_comma_item
+\def\syst_helpers_do_do_do_process_comma_item
{\csname\s!next\the\commalevel\endcsname}
-\def\do_do_process_comma_item
+\def\syst_helpers_do_do_process_comma_item
{\ifx\nexttoken\blankspace
- \expandafter\re_do_process_comma_item
+ \expandafter\syst_helpers_re_do_process_comma_item
\else
- \expandafter\do_do_process_comma_item_indeed
+ \expandafter\syst_helpers_do_do_process_comma_item_indeed
\fi}
-\def\do_do_process_comma_item_indeed
+\def\syst_helpers_do_do_process_comma_item_indeed
{\ifx\nexttoken]%
\expandafter\gobbleoneargument
\else
- \expandafter\do_do_do_process_comma_item
+ \expandafter\syst_helpers_do_do_do_process_comma_item
\fi}
-\def\do_process_comma_item
- {\futurelet\nexttoken\do_do_process_comma_item}
+\def\syst_helpers_do_process_comma_item
+ {\futurelet\nexttoken\syst_helpers_do_do_process_comma_item}
%D Empty arguments are not processed. Empty items (\type{,,})
%D however are treated. We have to check for the special case
%D \type{[{a,b,c}]}.
\unexpanded\def\processcommalist[%
- {\futurelet\nexttoken\do_check_comma_item}
+ {\futurelet\nexttoken\syst_helpers_do_check_comma_item}
-\def\do_check_comma_item
+\def\syst_helpers_do_check_comma_item
{\ifx\nexttoken]%
\expandafter\gobblethreearguments
\else
- \expandafter\do_process_comma_list
+ \expandafter\syst_helpers_do_process_comma_list
\fi
\relax} % this one preserved the next {}
-\def\do_process_comma_list#1]#2%
+\def\syst_helpers_do_process_comma_list#1]#2%
{\global\advance\commalevel \plusone
\expandafter\def\csname\s!next\the\commalevel\endcsname##1,%
- {#2{##1}\do_process_comma_item}%
- \expandafter\do_do_process_comma_item\gobbleoneargument#1,]\relax
+ {#2{##1}\syst_helpers_do_process_comma_item}%
+ \expandafter\syst_helpers_do_do_process_comma_item\gobbleoneargument#1,]\relax
\global\advance\commalevel \minusone }
%D One way of quitting a commalist halfway is:
\def\quitcommalist
- {\begingroup\let\do_process_comma_item\do_quit_comma_list}
+ {\begingroup\let\syst_helpers_do_process_comma_item\syst_helpers_do_quit_comma_list}
-\def\do_quit_comma_list#1]%
+\def\syst_helpers_do_quit_comma_list#1]%
{\endgroup}
\def\quitprevcommalist
- {\begingroup\let\do_process_comma_item\do_quit_prev_comma_list}
+ {\begingroup\let\syst_helpers_do_process_comma_item\syst_helpers_do_quit_prev_comma_list}
-\def\do_quit_prev_comma_list#1]%
- {\let\do_process_comma_item\do_quit_comma_list}
+\def\syst_helpers_do_quit_prev_comma_list#1]%
+ {\let\syst_helpers_do_process_comma_item\syst_helpers_do_quit_comma_list}
%D The hack we used for checking the next character
%D \type {\doifnextcharelse} is also used here.
\let\next\:
-\def\:{\re_do_process_comma_item} % \:not saved ?
+\def\:{\syst_helpers_re_do_process_comma_item} % \:not saved ?
-\expandafter\def\: {\futurelet\nexttoken\do_do_process_comma_item}
+\expandafter\def\: {\futurelet\nexttoken\syst_helpers_do_do_process_comma_item}
\let\:\next
@@ -1041,8 +1041,8 @@
%D \stoptyping
\unexpanded\def\processcommalistwithparameters[#1]#2%
- {\def\do_process_comma_list_with_parameters##1{#2[##1]}%
- \processcommalist[#1]\do_process_comma_list_with_parameters}
+ {\def\syst_helpers_do_process_comma_list_with_parameters##1{#2[##1]}%
+ \processcommalist[#1]\syst_helpers_do_process_comma_list_with_parameters}
%D \macros
%D {startprocesscommalist,startprocesscommacommand}
@@ -1101,7 +1101,7 @@
% obsolete: \def\expandactions{\let\expandedaction\edef} \expandactions (see mkii)
-\unexpanded\def\do_compare_process_action_a[#1=>#2][#3]%
+\unexpanded\def\syst_helpers_do_compare_process_action_a[#1=>#2][#3]%
{\edef\!!stringb{#1}%
\ifx\!!stringb\s!default
\let\commalistelement\empty
@@ -1110,7 +1110,7 @@
% met \quitcommalist tot meer dan 25\% sneller
-\unexpanded\def\do_compare_process_action_b[#1=>#2][#3]%
+\unexpanded\def\syst_helpers_do_compare_process_action_b[#1=>#2][#3]%
{\edef\!!stringb{#1}%
\ifx\!!stringa\!!stringb
\def\commalistelement{#3}%
@@ -1124,14 +1124,14 @@
\unexpanded\def\processaction[#1]#2[%
{\edef\!!stringa{#1}%
\ifx\!!stringa\empty
- \let\do_compare_process_action\do_compare_process_action_a
+ \let\syst_helpers_do_compare_process_action\syst_helpers_do_compare_process_action_a
\else
- \let\do_compare_process_action\do_compare_process_action_b
+ \let\syst_helpers_do_compare_process_action\syst_helpers_do_compare_process_action_b
\fi
- \edef\do_process_action##1{\do_compare_process_action[##1][#1]}% expands #1
- \processnextcommalist\relax\relax\do_process_action[}
+ \edef\syst_helpers_do_process_action##1{\syst_helpers_do_compare_process_action[##1][#1]}% expands #1
+ \processnextcommalist\relax\relax\syst_helpers_do_process_action[}
-\unexpanded\def\do_compare_process_action_c[#1=>#2][#3]%
+\unexpanded\def\syst_helpers_do_compare_process_action_c[#1=>#2][#3]%
{\edef\!!stringa{#1}%
\edef\!!stringb{#3}%
\ifx\!!stringa\!!stringb
@@ -1151,17 +1151,17 @@
\ifx\!!stringa\empty
\expandafter\processaction
\else
- \expandafter\process_first_action_in_set_indeed
+ \expandafter\syst_helpers_process_first_action_in_set_indeed
\fi
[#1]}
-\unexpanded\def\process_first_action_in_set_indeed[#1]#2[#3]%
- {\def\do_process_action##1%
- {\def\do_do_process_action####1{\do_compare_process_action_c[####1][##1]}%
- \processcommalist[#3]\do_do_process_action}%
- \normalexpanded{\processcommalist[#1]}\do_process_action}
+\unexpanded\def\syst_helpers_process_first_action_in_set_indeed[#1]#2[#3]%
+ {\def\syst_helpers_do_process_action##1%
+ {\def\syst_helpers_do_do_process_action####1{\syst_helpers_do_compare_process_action_c[####1][##1]}%
+ \processcommalist[#3]\syst_helpers_do_do_process_action}%
+ \normalexpanded{\processcommalist[#1]}\syst_helpers_do_process_action}
-\unexpanded\def\do_compare_process_action_d[#1=>#2][#3]%
+\unexpanded\def\syst_helpers_do_compare_process_action_d[#1=>#2][#3]%
{\edef\!!stringa{#1}%
\edef\!!stringb{#3}%
\ifx\!!stringa\!!stringb
@@ -1176,7 +1176,7 @@
\fi
\fi}
-\unexpanded\def\do_process_all_actions_in_set
+\unexpanded\def\syst_helpers_do_process_all_actions_in_set
{\csname\s!do\the\processlevel\endcsname}
\unexpanded\def\processallactionsinset[#1]%
@@ -1184,16 +1184,16 @@
\ifx\!!stringa\empty
\expandafter\processaction
\else
- \expandafter\process_all_actions_in_set_indeed
+ \expandafter\syst_helpers_process_all_actions_in_set_indeed
\fi
[#1]}
-\unexpanded\def\process_all_actions_in_set_indeed[#1]#2[#3]%
+\unexpanded\def\syst_helpers_process_all_actions_in_set_indeed[#1]#2[#3]%
{\advance\processlevel \plusone
\expandafter\def\csname\s!do\the\processlevel\endcsname##1%
- {\def\do_do_process_action####1{\do_compare_process_action_d[####1][##1]}%
- \processcommalist[#3]\do_do_process_action}%
- \normalexpanded{\processcommalist[#1]}\do_process_all_actions_in_set
+ {\def\syst_helpers_do_do_process_action####1{\syst_helpers_do_compare_process_action_d[####1][##1]}%
+ \processcommalist[#3]\syst_helpers_do_do_process_action}%
+ \normalexpanded{\processcommalist[#1]}\syst_helpers_do_process_all_actions_in_set
\advance\processlevel\minusone}
%D These macros use:
@@ -1203,8 +1203,8 @@
\let\nexttoken#4%
\global\advance\commalevel \plusone
\expandafter\def\csname\s!next\the\commalevel\endcsname##1,%
- {#3{##1}\do_process_comma_item}%
- \do_do_process_comma_item#4#5,]\relax
+ {#3{##1}\syst_helpers_do_process_comma_item}%
+ \syst_helpers_do_do_process_comma_item#4#5,]\relax
\global\advance\commalevel\minusone
#2}
@@ -1241,11 +1241,11 @@
\ifx\@@@instring\empty
\expandafter\thirdofthreearguments
\else
- \expandafter\do_if_in_string_else_indeed
+ \expandafter\syst_helpers_do_if_in_string_else_indeed
\fi}
-\unexpanded\def\do_if_in_string_else_indeed#1%
- {\do_if_in_string_else\@@@instring{#1}%
+\unexpanded\def\syst_helpers_do_if_in_string_else_indeed#1%
+ {\syst_helpers_do_if_in_string_else\@@@instring{#1}%
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
@@ -1256,11 +1256,11 @@
\ifx\@@@instring\empty
\expandafter\gobbletwoarguments
\else
- \expandafter\do_if_in_string_indeed
+ \expandafter\syst_helpers_do_if_in_string_indeed
\fi}
-\unexpanded\def\do_if_in_string_indeed#1%
- {\do_if_in_string_else\@@@instring{#1}%
+\unexpanded\def\syst_helpers_do_if_in_string_indeed#1%
+ {\syst_helpers_do_if_in_string_else\@@@instring{#1}%
\expandafter\firstofoneargument
\else
\expandafter\gobbleoneargument
@@ -1271,11 +1271,11 @@
\ifx\@@@instring\empty
\expandafter\gobbletwoarguments
\else
- \expandafter\do_if_not_in_string_indeed
+ \expandafter\syst_helpers_do_if_not_in_string_indeed
\fi}
-\unexpanded\def\do_if_not_in_string_indeed#1%
- {\do_if_in_string_else\@@@instring{#1}%
+\unexpanded\def\syst_helpers_do_if_not_in_string_indeed#1%
+ {\syst_helpers_do_if_in_string_else\@@@instring{#1}%
\expandafter\gobbleoneargument
\else
\expandafter\firstofoneargument
@@ -1283,10 +1283,10 @@
% replaces prev
-\unexpanded\def\do_if_in_string_else#1#2% ##2 can be {abc}
- {\expandafter\def\expandafter\do_do_if_in_string_else
+\unexpanded\def\syst_helpers_do_if_in_string_else#1#2% ##2 can be {abc}
+ {\expandafter\def\expandafter\syst_helpers_do_do_if_in_string_else
\expandafter##\expandafter1#1##2##3\war{\unless\if##2@}% expand #1 here
- \expandafter\do_do_if_in_string_else\normalexpanded{#2#1}@@\war} % expand #2 here
+ \expandafter\syst_helpers_do_do_if_in_string_else\normalexpanded{#2#1}@@\war} % expand #2 here
%D The next alternative proved to be upto twice as fast on
%D tasks like checking reserved words in pretty verbatim
@@ -1301,14 +1301,14 @@
%D possible, the latter alternative does minimal (one level)
%D expansion.
-\unexpanded\def\do_if_in_csname_else#1#2%
- {\def\do_do_if_in_csname_else##1#1##2##3\war
+\unexpanded\def\syst_helpers_do_if_in_csname_else#1#2%
+ {\def\syst_helpers_do_do_if_in_csname_else##1#1##2##3\war
{\unless\if##2@}%
- \expandafter\do_do_if_in_csname_else#2#1@@\war}
+ \expandafter\syst_helpers_do_do_if_in_csname_else#2#1@@\war}
\unexpanded\def\doifincsnameelse#1#2%
{\edef\@@@instring{#1}%
- \expandafter\do_if_in_csname_else\expandafter{\@@@instring}{#2}%
+ \expandafter\syst_helpers_do_if_in_csname_else\expandafter{\@@@instring}{#2}%
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
@@ -1366,25 +1366,25 @@
%D we gain).
\unexpanded\def\makerawcommalist[#1]#2% use \processnext ... here
- {\def\do_make_raw_comma_list##1% we don't expand ##1
+ {\def\syst_helpers_do_make_raw_comma_list##1% we don't expand ##1
{\ifx#2\empty
\def#2{##1}%
\else
\expandafter\def\expandafter#2\expandafter{#2,##1}%
\fi}%
\let#2\empty
- \processcommalist[#1]\do_make_raw_comma_list}
+ \processcommalist[#1]\syst_helpers_do_make_raw_comma_list}
-\def\raw_process_comma_item#1,#2% #2 eats up preceding space
+\def\syst_helpers_raw_process_comma_item#1,#2% #2 eats up preceding space
{\if]#1\else
\csname\s!next\the\commalevel\endcsname{#1}%
- \expandafter\raw_process_comma_item
+ \expandafter\syst_helpers_raw_process_comma_item
\fi#2}
\unexpanded\def\rawprocesscommalist[#1]#2% accepteert ook [\cs]
{\global\advance\commalevel \plusone
\expandafter\let\csname\s!next\the\commalevel\endcsname#2%
- \expandafter\raw_process_comma_item#1,],% \relax
+ \expandafter\syst_helpers_raw_process_comma_item#1,],% \relax
\global\advance\commalevel \minusone }
\unexpanded\def\rawprocesscommacommand[#1]% not really needed
@@ -1400,11 +1400,11 @@
\ifx\@@@instring\@@rawempty
\expandafter\thirdofthreearguments
\else
- \expandafter\raw_do_if_in_set_else
+ \expandafter\syst_helpers_raw_do_if_in_set_else
\fi}
-\unexpanded\def\raw_do_if_in_set_else#1%
- {\do_if_in_string_else\@@@instring{,#1,}%
+\unexpanded\def\syst_helpers_raw_do_if_in_set_else#1%
+ {\syst_helpers_do_if_in_string_else\@@@instring{,#1,}%
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
@@ -1415,11 +1415,11 @@
\ifx\@@@instring\@@rawempty
\expandafter\gobbletwoarguments
\else
- \expandafter\raw_do_if_in_set
+ \expandafter\syst_helpers_raw_do_if_in_set
\fi}
-\unexpanded\def\raw_do_if_in_set#1%%
- {\do_if_in_string_else\@@@instring{,#1,}%
+\unexpanded\def\syst_helpers_raw_do_if_in_set#1%%
+ {\syst_helpers_do_if_in_string_else\@@@instring{,#1,}%
\expandafter\firstofoneargument
\else
\expandafter\gobbleoneargument
@@ -1427,23 +1427,23 @@
%D Some more raw material:
-\def\do_raw_process_action[#1][#2]%
- {\def\do_do_raw_process_action##1,#1=>##2,##3\war
+\def\syst_helpers_do_raw_process_action[#1][#2]%
+ {\def\syst_helpers_do_do_raw_process_action##1,#1=>##2,##3\war
{\if##3@\else
\def\!!processaction{##2}%
\fi}%
- \do_do_raw_process_action,#2,#1=>,@\war}
+ \syst_helpers_do_do_raw_process_action,#2,#1=>,@\war}
\unexpanded\def\rawprocessaction[#1]#2[#3]%
{\edef\!!stringa{#1}%
\edef\!!stringb{undefined}% better \!!undefined
\let\!!processaction\!!stringb
\ifx\!!stringa\empty
- \expandafter\do_raw_process_action\expandafter[\s!default][#3]%
+ \expandafter\syst_helpers_do_raw_process_action\expandafter[\s!default][#3]%
\else
- \expandafter\do_raw_process_action\expandafter[\!!stringa][#3]%
+ \expandafter\syst_helpers_do_raw_process_action\expandafter[\!!stringa][#3]%
\ifx\!!processaction\!!stringb
- \expandafter\do_raw_process_action\expandafter[\s!unknown][#3]%
+ \expandafter\syst_helpers_do_raw_process_action\expandafter[\s!unknown][#3]%
\fi
\fi
\ifx\!!processaction\!!stringb
@@ -3211,20 +3211,20 @@
%D Nowadays we don't mind a few more tokens if we can gain a
%D bit of speed.
-\def\do_increment#1{\dodoglobal\edef#1{\the\numexpr\ifdefined#1\ifx#1\relax\else#1\fi\fi+\plusone \relax}}
-\def\do_decrement#1{\dodoglobal\edef#1{\the\numexpr\ifdefined#1\ifx#1\relax\else#1\fi\fi+\minusone\relax}}
+\def\syst_helpers_do_increment#1{\dodoglobal\edef#1{\the\numexpr\ifdefined#1\ifx#1\relax\else#1\fi\fi+\plusone \relax}}
+\def\syst_helpers_do_decrement#1{\dodoglobal\edef#1{\the\numexpr\ifdefined#1\ifx#1\relax\else#1\fi\fi+\minusone\relax}}
-\def\do_do_do_increment#1,#2){\dodoglobal\edef#1{\the\numexpr\ifdefined#1\ifx#1\relax\else#1\fi\fi+#2\relax}}
-\def\do_do_do_decrement#1,#2){\dodoglobal\edef#1{\the\numexpr\ifdefined#1\ifx#1\relax\else#1\fi\fi-#2\relax}}
+\def\syst_helpers_do_do_do_increment#1,#2){\dodoglobal\edef#1{\the\numexpr\ifdefined#1\ifx#1\relax\else#1\fi\fi+#2\relax}}
+\def\syst_helpers_do_do_do_decrement#1,#2){\dodoglobal\edef#1{\the\numexpr\ifdefined#1\ifx#1\relax\else#1\fi\fi-#2\relax}}
-\def\do_do_increment(#1{\doifnextcharelse,{\do_do_do_increment#1}{\do_do_do_increment#1,\plusone}}
-\def\do_do_decrement(#1{\doifnextcharelse,{\do_do_do_decrement#1}{\do_do_do_decrement#1,\plusone}}
+\def\syst_helpers_do_do_increment(#1{\doifnextcharelse,{\syst_helpers_do_do_do_increment#1}{\syst_helpers_do_do_do_increment#1,\plusone}}
+\def\syst_helpers_do_do_decrement(#1{\doifnextcharelse,{\syst_helpers_do_do_do_decrement#1}{\syst_helpers_do_do_do_decrement#1,\plusone}}
\def\fastincrement#1{\dodoglobal\edef#1{\the\numexpr#1+\plusone \relax}}
\def\fastdecrement#1{\dodoglobal\edef#1{\the\numexpr#1+\minusone\relax}}
-\def\increment{\doifnextcharelse(\do_do_increment\do_increment}
-\def\decrement{\doifnextcharelse(\do_do_decrement\do_decrement}
+\def\increment{\doifnextcharelse(\syst_helpers_do_do_increment\syst_helpers_do_increment}
+\def\decrement{\doifnextcharelse(\syst_helpers_do_do_decrement\syst_helpers_do_decrement}
\def\incrementvalue#1{\expandafter\increment\csname#1\endcsname}
\def\decrementvalue#1{\expandafter\decrement\csname#1\endcsname}
@@ -4295,7 +4295,7 @@
% \bgroup\aftergroup\AfterGroup#1}
\def\HandleNoGroup % retrofit into mkii
- {\ifnum\currentgrouptype=\@@semisimplegroup
+ {\ifnum\currentgrouptype=\semisimplegroupcode
\expandafter\HandleNoGroupA
\else
\expandafter\HandleNoGroupB
@@ -4597,7 +4597,7 @@
%D
%D \starttyping
%D \def\doifstringinstringelse#1#2%
-%D {\do_if_in_string_else#1#2%
+%D {\syst_helpers_do_if_in_string_else#1#2%
%D \expandafter\firstoftwoarguments
%D \else
%D \expandafter\secondoftwoarguments
@@ -5122,17 +5122,17 @@
%D Simple but effective are the next two macros. There name
%D exactly states their purpose.
-\newdimen\swapped_dimen
-\newcount\swapped_count
-\let \swapped_macro\relax
+\newdimen\d_syst_helpers_swapped
+\newcount\c_syst_helpers_swapped
+\let \m_syst_helpers_swapped\relax
-\unexpanded\def\swapdimens#1#2{\swapped_dimen #1\relax#1#2\relax#2\swapped_dimen}
-\unexpanded\def\swapcounts#1#2{\swapped_count #1\relax#1#2\relax#2\swapped_count}
-\unexpanded\def\swapmacros#1#2{\let\swapped_macro#1\let #1#2\let #2\swapped_macro}
+\unexpanded\def\swapdimens#1#2{\d_syst_helpers_swapped #1\relax#1#2\relax#2\d_syst_helpers_swapped}
+\unexpanded\def\swapcounts#1#2{\c_syst_helpers_swapped #1\relax#1#2\relax#2\c_syst_helpers_swapped}
+\unexpanded\def\swapmacros#1#2{\let\m_syst_helpers_swapped#1\let #1#2\let #2\m_syst_helpers_swapped}
-\unexpanded\def\globalswapdimens#1#2{\swapped_dimen #1\global #1#2\global #2\swapped_dimen}
-\unexpanded\def\globalswapcounts#1#2{\swapped_count #1\global #1#2\global #2\swapped_count}
-\unexpanded\def\globalswapmacros#1#2{\let\swapped_macro#1\global\let#1#2\global\let#2\swapped_macro}
+\unexpanded\def\globalswapdimens#1#2{\d_syst_helpers_swapped #1\global #1#2\global #2\d_syst_helpers_swapped}
+\unexpanded\def\globalswapcounts#1#2{\c_syst_helpers_swapped #1\global #1#2\global #2\c_syst_helpers_swapped}
+\unexpanded\def\globalswapmacros#1#2{\let\m_syst_helpers_swapped#1\global\let#1#2\global\let#2\m_syst_helpers_swapped}
%D \macros
%D {pushmacro,popmacro}
@@ -5337,17 +5337,17 @@
%D \type {\doifallcommonelse}, where the first two
%D arguments are sets.
-\def\do_if_all_common_else#1#2#3#4% slow
- {\def\do_common_check_all##1%
+\def\syst_helpers_do_if_all_common_else#1#2#3#4% slow
+ {\def\syst_helpers_do_common_check_all##1%
{\doifnotinset{##1}{#4}\donefalse
\ifdone\else\expandafter\quitcommalist\fi}%
\donetrue
- \processcommalist[#3]\do_common_check_all
+ \processcommalist[#3]\syst_helpers_do_common_check_all
\ifdone\expandafter#1\else\expandafter#2\fi}
-\def\doifallcommonelse{\do_if_all_common_else\firstoftwoarguments\secondoftwoarguments}
-\def\doifallcommon {\do_if_all_common_else\firstofonearguments\gobbleoneargument }
-\def\doifnotallcommon {\do_if_all_common_else\gobbleoneargument \firstofonearguments }
+\def\doifallcommonelse{\syst_helpers_do_if_all_common_else\firstoftwoarguments\secondoftwoarguments}
+\def\doifallcommon {\syst_helpers_do_if_all_common_else\firstofonearguments\gobbleoneargument }
+\def\doifnotallcommon {\syst_helpers_do_if_all_common_else\gobbleoneargument \firstofonearguments }
%D \macros
%D {DOIF,DOIFELSE,DOIFNOT}
@@ -5366,38 +5366,38 @@
%D We have to use a two||step implementation, because the
%D expansion has to take place outside \type{\uppercase}.
-\unexpanded\def\DO_IF#1#2%
+\unexpanded\def\syst_helpers_do_IF#1#2%
{\uppercase{{$#1$}{$#2$}}%
\expandafter\firstofoneargument
\else
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\DO_IF_NOT#1#2%
+\unexpanded\def\syst_helpers_do_IF_NOT#1#2%
{\uppercase{{$#1$}{$#2$}}%
\expandafter\gobbleoneargument
\else
\expandafter\firstofoneargument
\fi}
-\unexpanded\def\DO_IF_ELSE#1#2%
+\unexpanded\def\syst_helpers_do_IF_ELSE#1#2%
{\uppercase{{$#1$}{$#2$}}%
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\unexpanded\def\DO_IF_INSTRING_ELSE#1#2%
+\unexpanded\def\syst_helpers_do_IF_INSTRING_ELSE#1#2%
{\uppercase{{$#1$}{$#2$}}%
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\unexpanded\def\DOIF #1#2{\normalexpanded{\DO_IF {#1}{#2}}}
-\unexpanded\def\DOIFNOT #1#2{\normalexpanded{\DO_IF_NOT {#1}{#2}}}
-\unexpanded\def\DOIFELSE #1#2{\normalexpanded{\DO_IF_ELSE {#1}{#2}}}
-\unexpanded\def\DOIFINSTRINGELSE #1#2{\normalexpanded{\DO_IF_INSTRING_ELSE{#1}{#2}}}
+\unexpanded\def\DOIF #1#2{\normalexpanded{\syst_helpers_do_IF {#1}{#2}}}
+\unexpanded\def\DOIFNOT #1#2{\normalexpanded{\syst_helpers_do_IF_NOT {#1}{#2}}}
+\unexpanded\def\DOIFELSE #1#2{\normalexpanded{\syst_helpers_do_IF_ELSE {#1}{#2}}}
+\unexpanded\def\DOIFINSTRINGELSE #1#2{\normalexpanded{\syst_helpers_do_IF_INSTRING_ELSE{#1}{#2}}}
%D \macros
%D {dosingleargumentwithset,
@@ -6229,9 +6229,9 @@
%D
%D This one if for Taco's bibliography module:
-\let\normal_inspect_next_character\inspect_next_character
+\let\syst_helpers_normal_inspect_next_character\syst_helpers_inspect_next_character
-\def\strict_inspect_next_character% no user macro !
+\def\syst_helpers_strict_inspect_next_character% no user macro !
{\ifx\nexttoken\charactertoken
\expandafter\!!stringa
\else
@@ -6241,10 +6241,10 @@
% better: push/pop
\unexpanded\def\startstrictinspectnextcharacter
- {\let\inspect_next_character\strict_inspect_next_character}
+ {\let\syst_helpers_inspect_next_character\syst_helpers_strict_inspect_next_character}
\unexpanded\def\stopstrictinspectnextcharacter
- {\let\inspect_next_character\normal_inspect_next_character}
+ {\let\syst_helpers_inspect_next_character\syst_helpers_normal_inspect_next_character}
\def\strictdoifnextoptionalelse#1#2%
{\startstrictinspectnextcharacter
diff --git a/tex/context/base/syst-ini.mkiv b/tex/context/base/syst-ini.mkiv
index ab70126df..f0cd6ec0b 100644
--- a/tex/context/base/syst-ini.mkiv
+++ b/tex/context/base/syst-ini.mkiv
@@ -50,8 +50,6 @@
%.......
%catcode`\z = 11
-\chardef\activecatcode = 13 % later this will become a counter
-
\def ^^L{\par}
\def\^^M{\ } % control <return> = control <space>
\def\^^I{\ } % same for <tab>
@@ -172,34 +170,34 @@
% 255 : page
% 256 - : user
-\countdef \min_allocated_register = 52 \min_allocated_register = 256 % can change
-\countdef \max_allocated_register = 53 \max_allocated_register = 32767
-\countdef \min_allocated_iochannel = 54 \min_allocated_iochannel = -1
-\countdef \max_allocated_iochannel = 55 \max_allocated_iochannel = 16
-\countdef \min_allocated_language = 56 \min_allocated_language = 0
-\countdef \max_allocated_language = 57 \max_allocated_language = 255
-\countdef \max_allocated_insert = 58 \max_allocated_insert = 254
-\countdef \min_allocated_insert = 59 \min_allocated_insert = 128
-\countdef \min_allocated_family = 60 \min_allocated_family = 128
-\countdef \max_allocated_family = 61 \max_allocated_family = 255
-\countdef \min_allocated_attribute = 62 \min_allocated_attribute = 1024 % 127-1023 : private
-
-\countdef \last_allocated_count = 32 \last_allocated_count = \min_allocated_register
-\countdef \last_allocated_dimen = 33 \last_allocated_dimen = \min_allocated_register
-\countdef \last_allocated_skip = 34 \last_allocated_skip = \min_allocated_register
-\countdef \last_allocated_muskip = 35 \last_allocated_muskip = \min_allocated_register
-\countdef \last_allocated_box = 36 \last_allocated_box = \min_allocated_register
-\countdef \last_allocated_toks = 37 \last_allocated_toks = \min_allocated_register
-\countdef \last_allocated_read = 38 \last_allocated_read = \min_allocated_iochannel
-\countdef \last_allocated_write = 39 \last_allocated_write = \min_allocated_iochannel
-\countdef \last_allocated_marks = 40 \last_allocated_marks = \min_allocated_register
-\countdef \last_allocated_language = 41 \last_allocated_language = \min_allocated_language % not used in context
-\countdef \last_allocated_insertion = 42 \last_allocated_insertion = \min_allocated_insert
-\countdef \last_allocated_family = 43 \last_allocated_family = \min_allocated_family % not used in context
-\countdef \last_allocated_attribute = 44 \last_allocated_attribute = \min_allocated_attribute
-
-\countdef \min_counter_value = 125 \min_counter_value = -"7FFFFFFF % beware, we use index 125 at the lua end
-\countdef \max_counter_value = 126 \max_counter_value = "7FFFFFFF % beware, we use index 126 at the lua end
+\countdef \c_syst_min_allocated_register = 52 \c_syst_min_allocated_register = 256 % can change
+\countdef \c_syst_max_allocated_register = 53 \c_syst_max_allocated_register = 32767
+\countdef \c_syst_min_allocated_iochannel = 54 \c_syst_min_allocated_iochannel = -1
+\countdef \c_syst_max_allocated_iochannel = 55 \c_syst_max_allocated_iochannel = 16
+\countdef \c_syst_min_allocated_language = 56 \c_syst_min_allocated_language = 0
+\countdef \c_syst_max_allocated_language = 57 \c_syst_max_allocated_language = 255
+\countdef \c_syst_max_allocated_insert = 58 \c_syst_max_allocated_insert = 254
+\countdef \c_syst_min_allocated_insert = 59 \c_syst_min_allocated_insert = 128
+\countdef \c_syst_min_allocated_family = 60 \c_syst_min_allocated_family = 128
+\countdef \c_syst_max_allocated_family = 61 \c_syst_max_allocated_family = 255
+\countdef \c_syst_min_allocated_attribute = 62 \c_syst_min_allocated_attribute = 1024 % 127-1023 : private
+
+\countdef \c_syst_last_allocated_count = 32 \c_syst_last_allocated_count = \c_syst_min_allocated_register
+\countdef \c_syst_last_allocated_dimen = 33 \c_syst_last_allocated_dimen = \c_syst_min_allocated_register
+\countdef \c_syst_last_allocated_skip = 34 \c_syst_last_allocated_skip = \c_syst_min_allocated_register
+\countdef \c_syst_last_allocated_muskip = 35 \c_syst_last_allocated_muskip = \c_syst_min_allocated_register
+\countdef \c_syst_last_allocated_box = 36 \c_syst_last_allocated_box = \c_syst_min_allocated_register
+\countdef \c_syst_last_allocated_toks = 37 \c_syst_last_allocated_toks = \c_syst_min_allocated_register
+\countdef \c_syst_last_allocated_read = 38 \c_syst_last_allocated_read = \c_syst_min_allocated_iochannel
+\countdef \c_syst_last_allocated_write = 39 \c_syst_last_allocated_write = \c_syst_min_allocated_iochannel
+\countdef \c_syst_last_allocated_marks = 40 \c_syst_last_allocated_marks = \c_syst_min_allocated_register
+\countdef \c_syst_last_allocated_language = 41 \c_syst_last_allocated_language = \c_syst_min_allocated_language % not used in context
+\countdef \c_syst_last_allocated_insertion = 42 \c_syst_last_allocated_insertion = \c_syst_min_allocated_insert
+\countdef \c_syst_last_allocated_family = 43 \c_syst_last_allocated_family = \c_syst_min_allocated_family % not used in context
+\countdef \c_syst_last_allocated_attribute = 44 \c_syst_last_allocated_attribute = \c_syst_min_allocated_attribute
+
+\countdef \c_syst_min_counter_value = 125 \c_syst_min_counter_value = -"7FFFFFFF % beware, we use index 125 at the lua end
+\countdef \c_syst_max_counter_value = 126 \c_syst_max_counter_value = "7FFFFFFF % beware, we use index 126 at the lua end
\countdef \zerocount = 120 \zerocount = 0
\countdef \plusone = 121 \plusone = 1
@@ -224,21 +222,21 @@
%D The allocators share a common helper macro.
-\normalprotected\def\newcount {\allocate_register\last_allocated_count \count \countdef \max_allocated_register}
-\normalprotected\def\newdimen {\allocate_register\last_allocated_dimen \dimen \dimendef \max_allocated_register}
-\normalprotected\def\newskip {\allocate_register\last_allocated_skip \skip \skipdef \max_allocated_register}
-\normalprotected\def\newmuskip {\allocate_register\last_allocated_muskip \muskip \muskipdef \max_allocated_register}
-\normalprotected\def\newbox {\allocate_register\last_allocated_box \box \mathchardef\max_allocated_register}
-\normalprotected\def\newtoks {\allocate_register\last_allocated_toks \toks \toksdef \max_allocated_register}
-\normalprotected\def\newread {\allocate_register\last_allocated_read \read \chardef \max_allocated_iochannel}
-\normalprotected\def\newwrite {\allocate_register\last_allocated_write \write \chardef \max_allocated_iochannel}
-\normalprotected\def\newmarks {\allocate_register\last_allocated_marks \marks \mathchardef\max_allocated_register}
-\normalprotected\def\newinsert {\allocate_register\last_allocated_insertion\insert \chardef \max_allocated_insert}
+\normalprotected\def\newcount {\syst_basics_allocate\c_syst_last_allocated_count \count \countdef \c_syst_max_allocated_register}
+\normalprotected\def\newdimen {\syst_basics_allocate\c_syst_last_allocated_dimen \dimen \dimendef \c_syst_max_allocated_register}
+\normalprotected\def\newskip {\syst_basics_allocate\c_syst_last_allocated_skip \skip \skipdef \c_syst_max_allocated_register}
+\normalprotected\def\newmuskip {\syst_basics_allocate\c_syst_last_allocated_muskip \muskip \muskipdef \c_syst_max_allocated_register}
+\normalprotected\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \mathchardef\c_syst_max_allocated_register}
+\normalprotected\def\newtoks {\syst_basics_allocate\c_syst_last_allocated_toks \toks \toksdef \c_syst_max_allocated_register}
+\normalprotected\def\newread {\syst_basics_allocate\c_syst_last_allocated_read \read \chardef \c_syst_max_allocated_iochannel}
+\normalprotected\def\newwrite {\syst_basics_allocate\c_syst_last_allocated_write \write \chardef \c_syst_max_allocated_iochannel}
+\normalprotected\def\newmarks {\syst_basics_allocate\c_syst_last_allocated_marks \marks \mathchardef\c_syst_max_allocated_register}
+\normalprotected\def\newinsert {\syst_basics_allocate\c_syst_last_allocated_insertion\insert \chardef \c_syst_max_allocated_insert}
%D We don't need these in \CONTEXT:
-\normalprotected\def\newlanguage{\allocate_register\last_allocated_language \language\chardef \max_allocated_language}
-\normalprotected\def\newfamily {\allocate_register\last_allocated_family \fam \chardef \max_allocated_family}
+\normalprotected\def\newlanguage{\syst_basics_allocate\c_syst_last_allocated_language \language\chardef \c_syst_max_allocated_language}
+\normalprotected\def\newfamily {\syst_basics_allocate\c_syst_last_allocated_family \fam \chardef \c_syst_max_allocated_family}
\let\newfam\newfamily
@@ -267,7 +265,7 @@
\normalprotected\def\writestatus#1#2{\immediate\write16{#1: #2}}
\fi
-\def\allocate_register_yes#1#2#3#4#5% last class method max name
+\def\syst_basics_allocate_yes#1#2#3#4#5% last class method max name
{\ifnum#1<#4\relax
\global\advance#1\plusone
\global#3#5=#1\relax
@@ -275,16 +273,16 @@
\writestatus{warning}{no room for \string#2\space \string#5\space (max: \number#4)}%
\fi}
-\def\allocate_register_nop#1#2#3#4#5% last class method max name
+\def\syst_basics_allocate_nop#1#2#3#4#5% last class method max name
{\writestatus{warning}{\string#2 \string#5 is already defined (\string\relax\space it first)}}
-\def\allocate_register#1#2#3#4#5% last class method max name
+\def\syst_basics_allocate#1#2#3#4#5% last class method max name
{\ifx#5\undefined
- \expandafter\allocate_register_yes
+ \expandafter\syst_basics_allocate_yes
\else\ifx#5\relax
- \expandafter\expandafter\expandafter\allocate_register_yes
+ \expandafter\expandafter\expandafter\syst_basics_allocate_yes
\else
- \expandafter\expandafter\expandafter\allocate_register_nop
+ \expandafter\expandafter\expandafter\syst_basics_allocate_nop
\fi\fi
#1#2#3#4#5}
@@ -292,8 +290,8 @@
%D {\chardef} instead of the more limited \type {\mathchardef}.
\ifnum\texengine>\pdftexengine
- \normalprotected\def\newbox {\allocate_register\last_allocated_box \box \chardef\max_allocated_register}
- \normalprotected\def\newmarks{\allocate_register\last_allocated_marks\marks\chardef\max_allocated_register}
+ \normalprotected\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \chardef\c_syst_max_allocated_register}
+ \normalprotected\def\newmarks{\syst_basics_allocate\c_syst_last_allocated_marks\marks\chardef\c_syst_max_allocated_register}
\fi
%D Attributes are something very \LUATEX. In \CONTEXT\ you are not
@@ -303,8 +301,8 @@
%D and should not be touched.
\ifnum\texengine=\luatexengine
- \let\attributeunsetvalue\min_counter_value % used to be \minusone
- \normalprotected\def\newattribute{\allocate_register\min_allocated_attribute\attribute\attributedef\max_allocated_register}
+ \let\attributeunsetvalue\c_syst_min_counter_value % used to be \minusone
+ \normalprotected\def\newattribute{\syst_basics_allocate\c_syst_min_allocated_attribute\attribute\attributedef\c_syst_max_allocated_register}
\fi
%D Not used by \CONTEXT\ but for instance \PICTEX\ needs it. It's a
@@ -470,62 +468,53 @@
\ifdefined\htdp \else \def\htdp#1{\dimexpr\ht#1+\dp#1\relax} \fi
-%D \macros
-%D {@@escape,@@begingroup,@@endgroup,@@mathshift,@@alignment,
-%D @@endofline,@@parameter,@@superscript,@@subscript,
-%D @@ignore,@@space,@@letter,@@other,@@active,@@comment}
-%D
-%D In \CONTEXT\ we sometimes manipulate the \CATCODES\ of certain
-%D characters. Because we are not that good at remembering numbers,
-%D we introduce some symbolic names.
-
-%D As we now have catc-* files, we also have more readable names but
-%D We will keep the following around for a while.
-
-\chardef\@@escape = 0
-\chardef\@@begingroup = 1
-\chardef\@@endgroup = 2
-\chardef\@@mathshift = 3
-\chardef\@@alignment = 4
-\chardef\@@endofline = 5
-\chardef\@@parameter = 6
-\chardef\@@superscript = 7
-\chardef\@@subscript = 8
-\chardef\@@ignore = 9
-\chardef\@@space = 10
-\chardef\@@letter = 11
-\chardef\@@other = 12
-\chardef\@@active = 13
-\chardef\@@comment = 14
+%D The catcode constants will be redefined in later catcode
+%D related modules but they can be used in the same way.
+
+\chardef\escapecatcode = 0
+\chardef\begingroupcatcode = 1
+\chardef\endgroupcatcode = 2
+\chardef\mathshiftcatcode = 3
+\chardef\alignmentcatcode = 4
+\chardef\endoflinecatcode = 5
+\chardef\parametercatcode = 6
+\chardef\superscriptcatcode = 7
+\chardef\subscriptcatcode = 8
+\chardef\ignorecatcode = 9
+\chardef\spacecatcode = 10
+\chardef\lettercatcode = 11
+\chardef\othercatcode = 12
+\chardef\activecatcode = 13
+\chardef\commentcatcode = 14
+\chardef\invalidcatcode = 15
%D Constants to be used with \type {\currentgrouptype}.
-\chardef\@@bottomlevelgroup = 0
-\chardef\@@simplegroup = 1
-\chardef\@@hboxgroup = 2
-\chardef\@@adjustedhboxgroup = 3
-\chardef\@@vboxgroup = 4
-\chardef\@@vtopgroup = 5
-\chardef\@@aligngroup = 6
-\chardef\@@noaligngroup = 7
-\chardef\@@outputgroup = 8
-\chardef\@@mathgroup = 9
-\chardef\@@discretionarygroup = 10
-\chardef\@@insertgroup = 11
-\chardef\@@vcentergroup = 12
-\chardef\@@mathchoicegroup = 13
-\chardef\@@semisimplegroup = 14
-\chardef\@@mathshiftgroup = 15
-\chardef\@@mathleftgroup = 16
-
-\chardef\@@vadjustgroup = \@@insertgroup
+\chardef\bottomlevelgroupcode = 0
+\chardef\simplegroupcode = 1
+\chardef\hboxgroupcode = 2
+\chardef\adjustedhboxgroupcode = 3
+\chardef\vboxgroupcode = 4
+\chardef\vtopgroupcode = 5
+\chardef\aligngroupcode = 6
+\chardef\noaligngroupcode = 7
+\chardef\outputgroupcode = 8
+\chardef\mathgroupcode = 9
+\chardef\discretionarygroupcode = 10
+\chardef\insertgroupcode = 11
+\chardef\vcentergroupcode = 12
+\chardef\mathchoicegroupcode = 13
+\chardef\semisimplegroupcode = 14
+\chardef\mathshiftgroupcode = 15
+\chardef\mathleftgroupcode = 16
+\chardef\vadjustgroupcode = \insertgroupcode
%D Constants to be used with \type {\interactionmode}.
-\chardef\@@batchmode = 0
-\chardef\@@nonstopmode = 1
-\chardef\@@scrollmode = 2
-\chardef\@@errorstopmode = 3
+\chardef\batchmodecode = 0
+\chardef\nonstopmodecode = 1
+\chardef\scrollmodecode = 2
+\chardef\errorstopmodecode = 3
%D Constants to be used with \type {\lastnodetype}. The \type
%D {\lastnodetype} primitive is \ETEX\ compliant. The valid range is
@@ -535,45 +524,46 @@
%D mind that the internal node numbers are different and that there
%D are more node types that 15.
-\chardef\@@charnode = 0
-\chardef\@@hlistnode = 1
-\chardef\@@vlistnode = 2
-\chardef\@@rulenode = 3
-\chardef\@@insertnode = 4
-\chardef\@@marknode = 5
-\chardef\@@adjustnode = 6
-\chardef\@@ligaturenode = 7
-\chardef\@@discretionarynode = 8
-\chardef\@@whatsitnode = 9
-\chardef\@@mathnode = 10
-\chardef\@@gluenode = 11
-\chardef\@@kernnode = 12
-\chardef\@@penaltynode = 13
-\chardef\@@unsetnode = 14
-\chardef\@@mathsnode = 15
-
-%D Constants to be used with \type {\currentiftype}.
-
-\chardef\@@charif = 1
-\chardef\@@catif = 2
-\chardef\@@numif = 3
-\chardef\@@dimif = 4
-\chardef\@@oddif = 5
-\chardef\@@vmodeif = 6
-\chardef\@@hmodeif = 7
-\chardef\@@mmodeif = 8
-\chardef\@@innerif = 9
-\chardef\@@voidif = 10
-\chardef\@@hboxif = 11
-\chardef\@@vboxif = 12
-\chardef\@@xif = 13
-\chardef\@@eofif = 14
-\chardef\@@trueif = 15
-\chardef\@@falseif = 16
-\chardef\@@caseif = 17
-\chardef\@@definedif = 18
-\chardef\@@csnameif = 19
-\chardef\@@fontcharif = 20
+\chardef\charnodecode = 0
+\chardef\hlistnodecode = 1
+\chardef\vlistnodecode = 2
+\chardef\rulenodecode = 3
+\chardef\insertnodecode = 4
+\chardef\marknodecode = 5
+\chardef\adjustnodecode = 6
+\chardef\ligaturenodecode = 7
+\chardef\discretionarynodecode = 8
+\chardef\whatsitnodecode = 9
+\chardef\mathnodecode = 10
+\chardef\gluenodecode = 11
+\chardef\kernnodecode = 12
+\chardef\penaltynodecode = 13
+\chardef\unsetnodecode = 14
+\chardef\mathsnodecode = 15
+
+%D Constants to be used with \type {\currentiftype}. I wonder if
+%D we will ever use these in \CONTEXT.
+
+\chardef\charifcode = 1
+\chardef\catifcode = 2
+\chardef\numifcode = 3
+\chardef\dimifcode = 4
+\chardef\oddifcode = 5
+\chardef\vmodeifcode = 6
+\chardef\hmodeifcode = 7
+\chardef\mmodeifcode = 8
+\chardef\innerifcode = 9
+\chardef\voidifcode = 10
+\chardef\hboxifcode = 11
+\chardef\vboxifcode = 12
+\chardef\xifcode = 13
+\chardef\eofifcode = 14
+\chardef\trueifcode = 15
+\chardef\falseifcode = 16
+\chardef\caseifcode = 17
+\chardef\definedifcode = 18
+\chardef\csnameifcode = 19
+\chardef\fontcharifcode = 20
%D Of course we want even bigger log files, so we copied this
%D from the \ETEX\ source files.
@@ -670,28 +660,28 @@
% \normalprotected\def\appendtotoks #1#{\def\temp{#1}\afterassignment\doappendtotoks \scratchtoks=}
% \normalprotected\def\prependtotoks#1#{\def\temp{#1}\afterassignment\doprependtotoks\scratchtoks=}
-\newtoks\t_syst_app_pre_temp
+\newtoks\t_syst_toks_temp \let\m_syst_toks_temp\t_syst_toks_temp
-\normalprotected\def\appendtotoks #1{\let\scratch_toks#1\afterassignment\syst_app_toks_l\t_syst_app_pre_temp=}
-\normalprotected\def\prependtotoks#1{\let\scratch_toks#1\afterassignment\syst_pre_toks_l\t_syst_app_pre_temp=}
+\normalprotected\def\appendtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_append_l \t_syst_toks_temp=}
+\normalprotected\def\prependtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_prepend_l\t_syst_toks_temp=}
-% \def\syst_app_toks{\scratch_toks\expandafter\expandafter\expandafter{\expandafter\the\expandafter\scratch_toks\the\t_syst_app_pre_temp}}}
-% \def\syst_pre_toks{\scratch_toks\expandafter\expandafter\expandafter{\expandafter\the\expandafter\t_syst_app_pre_temp\the\scratch_toks}}}
+% \def\syst_toks_append {\m_syst_toks_temp\expandafter\expandafter\expandafter{\expandafter\the\expandafter\m_syst_toks_temp\the\t_syst_toks_temp}}}
+% \def\syst_toks_prepend{\m_syst_toks_temp\expandafter\expandafter\expandafter{\expandafter\the\expandafter\t_syst_toks_temp\the\m_syst_toks_temp}}}
-\normalprotected\def\globalappendtotoks #1{\let\scratch_toks#1\afterassignment\syst_app_toks_g\t_syst_app_pre_temp=}
-\normalprotected\def\globalprependtotoks#1{\let\scratch_toks#1\afterassignment\syst_pre_toks_g\t_syst_app_pre_temp=}
+\normalprotected\def\globalappendtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_append_g \t_syst_toks_temp=}
+\normalprotected\def\globalprependtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_prepend_g\t_syst_toks_temp=}
-\def\syst_app_toks_l{\normalexpanded{\scratch_toks{\the\scratch_toks\the\t_syst_app_pre_temp}}}
-\def\syst_pre_toks_l{\normalexpanded{\scratch_toks{\the\t_syst_app_pre_temp\the\scratch_toks}}}
+\def\syst_toks_append_l {\normalexpanded{\m_syst_toks_temp{\the\m_syst_toks_temp\the\t_syst_toks_temp}}}
+\def\syst_toks_prepend_l{\normalexpanded{\m_syst_toks_temp{\the\t_syst_toks_temp\the\m_syst_toks_temp}}}
-\def\syst_app_toks_g{\global\syst_app_toks_l}
-\def\syst_pre_toks_g{\global\syst_pre_toks_l}
+\def\syst_toks_append_g {\global\syst_toks_append_l }
+\def\syst_toks_prepend_g{\global\syst_toks_prepend_l}
-\normalprotected\def\addtotoks #1{\let\scratch_toks#1\afterassignment\syst_add_toks_l\let\next}
-\normalprotected\def\globaladdtotoks#1{\let\scratch_toks#1\afterassignment\syst_add_toks_g\let\next}
+\normalprotected\def\addtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_add_l\let\next}
+\normalprotected\def\globaladdtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_add_g\let\next}
-\def\syst_add_toks_l{\scratch_toks\expandafter\bgroup\the\scratch_toks}
-\def\syst_add_toks_g{\global\syst_add_toks_l}
+\def\syst_toks_add_l{\m_syst_toks_temp\expandafter\bgroup\the\m_syst_toks_temp}
+\def\syst_toks_add_g{\global\syst_toks_add_l}
\normalprotected\def\addtotokscs #1#2{#1{\the#1#2}} % saves a few bytes
\normalprotected\def\globaladdtotokscs#1#2{\global#1{\the#1#2}} % saves a few bytes
diff --git a/tex/context/base/tabl-xnt.mkvi b/tex/context/base/tabl-xnt.mkvi
index 1e7fefe2c..35451abe0 100644
--- a/tex/context/base/tabl-xnt.mkvi
+++ b/tex/context/base/tabl-xnt.mkvi
@@ -53,42 +53,42 @@
%D
%D \typebuffer \getbuffer
-\let\normal_x_table_bTABLEhead\bTABLEhead
-\let\normal_x_table_eTABLEhead\eTABLEhead
-\let\normal_x_table_bTABLEnext\bTABLEnext
-\let\normal_x_table_eTABLEnext\eTABLEnext
-\let\normal_x_table_bTABLEfoot\bTABLEfoot
-\let\normal_x_table_eTABLEfoot\eTABLEfoot
-\let\normal_x_table_bTABLEbody\bTABLEbody
-\let\normal_x_table_eTABLEbody\eTABLEbody
-\let\normal_x_table_bTR \bTR
-\let\normal_x_table_eTR \eTR
-\let\normal_x_table_bTD \bTD
-\let\normal_x_table_eTD \eTD
-\let\normal_x_table_bTH \bTH
-\let\normal_x_table_eTH \eTH
-\let\normal_x_table_setupTABLE\setupTABLE
-\let\normal_x_table_bTABLE \bTABLE
-\let\normal_x_table_eTABLE \eTABLE
+\let\tabl_x_normal_bTABLEhead\bTABLEhead
+\let\tabl_x_normal_eTABLEhead\eTABLEhead
+\let\tabl_x_normal_bTABLEnext\bTABLEnext
+\let\tabl_x_normal_eTABLEnext\eTABLEnext
+\let\tabl_x_normal_bTABLEfoot\bTABLEfoot
+\let\tabl_x_normal_eTABLEfoot\eTABLEfoot
+\let\tabl_x_normal_bTABLEbody\bTABLEbody
+\let\tabl_x_normal_eTABLEbody\eTABLEbody
+\let\tabl_x_normal_bTR \bTR
+\let\tabl_x_normal_eTR \eTR
+\let\tabl_x_normal_bTD \bTD
+\let\tabl_x_normal_eTD \eTD
+\let\tabl_x_normal_bTH \bTH
+\let\tabl_x_normal_eTH \eTH
+\let\tabl_x_normal_setupTABLE\setupTABLE
+\let\tabl_x_normal_bTABLE \bTABLE
+\let\tabl_x_normal_eTABLE \eTABLE
\unexpanded\def\restoreTABLEfromxtable
- {\let\bTABLEhead\normal_x_table_bTABLEhead
- \let\eTABLEhead\normal_x_table_eTABLEhead
- \let\bTABLEnext\normal_x_table_bTABLEnext
- \let\eTABLEnext\normal_x_table_eTABLEnext
- \let\bTABLEfoot\normal_x_table_bTABLEfoot
- \let\eTABLEfoot\normal_x_table_eTABLEfoot
- \let\bTABLEbody\normal_x_table_bTABLEbody
- \let\eTABLEbody\normal_x_table_eTABLEbody
- \let\bTR \normal_x_table_bTR
- \let\eTR \normal_x_table_eTR
- \let\bTD \normal_x_table_bTD
- \let\eTD \normal_x_table_eTD
- \let\bTH \normal_x_table_bTH
- \let\eTH \normal_x_table_eTH
- \let\setupTABLE\normal_x_table_setupTABLE
- \let\bTABLE \normal_x_table_bTABLE
- \let\eTABLE \normal_x_table_eTABLE}
+ {\let\bTABLEhead\tabl_x_normal_bTABLEhead
+ \let\eTABLEhead\tabl_x_normal_eTABLEhead
+ \let\bTABLEnext\tabl_x_normal_bTABLEnext
+ \let\eTABLEnext\tabl_x_normal_eTABLEnext
+ \let\bTABLEfoot\tabl_x_normal_bTABLEfoot
+ \let\eTABLEfoot\tabl_x_normal_eTABLEfoot
+ \let\bTABLEbody\tabl_x_normal_bTABLEbody
+ \let\eTABLEbody\tabl_x_normal_eTABLEbody
+ \let\bTR \tabl_x_normal_bTR
+ \let\eTR \tabl_x_normal_eTR
+ \let\bTD \tabl_x_normal_bTD
+ \let\eTD \tabl_x_normal_eTD
+ \let\bTH \tabl_x_normal_bTH
+ \let\eTH \tabl_x_normal_eTH
+ \let\setupTABLE\tabl_x_normal_setupTABLE
+ \let\bTABLE \tabl_x_normal_bTABLE
+ \let\eTABLE \tabl_x_normal_eTABLE}
\unexpanded\def\mapTABLEtoxtable
{\let\bTABLEhead\startxtablehead
@@ -103,33 +103,33 @@
\let\eTR \stopxrow
\let\bTD \startxcell
\let\eTD \stopxcell
- \let\bTH \start_x_cell_th
- \let\eTH \stop_x_cell_th
- \let\setupTABLE\setup_x_table_TABLE
- \let\bTABLE \start_x_table_TABLE
- \let\eTABLE \stop_x_table_TABLE}
+ \let\bTH \tabl_x_TABLE_TH_start_cell
+ \let\eTH \tabl_x_TABLE_TH_stop_cell
+ \let\setupTABLE\tabl_x_TABLE_setup
+ \let\bTABLE \tabl_x_TABLE_start
+ \let\eTABLE \tabl_x_TABLE_stop}
-\unexpanded\def\setup_x_table_TABLE{\dosingleempty\do_setup_x_table_TABLE}
-\unexpanded\def\start_x_table_TABLE{\dosingleempty\do_start_x_table_TABLE}
-\unexpanded\def\stop_x_table_TABLE {\stopxtable}
+\unexpanded\def\tabl_x_TABLE_setup{\dosingleempty\tabl_x_TABLE_setup_indeed}
+\unexpanded\def\tabl_x_TABLE_start{\dosingleempty\tabl_x_TABLE_start_indeed}
+\unexpanded\def\tabl_x_TABLE_stop {\stopxtable}
-\unexpanded\def\start_x_cell_th
+\unexpanded\def\tabl_x_TABLE_TH_start_cell
{\startxcellgroup[\c!foregroundstyle=\v!bold]%
\startxcell}
-\unexpanded\def\stop_x_cell_th
+\unexpanded\def\tabl_x_TABLE_TH_stop_cell
{\stopxcell
\stopxcellgroup}
-\unexpanded\def\do_setup_x_table_TABLE[#settings]%
+\unexpanded\def\tabl_x_TABLE_setup_indeed[#settings]%
{\iffirstargument
\setupxtable[#settings]%
\fi}
-\unexpanded\def\do_start_x_table_TABLE[#settings]%
+\unexpanded\def\tabl_x_TABLE_start_indeed[#settings]%
{\bgroup
- \x_table_prepare{#settings}%
- \edef\x_table_current_buffer{\x_table_default_buffer}%
- \buffers_pickup\x_table_current_buffer{bTABLE}{eTABLE}\relax\x_table_process}
+ \tabl_x_prepare{#settings}%
+ \edef\tabl_x_current_buffer{\x_table_default_buffer}%
+ \buff_pickup\tabl_x_current_buffer{bTABLE}{eTABLE}\relax\tabl_x_process}
\protect \endinput
diff --git a/tex/context/base/tabl-xtb.mkvi b/tex/context/base/tabl-xtb.mkvi
index 20036a869..f8900e2d1 100644
--- a/tex/context/base/tabl-xtb.mkvi
+++ b/tex/context/base/tabl-xtb.mkvi
@@ -82,18 +82,18 @@
\def\dotagxtablesignal{\char\zerocount}% not used
\to \everyenableelements
-\newdimen\x_table_width
-\newdimen\x_table_height
-\newdimen\x_table_depth % not used
-\newdimen\x_table_distance
-\newcount\x_table_nx
-\newcount\x_table_ny
-\newcount\x_table_mode
-\newbox \x_table_box
-\newcount\x_table_state % 0=empty 1=content 3=splitleft
-\newdimen\x_table_final_width
-\newcount\x_table_nesting
-\newcount\x_table_skip_mode % 1 = skip
+\newdimen\d_tabl_x_width
+\newdimen\d_tabl_x_height
+\newdimen\d_tabl_x_depth % not used
+\newdimen\d_tabl_x_distance
+\newcount\c_tabl_x_nx
+\newcount\c_tabl_x_ny
+\newcount\c_tabl_x_mode
+\newbox \b_tabl_x_box
+\newcount\c_tabl_x_state % 0=empty 1=content 3=splitleft
+\newdimen\d_tabl_x_final_width
+\newcount\c_tabl_x_nesting
+\newcount\c_tabl_x_skip_mode % 1 = skip
% \setupxtable[one][parent][a=b,c=d]
% \setupxtable[one] [a=b,c=d]
@@ -143,97 +143,97 @@
]
\unexpanded\def\startxtable
- {\dosingleempty\start_x_table}
+ {\dosingleempty\tabl_x_start_table}
\let\stopxtable\relax
-\def\x_table_default_buffer{x_table_\number\x_table_nesting}
+\def\tabl_x_default_buffer{x_table_\number\c_tabl_x_nesting}
-\unexpanded\def\start_x_table[#settings]% maybe two arguments: [tag][settings] | [tag] | [settings]
+\unexpanded\def\tabl_x_start_table[#settings]% maybe two arguments: [tag][settings] | [tag] | [settings]
{\bgroup
- \x_table_prepare{#settings}%
- \edef\x_table_current_buffer{\x_table_default_buffer}%
- \buffers_pickup{\x_table_current_buffer}{startxtable}{stopxtable}\relax\x_table_process}
+ \tabl_x_prepare{#settings}%
+ \edef\tabl_x_current_buffer{\tabl_x_default_buffer}%
+ \buff_pickup{\tabl_x_current_buffer}{startxtable}{stopxtable}\relax\tabl_x_process}
\unexpanded\def\processxtablebuffer
- {\dosingleempty\process_x_table_buffer}
+ {\dosingleempty\tabl_x_process_buffer}
-\let\normal_start_x_table\start_x_table
+\let\tabl_x_normal_start\tabl_x_start_table
% These direct buffers can be somewhat faster but it's probably neglectable.
% Anyway, no nesting is supported as we then need to catch (e.g.) rows and
% keep track of nesting and have a more complex redefinition of nested
% instanced \unknown\ it's not worth the trouble.
-\def\process_x_table_buffer[#name]%
+\def\tabl_x_process_buffer[#name]%
{\bgroup
- \let\start_x_table\start_process_x_table_buffer
- \edef\x_table_current_buffer{#name}%
- \x_table_get_buffer % pickup settings
- \x_table_process}
+ \let\tabl_x_start_table\tabl_x_process_buffer
+ \edef\tabl_x_current_buffer{#name}%
+ \tabl_x_get_buffer % pickup settings
+ \tabl_x_process}
-\def\ignore_start_x_table[#settings]%
+\def\tabl_x_start_ignore[#settings]%
{}
-\def\start_process_x_table_buffer[#settings]%
- {\x_table_prepare{#settings}%
- \let\start_x_table\ignore_start_x_table
+\def\tabl_x_process_buffer[#settings]%
+ {\tabl_x_prepare{#settings}%
+ \let\tabl_x_start_table\tabl_x_start_ignore
\gobbleuntil\stopxtable}
%D A bonus: you can use the following construct inside a macro.
\unexpanded\def\startembeddedxtable
- {\dosingleempty\start_embedded_x_table}
+ {\dosingleempty\tabl_x_embedded_start}
-\def\start_embedded_x_table[#settings]#content\stopembeddedxtable
- {\x_table_prepare{#settings}%
+\def\tabl_x_embedded_start[#settings]#content\stopembeddedxtable
+ {\tabl_x_prepare{#settings}%
\ctxcommand{assignbuffer("embedded_x_table",\!!bs\detokenize{#content}\!!es)}%
\bgroup
- \let\start_x_table\start_process_x_table_buffer
- \edef\x_table_current_buffer{embedded_x_table}%
- \x_table_process}
+ \let\tabl_x_start_table\tabl_x_process_buffer
+ \edef\tabl_x_current_buffer{embedded_x_table}%
+ \tabl_x_process}
\let\stopembeddedxtable\relax
%D We can also define xtables.
\appendtoks
- \setuevalue{\e!start\currentxtable}{\start_named_x_table{\currentxtable}}%
- \setuevalue{\e!stop \currentxtable}{\stop_named_x_table}%
+ \setuevalue{\e!start\currentxtable}{\tabl_x_start_named{\currentxtable}}%
+ \setuevalue{\e!stop \currentxtable}{\tabl_x_stop_named}%
\to \everydefinextable
-\unexpanded\def\start_named_x_table#tag%
+\unexpanded\def\tabl_x_start_named#tag%
{\bgroup
\edef\currentxtable{#tag}%
- \dosingleempty\start_named_x_table_indeed}
+ \dosingleempty\tabl_x_start_named_indeed}
-\unexpanded\def\start_named_x_table_indeed[#settings]%
- {\advance\x_table_nesting\plusone
+\unexpanded\def\tabl_x_start_named_indeed[#settings]%
+ {\advance\c_tabl_x_nesting\plusone
\dostarttagged\t!table\empty
\forgetall
\iffirstargument
\setupcurrentxtable[#settings]%
\fi
- \edef\x_table_current_buffer{\x_table_default_buffer}%
- \normalexpanded{\buffers_pickup{\x_table_current_buffer}{\e!start\currentxtable}{\e!stop\currentxtable}\relax\x_table_process}}
+ \edef\tabl_x_current_buffer{\tabl_x_default_buffer}%
+ \normalexpanded{\buff_pickup{\tabl_x_current_buffer}{\e!start\currentxtable}{\e!stop\currentxtable}\relax\tabl_x_process}}
-\unexpanded\def\stop_named_x_table
+\unexpanded\def\tabl_x_stop_named
{}
%D Now we come to processing:
-\def\x_table_prepare#settings% assumes \iffirstargument to be set
- {\advance\x_table_nesting\plusone
+\def\tabl_x_prepare#settings% assumes \iffirstargument to be set
+ {\advance\c_tabl_x_nesting\plusone
\dostarttagged\t!table\empty
\forgetall
\iffirstargument
- \set_checked_x_table{#settings}%
+ \tabl_x_set_checked{#settings}%
\fi}
-\def\x_table_get_buffer
- {\ctxcommand{gettexbuffer("\x_table_current_buffer")}}
+\def\tabl_x_get_buffer
+ {\ctxcommand{gettexbuffer("\tabl_x_current_buffer")}}
-\unexpanded\def\x_table_process
+\unexpanded\def\tabl_x_process
{\begingroup % *
\doifsomething{\xtableparameter\c!bodyfont}
{\setupbodyfont[\xtableparameter\c!bodyfont]}%
@@ -255,76 +255,76 @@
\linewidth\xtableparameter\c!rulethickness\relax
% so we freeze it
\begingroup
- \let\start_x_row_yes \start_x_row_reflow_width_yes
- \let\start_x_row_nop \start_x_row_reflow_width_nop
- \let\stop_x_row \stop_x_row_reflow_width
- \let\start_x_cell_yes\start_x_cell_reflow_width_yes
- \let\start_x_cell_nop\start_x_cell_reflow_width_nop
- \let\stop_x_cell \stop_x_cell_reflow_width
+ \let\tabl_x_start_row_yes \tabl_x_start_row_reflow_width_yes
+ \let\tabl_x_start_row_nop \tabl_x_start_row_reflow_width_nop
+ \let\tabl_x_stop_row \tabl_x_stop_row_reflow_width
+ \let\tabl_x_start_cell_yes\tabl_x_start_cell_reflow_width_yes
+ \let\tabl_x_start_cell_nop\tabl_x_start_cell_reflow_width_nop
+ \let\tabl_x_stop_cell \tabl_x_stop_cell_reflow_width
\settrialtypesetting
- \x_table_get_buffer
+ \tabl_x_get_buffer
\ctxcommand{x_table_reflow_width()}\relax
\endgroup
\begingroup
- \let\start_x_row_yes \start_x_row_reflow_height_yes
- \let\start_x_row_nop \start_x_row_reflow_height_nop
- \let\stop_x_row \stop_x_row_reflow_height
- \let\start_x_cell_yes\start_x_cell_reflow_height_yes
- \let\start_x_cell_nop\start_x_cell_reflow_height_nop
- \let\stop_x_cell \stop_x_cell_reflow_height
+ \let\tabl_x_start_row_yes \tabl_x_start_row_reflow_height_yes
+ \let\tabl_x_start_row_nop \tabl_x_start_row_reflow_height_nop
+ \let\tabl_x_stop_row \tabl_x_stop_row_reflow_height
+ \let\tabl_x_start_cell_yes\tabl_x_start_cell_reflow_height_yes
+ \let\tabl_x_start_cell_nop\tabl_x_start_cell_reflow_height_nop
+ \let\tabl_x_stop_cell \tabl_x_stop_cell_reflow_height
\settrialtypesetting
- \x_table_get_buffer
+ \tabl_x_get_buffer
\ctxcommand{x_table_reflow_height()}\relax
\endgroup
\begingroup
- \let\start_x_row_yes \start_x_row_construct_yes
- \let\start_x_row_nop \start_x_row_construct_nop
- \let\stop_x_row \stop_x_row_construct
- \let\start_x_cell_yes\start_x_cell_construct_yes
- \let\start_x_cell_nop\start_x_cell_construct_nop
- \let\stop_x_cell \stop_x_cell_construct
- \x_table_get_buffer
+ \let\tabl_x_start_row_yes \tabl_x_start_row_construct_yes
+ \let\tabl_x_start_row_nop \tabl_x_start_row_construct_nop
+ \let\tabl_x_stop_row \tabl_x_stop_row_construct
+ \let\tabl_x_start_cell_yes\tabl_x_start_cell_construct_yes
+ \let\tabl_x_start_cell_nop\tabl_x_start_cell_construct_nop
+ \let\tabl_x_stop_cell \tabl_x_stop_cell_construct
+ \tabl_x_get_buffer
\ctxcommand{x_table_construct()}\relax
\endgroup
\endgroup % *
\ifinsidesplitfloat
- \x_table_flush_float_split
+ \tabl_x_flush_float_split
\else\ifinsidefloat
- \x_table_flush_float_normal
+ \tabl_x_flush_float_normal
\else
\doifelse{\xtableparameter\c!split}\v!yes
- \x_table_flush_flow_split
- \x_table_flush_flow_normal
+ \tabl_x_flush_flow_split
+ \tabl_x_flush_flow_normal
\fi\fi
\ctxcommand{x_table_cleanup()}%
\dostoptagged
- \resetbuffer[\x_table_current_buffer]%
+ \resetbuffer[\tabl_x_current_buffer]%
\egroup}
\let\extratxtablesplitheight\zeropoint % might disappear so don't depend on it
-\def\x_table_flush_float_normal
+\def\tabl_x_flush_float_normal
{\ctxcommand{x_table_flush{ method = "\v!normal" }}}
-\def\x_table_flush_float_split
+\def\tabl_x_flush_float_split
{\resetdirecttsplit
\edef\extrasplitfloatlines {\xtableparameter\c!split}%
\edef\tsplitminimumfreespace{\the\dimexpr\extratxtablesplitheight+\xtableparameter\c!splitoffset\relax}%
% \edef\tsplitminimumfreelines{2}% not needed here as we're precise enough
- \let\tsplitdirectsplitter\x_table_split_splitter
- \let\tsplitdirectwidth \x_table_final_width
+ \let\tsplitdirectsplitter\tabl_x_split_splitter
+ \let\tsplitdirectwidth \d_tabl_x_final_width
\handledirecttsplit}
-\def\x_table_flush_flow_normal
+\def\tabl_x_flush_flow_normal
{\ctxcommand{x_table_flush{ method = "\v!normal" }}}
-\def\x_table_flush_flow_split
+\def\tabl_x_flush_flow_split
{\ctxcommand{x_table_flush{ method = "\v!split" }}}
-\def\x_table_split_splitter#vsize%
+\def\tabl_x_split_splitter#vsize%
{\setbox\tsplitresult\vbox
{\ctxcommand{x_table_flush{ method = "\v!split", vsize = \number\dimexpr#vsize }}}%
- \ifcase\x_table_state
+ \ifcase\c_tabl_x_state
\global\setfalse\somenextsplitofffloat
\else
\global\settrue \somenextsplitofffloat
@@ -332,49 +332,49 @@
\unexpanded\def\startxrow
{\begingroup
- \doifnextoptionalelse\start_x_row_yes\start_x_row_nop}
+ \doifnextoptionalelse\tabl_x_start_row_yes\tabl_x_start_row_nop}
-\def\start_x_row_reflow_width_yes[#settings]%
+\def\tabl_x_start_row_reflow_width_yes[#settings]%
{\setupcurrentxtable[#settings]%
\ctxcommand{x_table_next_row()}}
-\def\start_x_row_reflow_width_nop
+\def\tabl_x_start_row_reflow_width_nop
{\ctxcommand{x_table_next_row()}}
-\def\stop_x_row_reflow_width
+\def\tabl_x_stop_row_reflow_width
{}
-\let\start_x_row_reflow_height_yes\start_x_row_reflow_width_yes
-\let\start_x_row_reflow_height_nop\start_x_row_reflow_width_nop
-\let\stop_x_row_reflow_height \stop_x_row_reflow_width
+\let\tabl_x_start_row_reflow_height_yes\tabl_x_start_row_reflow_width_yes
+\let\tabl_x_start_row_reflow_height_nop\tabl_x_start_row_reflow_width_nop
+\let\tabl_x_stop_row_reflow_height \tabl_x_stop_row_reflow_width
-\def\start_x_row_construct_yes[#settings]%
+\def\tabl_x_start_row_construct_yes[#settings]%
{\setupcurrentxtable[#settings]%
\dostarttagged\t!tablerow\empty
\ctxcommand{x_table_next_row()}}
-\def\start_x_row_construct_nop
+\def\tabl_x_start_row_construct_nop
{\dostarttagged\t!tablerow\empty
\ctxcommand{x_table_next_row()}}
-\def\stop_x_row_construct
+\def\tabl_x_stop_row_construct
{\dostoptagged}
\unexpanded\def\stopxrow
- {\stop_x_row
+ {\tabl_x_stop_row
\endgroup}
\unexpanded\def\startxcell
- {\doifnextoptionalelse\start_x_cell_yes\start_x_cell_nop}
+ {\doifnextoptionalelse\tabl_x_start_cell_yes\tabl_x_start_cell_nop}
\unexpanded\def\stopxcell
- {\stop_x_cell}
+ {\tabl_x_stop_cell}
-\def\begin_of_cell
+\def\tabl_x_begin_of_cell
{\inhibitblank
\everypar{\delayedbegstrut}}
-\def\end_of_cell
+\def\tabl_x_end_of_cell
{\ifhmode
\delayedendstrut
\par
@@ -391,18 +391,18 @@
% obsolete some day. The let as well as the direct speed things up a bit. We
% could also consider a \defaultxtableparameter.
%
-% \x_table_nx\defaultxtableparameter\c!nc{\defaultxtableparameter\c!nx\plusone}
-% \x_table_ny\defaultxtableparameter\c!nr{\defaultxtableparameter\c!ny\plusone}
+% \c_tabl_x_nx\defaultxtableparameter\c!nc{\defaultxtableparameter\c!nx\plusone}
+% \c_tabl_x_ny\defaultxtableparameter\c!nr{\defaultxtableparameter\c!ny\plusone}
%
% Although this becomes kind of messy. It saves already time that we only check
% for it when we have settings.
-\def\set_x_table_hsize
+\def\tabl_x_set_hsize
{\hsize.25\maxdimen} % let's be reasonable
-\unexpanded\def\start_x_cell_reflow_width_yes[#settings]%
- {\setbox\x_table_box\hbox\bgroup
- \ifnum\x_table_nesting>\plusone
+\unexpanded\def\tabl_x_start_cell_reflow_width_yes[#settings]%
+ {\setbox\b_tabl_x_box\hbox\bgroup
+ \ifnum\c_tabl_x_nesting>\plusone
\letxtableparameter\c!width \v!fit % overloads given width
\letxtableparameter\c!height\v!fit % overloads given height
\fi
@@ -414,99 +414,99 @@
%
\setupcurrentxtable[#settings]%
%
- \x_table_nx\directxtableparameter\c!nc\relax
- \x_table_ny\directxtableparameter\c!nr\relax
- \ifnum\x_table_nx=\plusone
- \x_table_nx\directxtableparameter\c!nx\relax
+ \c_tabl_x_nx\directxtableparameter\c!nc\relax
+ \c_tabl_x_ny\directxtableparameter\c!nr\relax
+ \ifnum\c_tabl_x_nx=\plusone
+ \c_tabl_x_nx\directxtableparameter\c!nx\relax
\fi
- \ifnum\x_table_ny=\plusone
- \x_table_ny\directxtableparameter\c!ny\relax
+ \ifnum\c_tabl_x_ny=\plusone
+ \c_tabl_x_ny\directxtableparameter\c!ny\relax
\fi
%
- \x_table_distance\xtableparameter\c!distance\relax
+ \d_tabl_x_distance\xtableparameter\c!distance\relax
\ctxcommand{x_table_init_reflow_width()}%
\inheritedxtableframed\bgroup
- \begin_of_cell
- \set_x_table_hsize}
+ \tabl_x_begin_of_cell
+ \tabl_x_set_hsize}
-\unexpanded\def\start_x_cell_reflow_width_nop
- {\setbox\x_table_box\hbox\bgroup
- \ifnum\x_table_nesting>\plusone
+\unexpanded\def\tabl_x_start_cell_reflow_width_nop
+ {\setbox\b_tabl_x_box\hbox\bgroup
+ \ifnum\c_tabl_x_nesting>\plusone
\letxtableparameter\c!width \v!fit % overloads given width
\letxtableparameter\c!height\v!fit % overloads given height
\fi
- \x_table_nx\plusone
- \x_table_ny\plusone
- \x_table_distance\xtableparameter\c!distance\relax
+ \c_tabl_x_nx\plusone
+ \c_tabl_x_ny\plusone
+ \d_tabl_x_distance\xtableparameter\c!distance\relax
\ctxcommand{x_table_init_reflow_width()}%
\inheritedxtableframed\bgroup
- \begin_of_cell
- \set_x_table_hsize}
+ \tabl_x_begin_of_cell
+ \tabl_x_set_hsize}
-\unexpanded\def\stop_x_cell_reflow_width
- {\end_of_cell
+\unexpanded\def\tabl_x_stop_cell_reflow_width
+ {\tabl_x_end_of_cell
\egroup
\egroup
\ctxcommand{x_table_set_reflow_width()}}
-\unexpanded\def\start_x_cell_reflow_height_yes[#settings]%
- {\setbox\x_table_box\hbox\bgroup
+\unexpanded\def\tabl_x_start_cell_reflow_height_yes[#settings]%
+ {\setbox\b_tabl_x_box\hbox\bgroup
\ctxcommand{x_table_init_reflow_height()}%
- \ifcase\x_table_skip_mode % can be sped up
- \ifnum\x_table_nesting>\plusone
+ \ifcase\c_tabl_x_skip_mode % can be sped up
+ \ifnum\c_tabl_x_nesting>\plusone
\letxtableparameter\c!height\v!fit % overloads given height
\fi
\setupcurrentxtable[#settings]%
\relax
- \letxtableparameter\c!width\x_table_width % overloads given width
+ \letxtableparameter\c!width\d_tabl_x_width % overloads given width
\inheritedxtableframed\bgroup
- \begin_of_cell
+ \tabl_x_begin_of_cell
\fi}
-\unexpanded\def\start_x_cell_reflow_height_nop
- {\setbox\x_table_box\hbox\bgroup
+\unexpanded\def\tabl_x_start_cell_reflow_height_nop
+ {\setbox\b_tabl_x_box\hbox\bgroup
\ctxcommand{x_table_init_reflow_height()}%
- \ifcase\x_table_skip_mode % can be sped up
- \ifnum\x_table_nesting>\plusone
+ \ifcase\c_tabl_x_skip_mode % can be sped up
+ \ifnum\c_tabl_x_nesting>\plusone
\letxtableparameter\c!height\v!fit % overloads given height
\fi
\relax
- \letxtableparameter\c!width\x_table_width % overloads given width
+ \letxtableparameter\c!width\d_tabl_x_width % overloads given width
\inheritedxtableframed\bgroup
- \begin_of_cell
+ \tabl_x_begin_of_cell
\fi}
-\unexpanded\def\stop_x_cell_reflow_height
- {\ifcase\x_table_skip_mode
- \end_of_cell
+\unexpanded\def\tabl_x_stop_cell_reflow_height
+ {\ifcase\c_tabl_x_skip_mode
+ \tabl_x_end_of_cell
\egroup
\fi
\egroup
\ctxcommand{x_table_set_reflow_height()}}
-\unexpanded\def\start_x_cell_construct_yes[#settings]%
+\unexpanded\def\tabl_x_start_cell_construct_yes[#settings]%
{\dostarttagged\t!tablecell\empty % can't we just tag the box
- \setbox\x_table_box\hbox\bgroup
+ \setbox\b_tabl_x_box\hbox\bgroup
\setupcurrentxtable[#settings]%
- \letxtableparameter\c!width \x_table_width % overloads given width
- \letxtableparameter\c!height\x_table_height % overloads given height
+ \letxtableparameter\c!width \d_tabl_x_width % overloads given width
+ \letxtableparameter\c!height\d_tabl_x_height % overloads given height
\ctxcommand{x_table_init_construct()}%
\inheritedxtableframed\bgroup
- \begin_of_cell
+ \tabl_x_begin_of_cell
\dotagxtablecell}
-\unexpanded\def\start_x_cell_construct_nop
+\unexpanded\def\tabl_x_start_cell_construct_nop
{\dostarttagged\t!tablecell\empty % can't we just tag the box
- \setbox\x_table_box\hbox\bgroup
- \letxtableparameter\c!width \x_table_width % overloads given width
- \letxtableparameter\c!height\x_table_height % overloads given height
+ \setbox\b_tabl_x_box\hbox\bgroup
+ \letxtableparameter\c!width \d_tabl_x_width % overloads given width
+ \letxtableparameter\c!height\d_tabl_x_height % overloads given height
\ctxcommand{x_table_init_construct()}%
\inheritedxtableframed\bgroup
- \begin_of_cell
+ \tabl_x_begin_of_cell
\dotagxtablecell}
-\unexpanded\def\stop_x_cell_construct
- {\end_of_cell
+\unexpanded\def\tabl_x_stop_cell_construct
+ {\tabl_x_end_of_cell
\egroup
\egroup
\ctxcommand{x_table_set_construct()}%
@@ -514,60 +514,60 @@
\unexpanded\def\startxcellgroup
{\begingroup
- \dosingleempty\start_x_cell_group}
+ \dosingleempty\tabl_x_start_cell_group}
\unexpanded\def\stopxcellgroup
{\endgroup}
-\unexpanded\def\start_x_cell_group[#settings]%
+\unexpanded\def\tabl_x_start_cell_group[#settings]%
{\iffirstargument
- \set_checked_x_table{#settings}%
+ \tabl_x_set_checked{#settings}%
\fi}
\unexpanded\def\startxrowgroup
{\begingroup
- \dosingleempty\start_x_row_group}
+ \dosingleempty\tabl_x_start_row_group}
\unexpanded\def\stopxrowgroup
{\dostoptagged
\endgroup}
-\unexpanded\def\start_x_row_group[#settings]%
+\unexpanded\def\tabl_x_start_row_group[#settings]%
{\iffirstargument
- \set_checked_x_table{#settings}%
+ \tabl_x_set_checked{#settings}%
\fi}
-% \def\set_checked_x_table#settings
+% \def\tabl_x_set_checked#settings
% {\doifassignmentelse{#settings}
% {\setupcurrentxtable[#settings]}
% {\ifcsname\namedxtablehash{#settings}\s!parent\endcsname
% \edef\currentxtable{#settings}%
% \fi}}
-\unexpanded\def\set_checked_x_table#settings%
+\unexpanded\def\tabl_x_set_checked#settings%
{\ifcsname\namedxtablehash{#settings}\s!parent\endcsname
\edef\currentxtable{#settings}%
\else
\setupcurrentxtable[#settings]%
\fi}
-\unexpanded\def\startxtablehead{\begingroup\x_table_mode\plusone \dosingleempty\start_x_table_partition}
-\unexpanded\def\startxtablefoot{\begingroup\x_table_mode\plustwo \dosingleempty\start_x_table_partition}
-\unexpanded\def\startxtablenext{\begingroup\x_table_mode\plusthree\dosingleempty\start_x_table_partition}
-\unexpanded\def\startxtablebody{\begingroup\x_table_mode\plusfour \dosingleempty\start_x_table_partition}
+\unexpanded\def\startxtablehead{\begingroup\c_tabl_x_mode\plusone \dosingleempty\tabl_x_start_partition}
+\unexpanded\def\startxtablefoot{\begingroup\c_tabl_x_mode\plustwo \dosingleempty\tabl_x_start_partition}
+\unexpanded\def\startxtablenext{\begingroup\c_tabl_x_mode\plusthree\dosingleempty\tabl_x_start_partition}
+\unexpanded\def\startxtablebody{\begingroup\c_tabl_x_mode\plusfour \dosingleempty\tabl_x_start_partition}
-\unexpanded\def\start_x_table_partition[#settings]%
+\unexpanded\def\tabl_x_start_partition[#settings]%
{\iffirstargument
- \set_checked_x_table{#settings}%
+ \tabl_x_set_checked{#settings}%
\fi}
-\unexpanded\def\stop_x_table_partition
+\unexpanded\def\tabl_x_stop_partition
{\endgroup}
-\let\stopxtablehead\stop_x_table_partition
-\let\stopxtablefoot\stop_x_table_partition
-\let\stopxtablenext\stop_x_table_partition
-\let\stopxtablebody\stop_x_table_partition
+\let\stopxtablehead\tabl_x_stop_partition
+\let\stopxtablefoot\tabl_x_stop_partition
+\let\stopxtablenext\tabl_x_stop_partition
+\let\stopxtablebody\tabl_x_stop_partition
%D This is an experiment! Beware: you can create loops by using nested
%D references to already chained settings.
@@ -606,20 +606,20 @@
\unexpanded\def\startxgroup
{\begingroup
- \doifnextoptionalelse\start_x_group_delayed_one\relax}
+ \doifnextoptionalelse\tabl_x_start_group_delayed_one\relax}
\unexpanded\def\stopxgroup
{\endgroup}
-\def\start_x_group_delayed_one[#tag]%
+\def\tabl_x_start_group_delayed_one[#tag]%
% {\ifcsname\namedxtablehash{#tag}\s!parent\endcsname
{\ifcsname\??xtablecheck#tag\endcsname
- \expandafter\start_x_group_delayed_two
+ \expandafter\tabl_x_start_group_delayed_two
\else
\expandafter\setupcurrentxtable
\fi[#tag]}
-\def\start_x_group_delayed_two[#tag]%
+\def\tabl_x_start_group_delayed_two[#tag]%
{\ifx\currentxtable\empty \else
\chaintocurrentxtable{#tag}%
\fi
@@ -635,50 +635,50 @@
\unexpanded\def\startxcell
{\begingroup
- \doifnextoptionalelse\start_x_cell_delayed_one\start_x_cell_nop}
+ \doifnextoptionalelse\tabl_x_start_cell_delayed_one\tabl_x_start_cell_nop}
-\def\start_x_cell_delayed_one[#tag]%
+\def\tabl_x_start_cell_delayed_one[#tag]%
% {\ifcsname\namedxtablehash{#tag}\s!parent\endcsname
{\ifcsname\??xtablecheck#tag\endcsname
- \expandafter\start_x_cell_delayed_two
+ \expandafter\tabl_x_start_cell_delayed_two
\else
- \expandafter\start_x_cell_yes
+ \expandafter\tabl_x_start_cell_yes
\fi[#tag]}
-\def\start_x_cell_delayed_two[#tag]%
+\def\tabl_x_start_cell_delayed_two[#tag]%
{\ifx\currentxtable\empty \else
\chaintocurrentxtable{#tag}%
\fi
\edef\currentxtable{#tag}%
- \doifnextoptionalelse\start_x_cell_yes\start_x_cell_nop}
+ \doifnextoptionalelse\tabl_x_start_cell_yes\tabl_x_start_cell_nop}
\unexpanded\def\stopxcell
- {\stop_x_cell
+ {\tabl_x_stop_cell
\endgroup}
% rows
\unexpanded\def\startxrow
{\begingroup
- \doifnextoptionalelse\start_x_row_delayed_one\start_x_row_nop}
+ \doifnextoptionalelse\tabl_x_start_row_delayed_one\tabl_x_start_row_nop}
-\def\start_x_row_delayed_one[#tag]%
+\def\tabl_x_start_row_delayed_one[#tag]%
% {\ifcsname\namedxtablehash{#tag}\s!parent\endcsname
{\ifcsname\??xtablecheck#tag\endcsname
- \expandafter\start_x_row_delayed_two
+ \expandafter\tabl_x_start_row_delayed_two
\else
- \expandafter\start_x_row_yes
+ \expandafter\tabl_x_start_row_yes
\fi[#tag]}
-\def\start_x_row_delayed_two[#tag]%
+\def\tabl_x_start_row_delayed_two[#tag]%
{\ifx\currentxtable\empty \else
\chaintocurrentxtable{#tag}%
\fi
\edef\currentxtable{#tag}%
- \doifnextoptionalelse\start_x_row_yes\start_x_row_nop}
+ \doifnextoptionalelse\tabl_x_start_row_yes\tabl_x_start_row_nop}
\unexpanded\def\stopxrow
- {\stop_x_row
+ {\tabl_x_stop_row
\endgroup}
\protect \endinput
diff --git a/tex/context/base/toks-ini.mkiv b/tex/context/base/toks-ini.mkiv
index e8b296210..4eb756b75 100644
--- a/tex/context/base/toks-ini.mkiv
+++ b/tex/context/base/toks-ini.mkiv
@@ -46,24 +46,24 @@
% \stoptext
\unexpanded\def\defineremapper[#1]%
- {\setuevalue{\e!start#1}{\tokens_start_remapper{#1}}%
- \setuevalue{\e!stop #1}{\tokens_stop_remapper {#1}}%
+ {\setuevalue{\e!start#1}{\toks_start_remapper{#1}}%
+ \setuevalue{\e!stop #1}{\toks_stop_remapper {#1}}%
\letvalue{#1}\relax
\normalexpanded{\expandafter\def\csname#1\endcsname##1{\csname\e!start#1\endcsname##1\csname\e!stop#1\endcsname}}}
-\unexpanded\def\tokens_start_remapper#1%
+\unexpanded\def\toks_start_remapper#1%
{\ctxlua{tokens.collectors.install("#1", "\e!stop#1")}}
-\unexpanded\def\tokens_stop_remapper#1%
+\unexpanded\def\toks_stop_remapper#1%
{\ctxlua{tokens.collectors.handle("#1",function(str) return tokens.collectors.remapper.convert("#1",str) end, true)}}
\unexpanded\def\remaptokens#1%
{\ctxlua{tokens.collectors.handle("#1",function(str) return tokens.collectors.remapper.convert("#1",str) end)}}
\unexpanded\def\remapcharacter
- {\dodoubleempty\tokens_remap_character}
+ {\dodoubleempty\toks_remap_character}
-\def\tokens_remap_character[#1][#2]#3%
+\def\toks_remap_character[#1][#2]#3%
{\ctxlua{tokens.collectors.install("store", "ctxlua")}#3%
\ctxlua{tokens.collectors.remapper.store("store","#1",\number#2)}}
diff --git a/tex/context/base/trac-tex.mkiv b/tex/context/base/trac-tex.mkiv
index 47ef92e54..53c95ab01 100644
--- a/tex/context/base/trac-tex.mkiv
+++ b/tex/context/base/trac-tex.mkiv
@@ -29,11 +29,11 @@
\unexpanded\def\installtextracer#1%
{\addtocommalist{#1}\alltextracers}
-\unexpanded\def\enabletextracers [#1]{\processcommalist[#1]\system_textracer_enable }
-\unexpanded\def\disabletextracers[#1]{\processcommalist[#1]\system_textracer_disable}
+\unexpanded\def\enabletextracers [#1]{\processcommalist[#1]\syst_textracers_enable }
+\unexpanded\def\disabletextracers[#1]{\processcommalist[#1]\syst_textracers_disable}
-\def\system_textracer_enable #1{\csname enabletracer#1\endcsname}
-\def\system_textracer_disable#1{\csname disabletracer#1\endcsname}
+\def\syst_textracers_enable #1{\csname enabletracer#1\endcsname}
+\def\syst_textracers_disable#1{\csname disabletracer#1\endcsname}
% The next one is for Taco, although we can use directives as well:
diff --git a/tex/context/base/typo-mar.mkiv b/tex/context/base/typo-mar.mkiv
index 7ee182c39..0d5c5a5b9 100644
--- a/tex/context/base/typo-mar.mkiv
+++ b/tex/context/base/typo-mar.mkiv
@@ -182,7 +182,7 @@
\ifdone
\edef\currentmarginreference{\margindataparameter\c!reference}%
\ifx\currentmarginreference\empty \else
- \set_page_only_destination_box_attribute\currentmarginreference\currentmarginreference
+ \strc_references_set_page_only_destination_box_attribute\currentmarginreference\currentmarginreference
\fi
\edef\currentmargindatastrut{\margindataparameter\c!strut}%
\the\everymargindatacontent
@@ -232,7 +232,7 @@
\dostoptagged
\fi
\ifdone
- \positions_initialize % we use positions at the lua end (will become pdf.h/v)
+ \anch_positions_initialize % we use positions at the lua end (will become pdf.h/v)
\ctxlua{typesetters.margins.save{
location = "\margindataparameter\c!location",
method = "\margindataparameter\c!method",
diff --git a/tex/context/base/typo-par.mkiv b/tex/context/base/typo-par.mkiv
index 358c31878..7153d1f8a 100644
--- a/tex/context/base/typo-par.mkiv
+++ b/tex/context/base/typo-par.mkiv
@@ -57,14 +57,14 @@
\checkinitialparent % this might become automatic
\to \everysetupinitial
-\def\initial_auto_scale % magic
+\def\v_typo_initials_auto_scale % magic
{\the\dimexpr\lineheight*\initialparameter\c!n-\initialparameter\c!voffset\relax}
\setupinitial
[\c!location=\v!text,
\c!n=3,
% \s!font=Bold sa 4,
- \s!font=Bold at \initial_auto_scale,
+ \s!font=Bold at \v_typo_initials_auto_scale,
\c!distance=.125em,
\c!hoffset=\zeropoint,
\c!voffset=-1ex,
@@ -73,9 +73,9 @@
\c!before=\blank]
\unexpanded\def\placeinitial
- {\dosingleempty\place_initial}
+ {\dosingleempty\typo_initials_place}
-\def\place_initial[#1]% todo: optional text
+\def\typo_initials_place[#1]% todo: optional text
{\par
\begingroup
\edef\currentinitial{#1}%
diff --git a/tex/context/base/typo-prc.mkvi b/tex/context/base/typo-prc.mkvi
index 3c0fcc93e..9ad643fbb 100644
--- a/tex/context/base/typo-prc.mkvi
+++ b/tex/context/base/typo-prc.mkvi
@@ -62,17 +62,17 @@
\unexpanded\def\applyprocessor#tag%
{\def\currentprocessor{#tag}%
\ifcsname\??processorcheck\currentprocessor\endcsname
- \expandafter\apply_processor
+ \expandafter\typo_processor_apply
\else
\expandafter\firstofoneargument
\fi}
-\def\apply_processor
+\def\typo_processor_apply
{\doifelse{\processorparameter\c!state}\v!stop
\firstofoneargument
- \apply_processor_indeed}
+ \typo_processor_apply_indeed}
-\def\apply_processor_indeed#content%
+\def\typo_processor_apply_indeed#content%
{\begingroup
\useprocessorstyleandcolor\c!style\c!color
\processorparameter\c!left
diff --git a/tex/context/base/typo-txt.mkvi b/tex/context/base/typo-txt.mkvi
index 5f7824a0a..f2859b58f 100644
--- a/tex/context/base/typo-txt.mkvi
+++ b/tex/context/base/typo-txt.mkvi
@@ -20,26 +20,26 @@
%D \NormalizeTextHeight {font} {height} {text}
%D \NormalizeTextWidth {font} {width} {text}
-\newbox\normalize_font_box
+\newbox\b_typo_normalizers
-\def\normalized_size#axis#size%
- {\dimexpr\ifdim#1\normalize_font_box=\zeropoint
+\def\typo_normalizers_size#axis#size%
+ {\dimexpr\ifdim#1\b_typo_normalizers=\zeropoint
\bodyfontsize
\else
- \cldcontext{\number\dimexpr10pt\relax*\number\dimexpr#size\relax/\number#axis\normalize_font_box}\scaledpoint
+ \cldcontext{\number\dimexpr10pt\relax*\number\dimexpr#size\relax/\number#axis\b_typo_normalizers}\scaledpoint
\fi\relax}
-\def\normalize_font_at_size#axis#cs#text#size#font% avoid overflow by using lua
+\def\typo_normalizers_font_at_size#axis#cs#text#size#font% avoid overflow by using lua
{\begingroup
- \setbox\normalize_font_box\hbox{\definedfont[#font at 10pt]\settrialtypesetting#text}%
- \normalexpanded{\endgroup\edef\noexpand\TheNormalizedFontSize{\the\normalized_size{#axis}{#size}}}%
+ \setbox\b_typo_normalizers\hbox{\definedfont[#font at 10pt]\settrialtypesetting#text}%
+ \normalexpanded{\endgroup\edef\noexpand\TheNormalizedFontSize{\the\typo_normalizers_size{#axis}{#size}}}%
\edef#cs{\noexpand\definedfont[#font at \TheNormalizedFontSize]}}
-\unexpanded\def\normalize_text_at_size#axis#font#size#text%
+\unexpanded\def\typo_normalizers_text_at_size#axis#font#size#text%
{\dontleavehmode
\begingroup
- \setbox\normalize_font_box\hbox{\definedfont[#font at 10pt]\settrialtypesetting#text}%
- \definedfont[#font at \the\normalized_size{#axis}{#size}]#text%
+ \setbox\b_typo_normalizers\hbox{\definedfont[#font at 10pt]\settrialtypesetting#text}%
+ \definedfont[#font at \the\typo_normalizers_size{#axis}{#size}]#text%
\endgroup}
\let\TheNormalizedFontSize\!!zeropoint
@@ -47,11 +47,11 @@
%D Traditionally we use UpperCasedNames for this kind of
%D functionality.
-\unexpanded\def\NormalizeFontHeight{\normalize_font_at_size\ht}
-\unexpanded\def\NormalizeFontWidth {\normalize_font_at_size\wd}
+\unexpanded\def\NormalizeFontHeight{\typo_normalizers_font_at_size\ht}
+\unexpanded\def\NormalizeFontWidth {\typo_normalizers_font_at_size\wd}
-\unexpanded\def\NormalizeTextHeight{\normalize_text_at_size\ht}
-\unexpanded\def\NormalizeTextWidth {\normalize_text_at_size\wd}
+\unexpanded\def\NormalizeTextHeight{\typo_normalizers_text_at_size\ht}
+\unexpanded\def\NormalizeTextWidth {\typo_normalizers_text_at_size\wd}
\unexpanded\def\WidthSpanningText#text#width#font% compatibility macro
{\hbox{\NormalizeFontWidth\temp{#text}{#width}{#font}\temp\the\everydefinedfont#1}}
diff --git a/tex/context/base/x-mathml.mkiv b/tex/context/base/x-mathml.mkiv
index 8f6f5b94c..f2dbda5e4 100644
--- a/tex/context/base/x-mathml.mkiv
+++ b/tex/context/base/x-mathml.mkiv
@@ -54,8 +54,8 @@
\xmlmapvalue {mml:math:display} {block} {\displaymathematics} % before this showed up
\xmlmapvalue {mml:math:display} {inline} {\inlinemathematics }
-\xmlmapvalue {mml:math:dir} {ltr} {\setfalse\mathematics_right_to_left\mathematics_synchronize_direction}
-\xmlmapvalue {mml:math:dir} {rtl} {\settrue \mathematics_right_to_left\mathematics_synchronize_direction}
+\xmlmapvalue {mml:math:dir} {ltr} {\setfalse\c_math_right_to_left\math_basics_synchronize_direction}
+\xmlmapvalue {mml:math:dir} {rtl} {\settrue \c_math_right_to_left\math_basics_synchronize_direction}
\startxmlsetups mml:math
\begingroup
diff --git a/tex/context/base/xtag-ext.mkii b/tex/context/base/xtag-ext.mkii
index e60ecd401..60615b1c2 100644
--- a/tex/context/base/xtag-ext.mkii
+++ b/tex/context/base/xtag-ext.mkii
@@ -148,7 +148,7 @@
% trial macros (used in setupx), to be sped up !
-\bgroup \catcode`\<=\active
+\bgroup \catcode`\<=\activecatcode
\gdef\saveXMLasdata#1#2% name raw data
{\dodoglobal\setevalue{\@@XMLsave:#1}{#2}} % \edef!
@@ -348,7 +348,7 @@
\setupXMLprocessing
[\c!escape=e]
-\bgroup \catcode`\<=\active
+\bgroup \catcode`\<=\activecatcode
\long\gdef\defexpandedxmlargument#1#2#3%
{\begingroup
diff --git a/tex/context/base/xtag-ini.mkii b/tex/context/base/xtag-ini.mkii
index 79fb2f24d..8f10c4f55 100644
--- a/tex/context/base/xtag-ini.mkii
+++ b/tex/context/base/xtag-ini.mkii
@@ -261,25 +261,25 @@
\let\disableXMLelements \relax
% \bgroup
-% \catcode`\*=\@@comment
-% \catcode`\.=\@@escape
-% .catcode`.B=.@@begingroup
-% .catcode`.E=.@@endgroup
-% .catcode`.P=.@@parameter
-%
-% .catcode`.&=.@@active
-% .catcode`.<=.@@active
-%
-% .catcode`.#=.@@active
-% .catcode`.$=.@@active
-% .catcode`.%=.@@active
-% .catcode`.\=.@@active
-% .catcode`.^=.@@active
-% .catcode`._=.@@active
-% .catcode`.{=.@@active
-% .catcode`.}=.@@active
-% .catcode`.|=.@@active
-% .catcode`.~=.@@active
+% \catcode`\*=\commentcatcode
+% \catcode`\.=\escapecatcode
+% .catcode`.B=.begingroupcatcode
+% .catcode`.E=.endgroupcatcode
+% .catcode`.P=.parametercatcode
+%
+% .catcode`.&=.activecatcode
+% .catcode`.<=.activecatcode
+%
+% .catcode`.#=.activecatcode
+% .catcode`.$=.activecatcode
+% .catcode`.%=.activecatcode
+% .catcode`.\=.activecatcode
+% .catcode`.^=.activecatcode
+% .catcode`._=.activecatcode
+% .catcode`.{=.activecatcode
+% .catcode`.}=.activecatcode
+% .catcode`.|=.activecatcode
+% .catcode`.~=.activecatcode
%
% .gdef.enableXMLexpansion
% B.def<B.doXMLelementE.let&=.doXMLentityE
@@ -297,18 +297,18 @@
% * (eating up argument)
%
% .unexpanded.gdef.enableXML
-% B.catcode`.!=.@@other
-% .catcode`.?=.@@other
-% .catcode`.:=.@@other * active in french
-% .catcode`.;=.@@other * active in french
-% .catcode`.&=.@@active
-% .catcode`.<=.@@active
-% .catcode`.>=.@@other
-% .catcode`."=.@@other
-% .catcode`./=.@@other
-% .catcode`.'=.@@other
-% .catcode`.~=.@@other
-% .catcode`.#=.@@other
+% B.catcode`.!=.othercatcode
+% .catcode`.?=.othercatcode
+% .catcode`.:=.othercatcode * active in french
+% .catcode`.;=.othercatcode * active in french
+% .catcode`.&=.activecatcode
+% .catcode`.<=.activecatcode
+% .catcode`.>=.othercatcode
+% .catcode`."=.othercatcode
+% .catcode`./=.othercatcode
+% .catcode`.'=.othercatcode
+% .catcode`.~=.othercatcode
+% .catcode`.#=.othercatcode
% .let &=.doXMLentity
% .unexpanded.def<B.doXMLelementE*
% .ifcase.XMLtokensreduction
@@ -323,14 +323,14 @@
% E
%
% .gdef.activateXMLescapetokens
-% B.catcode`.$=.@@active
-% .catcode`.%=.@@active
-% .catcode`.\=.@@active
-% .catcode`.^=.@@active
-% .catcode`._=.@@active
-% .catcode`.{=.@@active
-% .catcode`.}=.@@active
-% .catcode`.|=.@@active
+% B.catcode`.$=.activecatcode
+% .catcode`.%=.activecatcode
+% .catcode`.\=.activecatcode
+% .catcode`.^=.activecatcode
+% .catcode`._=.activecatcode
+% .catcode`.{=.activecatcode
+% .catcode`.}=.activecatcode
+% .catcode`.|=.activecatcode
% E
%
% .xdef.entitleXMLescapetokens
@@ -360,29 +360,29 @@
% E
%
% .gdef.ignoreXMLescapetokens
-% B.catcode`.$=.@@other
-% .catcode`.%=.@@other
-% .catcode`.\=.@@other
-% .catcode`.^=.@@other
-% .catcode`._=.@@other
-% .catcode`.{=.@@other
-% .catcode`.}=.@@other
-% .catcode`.|=.@@other
+% B.catcode`.$=.othercatcode
+% .catcode`.%=.othercatcode
+% .catcode`.\=.othercatcode
+% .catcode`.^=.othercatcode
+% .catcode`._=.othercatcode
+% .catcode`.{=.othercatcode
+% .catcode`.}=.othercatcode
+% .catcode`.|=.othercatcode
% E
%
% * The following macro can be invokes when reading from
% * an auxiliary file.
%
% .unexpanded.gdef.enableXMLelements
-% B.catcode60=.@@active * .catcode`.<=.@@active
-% .catcode62=.@@other * .catcode`.>=.@@other
+% B.catcode60=.activecatcode * .catcode`.<=.activecatcode
+% .catcode62=.othercatcode * .catcode`.>=.other
% .unexpanded.def<B.doXMLelementE*
% .processingXMLtrue
% E
%
% .unexpanded.gdef.disableXMLelements
-% B.catcode60=.@@active * .catcode`.<=.@@active
-% .catcode62=.@@other * .catcode`.>=.@@other
+% B.catcode60=.activecatcode * .catcode`.<=.activecatcode
+% .catcode62=.othercatcode * .catcode`.>=.othercatcode
% .let<.relax * new
% .processingXMLfalse
% E
@@ -476,14 +476,14 @@
\let&\doXMLentity}
\unexpanded\gdef\enableXMLelements
- {\catcode60=\@@active
- \catcode62=\@@other
+ {\catcode60=\activecatcode
+ \catcode62=\othercatcode
\unexpanded\def<{\doXMLelement}%
\processingXMLtrue}
\unexpanded\gdef\disableXMLelements
- {\catcode60=\@@active
- \catcode62=\@@other
+ {\catcode60=\activecatcode
+ \catcode62=\othercatcode
\let<\relax
\processingXMLfalse}
@@ -1838,7 +1838,7 @@
%D definitions so that the mappings will run as fast as
%D possible.
-\bgroup \catcode`<=\@@active
+\bgroup \catcode`<=\activecatcode
\long\gdef\dododefineXMLsingular#1#2%
{\long\@EA\def\csname\@@XMLelement:#1/\endcsname{#2}}
@@ -2675,7 +2675,7 @@
%D Used in x-fo: I really need to document this!
-\bgroup \catcode`\<=\active
+\bgroup \catcode`\<=\activecatcode
% usage: \expanded{\rescanXMLatttributes{fo:table-cell}}
@@ -2694,7 +2694,7 @@
\def\XMLprocess#1%
{\begingroup\enableXML\XMLflush{#1}\endgroup}
-\bgroup \catcode`<=\@@active
+\bgroup \catcode`<=\activecatcode
\long\gdef\ignoreuntilXMLelement#1<{<}
\long\gdef\grabuntilXMLelement #1<\to#2{\def#2{#1}<}
@@ -2767,7 +2767,7 @@
\catcode\endoflineasciicode\spacecatcode
\catcode\formfeedasciicode \spacecatcode
\catcode\endoffileasciicode\spacecatcode
- \catcode`\#\@@other}
+ \catcode`\#\othercatcode}
\long\def\startXMLcode
{\begingroup
@@ -2907,7 +2907,7 @@
\newtoks\groupedtoks
\newif\ifcollectXMLgrouped
-\bgroup \catcode`\<=\@@active
+\bgroup \catcode`\<=\activecatcode
\newtoks\XMLgtoks
@@ -2998,8 +2998,8 @@
\bgroup
-\catcode`\<\active
-\catcode`\&\active
+\catcode`\<\activecatcode
+\catcode`\&\activecatcode
\gdef\flattenXMLcontent#1% we need taco's 'over one group'
{\begingroup
diff --git a/tex/context/base/xtag-map.mkii b/tex/context/base/xtag-map.mkii
index 377b76ad3..4f639bf01 100644
--- a/tex/context/base/xtag-map.mkii
+++ b/tex/context/base/xtag-map.mkii
@@ -459,9 +459,9 @@
\let\par\endgraf
\popmacro\doXMLentity % needed ?
\disableXMLexpansion
- \catcode`\{=\@@begingroup
- \catcode`\}=\@@endgroup
- \catcode`\\=\@@escape
+ \catcode`\{=\begingroupcatcode
+ \catcode`\}=\endgroupcatcode
+ \catcode`\\=\escapecatcode
\iftraceXMLremapping
\ifmmode\vbox\fi\bgroup
\defconvertedcommand\ascii\remappedXMLdata
@@ -724,7 +724,7 @@
{\remapXMLsingular[\s!unknown][CPA]\doXMLunknownSI
\remapXMLsequence[\s!unknown][CPA]\doXMLunknownSE}
-\bgroup \catcode`<=\active
+\bgroup \catcode`<=\activecatcode
\gdef\revertXMLremapping
{\gdef\doXMLunknownSE##1##2{<##1>##2</##1>}%
diff --git a/tex/context/base/xtag-run.mkii b/tex/context/base/xtag-run.mkii
index 219c7c081..65424650c 100644
--- a/tex/context/base/xtag-run.mkii
+++ b/tex/context/base/xtag-run.mkii
@@ -19,31 +19,31 @@
\bgroup
-\catcode`\.=\@@escape
-.catcode`.B=.@@begingroup
-.catcode`.E=.@@endgroup
-.catcode`.#=.@@active
-.catcode`.$=.@@active
-.catcode`.%=.@@active
-.catcode`.\=.@@active
-.catcode`.^=.@@active
-.catcode`._=.@@active
-.catcode`.{=.@@active
-.catcode`.}=.@@active
-.catcode`.|=.@@active
-.catcode`.~=.@@active
+\catcode`\.=\escapecatcode
+.catcode`.B=.begingroupcatcode
+.catcode`.E=.endgroupcatcode
+.catcode`.#=.activecatcode
+.catcode`.$=.activecatcode
+.catcode`.%=.activecatcode
+.catcode`.\=.activecatcode
+.catcode`.^=.activecatcode
+.catcode`._=.activecatcode
+.catcode`.{=.activecatcode
+.catcode`.}=.activecatcode
+.catcode`.|=.activecatcode
+.catcode`.~=.activecatcode
.gdef.verbatimXML
- B.catcode`.#=.@@active .let#.letterhash
- .catcode`.$=.@@active .let$.dollar
- .catcode`.%=.@@active .let%.percent
- .catcode`.\=.@@active .let\.letterbackslash
- .catcode`.^=.@@active .let^.letterhat
- .catcode`._=.@@active .let_.letterunderscore
- .catcode`.{=.@@active .let{.leftargument
- .catcode`.}=.@@active .let}.rightargument
- .catcode`.|=.@@active .let|.letterbar
- .catcode`.~=.@@active .let~.lettertilde
+ B.catcode`.#=.activecatcode .let#.letterhash
+ .catcode`.$=.activecatcode .let$.dollar
+ .catcode`.%=.activecatcode .let%.percent
+ .catcode`.\=.activecatcode .let\.letterbackslash
+ .catcode`.^=.activecatcode .let^.letterhat
+ .catcode`._=.activecatcode .let_.letterunderscore
+ .catcode`.{=.activecatcode .let{.leftargument
+ .catcode`.}=.activecatcode .let}.rightargument
+ .catcode`.|=.activecatcode .let|.letterbar
+ .catcode`.~=.activecatcode .let~.lettertilde
E
.egroup
@@ -61,10 +61,10 @@
\bgroup
-\@EA\catcode\string`=\@@active
-\@EA\catcode\string`"\@@active
-\@EA\catcode\string``\@@active
-\@EA\catcode\string`&\@@active
+\@EA\catcode\string`=\activecatcode
+\@EA\catcode\string`"\activecatcode
+\@EA\catcode\string``\activecatcode
+\@EA\catcode\string`&\activecatcode
\gdef\doshowXMLargument#1#2#3#4%
{\hskip\zeropoint % or maybe \allowbreak
@@ -74,10 +74,10 @@
{\hskip\zeropoint % or maybe \allowbreak
\ifshowXMLarguments
\bgroup
- \@EA\catcode\string`=\@@active
- \@EA\catcode\string`"\@@active
- \@EA\catcode\string``\@@active
- \@EA\catcode\string`&\@@active
+ \@EA\catcode\string`=\activecatcode
+ \@EA\catcode\string`"\activecatcode
+ \@EA\catcode\string``\activecatcode
+ \@EA\catcode\string`&\activecatcode
\def={\color[xtag:7]{\string=}}%
\def"##1"{\doshowXMLargument""8{##1}}%
\def`##1`{\doshowXMLargument``8{##1}}%
diff --git a/tex/context/base/xtag-xsl.mkii b/tex/context/base/xtag-xsl.mkii
index af5245638..49767e30c 100644
--- a/tex/context/base/xtag-xsl.mkii
+++ b/tex/context/base/xtag-xsl.mkii
@@ -41,7 +41,7 @@
\def\obeyXSLTcharacters
{\setnaturalcatcodes
- \catcode`\\=\@@escape}
+ \catcode`\\=\escapecatcode}
\long\def\startXSLTscript #1 #2 %
{\bgroup
diff --git a/tex/context/bib/backup/sample.bib b/tex/context/bib/backup/sample.bib
deleted file mode 100644
index 3f8df623e..000000000
--- a/tex/context/bib/backup/sample.bib
+++ /dev/null
@@ -1,38 +0,0 @@
-@STRING{hh = {Hans Hagen}}
-
-@ELECTRONIC{hh2010,
- author = hh,
- year = {2010},
- title = {Metafun. \CONTEXT\ mkiv},
- url = {http://www.pragma-ade.nl/general/manuals/metafun-s.pdf},
-}
-
-@ARTICLE{hh2010a,
- author = hh,
- title = {The Font Name Mess},
- journal = {MAPS},
- year = {2010},
- volume = {40},
- pages = {2-8},
- keywords = {context},
-}
-
-@ARTICLE{hh2010b,
- author = hh,
- title = {Grouping in Hybrid Environments},
- journal = {MAPS},
- year = {2010},
- volume = {40},
- pages = {67-71},
- keywords = {context},
-}
-
-@BOOK{Eijkhout1991,
- title = {\TeX\ by Topic. A \TeX nician's Reference},
- publisher = {Addison-Wesley},
- year = {1991},
- author = {Victor Eijkhout},
- address = {London},
- keywords = {general},
-}
-