typo-hid.mkxl /size: 1136 b    last modification: 2025-02-21 11:03
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% This could be redone by using stacking zero or some special code.
19
20\definesystemattribute[hidecontent][public]
21
22\unprotect
23
24\newinteger\c_typo_hidden_level
25
26\permanent\protected\def\starthiddencontent
27  {\ifcase\c_typo_hidden_level
28     \clf_enablehidecontent
29     \let\clf_enablehidecontent\relax
30     \attribute\hidecontentattribute\plusone
31   \fi
32   \advanceby\c_typo_hidden_level\plusone}
33
34\permanent\protected\def\stophiddencontent
35  {\advanceby\c_typo_hidden_level\minusone
36   \ifcase\c_typo_hidden_level
37     \attribute\hidecontentattribute\attributeunsetvalue
38   \fi}
39
40\protect \endinput
41