BibTeX, biblatex and biberShorten List of Authors to maximal two Names

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
timknuj
Posts: 4
Joined: Sun Apr 15, 2012 10:15 pm

Shorten List of Authors to maximal two Names

Post by timknuj »

Hello,

I'm writing a document with a bibliography in which some items have several 10s of authors. I like using the \citeauthor command but it prints the names of all the authors which is a bit much.

Is there a way to set it to print 1 or 2 names as normal and if there are more than 2 authors then have it print "J. Bloggs et al."?


Thanks,
Tim

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Shorten List of Authors to maximal two Names

Post by cgnieder »

Are you using biblatex? Then you could use the options maxnames/minnames, maxcitenames/mincitenames, maxbibnames/minbibnames, maxalphanames/minalphanames, maxitems/minitems:

Code: Select all

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,style=authoryear,minnames=2,maxcitenames=2]{biblatex}
\addbibresource{biblatex-examples.bib}

\begin{document}

Text (\citeauthor{companion}) Text (\citeauthor{knuth:ct:a})
\printbibliography

\end{document}
Regards
site moderator & package author
timknuj
Posts: 4
Joined: Sun Apr 15, 2012 10:15 pm

Shorten List of Authors to maximal two Names

Post by timknuj »

Hi,

unfortunately I'm not using biblatex (which I've never used before).

I just use

Code: Select all

\bibliography{projectBib}
\bibliographystyle{custom}
I tried to quickly change to biblatex using your code but got errors about missing .sty files. Is it easy to switch or can I implement the two name technique using bibtex on its own?

thanks,

Tim
Last edited by Stefan Kottwitz on Sat May 05, 2012 12:22 pm, edited 1 time in total.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Shorten List of Authors to maximal two Names

Post by cgnieder »

I am not aware of a way doing this without biblatex (which doesn't mean there is none, though).

A missing sty sounds like you're system isn't up to date or not a full installation. I can't say more...

In case you want to switch to biblatex (and maybe biber, too) there are a few resources that might be helpful:
Regards
site moderator & package author
Post Reply