Biblatex:\footcite 中只有姓氏

Biblatex:\footcite 中只有姓氏

我怎样才能在以下 MWE 中删除作者的名字?我已经隐藏了条目的卷数和页数。我只想这样读:

Brav 和 Heaton (2002)。《金融异常的竞争理论》。《金融研究评论》。

\documentclass{beamer}
\usetheme{Boadilla}
\usepackage{chngcntr}
\usepackage{lmodern}

\begingroup\newif\ifmy
\IfFileExists{\jobname.bib}{}{\mytrue}
\ifmy
\begin{filecontents}{\jobname.bib}
@ARTICLE{Brav2002,
author = {Alon Brav and J. B. Heaton},
title = {Competing Theories of Financial Anomalies},
journal = {Reveiw of Financial Studies},
year = {2002},
volume = {15:2},
pages = {575-606},
owner = {User},
timestamp = {2013.11.03}
}
\end{filecontents}
\fi\endgroup

\usepackage[backend=bibtex,citestyle=verbose]{biblatex}
\addbibresource{delete.bib}


\renewbibmacro{in:}{\hspace{-5pt}}
\AtEveryCitekey{\clearfield{pages}\clearfield{volume}}


\begin{document}
\begin{frame}
\frametitle{Stuff famous linguists asked}
\begin{block}{A block}
\begin{enumerate}
\item Is it part?\footcite{Brav2002}
\item More Saussure.
\end{enumerate}
\end{block}
\end{frame}
\end{document}

答案1

您可以使用\DeclareNameFormat指令来丢弃名字。我刚刚在您的代码中添加了以下行

\DeclareNameFormat{}{\usebibmacro{name:first-last}{}{#5}{#1}{#7}}

它只是省略了名字的输出,正如您在下面的示例页面中看到的那样:

在此处输入图片描述

我必须承认,在某些部分它有点像一个黑客解决方案,因为它只是滥用 bibmacro name:first-last,而且我也没有检查它是否正确处理名称后缀和前缀,但它在你的 MWE 环境中有效。

答案2

我建议使用以下重新定义cite:full

\renewbibmacro*{cite:full}{%
  \usebibmacro{cite:full:citepages}%
  \printtext[bibhypertarget]{%
    \usedriver
      {\DeclareNameAlias{sortname}{labelname}}
      {\thefield{entrytype}}}%
  \usebibmacro{shorthandintro}}

cite:fullverbose样式中通常只打印整个参考书目条目,因为它将打印在参考书目中,但在此之前它会更改sortnamedefault\DeclareNameAlias{sortname}{default}),因此我们得到first-last格式的名称(因为这是default默认设置为...)。

我们只需将sortname其改为labelname,这样我们就可以尽可能地获得姓氏,否则获得明确的名字(取决于选项uniqeuname;无论如何,名字格式将与后续引用相同)。


如果你无论如何都坚持姓氏,我建议

\DeclareNameFormat{family}{%
  \usebibmacro{name:family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}%
  \usebibmacro{name:andothers}}

\renewbibmacro*{cite:full}{%
  \usebibmacro{cite:full:citepages}%
  \printtext[bibhypertarget]{%
    \usedriver
      {\DeclareNameAlias{sortname}{family}}
      {\thefield{entrytype}}}%
  \usebibmacro{shorthandintro}}

编辑biblatex>= 3.3中的新名称格式,请参阅 3.3 之前代码的编辑历史。


平均能量损失

\documentclass{beamer}
\usetheme{Boadilla}
\usepackage{chngcntr}
\usepackage{lmodern}
\usepackage{filecontents}

\begin{filecontents*}{\jobname.bib}
@article{Brav2002,
  author = {Alon Brav and J. B. Heaton},
  title = {Competing Theories of Financial Anomalies},
  journal = {Reveiw of Financial Studies},
  year = {2002},
  volume = {15:2},
  pages = {575-606},
}
\end{filecontents*}

\usepackage[backend=bibtex,style=verbose]{biblatex}
\addbibresource{\jobname.bib}


\renewbibmacro{in:}{\hspace{-5pt}}
\AtEveryCitekey{\clearfield{pages}\clearfield{volume}}

\renewbibmacro*{cite:full}{%
  \usebibmacro{cite:full:citepages}%
  \printtext[bibhypertarget]{%
    \usedriver
      {\DeclareNameAlias{sortname}{labelname}}
      {\thefield{entrytype}}}%
  \usebibmacro{shorthandintro}}

\begin{document}
\begin{frame}
\frametitle{Stuff famous linguists asked}
\begin{block}{A block}
\begin{enumerate}
\item Is it part?\footcite{Brav2002}
\item More Saussure.\footcite{Brav2002}
\end{enumerate}
\end{block}
\end{frame}
\end{document}

在此处输入图片描述

相关内容