diff options
Diffstat (limited to 'tex/context/base/mkxl/bndr-ini.mkxl')
-rw-r--r-- | tex/context/base/mkxl/bndr-ini.mkxl | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tex/context/base/mkxl/bndr-ini.mkxl b/tex/context/base/mkxl/bndr-ini.mkxl new file mode 100644 index 000000000..8481048bb --- /dev/null +++ b/tex/context/base/mkxl/bndr-ini.mkxl @@ -0,0 +1,39 @@ +%D \module +%D [ file=bndr-ini, +%D version=2022.05.02, +%D title=\CONTEXT\ Boundary Macros, +%D subtitle=Initialization, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Boundary Macros / Initialization} + +\unprotect + +\registerctxluafile{bndr-ini}{autosuffix} + +% \defineboundary[foobar][public]\meaning\foobar\par +% \defineboundary[barfoo][public]\meaning\barfoo\par + +\immutable\def\??boundaryprefix{c_bndr_} + +\permanent\tolerant\protected\def\defineboundary[#1]#*[#2]% nicer for users + {\doifelseinset\s!public{#2}% + {\ifcsname#1\endcsname\else + \global\permanent\expandafter\integerdef\csname#1\endcsname\clf_defineboundary{#1}\relax + \fi} + {\ifcsname\??boundaryprefix#1\endcsname\else + \global\permanent\expandafter\integerdef\csname\??boundaryprefix#1\endcsname\clf_defineboundary{#1}\relax + \fi}} + +\permanent\protected\def\newboundary#1% nicer for lowlevel + {\ifdefined#1\else + \global\immutable\integerdef#1\clf_defineboundary{\csstring#1}\relax + \fi} + +\protect |