diff options
author | Karl Berry <karl@freefriends.org> | 2023-06-11 20:53:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-06-11 20:53:37 +0000 |
commit | abe4509ae31120f7c8b68eabda08ad470db03020 (patch) | |
tree | 5b4e428eae508a75d52ff9248f6c84d1aa1df148 /Master/texmf-dist/tex/latex/counterz | |
parent | d4d6f3d7c1b248102e94e8f4208cc7d8a9db1ec7 (diff) |
counterz
git-svn-id: svn://tug.org/texlive/trunk@67335 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/counterz')
-rw-r--r-- | Master/texmf-dist/tex/latex/counterz/counterz.sty | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/counterz/counterz.sty b/Master/texmf-dist/tex/latex/counterz/counterz.sty index 60c70341d33..d339c9ac4a8 100644 --- a/Master/texmf-dist/tex/latex/counterz/counterz.sty +++ b/Master/texmf-dist/tex/latex/counterz/counterz.sty @@ -6,7 +6,7 @@ %% %% counterz.dtx (with options: `package') %% ---------------------------------------------------------------------- -%% `counterz' --- 2023/05/30 Version 1.1.0 Additional tools for counters +%% `counterz' --- 2023/06/05 Version 1.1.1 Additional tools for counters %% E-mail: christopher.mcclain@mail.wvu.edu %% Released under the LaTeX Project Public License v1.3c or later %% See https://www.latex-project.org/lppl.txt @@ -21,7 +21,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{counterz}[% - 2023/05/30 v1.1.0 Additional tools for counters + 2023/06/05 v1.1.1 Additional tools for counters ]% \RequirePackage{etoolbox,makecmds} \newcommand{\@counterz@counterprefix}{} @@ -145,22 +145,6 @@ \newcommand{\xnegsignedcoef}[1]{% \xnegsignofcoef{#1} \xabsofcoef{#1} }% -\newcommand{\randsetcounter}[3]{% - \setcounter{#1}{% - \the \numexpr #2+\pdfuniformdeviate \numexpr #3-#2+1 \relax - }% -}% -\newcommand{\xrandsetcounter}[3]{% - \randsetcounter{\@counterz@counterprefix#1}{#2}{#3} -}% -\newcommand{\randaddtocounter}[3]{% - \addtocounter{#1}{% - \the \numexpr #2+\pdfuniformdeviate \numexpr #3-#2+1 \relax - }% -}% -\newcommand{\xrandaddtocounter}[3]{% - \randaddtocounter{\@counterz@counterprefix#1}{#2}{#3} -}% \newbool{@counterz@random} \booltrue{@counterz@random} \newcommand{\randomizectr}{\booltrue{@counterz@random}} @@ -176,6 +160,30 @@ \norandomizectr }% }% +\newcommand{\randsetcounter}[3]{% + \ifrandomizectr{% + \setcounter{#1}{% + \the \numexpr #2+\pdfuniformdeviate \numexpr #3-#2+1 \relax + }% + }{% + % Do Nothing + }% +}% +\newcommand{\xrandsetcounter}[3]{% + \randsetcounter{\@counterz@counterprefix#1}{#2}{#3} +}% +\newcommand{\randaddtocounter}[3]{% + \ifrandomizectr{% + \addtocounter{#1}{% + \the \numexpr #2+\pdfuniformdeviate \numexpr #3-#2+1 \relax + }% + }{% + % Do Nothing + }% +}% +\newcommand{\xrandaddtocounter}[3]{% + \randaddtocounter{\@counterz@counterprefix#1}{#2}{#3} +}% \newbool{@counterz@fileISopen} \boolfalse{@counterz@fileISopen} \newcommand{\opencountersfile}{% |