Biblatex:姓氏只在 \footcite 中

Biblatex:姓氏只在 \footcite 中

如何在以下 MWE 中刪除作者的名字?我已經壓制了條目的體積和頁數。我只想讀:

布拉夫和希頓(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}}

它只是省略了名字的輸出,如下面的範例頁面所示:

在此輸入影像描述

我必須承認它在某些部分是一個有點 hacky 的解決方案,因為它只是濫用 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預設為... 的內容)。

我們只需更改sortnamelabelname,因此如果可能的話我們會得到姓氏,否則會得到明確的名稱(取決於選項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}

在此輸入影像描述

相關內容