为什么在参考书目中作者姓名后有星号,而在正文中却没有?

为什么在参考书目中作者姓名后有星号,而在正文中却没有?

对于某些出版物条目,传递“共享最后作者”和/或“平等贡献”的信息非常重要。

我可以使用author+an和 的重新定义来获得它mkbibfamily。这很好用,但我在文本中也有作者姓名的星号。但我只想在参考书目中使用它。

我想知道是否有布尔值when-in-bibliography或任何想法可以解决这个问题。

这是我的 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}

截屏

答案1

隐藏宏中的星号,该宏可以根据上下文具有不同的行为,使用可以在参考书目中使用钩子设置为 true 的切换按钮\bibsetup

\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}

在此处输入图片描述

moewe,谁是 biblatex向导,建议阻止

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

可以用更简单的替代

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

(在上面的代码中添加了注释掉原来的代码)。

相关内容