One Hat Cyber Team
Your IP :
216.73.216.135
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
texlive
/
texmf-dist
/
tex
/
latex
/
secnum
/
Edit File:
secnum.sty
%% %% This is file `secnum.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% secnum.dtx (with options: `package') %% %% Copyright (C) 2019-- %% Gau, Syu ( GauSyu@Gmail.com ) %% %% ---------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either %% version 1.3c of this license or (at your option) any later %% version. This version of this license is in %% http://www.latex-project.org/lppl/lppl-1-3c.txt %% and the latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of %% LaTeX version 2005/12/01 or later. %% %% This work has the LPPL maintenance status `maintained'. %% %% The Current Maintainer of this work is %% Gau, Syu ( GauSyu@Gmail.com ). %% %% ---------------------------------------------------------------------- %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} \ProvidesExplPackage{secnum}{2021/08/28}{} { An intuitive way to format section numbering } \RequirePackage{xparse,l3keys2e} \tl_new:N \l__syu_secnum_tl \seq_new:N \l__syu_secnum_seq \int_new:N \l__syu_secnum_depth \tl_new:N \g__syu_chapter_tl \tl_new:N \g__syu_section_tl \tl_new:N \g__syu_subsection_tl \tl_new:N \g__syu_subsubsection_tl \tl_new:N \g__syu_paragraph_tl \tl_new:N \g__syu_subparagraph_tl \int_new:N \g__syu_if_thechapter_int \if_cs_exist:N \thechapter \int_gset:Nn \g__syu_if_thechapter_int 1 \else: \int_gset:Nn \g__syu_if_thechapter_int 0 \fi: \tl_new:N \g__syu_secnum_bkmr \tl_gset:Nx \g__syu_secnum_bkmr {,} \cs_generate_variant:Nn \tl_if_in:NnTF { NV } \cs_generate_variant:Nn \tl_remove_all:Nn { NV } \keys_define:nn { syu / options } { tocdep .code:n = { \int_const:Nn \g__syu_tocdep {#1} \setcounter{tocdepth}{ \g__syu_tocdep } }, breaking .code:n = { \tl_gset:Nx \g__syu_secnum_bkmr {#1} }, } \ProcessKeysOptions{ syu / options } \DeclareDocumentCommand{\setsecnum}{m} { \tl_set:Nn \l__syu_secnum_tl {#1} \__syu_secnum_unabbr:N \l__syu_secnum_tl \__syu_split_by_macros:NN \l__syu_secnum_tl \l__syu_secnum_seq \__syu_secnum_from_seq:N \l__syu_secnum_seq \int_set:Nn \l__syu_secnum_depth { \seq_count:N \l__syu_secnum_seq } \setcounter{secnumdepth} { \int_eval:n { \l__syu_secnum_depth - \g__syu_if_thechapter_int } } \int_if_exist:NTF \g__syu_tocdep { \setcounter{tocdepth}{ \g__syu_tocdep } } { \setcounter{tocdepth} { \int_eval:n { \l__syu_secnum_depth - \g__syu_if_thechapter_int } } } \__syu_secnum: } \cs_new_protected:Npn \__syu_secnum_unabbr:N #1 { \regex_replace_all:nnN {A} {\c{Alph}} #1 \regex_replace_all:nnN {a} {\c{alph}} #1 \regex_replace_all:nnN {I} {\c{Roman}} #1 \regex_replace_all:nnN {i} {\c{roman}} #1 \regex_replace_all:nnN {1} {\c{arabic}} #1 } \cs_new_protected:Npn \__syu_split_by_macros:NN #1 #2 { \tl_clear:N \l_tmpa_tl \seq_clear:N #2 \tl_map_inline:Nn #1 { \tl_put_right:Nn \l_tmpa_tl ##1 \__syu_if_macro:nT ##1 { \seq_put_right:NV #2 \l_tmpa_tl \tl_clear:N \l_tmpa_tl } } } \tl_new:N \g__syu_macro_tl \tl_set:Nx \g__syu_macro_tl { \meaning \g__syu_macro_tl } \tl_gset:Nx \g__syu_macro_tl { \tl_range:Nnn \g__syu_macro_tl {1}{5} } \prg_new_protected_conditional:Npnn \__syu_if_macro:n #1 { T , F , TF } { \group_begin: \tl_set:Nx \l_tmpa_tl {\meaning #1} \tl_set:Nx \l_tmpa_tl {\tl_range:Nnn \l_tmpa_tl {1} {5}} \exp_after:wN \group_end: \if_meaning:w \l_tmpa_tl \g__syu_macro_tl \prg_return_true: \else: \prg_return_false: \fi: } \cs_new_protected:Npn \__syu_secnum_from_seq:N #1 { \tl_gset:Nx \g__syu_chapter_tl { \seq_item:Nn #1 { \g__syu_if_thechapter_int } } \tl_gset:Nx \g__syu_section_tl { \seq_item:Nn #1 { 1 + \g__syu_if_thechapter_int } } \tl_gset:Nx \g__syu_subsection_tl { \seq_item:Nn #1 { 2 + \g__syu_if_thechapter_int } } \tl_gset:Nx \g__syu_subsubsection_tl { \seq_item:Nn #1 { 3 + \g__syu_if_thechapter_int } } \tl_gset:Nx \g__syu_paragraph_tl { \seq_item:Nn #1 { 4 + \g__syu_if_thechapter_int } } \tl_gset:Nx \g__syu_subparagraph_tl { \seq_item:Nn #1 { 5 + \g__syu_if_thechapter_int } } } \cs_new:Nn \__syu_secnum: { \if_cs_exist:N \thechapter \renewcommand*{\thechapter} { \g__syu_chapter_tl {chapter} } \tl_if_in:NVTF \g__syu_section_tl \g__syu_secnum_bkmr { \tl_remove_all:NV \g__syu_section_tl \g__syu_secnum_bkmr \renewcommand*{\thesection} { \g__syu_section_tl {section} } } { \renewcommand*{\thesection} { \thechapter \g__syu_section_tl {section} } } \else: \renewcommand*{\thesection} { \g__syu_section_tl {section} } \fi: \tl_if_empty:NTF \g__syu_subsection_tl {} { \tl_if_in:NVTF \g__syu_subsection_tl \g__syu_secnum_bkmr { \tl_remove_all:NV \g__syu_subsection_tl \g__syu_secnum_bkmr \renewcommand*{\thesubsection} { \g__syu_subsection_tl {subsection} } } { \renewcommand*{\thesubsection} { \thesection \g__syu_subsection_tl {subsection} } } } \tl_if_empty:NTF \g__syu_subsubsection_tl {} { \tl_if_in:NVTF \g__syu_subsubsection_tl \g__syu_secnum_bkmr { \tl_remove_all:NV \g__syu_subsubsection_tl \g__syu_secnum_bkmr \renewcommand*{\thesubsubsection} { \g__syu_subsubsection_tl {subsubsection} } } { \renewcommand*{\thesubsubsection} { \thesubsection \g__syu_subsubsection_tl {subsubsection} } } } \tl_if_empty:NTF \g__syu_paragraph_tl {} { \tl_if_in:NVTF \g__syu_paragraph_tl \g__syu_secnum_bkmr { \tl_remove_all:NV \g__syu_paragraph_tl \g__syu_secnum_bkmr \renewcommand*{\theparagraph} { \g__syu_paragraph_tl {paragraph} } } { \renewcommand*{\theparagraph} { \thesubsubsection \g__syu_paragraph_tl {paragraph} } } } \tl_if_empty:NTF \g__syu_subparagraph_tl {} { \tl_if_in:NVTF \g__syu_subparagraph_tl \g__syu_secnum_bkmr { \tl_remove_all:NV \g__syu_subparagraph_tl \g__syu_secnum_bkmr \renewcommand*{\thesubparagraph} { \g__syu_subparagraph_tl {subparagraph} } } { \renewcommand*{\thesubparagraph} { \theparagraph \g__syu_subparagraph_tl {subparagraph} } } } } \endinput %% %% End of file `secnum.sty'.
Simpan