Own name should not get filtered out as co-editor of a volume in which one also published a chapter
Closed this issue · 9 comments
One of the main features of biblatex-publist is the filtering out of the author's name. But in some places it should not happen, such as when one is a co-editor of a volume in which one also publishes a chapter. Of course, when making an entry for that volume itself (2) it is fine, but when referring to the chapter in the volume (1) my name is simply missing from the editors.
\documentclass{article}
\begin{filecontents}{ref.bib}
@collection {FilliozatGoodallPasedach2020,
editor = {Pierre-Sylvain Filliozat and Dominic Goodall and Peter Pasedach},
title = {Volume in Memory of Pandit N.R. Bhatt / Volume à la mémoire de Pandit N.R. Bhatt},
publisher = {Institute Français de Pondichéry / École française d’Extrême-Orient},
location = {Pondicherry},
pubstate = {forthcoming},
sortyear = {2020},
keywords = {pasedach,dfg-a},
}
@incollection{Pasedach2020,
author = {Peter Pasedach},
title = {The Sixth Canto of the Haravijaya},
subtitle = {Evidence of the Śaivasiddhānta in Ninth Century Kashmir},
related = {FilliozatGoodallPasedach2020},
pubstate = {forthcoming},
sortyear = {2020},
keywords = {pasedach,dfg-a},
}
\end{filecontents}
\usepackage[backend=biber, bibstyle=publist]{biblatex}
\plauthorname{Pasedach}
\addbibresource{ref.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
I see. Note that this only applies to related
. If you link to the volume the normal way (via crossref
or xref
), the editor list is not filtered (although et al.
should not appear here):
\documentclass{article}
\begin{filecontents}{ref.bib}
@collection {FilliozatGoodallPasedach2020,
editor = {Pierre-Sylvain Filliozat and Dominic Goodall and Peter Pasedach},
title = {Volume in Memory of Pandit N.R. Bhatt / Volume à la mémoire de Pandit N.R. Bhatt},
publisher = {Institute Français de Pondichéry / École française d’Extrême-Orient},
location = {Pondicherry},
pubstate = {forthcoming},
sortyear = {2020},
keywords = {pasedach,dfg-a},
}
@incollection{Pasedach2020,
author = {Peter Pasedach},
title = {The Sixth Canto of the Haravijaya},
subtitle = {Evidence of the Śaivasiddhānta in Ninth Century Kashmir},
crossref = {FilliozatGoodallPasedach2020},
pubstate = {forthcoming},
sortyear = {2020},
keywords = {pasedach,dfg-a},
}
\end{filecontents}
\usepackage[backend=biber, bibstyle=publist]{biblatex}
\plauthorname{Pasedach}
\addbibresource{ref.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
Hm, I don't know the most straightforward way to tell whether an author or editor has been inherited via related
. The following hack seems to work, but I suppose the begrelated
and endrelated
macros are provided for something else:
diff --git a/publist.bbx b/publist.bbx
index 593303a..04e0375 100644
--- a/publist.bbx
+++ b/publist.bbx
@@ -476,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}
@@ -581,12 +587,16 @@
}%
}
+\newtoggle{isinrelated}
+\renewbibmacro*{begrelated}{\global\toggletrue{isinrelated}}
+\renewbibmacro*{endrelated}{\global\togglefalse{isinrelated}}
+
% 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
@@ -669,7 +679,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}}}%
}%
}%
}%
@moewew could I request your expertise? BTW is there a straightforward way to prepend/append something to an existing bibmacro (à la \apptocmd
) rather than to redefine it?
Unfortunately, I don't have time to look at this in more detail at the moment, but hopefully I can find some time towards the end of the week.
If you want to append/preprend code to bibmacros and the like, have a look at xpatch
's \xapptobibmacro
and friends.
Thanks, my immediate need is now taken care of by just switching from related
to crossref
, and keeping the latest versions of publist.bbx
and publist.cbx
in my working directory.
@jspitz I don't quite understand what you mean by checking if an author
or editor
has been inherited via related
. Usually related
is implemented like this
\newbibmacro*{related:default}[1]{%
\entrydata*{#1}{%
\usedriver
{\ifnameundef{savedauthor}
{\ifnameundef{savededitor}
{}
{\ifnamesequal{editor}{savededitor}
{\clearname{editor}}
{}}}
{\ifnamesequal{author}{savedauthor}
{\clearname{author}}
{}}%
\renewbibmacro*{related:init}{}%
\DeclareNameAlias{sortname}{default}%
\ifbibmacroundef{date+extradate}
{}
{\renewbibmacro*{date+extradate}{}%
\renewbibmacro*{bbx:ifmergeddate}{\@secondoftwo}}%
\renewbibmacro*{pageref}{}}
{\thefield{entrytype}}}}
Which just executes the bibliography driver of the related
entry (within \entrydata*
to make sure the entry data of the related entry is printed and not that of the main entry).
Regardless of that, my first hunch would have been that maybe the name counters aren't initialised correctly, since \AtEveryBibitem
does not get executed before the related
(sub-)entries. I have no idea how one would do that in general, but here is something that shows how it would work in this case (look for YYY
).
\documentclass{article}
\usepackage[backend=biber, bibstyle=publist]{biblatex}
\plauthorname{Pasedach}
\makeatletter
\newcommand*{\bpl@initnamecounters}{%%
\setcounter{nonplauthors}{0}%
\setcounter{nonpleditors}{0}%
\setcounter{plauthor}{0}%
\setcounter{pleditor}{0}%
\setcounter{plauthors}{0}%
\setcounter{pleditors}{0}%
\setcounter{nonplauthor}{0}%
\setcounter{nonpleditor}{0}%
\setcounter{realliststop}{0}%
\indexnames[nonplauthorcount][-\value{listtotal}]{author}%
\indexnames[nonpleditorcount][-\value{listtotal}]{editor}%
}
\AtEveryBibitem{XXXX\bpl@initnamecounters}
\renewbibmacro*{related:default}[1]{%
\entrydata*{#1}{%
\usedriver
{YYY\bpl@initnamecounters
\ifnameundef{savedauthor}
{\ifnameundef{savededitor}
{}
{\ifnamesequal{editor}{savededitor}
{\clearname{editor}}
{}}}
{\ifnamesequal{author}{savedauthor}
{\clearname{author}}
{}}%
\renewbibmacro*{related:init}{}%
\DeclareNameAlias{sortname}{default}%
\ifbibmacroundef{date+extradate}
{}
{\renewbibmacro*{date+extradate}{}%
\renewbibmacro*{bbx:ifmergeddate}{\@secondoftwo}}%
\renewbibmacro*{pageref}{}}
{\thefield{entrytype}}}}
\makeatother
\begin{filecontents}{\jobname.bib}
@collection{FilliozatGoodallPasedach2020,
editor = {Pierre-Sylvain Filliozat and Dominic Goodall and Peter Pasedach},
title = {Volume in Memory of Pandit N.R. Bhatt / Volume à la mémoire de Pandit N.R. Bhatt},
publisher = {Institute Français de Pondichéry / École française d’Extrême-Orient},
location = {Pondicherry},
pubstate = {forthcoming},
sortyear = {2020},
keywords = {pasedach,dfg-a},
}
@incollection{Pasedach2020,
author = {Peter Pasedach},
title = {The Sixth Canto of the Haravijaya},
subtitle = {Evidence of the Śaivasiddhānta in Ninth Century Kashmir},
related = {FilliozatGoodallPasedach2020},
pubstate = {forthcoming},
sortyear = {2020},
keywords = {pasedach,dfg-a},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
Thanks, @moewew but that does not look like what I would expect. This approach applies the filtered list to the related entries, but what is desired here is the contrary: related entries should not get any special author/editor treatment.
In my take above, I am taking care of that by simply disabling all author filtering/highlighting between begrelated
and endrelated
.
OTOH it also seems to me that the usage of related in the example given in #25 (comment) is rather unusual.
Oh, sorry. I misunderstood.
Let me know if there is something else I can help with.
I patched now \abx@macro@begrelated
and \abx@macro@endrelated
manually
biblatex-publist
1.19 will go to CTAN in a minute.