bndr-ini.mkxl /size: 1271 b    last modification: 2024-01-16 10:22
1%D \module
2%D   [       file=bndr-ini,
3%D        version=2022.05.02,
4%D          title=\CONTEXT\ Boundary Macros,
5%D       subtitle=Initialization,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14\writestatus{loading}{ConTeXt Boundary Macros / Initialization}
15
16\unprotect
17
18\registerctxluafile{bndr-ini}{autosuffix}
19
20% \defineboundary[foobar][public]\meaning\foobar\par
21% \defineboundary[barfoo][public]\meaning\barfoo\par
22
23\immutable\def\??boundaryprefix{c_bndr_}
24
25\permanent\tolerant\protected\def\defineboundary[#1]#*[#2]% nicer for users
26  {\ifinset\s!public{#2}%
27     \ifcsname#1\endcsname\else
28       \global\permanent\expandafter\integerdef\csname#1\endcsname\clf_defineboundary{#1}\relax
29     \fi
30  \else
31    \ifcsname\??boundaryprefix#1\endcsname\else
32      \global\permanent\expandafter\integerdef\csname\??boundaryprefix#1\endcsname\clf_defineboundary{#1}\relax
33    \fi
34  \fi}
35
36\permanent\protected\def\newboundary#1% nicer for lowlevel
37  {\ifdefined#1\else
38     \global\immutable\integerdef#1\clf_defineboundary{\csstring#1}\relax
39   \fi}
40
41\protect
42