使用芝加哥风格在作者姓氏上添加星号(元分析)

使用芝加哥风格在作者姓氏上添加星号(元分析)

如同这个问题,我想在参考文献列表中为某些引文加星号,但使用style=chicago-authordate而不是apa。出于某种我不知道的原因,这个小变化消除了星号。该问题的 MWE 也是一个很好的例子:

\documentclass[american]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=apa]{biblatex}
\DeclareLanguageMapping{american}{american-apa}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{bohec,
  author        = {Le Bohec, Yann},
  title         = {Histoire militaire des guerres puniques},
  date          = {1996},
  location      = {Monaco},
  publisher     = {Rocher},
  isbn          = {2-268-02147-5},
}
@book{uthor,
  author        = {Uthor, Arnold},
  title         = {A Book},
  date          = {2013},
  location      = {Place},
  publisher     = {P. Ublisher's \& Co.},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\DeclareBibliographyCategory{asterisk}
\renewbibmacro*{begentry}{%
  \ifcategory{asterisk}%
    {*}%
    {}%
}

\begin{document}
  \addtocategory{asterisk}{uthor,bohec}
  \cite{wilde,cicero,coleridge,vangennep,bohec,uthor}
  \printbibliography
\end{document}

答案1

上述解决方案依赖于begentry在每个参考书目驱动程序中执行的 bibmacro,这是标准样式的自定义功能(我认为大多数自定义样式也是如此)。样式biblatex-chicago不会begentry在每个条目的开头发出(finentry但它们会在结尾使用,就像所有标准样式一样)。

bibindex幸运的是,每个驱动程序中都有执行的宏biblatex-chicago

所以我们所需要的是

\renewbibmacro*{bibindex}{%
  \ifbibindex
    {\indexnames{labelname}%
     \indexfield{indextitle}}
    {}
  \ifcategory{asterisk}%
    {*}%
    {}}

平均能量损失

\documentclass[american]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[authordate,backend=biber]{biblatex-chicago} 

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{bohec,
  author        = {Le Bohec, Yann},
  title         = {Histoire militaire des guerres puniques},
  date          = {1996},
  location      = {Monaco},
  publisher     = {Rocher},
  isbn          = {2-268-02147-5},
}
@book{uthor,
  author        = {Uthor, Arnold},
  title         = {A Book},
  date          = {2013},
  location      = {Place},
  publisher     = {P. Ublisher's \& Co.},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\DeclareBibliographyCategory{asterisk}

\renewbibmacro*{bibindex}{%
  \ifbibindex
    {\indexnames{labelname}%
     \indexfield{indextitle}}
    {}
  \ifcategory{asterisk}%
    {*}%
    {}}


\begin{document}
  \addtocategory{asterisk}{uthor,bohec}
  \cite{wilde,cicero,coleridge,vangennep,bohec,uthor}
  \printbibliography
\end{document}

相关内容