Debian Codegraph @

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

raw
1 %<*package>
2
3 \tl_new:N \l_@@_interface_arga_tl
4 \tl_new:N \l_@@_interface_argb_tl
5
6 \NewDocumentCommand \TableofContents {} {
7
8 \tl_put_right:Nn \g_@@_task_list_tl {\TOC {}}
9
10 }
11
12 \NewDocumentCommand \TextCommand {+m} {
13
14 \tl_put_right:Nn \g_@@_task_list_tl {\TextCommand {{#1}}}
15
16 }
17
18 \NewDocumentCommand \TableCommand {+m} {
19
20 \tl_put_right:Nn \g_@@_task_list_tl {\TableCommand {{#1}}}
21
22 }
23
24 \NewDocumentCommand \AddPart {m} {
25
26 \tl_set:Nn \g_@@_preprocess_part_tl {#1}
27 \tl_put_right:Nn \g_@@_task_list_tl {\Part {{#1}}}
28
29 }
30
31 \NewDocumentCommand \SetSectionPath {v} {
32
33 \str_gset:Nn \g_@@_path_prefix_str {#1}
34
35 }
36
37 \NewDocumentCommand \ImportSection {v d() d<>} {
38 \group_begin:
39
40 \IfValueTF {#2} {
41 \tl_set:Nn \l_@@_interface_arga_tl {#2}
42 } {
43 \seq_set_split:Nnn \l_tmpa_seq {/} {#1}
44 \seq_pop_right:NN \l_tmpa_seq \l_@@_interface_arga_tl
45 }
46 \IfValueT {#3} {
47 \tl_set:Nn \l_@@_interface_argb_tl {#3}
48 }
49
50 \_@@_preprocess_section:nVV {#1} \l_@@_interface_arga_tl \l_@@_interface_argb_tl
51
52 \group_end:
53 }
54
55 \NewDocumentCommand \NewBlockType {s m} {
56
57 \regex_match:nnTF {^[a-zA-Z]+$} {#2} {
58
59 \tl_new:c {g_#2_style_tl}
60 \IfBooleanTF {#1} {
61 \_@@_declare_anonymous_block_type:n {#2}
62 } {
63 \_@@_declare_block_type:n {#2}
64 }
65
66 } {
67 \msg_fatal:nnn {SimpleSystemTeX} {Invalid Block Type Name} {#2}
68 }
69
70 }
71
72 \NewDocumentCommand \MakeBlockIndex {s v d[] d<>} {
73 \group_begin:
74
75 \IfValueT {#3} {
76 \tl_set:Nn \l_@@_interface_arga_tl {#3}
77 }
78 \IfValueT {#4} {
79 \tl_set:Nn \l_@@_interface_argb_tl {#4}
80 }
81
82 \IfBooleanTF {#1} {
83 \_@@_generate_block_index:NnVV \c_false_bool {#2} \l_@@_interface_arga_tl \l_@@_interface_argb_tl
84 } {
85 \_@@_generate_block_index:NnVV \c_true_bool {#2} \l_@@_interface_arga_tl \l_@@_interface_argb_tl
86 }
87
88 \group_end:
89 }
90
91 \NewDocumentCommand \seclink {m d()} {
92 \group_begin:
93
94 \IfValueT {#2} {
95 \tl_set:Nn \l_@@_interface_arga_tl {#2}
96 }
97
98 \_@@_add_section_link:eV {\tl_to_str:e {#1}} \l_@@_interface_arga_tl
99
100 \group_end:
101 }
102
103 \NewDocumentCommand \blclink {m d()} {
104 \group_begin:
105
106 \IfValueT {#2} {
107 \tl_set:Nn \l_@@_interface_arga_tl {#2}
108 }
109
110 \_@@_add_block_link:eV {#1} \l_@@_interface_arga_tl
111
112 \group_end:
113 }
114
115 \NewDocumentCommand \indlink {m d()} {
116 \group_begin:
117
118 \IfValueT {#2} {
119 \tl_set:Nn \l_@@_interface_arga_tl {#2}
120 }
121
122 \_@@_add_index_link:eV {\tl_to_str:e {#1}} \l_@@_interface_arga_tl
123
124 \group_end:
125 }
126
127 %</package>