Debian Codegraph @

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

raw
1 %<*package>
2
3 % [parameter] path of section (verbatim) , section's display name , section's parameter
4 \cs_new_protected:Nn \_@@_preprocess_section:nnn {
5 \group_begin:
6
7 \seq_if_in:NnTF \g_@@_section_seq {./#1} {
8 \msg_error:nnn {SimpleSystemTeX} {Section Repeated} {#1}
9 } {
10 \seq_gput_right:Nn \g_@@_section_seq {./#1}
11 }
12
13 \prop_gput:Nnn \g_@@_sectionname_prop {#1} {#2}
14 \prop_gput:Nnn \g_@@_sectionparameter_prop {#1} {#3}
15 \prop_gput:NnV \g_@@_sectionpart_prop {#1} \g_@@_preprocess_part_tl
16 \tl_gput_right:Nn \g_@@_task_list_tl {\Section {{#1}}}
17
18 \group_end:
19 }
20 \cs_generate_variant:Nn \_@@_preprocess_section:nnn {nVV}
21
22 % [parameter] path of section (verbatim)
23 \cs_new_protected:Nn \_@@_print_section:n {
24 \phantomsection \label{./#1}
25 \group_begin:
26
27 % @section , @(...)group
28 \_@@_parse_path:nn {#1} {}
29 % @sectionpath
30 \tl_set:Nn \l_@@_sectionpath_tl {#1}
31 % @sectionpage
32 \tl_set:Nn \l_@@_sectionpage_tl {\pageref*{./#1}}
33 % @sectionname
34 \prop_get:NnN \g_@@_sectionname_prop {#1} \l_@@_sectionname_tl
35 % @sectionparameter
36 \prop_get:NnN \g_@@_sectionparameter_prop {#1} \l_@@_sectionparameter_tl
37 % @part
38 \prop_get:NnN \g_@@_sectionpart_prop {#1} \l_@@_part_tl
39
40 {\g_@@_SectionHeading_style_tl}
41
42 \file_if_exist:nTF {\g_@@_path_prefix_str #1.tex} {
43 \file_input:n {\g_@@_path_prefix_str #1.tex}
44 } {
45 \msg_warning:nnn {SimpleSystemTeX} {File Not Found} {#1.tex}
46 }
47
48 \group_end:
49 }
50
51 %</package>