typo-hid.mkxl /size: 1067 b    last modification: 2023-12-21 09:44
1%D \module
2%D   [       file=typo-hid,
3%D        version=2021.03.15, % based on old code lying around
4%D          title=\CONTEXT\ Typesetting Macros,
5%D       subtitle=Hiding,
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 Typesetting Macros / Hiding}
15
16\registerctxluafile{typo-hid}{autosuffix}
17
18\definesystemattribute[hidecontent][public]
19
20\unprotect
21
22\newinteger\c_typo_hidden_level
23
24\permanent\protected\def\starthiddencontent
25  {\ifcase\c_typo_hidden_level
26     \clf_enablehidecontent
27     \let\clf_enablehidecontent\relax
28     \attribute\hidecontentattribute\plusone
29   \fi
30   \advanceby\c_typo_hidden_level\plusone}
31
32\permanent\protected\def\stophiddencontent
33  {\advanceby\c_typo_hidden_level\minusone
34   \ifcase\c_typo_hidden_level
35     \attribute\hidecontentattribute\attributeunsetvalue
36   \fi}
37
38\protect \endinput
39