6

For some publication entries it is important to pass along the information of "shared last authorship" and/or "equal contribution".

I can get this using author+an and a redefinition of mkbibfamily. This works great, but I also have the asterisk of the author’s name in text. But I only want to have it in the bibliography.

I was wondering if there is a boolean like when-in-bibliography or any idea, how this could be solved.

Here is my MWE:

\begin{filecontents}[overwrite]{bib.bib}
@String {equal = {\textit{*equal contribution}}}
@String {sharedlast = {\textit{*shared last authorship}}}

@Article{roessner2021a,
  Author          = {Roessner, P.M. and Cid, L.Llao and Lupar, E. and Roider,
                    T. and Bordas, M. and Schifflers, C. and Arseni, L. and
                    Gaupel, A.C. and Kilpert, F. and Krotschel, M. and
                    Arnold, S.J. and Sellner, L. and Colomer, D. and
                    Stilgenbauer, S. and Dietrich, S. and Lichter, P. and
                    Izcue, A. and Seiffert, M.},
  Date            = {2021},
  author+an       = {17=sharedLast;18=sharedLast},
  Addendum        = sharedlast,
  Title           = {{EOMES} and {IL}-10 regulate antitumor activity of T
                    regulatory type 1 {CD4(+)} T cells in chronic lymphocytic
                    leukemia},
  Volume          = {35},
  Pages           = {2311--2324},
  JournalTitle    = {Leukemia}
}


@Article{sackett2019a,
  Author          = {Sackett, Sara Dutton and Otto, Tobias and Mohs, Antje
                    and Sander, Leif E. and Strauch, Sonja and Streetz,
                    Konrad L. and Kroy, Daniela C. and Trautwein, Christian},
  Date            = 2019,
  Title           = {Myeloid cells require gp130 signaling for protective
                    anti-inflammatory functions during sepsis},
  Volume          = 33,
  author+an       = {1=equal;2=equal},
  Addendum        = equal,
  Pages           = {6035--6044},
  DOI             = {10.1096/fj.201802118r},
  JournalTitle    = {The FASEB Journal},
  Number          = 5
}
\end{filecontents}

\documentclass{scrbook}
\usepackage[%
backend=biber,
  style=ext-authoryear-ecomp,
  autocite=inline,
  defernumbers=true, % reset numbered bibliography for each chapter
  giveninits=true, % abbreviate the first names
  maxcitenames=1,
  mincitenames=1,
  maxbibnames=99, % show all authors of an bib entry
  ]{biblatex}

\addbibresource{bib.bib}

% There is also the possibility that authors share the last authership.
% with the bib-string `lastShared` we can get it work.
\renewcommand*{\mkbibnamefamily}[1]{%
  \ifitemannotation{equal}
    {#1*}% add a * for those authors
    {%
    % Then we check for "shared Last authorship"
    \ifitemannotation{sharedLast}%
    {#1*}% adding a symbol
    {#1}% do nothing for any one else.
  }}

\begin{document}
\autocite{roessner2021a,sackett2019a}
\printbibliography[heading=none]
\end{document}

screenshot

1 Answer 1

5

Hide the asterisk in a macro that can have different behavior according to the context, using a toggle that can be set to true in the bibliography using the \bibsetup hook.

\begin{filecontents}[overwrite]{\jobname.bib}
@String {equal = {\textit{*equal contribution}}}
@String {sharedlast = {\textit{*shared last authorship}}}

@Article{roessner2021a,
  Author          = {Roessner, P.M. and Cid, L.Llao and Lupar, E. and Roider,
                    T. and Bordas, M. and Schifflers, C. and Arseni, L. and
                    Gaupel, A.C. and Kilpert, F. and Krotschel, M. and
                    Arnold, S.J. and Sellner, L. and Colomer, D. and
                    Stilgenbauer, S. and Dietrich, S. and Lichter, P. and
                    Izcue, A. and Seiffert, M.},
  Date            = {2021},
  author+an       = {17=sharedLast;18=sharedLast},
  Addendum        = sharedlast,
  Title           = {{EOMES} and {IL}-10 regulate antitumor activity of T
                    regulatory type 1 {CD4(+)} T cells in chronic lymphocytic
                    leukemia},
  Volume          = {35},
  Pages           = {2311--2324},
  JournalTitle    = {Leukemia}
}


@Article{sackett2019a,
  Author          = {Sackett, Sara Dutton and Otto, Tobias and Mohs, Antje
                    and Sander, Leif E. and Strauch, Sonja and Streetz,
                    Konrad L. and Kroy, Daniela C. and Trautwein, Christian},
  Date            = 2019,
  Title           = {Myeloid cells require gp130 signaling for protective
                    anti-inflammatory functions during sepsis},
  Volume          = 33,
  author+an       = {1=equal;2=equal},
  Addendum        = equal,
  Pages           = {6035--6044},
  DOI             = {10.1096/fj.201802118r},
  JournalTitle    = {The FASEB Journal},
  Number          = 5
}
\end{filecontents}

\documentclass{scrbook}
\usepackage[
  backend=biber,
  style=ext-authoryear-ecomp,
  autocite=inline,
  defernumbers=true, % reset numbered bibliography for each chapter
  giveninits=true, % abbreviate the first names
  uniquename=init,
  maxcitenames=1,
  mincitenames=1,
  maxbibnames=99, % show all authors of an bib entry
]{biblatex}

\addbibresource{\jobname.bib}

\newcommand{\addendumasterisk}{\ifbibliography{*}{}}
%%% the following three lines commented out, see end of the answer
%\newtoggle{showasterisk}
%\newcommand{\addendumasterisk}{\iftoggle{showasterisk}{*}{}}
%\appto{\bibsetup}{\toggletrue{showasterisk}}

% There is also the possibility that authors share the last authorship.
% with the bib-string `lastShared` we can get it work.
\renewcommand*{\mkbibnamefamily}[1]{%
  \ifitemannotation{equal}
    {#1\addendumasterisk}% add a * for those authors
    {%
    % Then we check for "shared Last authorship"
    \ifitemannotation{sharedLast}%
    {#1\addendumasterisk}% adding a symbol
    {#1}% do nothing for any one else.
  }}

\begin{document}

\autocite{roessner2021a,sackett2019a}

\printbibliography[heading=none]

\end{document}

enter image description here

moewe, who's the biblatex wizard, suggests that the block

\newtoggle{showasterisk}
\newcommand{\addendumasterisk}{\iftoggle{showasterisk}{*}{}}
\appto{\bibsetup}{\toggletrue{showasterisk}}

can be replaced by the simpler

\newcommand{\addendumasterisk}{\ifbibliography{*}{}}

(added to the code above commenting out the original).

5
  • Thanks. the lines \newrobustcmd{\equalcontribution}{\textit{*equal contribution}} \newrobustcmd{\sharedlastauthorship}{\textit{*shared last authorship}} are not necessary?! It is the same content as in the bibstring!? Nov 13 at 19:00
  • 1
    @lukascbossert Leftover from a previous attempt.
    – egreg
    Nov 13 at 20:06
  • 2
    biblatex has the tests \ifbibliography and \ifcitation that can be used to test the "context". In this example we could replace \iftoggle{showasterisk} by \ifbibliography, but this may not be useful if a more intricate logic is desired.
    – moewe
    Nov 14 at 16:29
  • The syntax is \ifbibliography{<true>}{<false>} (analogous for \ifcitation).
    – moewe
    Nov 14 at 16:46
  • I knew I have read this \ifbibliography somewhere but couldnt find it anymore in the documentation. Thanks alot! Nov 14 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.