2

My goal is to cite several sources by shortauthor (without date) and have the citation put in parentheses. As there is no \parenciteauthor command, I have defined one that relies on \citeauthor.

Furthermore, I wish to exclude these entries from the list of references by using the skipbib=true or the skipbiblist=true option.

My approach works whenever I cite a single source. Unfortunately, I can only ever get one of these two requirements to work when I cite multiple sources.

If I use the option skipbiblist=true, I can cite both sources at once (see line 2 of the output). However, the entries still show up in the list of references. If I instead use the option skipbib=true, the entries are successfully omitted from the list of references. Citing a single source also works fine (line 3 of the output). But if I cite multiple sources at once, the parentheses with the citation are empty (line 4 of the output).

Is there a way to achieve both requirements at the same time? Why are the parentheses empty when using skipbib=true?

This is what my output looks like:

MEW output

MEW:

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage[style=authoryear-icomp,
  backend=biber, 
  bibstyle=authoryear
  ]{biblatex}

\newcommand{\parenciteauthor}[1]{(\citeauthor{#1})}

\begin{filecontents*}[overwrite]{publist.bib}

@misc{test1,
author = {Author1},
shortauthor = {T1},
title = {Paper 1},
year = {2010},
howpublished = {Paper presented at the meeting of Organization Name, Location},
options = {skipbiblist=true}
}

@misc{test2,
author = {Author2},
shortauthor = {T2},
title = {Paper 2},
year = {2010},
howpublished = {Paper presented at the meeting of Organization Name, Location},
options = {skipbiblist=true}
}

@misc{test3,
author = {Author3},
shortauthor = {T3},
title = {Paper 3},
year = {2010},
howpublished = {Paper presented at the meeting of Organization Name, Location},
options = {skipbib=true}
}

@misc{test4,
author = {Author4},
shortauthor = {T4},
title = {Paper 4},
year = {2010},
howpublished = {Paper presented at the meeting of Organization Name, Location},
options = {skipbib=true}
}

\end{filecontents*}

\addbibresource{publist.bib}



\begin{document}

Cite paper 1 \parenciteauthor{test1} and paper 2 \parenciteauthor{test2}, both with the option skipbiblist=true.

Cite paper 1 and 2 together: \parenciteauthor{test1,test2}. % This is how I want to output to look like. Unfortunately, the sources still show up in the list of references.

Cite paper 3 \parenciteauthor{test3} and paper 4 \parenciteauthor{test4}, both with the option skipbib=true.

Cite paper 3 and 4 together: \parenciteauthor{test3,test4}. % The sources are omitted from the list of references as desired, but the citation does not work.

\printbibliography

\end{document}

1 Answer 1

3

Update

The bug found here was resolved in biblatex v3.18 (2022-06-22). Update your system if you still encounter this issue.


This issue is not caused by any of your definitions. It is caused by what is arguably a bug in biblatex: https://github.com/plk/biblatex/issues/1225.


If you need things to work now, you can include the fix for https://github.com/plk/biblatex/issues/1225 as follows. Please remember to delete the \makeatletter ... \makeatother block once biblatex is updated.

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage[
  backend=biber,
  style=authoryear-icomp,
]{biblatex}

\makeatletter
\protected\def\blx@bbl@endentry{%
  \csuse\blx@bbl@data
  \ifcsundef{blx@pref@\the\c@refsection @\abx@field@entrykey}
    {}
    {\blx@addpageref{\abx@field@entrykey}}%
  \nottoggle{blx@setonly}
    {}
    {\global\toggletrue{blx@addset}%
     \toggletrue{blx@skipbib}%
     \toggletrue{blx@skipbiblist}%
     \toggletrue{blx@skiplab}}%
  \expandafter\ifstrequal\expandafter{\blx@dlist@type}{entry}
    {\listcsxadd{blx@type@\the\c@refsection @\abx@field@entrytype}{\abx@field@entrykey}%
     \ifdef\abx@field@entrysubtype
       {\listcsxadd{blx@subt@\the\c@refsection @\abx@field@entrysubtype}{\abx@field@entrykey}}
       {}%
     \nottoggle{blx@setonly}
       {\listcsxadd{blx@dlist@centry@\the\c@refsection @\blx@dlist@name}{\abx@field@entrykey}}
       {}%
     \nottoggle{blx@skipbib}
       {\listcsxadd{blx@dlist@entry@\the\c@refsection @\blx@dlist@name}{\abx@field@entrykey}}
       {}}%
    {}%
  \nottoggle{blx@skipbiblist}
    {\expandafter\ifstrequal\expandafter{\blx@dlist@type}{list}
      {\blx@bbl@labelfields
        \listcsxadd{blx@dlist@\blx@dlist@type @\the\c@refsection @\blx@dlist@name}{\abx@field@entrykey}}
      {}}%
    {}%
  \nottoggle{blx@skiplab}
    {\iftoggle{blx@labelnumber}
       {\blx@bbl@labelnumber}
       {}%
     \iftoggle{blx@labelalpha}
       {\blx@bbl@labelalpha}
       {}%
     \iftoggle{blx@labeltitle}
       {\blx@bbl@labeltitle}
       {}%
     \iftoggle{blx@labeltitleyear}
       {\blx@bbl@labeltitleyear}
       {}%
     \iftoggle{blx@labeldateparts}
       {\blx@bbl@labeldate}
       {}%
     \blx@bbl@labelname}
    {}%
  \blx@bbl@titles
  \blx@bbl@hooks
  \endgroup}
\makeatother

\newcommand{\parenciteauthor}[1]{(\citeauthor{#1})}

\begin{filecontents*}[overwrite]{\jobname.bib}
@misc{test1,
  author       = {Author1},
  title        = {Paper 1},
  year         = {2010},
  options      = {skipbiblist=true},
}
@misc{test2,
  author       = {Author2},
  title        = {Paper 2},
  year         = {2010},
  options      = {skipbiblist=true}
}
@misc{test3,
  author       = {Author3},
  title        = {Paper 3},
  year         = {2010},
  options      = {skipbib=true}
}
@misc{test4,
  author       = {Author4},
  title        = {Paper 4},
  year         = {2010},
  options      = {skipbib=true}
}
\end{filecontents*}
\addbibresource{\jobname.bib}


\begin{document}
Cite paper 1 \parenciteauthor{test1}
and paper 2 \parenciteauthor{test2}, both with the option skipbiblist=true.

Cite paper 1 and 2 together: \parenciteauthor{test1,test2}.
Cite paper 3 \parenciteauthor{test3} and paper 4 \parenciteauthor{test4},
both with the option skipbib=true.

Cite paper 3 and 4 together: \parenciteauthor{test3,test4}. 

\printbibliography
\end{document}

Cite paper 1 (Author1) and paper 2 (Author2), both with the option skip-
biblist=true.
Cite paper 1 and 2 together: (Author1; Author2). Cite paper 3 (Author3)
and paper 4 (Author4), both with the option skipbib=true.
Cite paper 3 and 4 together: (Author3; Author4).


As I mentioned above, the issue is not at all caused by your definitions, but

\DeclareCiteCommand{\parenciteauthor}[\mkbibparens]
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexnames{labelname}}
     {}%
   \printnames{labelname}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

would be slightly more idiomatic - if admittedly much longer than

\newcommand{\parenciteauthor}[1]{(\citeauthor{#1})}
1
  • Totally awesome how your definition of \parenciteauthor preserves the two optional arguments (prenote & postnote) of \citeauthor. (I tried, but I had no idea that was so complex.) May 4, 2022 at 12:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .