diff options
Diffstat (limited to 'macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx')
-rw-r--r-- | macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx | 136 |
1 files changed, 72 insertions, 64 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx index c7d385b452..371a06232b 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx @@ -25,8 +25,8 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\def\bpl@version{2.9} -\def\bpl@rdate{2025/05/09} +\def\bpl@version{2.12} +\def\bpl@rdate{2024/07/16} \ProvidesFile{publist.bbx}[\bpl@rdate\space v.\bpl@version\space biblatex bibliography style (JSP)] @@ -552,16 +552,31 @@ {}{\PackageWarning{biblatex-publist}{Patching refsection failed!}} }{} -\newcommand*\GetSectionCount[1][\empty]{% - \edef\bpl@secno{#1}% - \ifx\bpl@secno\empty% - \csnumdef{bpltmprefsection}{\c@refsection}% - \csuse{bpl@secitems:\bpltmprefsection}% - \else% - \csuse{bpl@secitems:#1}% - \fi% +% Section count. We use l3 here to split the argument and do calculations +\ExplSyntaxOn + +\int_new:N \l_bpl_sec_cnt_int + +\NewDocumentCommand \GetSectionCount { >{\SplitList{,}} o } +{ + \IfNoValueTF{#1}{% + \csnumdef{bpltmprefsection}{\c@refsection} + \ifcsdef{bpl@secitems:\bpltmprefsection}{\csuse{bpl@secitems:\bpltmprefsection}}{}% + }{ + \int_zero:N \l_bpl_sec_cnt_int + \ProcessList{#1}{\__bpl_add_section_count} + \int_use:N \l_bpl_sec_cnt_int + } +} + +\cs_new:Npn \__bpl_add_section_count #1 +{ + \cs_if_exist:cT {bpl@secitems:#1} + { \int_add:Nn \l_bpl_sec_cnt_int { \use:c{bpl@secitems:#1} } } } +\ExplSyntaxOff + \newcommand*\GetTotalCount{% \csuse{bpl@items}% } @@ -897,7 +912,15 @@ \newrobustcmd{\mkbibdesc}[1]{% % Print labelnumber as actual number, plus item total - \number\numexpr\csuse{bpl@itemtotal}+#1+\csuse{bpl@shift@itemtotal}\relax% + \edef\bpl@current@item@no{\number\numexpr\csuse{bpl@itemtotal}+#1+\csuse{bpl@shift@itemtotal}\relax}% + \bpl@current@item@no% + % Store number in pbx file + \if@filesw% + \protected@write\bpl@bpxfile{}{% + \csedef{bpl@itemnumber:\thefield{entrykey}}{\bpl@current@item@no}% + \csedef{bpl@itemsec:\thefield{entrykey}}{\therefsection}% + }% + \fi% }% % Way to manually shift the numbering @@ -1112,21 +1135,25 @@ % from publist \defbibcheck{nosubmitted}{% \edef\tmpps{\bibstring{submitted}}% - \iffieldequals{pubstate}{\tmpps}{\skipentry}{}% + \iffieldequals{pubstate}{\tmpps}{\skipentry}{% + \iffieldequalstr{pubstate}{submitted}{\skipentry}{}}% } % check to exclude work in preparation % from publist \defbibcheck{noprepared}{% \edef\tmpps{\bibstring{inpreparation}}% - \iffieldequals{pubstate}{\tmpps}{\skipentry}{}% + \iffieldequals{pubstate}{\tmpps}{\skipentry}{% + \iffieldequalstr{pubstate}{inpreparation}{\skipentry}{}}% } % check to exclude all work which is not (pre-)published \defbibcheck{onlypublished}{% \iffieldundef{pubstate}{}{% \edef\tmpps{\bibstring{prepublished}}% - \iffieldequals{pubstate}{\tmpps}{}{\skipentry}% + \iffieldequals{pubstate}{\tmpps}{% + \iffieldequalstr{pubstate}{prepublished}{}{\skipentry}% + }{\skipentry}% }% } @@ -1137,12 +1164,37 @@ \edef\tmppss{\bibstring{forthcoming}}% \iffieldequals{pubstate}{\tmpps}{}{% \iffieldequals{pubstate}{\tmppss}{}{% - \skipentry}% - }% + \iffieldequalstr{pubstate}{prepublished}{}{% + \iffieldequalstr{pubstate}{forthcoming}{}{% + \skipentry}% + }% + }% + }% + }% +} + +% check to exclude all work which is not peer-reviewed +\defbibcheck{onlypr}{% + \iffieldundef{peerreview}{\skipentry}{% + \edef\tmppr{\bibstring{no}}% + \iffieldequals{peerreview}{\tmpps}{\skipentry}{% + \iffieldequalstr{peerreview}{no}{\skipentry}{}% + }% + }% +} + +% check to exclude all work which *is* peer-reviewed +\defbibcheck{nopr}{% + \iffieldundef{peerreview}{}{% + \edef\tmppr{\bibstring{no}}% + \iffieldequals{peerreview}{\tmpps}{}{% + \iffieldequalstr{peerreview}{no}{}{\skipentry} + }% }% } + % % Count non-plauthors % @@ -1739,6 +1791,10 @@ % % l7n % + +\DeclareLanguageMappingSuffix{-publist} + +% publist-specific bibstrings \NewBibliographyString{with} \NewBibliographyString{parttranslationof} \NewBibliographyString{impactfactor} @@ -1753,54 +1809,6 @@ \NewBibliographyString{peerreview:tp} \NewBibliographyString{peerreview:pp} \NewBibliographyString{peerreview:no} -\DefineBibliographyStrings{english}{% - parttranslationof = {partial translation of}, - with = {with}, - impactfactor = {impact factor}, - openaccess:true = {OpenAccess}, - openaccess:gold = {OpenAccess (gold)}, - openaccess:green = {OpenAccess (green)}, - peerreview:sb = {single blind peer review}, - peerreview:db = {double blind peer review}, - peerreview:op = {open peer review}, - peerreview:co = {collaborative peer review}, - peerreview:cc = {cascading peer review}, - peerreview:tp = {third-party peer review}, - peerreview:pp = {post-publication peer review}, - peerreview:no = {no peer review} -} -\DefineBibliographyStrings{french}{% - parttranslationof = {traduction partielle de}, - with = {avec}, - impactfactor = {facteur d'impact}, - openaccess:true = {libre acc\`es}, - openaccess:gold = {libre acc\`es (dorée)}, - openaccess:green = {libre acc\`es (verte)}, - peerreview:sb = {\'{e}valuation par des pairs anonymis\'{e}s}, - peerreview:db = {\'{e}valuation par les pairs en double aveugle}, - peerreview:op = {\'{e}valuation par les pairs ouverte}, - peerreview:co = {\'{e}valuation par les pairs collaborative}, - peerreview:cc = {\'{e}valuation par les pairs en cascade}, - peerreview:tp = {\'{e}valuation par des pairs ext\'{e}rieurs}, - peerreview:pp = {\'{e}valuation par les pairs apr\`{e}s publication}, - peerreview:no = {pas d'\'{e}valuation par les pairs} -} -\DefineBibliographyStrings{german}{% - parttranslationof = {Teil\"ubersetzung von}, - with = {mit}, - impactfactor = {Impactfaktor}, - openaccess:true = {OpenAccess}, - openaccess:gold = {OpenAccess (gold)}, - openaccess:green = {OpenAccess (gr\"un)}, - peerreview:sb = {Blindbegutachtung}, - peerreview:db = {Doppelblindbegutachtung}, - peerreview:op = {Offene Begutachtung}, - peerreview:co = {Kollaborative Begutachtung}, - peerreview:cc = {Cascading-Begutachtung}, - peerreview:tp = {Begutachtung durch Dritte}, - peerreview:pp = {Post-Publication-Begutachtung}, - peerreview:no = {keine Begutachtung} -} % |