summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-10-25 03:01:19 +0000
committerNorbert Preining <norbert@preining.info>2022-10-25 03:01:19 +0000
commit170c76072a2b68eeeb23fa4a9e3dfbdee131e29c (patch)
tree938d306578d616ae5f01f09a49fb3e102fed8f8c /macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx
parent74697976d2ffe935077542593ccbb18a00603251 (diff)
CTAN sync 202210250301
Diffstat (limited to 'macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx37
1 files changed, 32 insertions, 5 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx
index 2de500984f..3aaaedacf7 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx
@@ -26,8 +26,8 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\bpl@version{1.27}
-\def\bpl@rdate{2022/10/03}
+\def\bpl@version{2.0}
+\def\bpl@rdate{2022/10/24}
\ProvidesFile{publist.cbx}[\bpl@rdate\space v.\bpl@version\space
biblatex citation style (JSP)]
@@ -66,14 +66,41 @@
}
\providebool{@bpl@reversenum}
+\providebool{@bpl@numberreset}
+\providebool{plnumgroup}
\AtEndOfPackage{%
\if@bpl@reversenum
+ \newcounter{prevcrefsection}%
\renewrobustcmd{\mkrefdesc}[1]{%
- % Print the labelnumber as the total number of entries in the
- % current refsection, minus the actual labelnumber, plus one
- \number\numexpr\csuse{bpl@itemtotal}-#1+1%
+ \ifbool{@bpl@numberreset}{%
+ % Print the labelnumber as the total number of entries in the
+ % current refsection, minus the actual labelnumber, plus one
+ \ifbool{plnumgroup}{%
+ \number\numexpr\csuse{bpl@itemtotal}-#1+1%
+ +\csuse{bpl@secstartshift}\relax%
+ }{%
+ \ifcsdef{bpl@secitems:\therefsection}{%
+ \number\numexpr\csuse{bpl@secitems:\therefsection}-#1+1%
+\csuse{bpl@secstartshift}\relax%
+ }{%
+ \number\numexpr\csuse{bpl@itemtotal}-#1+1%
+ +\csuse{bpl@secstartshift}\relax%
+ }%
+ }%
+ }{%
+ % Use decreasing counter
+ \setcounter{prevcrefsection}{\therefsection}%
+ \addtocounter{prevcrefsection}{-1}%
+ \ifcsdef{bpl@items:\theprevcrefsection}{%
+ \number\numexpr\csuse{bpl@itemtotal}-#1+1%
+ -\csuse{bpl@items:\theprevcrefsection}%
+ +\csuse{bpl@secstartshift}\relax%
+ }{%
+ \number\numexpr\csuse{bpl@itemtotal}-#1+1%
+ +\csuse{bpl@secstartshift}\relax%
+ }%
+ }%
}%
\fi%
}