Debian Codegraph @

texmf-dist/doc/latex/simplesystemtex/sources/style.code.tex

raw
1 %<*package>
2
3 \clist_map_inline:nn {{}, index, target} {
4 \clist_map_inline:nn {section, part, group, subgroup, subsubgroup, subsubsubgroup, sectionpath, sectionpage, sectionname, sectionparameter} {
5 \tl_new:c {l_@@_#1##1_tl}
6 }
7 \clist_map_inline:nn {block, blockname, blockparameter, blockcontent} {
8 \tl_new:c {l_@@_#1##1_tl}
9 }
10 }
11
12 \tl_new:N \l_@@_indexparameter_tl
13 \tl_new:N \l_@@_linktext_tl
14 \tl_new:N \l_@@_targetindexparameter_tl
15
16 \tl_new:N \g_@@_TOCTitle_style_tl
17 \tl_new:N \g_@@_TOCPartTitle_style_tl
18 \tl_new:N \g_@@_TOCSection_style_tl
19 \tl_new:N \g_@@_SectionHeading_style_tl
20 \tl_new:N \g_@@_IndexGroup_style_tl
21 \tl_new:N \g_@@_IndexSubgroup_style_tl
22 \tl_new:N \g_@@_IndexSubsubgroup_style_tl
23 \tl_new:N \g_@@_IndexSubsubsubgroup_style_tl
24 \tl_new:N \g_@@_IndexBlock_style_tl
25 \tl_new:N \g_@@_SectionLink_style_tl
26 \tl_new:N \g_@@_BlockLink_style_tl
27 \tl_new:N \g_@@_IndexLink_style_tl
28
29 \NewDocumentCommand \SetStyle {m +m} {
30 \tl_gset:cn {g_@@_#1_style_tl} {#2}
31 \exp_args:Nnnc \regex_replace_all:nnN
32 {@([a-zA-Z]+)} {\c{l_@@_\1_tl}} {g_@@_#1_style_tl}
33 \exp_args:Nnnc \regex_replace_all:nnN
34 {\#ifempty} {\c{tl_if_empty:NTF}} {g_@@_#1_style_tl}
35 \exp_args:Nnnc \regex_replace_all:nnN
36 {\#ifis} {\c{str_if_eq:VnTF}} {g_@@_#1_style_tl}
37 \exp_args:Nnnc \regex_replace_all:nnN
38 {\#ifequal} {\c{str_if_eq:VVTF}} {g_@@_#1_style_tl}
39 }
40
41 %</package>