TeX - LaTeX Asked on July 13, 2021
I want to cite the authors of a publication. Say "A. Foo, B. Bar, and C. FooBar".
Using citeauthor
from biblatex with Biber backend it produces:
Foo, Bar and FooBar.
Great!
I am looking for some command (something like shortciteauthor
maybe) that produces only the name from the first author with "et al." afterwards.
So instead of above I only want
Foo et al.
Is there something like this? Sorry for not providing a MWE I didn’t come up with something really short enough.
Use the starred version citeauthor*
documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage{csquotes}
usepackage[style=authoryear, backend=biber]{biblatex}
addbibresource{biblatex-examples.bib}
begin{document}
citeauthor*{aksin}
citeauthor{aksin}
citeauthor*{companion}
citeauthor{companion}
printbibliography
end{document}
Note that if you use the natbib
compatibility mode (natbib=true,
, Is there a disadvantage to using natbib=true with biblatex?), the meaning of citeauthor*
is inverted: it prints all authors. In that case you can restore the original citeauthor*
which only prints the first author by adding
DeclareCiteCommand*{citeauthor}
{boolfalse{citetracker}%
boolfalse{pagetracker}%
usebibmacro{prenote}}
{ifciteindex
{indexnames{labelname}}
{}%
printnames[][1-1]{labelname}}
{multicitedelim}
{usebibmacro{postnote}}
to your preamble.
Correct answer by moewe on July 13, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP