9

How can I drop the authors first name in the following MWE? I have already suppressed the volume and pages of the entry. I just want this to read:

Brav and Heaton (2002). Competing Theories of Financial Anomalies. Reveiw of Financial Studies.

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

You can use the \DeclareNameFormat directive to throw away the first names. I just added the following line to your code

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

which just omits the output of first names, as you can see in the sample page below:

enter image description here

I have to admit it is in some parts a bit of a hacky solution as it just abuses the name:first-last bibmacro and I also did not check if it deals with name suffixes and prefixes correctly, but it works in the environment of your MWE.

  • This will go awry if biblatex needs to add an "et al." (it will just be eaten up), better use something like \DeclareNameFormat{}{\usebibmacro{name:first-last}{}{#5}{#1}{#7}\usebibmacro{name:andothers}}. (Plus, I'm not even sure whether one should use \DeclareNameFormat with an empty first argument. There is also a bibmacro{name:last}.) – moewe Mar 14 '14 at 15:57
  • As written it's some hackish solution and I didn't think much about and also kept my research about the possible bibmacros rather short. – Benedikt Bauer Mar 14 '14 at 18:43
7

I'd suggest using the following redefinition of cite:full:

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

cite:full in the verbose styles normally just prints the whole bibliography entry as it would be printed in the bibliography, but before that it changes sortname to default (\DeclareNameAlias{sortname}{default}), so we get names in first-last format (as that is what default is set to ... by default).

We simply change sortname to labelname, so we get last names if possible and unambiguous names otherwise (depending on the uniqeuname option; anyway, the name format will be the same as in subsequent citations).


If you insist on last names no matter what, I'd suggest

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

Edited for the new name format in biblatex >= 3.3, see edit history for pre-3.3 code.


MWE

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

enter image description here

  • Hi, great answer, since this answers a few years old, could I inquire whether the usebibmacro{name:last} which in some way I think has been replaced with usebibmacro{name:family} still works? I think the arguments it takes must have changed, because as is, it results in Illegal parameter number in definition of \blx@defformat@d – EngBIRD Jun 24 '16 at 22:28
  • @EngBIRD You will need something like \DeclareNameFormat{family}{% \usebibmacro{name:family} {\namepartfamily} {\namepartgiven} {\namepartprefix} {\namepartsuffix}% \usebibmacro{name:andothers}} (modulo line breaks). See above. – moewe Jun 25 '16 at 6:28
  • Very nice, but it's worth noting that your declaration of cite:full should go in the .cbx-file properly specified with citestyle=... Your solution is neat, but it took me many long hours to figure out how to apply it :/ – nJGL Mar 26 at 17:12
  • @nJGL The code can just be added to the preamble as in the MWE at the end. (I just verified that the MWE indeed compiles as expected.) You should not (have to) modify system-installed .cbx files. – moewe Mar 26 at 17:28

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.