diff options
author | Karl Berry <karl@freefriends.org> | 2017-04-30 20:33:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-04-30 20:33:25 +0000 |
commit | 47286be7cc00cb95d5e387c047b08018d41f37b6 (patch) | |
tree | c062450cc1036e5644a1e233205d4e3807b2d3e0 /Master/texmf-dist/tex/latex/xcntperchap | |
parent | 5fd760969b1a06d4ef546ad1e06439f3ba3661dc (diff) |
xcntperchap (30apr17)
git-svn-id: svn://tug.org/texlive/trunk@44128 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/xcntperchap')
-rw-r--r-- | Master/texmf-dist/tex/latex/xcntperchap/xcntperchap.sty | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/xcntperchap/xcntperchap.sty b/Master/texmf-dist/tex/latex/xcntperchap/xcntperchap.sty index 20edfe8187a..2f8a4de1cba 100644 --- a/Master/texmf-dist/tex/latex/xcntperchap/xcntperchap.sty +++ b/Master/texmf-dist/tex/latex/xcntperchap/xcntperchap.sty @@ -1,4 +1,4 @@ -%% LaTeX package xcntperchap - version 0.3 (2017/01/13 -- 23:24:36) +%% LaTeX package xcntperchap - version 0.4 (2017/04/30 -- 00:53:36) %% Source file for xcntperchap.sty %% %% @@ -19,22 +19,25 @@ %% %% -\def\xcntperchappackageversion{0.3} +\def\xcntperchappackageversion{0.4} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{xcntperchap}[2017/01/13 - v\xcntperchappackageversion] +\ProvidesPackage{xcntperchap}[2017/04/30 - v\xcntperchappackageversion] \RequirePackage[counter]{zref} -\RequirePackage{xparse} \RequirePackage{l3keys2e} -\RequirePackage[nonumberofruns]{xassoccnt} +\RequirePackage{xparse} +\RequirePackage{xassoccnt} \ExplSyntaxOn -\let\latex@@stepcounter\stepcounter -\let\latex@@addtocounter\addtocounter +%\let\latex@@stepcounter\stepcounter +%\let\latex@@addtocounter\addtocounter + +\cs_set_eq:NN \latex@@stepcounter \stepcounter +\cs_set_eq:NN \latex@@addtocounter \addtocounter \cs_generate_variant:Nn \int_set:Nn {NV, Nx} @@ -95,6 +98,7 @@ \cs_new:Nn \xcntperchap_storetracked_values:n{% + \group_begin: \tl_clear:N \l_tmpa_tl \int_zero:N \l_tmpa_int \int_zero:N \l_tmpb_int @@ -114,6 +118,7 @@ \setcounter{cps@@#1total##1}{\c_zero}% Reset the total counter values } } + \group_end: } @@ -123,18 +128,25 @@ % Redefine again, to provide the storage feature -\RenewDocumentCommand{\stepcounter}{m}{% + +\cs_set:Npn \xcntperchap_internal_stepcounter #1 {% +%\RenewDocumentCommand{\stepcounter}{m}{% % Must get reset list first \__xassoccnt_getresetlist:n{#1}% \seq_map_inline:Nn \g_xcntperchap_tracklevel_seq {% - \seq_if_in:NnT \l__xassoccnt_counterreset_seq {##1} {% - \StoreCounterValues{##1}% - } + \seq_if_in:NnT \l__xassoccnt_counterreset_seq {##1} {% + \StoreCounterValues{##1}% + } } \StoreCounterValues{#1}% \latex@@stepcounter{#1}% } +\let\foo\stepcounter + +\RenewDocumentCommand{\stepcounter}{m}{% + \xcntperchap_internal_stepcounter{#1}% +} \NewDocumentCommand{\AddToTrackedCounters}{mm}{% \seq_set_from_clist:Nn \l_tmpa_seq {#1} @@ -284,9 +296,9 @@ \AtBeginDocument{% \@ifpackageloaded{cleveref}{% - \@cpscleverefloadedtrue + \global\@cpscleverefloadedtrue }{% - \@cpscleverefloadedfalse + \global\@cpscleverefloadedfalse } } |