% publist.cbx, biblatex citation style by Juergen Spitzmueller % requires biblatex >= 3.4 % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % 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 2003/12/01 or later. % % This work has the LPPL maintenance status "maintained". % % This Current Maintainer of this work is Jürgen Spitzmüller. % % This work consists of the file publist.cbx and publist.bbx. % % % This is a simple portmanteau file that just loads the standard % "numeric" citation style. This file is provided to allow the loading % of biblatex-publist via the "style=" (alternatively to "bibstyle=") % option. % % Please send suggestions and bug reports to % https://github.com/jspitz/biblatex-publist % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\bpl@version{2.8} \def\bpl@rdate{2024/03/08} \ProvidesFile{publist.cbx}[\bpl@rdate\space v.\bpl@version\space biblatex citation style (JSP)] \RequireCitationStyle{numeric} \DeclareCiteCommand{\citeitem} {\defcounter{maxnames}{999}% \boolfalse{citetracker}% \boolfalse{pagetracker}% \usebibmacro{prenote}} {\usebibmacro{bpl:cite:extern}} {\multicitedelim} {\usebibmacro{postnote}} \newbibmacro*{bpl:cite:extern}{% \printtext[bibhyperref]{% \printfield{labelprefix}% \usebibmacro{bpl:cite:labelnumber}% \ifbool{bbx:subentry} {\printfield{entrysetcount}} {}}} \newbibmacro*{bpl:cite:labelnumber}{% \printtext[labelnumberwidth]{\mkrefdesc{\thefield{labelnumber}}}% } % Manual way to adjust numbering \csdef{bpl@secstartshift}{0} \newcommand*\shiftciteitem[1]{\csdef{bpl@secstartshift}{#1}} % Print labelnumber as actual number, plus item total % and probably a manual shift value \newrobustcmd{\mkrefdesc}[1]{% \number\numexpr#1+\csuse{bpl@itemtotal}+\csuse{bpl@secstartshift}\relax% } \providebool{@bpl@reversenum} \providebool{@bpl@numberreset} \providebool{plnumgroup} \AtEndOfPackage{% \if@bpl@reversenum \newcounter{prevcrefsection}% \renewrobustcmd{\mkrefdesc}[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% } %% \endinput