summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-08-22 03:03:28 +0000
committerNorbert Preining <norbert@preining.info>2020-08-22 03:03:28 +0000
commit55119febaa69f5ffba8fb68fb0d126a6e510088e (patch)
tree6d624a34404d268ea929c6a3fc67f8c2c258426d /macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx
parent53aa98594549cfbdb62a637d3c30cb9235c22621 (diff)
CTAN sync 202008220303
Diffstat (limited to 'macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx35
1 files changed, 25 insertions, 10 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx
index 4184304332..cb96b21e28 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{1.18}
-\def\bpl@rdate{2020/07/31}
+\def\bpl@version{1.19}
+\def\bpl@rdate{2020/08/21}
\ProvidesFile{publist.bbx}[\bpl@rdate\space v.\bpl@version\space
biblatex bibliography style (JSP)]
@@ -225,8 +225,7 @@
% and normalize spaces
\def\bpl@normalize#1#2{%
\begingroup
- \def\bibnamedelima{ }%
- \def\bibnamedelimb{ }%
+ \blx@indexnamesetup%
\def\IeC##1{##1}%
\protected@edef\@tempa{#1}%
\gdef\@gtempa{}%
@@ -477,6 +476,12 @@
\DeclareIndexNameFormat[inbook,inproceedings,incollection]{editorfiltered}{}%
+\DeclareDelimFormat{bpl:unfiltered:finalnamedelim}{%
+ \ifnumless{\value{listcount}}{\value{liststop}}%
+ {\multinamedelim}%
+ {\finalnamedelim}%
+}%
+
\DeclareDelimFormat[author]{bplfinalnamedelim}{%
\ifnumgreater{\value{nonplauthors}}{2}{\finalandcomma}{}%
\addspace\bibstring{and}\space}
@@ -582,12 +587,21 @@
}%
}
+% Add hook to check whether we are in a related entry.
+% This is to prevent author omission in such cases.
+\newtoggle{isinrelated}
+\apptocmd{\abx@macro@begrelated}{\global\toggletrue{isinrelated}}{}%
+ {\PackageWarning{biblatex-publist}{Patching begrelated failed!}}
+\apptocmd{\abx@macro@endrelated}{\global\toggletrue{isinrelated}}{}%
+ {\PackageWarning{biblatex-publist}{Patching endrelated failed!}}
+
% Omission/highlighting routine
% (common code for authors and editors)
% \usebibmacro{bpl:handlenames}[author|editor]
\newbibmacro{bpl:handlenames}[1][author]{%
\bpl@ifplauthor{\namepartgiven}{\namepartprefix}{\namepartfamily}%
- {\global\toggletrue{isplauthor}\stepcounter{pl#1}}%
+ {\iftoggle{isinrelated}{\togglefalse{isplauthor}}%
+ {\global\toggletrue{isplauthor}\stepcounter{pl#1}}}%
{\global\togglefalse{isplauthor}}%
%
% Calculate real list stop
@@ -619,7 +633,7 @@
{\ifdefvoid{\namepartgiven}{}{\addcomma\addspace\namepartgiven\isdot\addspace}}%
\fi
}%
- \ifnumequal{\value{listcount}}{\value{liststop}}{}{\usebibmacro{name:andothers}}%
+ \ifnumequal{\value{listcount}}{\value{liststop}}{}{\usebibmacro{bpl:name:andothers}}%
}{%
\ifnumgreater{\value{listcount}}{\value{realliststop}}{}{%
\if@givenfirst% given name first
@@ -640,7 +654,7 @@
{\ifdefvoid{\namepartgiven}{}{\addcomma\addspace\namepartgiven\isdot\addspace}}%
\fi
}%
- \usebibmacro{name:andothers}%
+ \usebibmacro{bpl:name:andothers}%
}%
%
% Second case: plauthorhandling=omit
@@ -670,7 +684,8 @@
\ifnumgreater{\value{listcount}}{\value{realliststop}}{}{%
\ifnumless{\value{nonpl#1}}{\value{nonpl#1s}}%
{\multinamedelim}%
- {\printdelim[#1]{bplfinalnamedelim}}%
+ {\iftoggle{isinrelated}{\printdelim{bpl:unfiltered:finalnamedelim}}%
+ {\printdelim[#1]{bplfinalnamedelim}}}%
}%
}%
}%
@@ -684,7 +699,7 @@
}%
}% <- end FALSE condition
%
- \usebibmacro{name:andothers}%
+ \usebibmacro{bpl:name:andothers}%
\ifthenelse{\value{nonpl#1s}>0\AND\value{listcount}=\value{liststop}}%
{\unspace\bibcloseparen}%
{}%
@@ -824,7 +839,7 @@
\fi% end of \if@hlauthor else condition
}
-\renewbibmacro*{name:andothers}{%
+\newbibmacro*{bpl:name:andothers}{%
\ifthenelse{\value{listcount}=\value{liststop}\AND\value{liststop}>\value{realliststop}}
{%
\ifboolexpr{