summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/secnum
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-02-03 22:31:53 +0000
committerKarl Berry <karl@freefriends.org>2020-02-03 22:31:53 +0000
commited733e4d8a5cf0e887872e05c3bb7bb25f54a515 (patch)
treeca57edb35c2d237cd3b0c757c9ee11365fcf269d /Master/texmf-dist/tex/latex/secnum
parent95bf7f250dbac1d55df4f24bd88c21372a555774 (diff)
secnum (3feb20)
git-svn-id: svn://tug.org/texlive/trunk@53657 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/secnum')
-rw-r--r--Master/texmf-dist/tex/latex/secnum/secnum.sty21
1 files changed, 11 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/secnum/secnum.sty b/Master/texmf-dist/tex/latex/secnum/secnum.sty
index c3e85d464d1..20f75a0c800 100644
--- a/Master/texmf-dist/tex/latex/secnum/secnum.sty
+++ b/Master/texmf-dist/tex/latex/secnum/secnum.sty
@@ -6,7 +6,7 @@
%%
%% secnum.dtx (with options: `package')
%%
-%% Copyright (C) 2019
+%% Copyright (C) 2019--
%% Gau, Syu ( GauSyu@Gmail.com )
%%
%% ----------------------------------------------------------------------
@@ -30,7 +30,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\ProvidesExplPackage{secnum}{2020/01/01}{}
+\ProvidesExplPackage{secnum}{2020/02/02}{}
{ An intuitive way to format section numbering }
\RequirePackage{xparse}
\tl_new:N \l__syu_secnum_tl
@@ -50,13 +50,14 @@
\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
+ \__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
\setcounter{secnumdepth}{ \seq_count:N \l__syu_secnum_seq }
- \syu_secnum:
+ \setcounter{tocdepth}{ \seq_count:N \l__syu_secnum_seq }
+ \__syu_secnum:
}
-\cs_new_protected:Npn \syu_secnum_unabbr:N #1
+\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
@@ -64,7 +65,7 @@
\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
+\cs_new_protected:Npn \__syu_split_by_macros:NN #1 #2
{
\tl_clear:N \l_tmpa_tl
\seq_clear:N #2
@@ -94,7 +95,7 @@
\prg_return_false:
\fi:
}
-\cs_new_protected:Npn \syu_secnum_from_seq:N #1
+\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 } }
@@ -109,7 +110,7 @@
\tl_gset:Nx \g__syu_subparagraph_tl
{ \seq_item:Nn #1 { 5 + \g__syu_if_thechapter_int } }
}
-\cs_new:Nn \syu_secnum:
+\cs_new:Nn \__syu_secnum:
{
\if_cs_exist:N \thechapter
\renewcommand*{\thechapter}