BibTeX, biblatex and bibernatbib | Truncating List of Authors in Bibliography

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
mark9630
Posts: 1
Joined: Mon Jul 02, 2012 10:50 am

natbib | Truncating List of Authors in Bibliography

Post by mark9630 »

Hi,

Is there a way to automatically reduce the list of authors in a bibliography entry to let's say three and append "et al"? I mean not just in the cite-key (which is standard behavior for natbib), but in the actual bibliography item.

An example where this might be desirable (random biology paper with many authors).

LaTeX source:

Code: Select all

\documentclass{article}
\usepackage{natbib}

\title{Some title}

\begin{document}	
    \maketitle
    \section{Section}
    Content with citation \citep{paper}.

    \bibliographystyle{abbrvnat}
    \bibliography{references}
\end{document}
references.bib:

Code: Select all

@article{paper,
	Author = {Loh, N. D. and Hampton, C. Y. and Martin, A. V. and Starodub, D. and Sierra, R. G. and Barty, A. and Aquila, A. and Schulz, J. and Lomb, L. and Steinbrener, J. and Shoeman, R. L. and Kassemeyer, S. and Bostedt, C. and Bozek, J. and Epp, S. W. and Erk, B. and Hartmann, R. and Rolles, D. and Rudenko, A. and Rudek, B. and Foucar, L. and Kimmel, N. and Weidenspointner, G. and Hauser, G. and Holl, P. and Pedersoli, E. and Liang, M. and Hunter, M. M. and Gumprecht, L. and Coppola, N. and Wunderer, C. and Graafsma, H. and Maia, F. R. N. C. and Ekeberg, T. and Hantke, M. and Fleckenstein, H. and Hirsemann, H. and Nass, K. and White, T. A. and Tobias, H. J. and Farquar, G. R. and Benner, W. H. and Hau-Riege, S. P. and Reich, C. and Hartmann, A. and Soltau, H. and Marchesini, S. and Bajt, S. and Barthelmess, M. and Bucksbaum, P. and Hodgson, K. O. and Struder, L. and Ullrich, J. and Frank, M. and Schlichting, I. and Chapman, H. N. and Bogan, M. J.},
	Date = {2012/06/28/print},
	Date-Added = {2012-07-02 08:41:15 +0000},
	Date-Modified = {2012-07-02 08:41:15 +0000},
	Day = {28},
	Isbn = {0028-0836},
	Journal = {Nature},
	L3 = {http://www.nature.com/nature/journal/v486/n7404/abs/nature11222.html#supplementary-information},
	M3 = {10.1038/nature11222},
	Month = {06},
	Number = {7404},
	Pages = {513--517},
	Publisher = {Nature Publishing Group, a division of Macmillan Publishers Limited. All Rights Reserved.},
	Title = {Fractal morphology, imaging and mass spectrometry of single aerosol particles in flight},
	Ty = {JOUR},
	Url = {http://dx.doi.org/10.1038/nature11222},
	Volume = {486},
	Year = {2012},
	Bdsk-Url-1 = {http://dx.doi.org/10.1038/nature11222}
}
Attachments
references.bib
bib example
(1.66 KiB) Downloaded 464 times
tt.tex
latex example
(261 Bytes) Downloaded 482 times
Last edited by localghost on Mon Jul 02, 2012 6:45 pm, edited 3 times in total.

Recommended reading 2024:

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

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

justfred
Posts: 3
Joined: Mon Sep 03, 2012 3:15 pm

natbib | Truncating List of Authors in Bibliography

Post by justfred »

Hi,

is there an answer to this question : I'd like to do the same but with natbib numbered references and have the author's list truncated to one name followed by et al. in the bibliography.

Code: Select all

\begin{filecontents*}{\jobname.bib}
	@Article{myref2012,
	author = "A. One and B. Two and C. Three",
	title = "{A Title for a Minimal Example}",
	journal = "{a Journal}",
	volume = 54, 
	pages =  {1-16},
	year = 2012,
    }
    
	@Article{otherref2012,
	author = "D. Four and E. Five and F. Six",
	title = "{Another Title for a Minimal Example}",
	journal = "{a Journal}",
	volume = 50, 
	pages =  {1-3},
	year = 2012,
    }
\end{filecontents*}
    
\documentclass[11pt]{article}
\usepackage[numbers, square]{natbib}

\bibliographystyle{unsrt}

\begin{document}
      \citep{otherref2012} and \citep{myref2012}
      \bibliography{\jobname}
\end{document}
So I'd like the output to look like :
[1] and [2]

References

[1] D. Four et al. Another Title for a Minimal Example. a Journal, 50:1–3, 2012.

[2] A. One et al. A Title for a Minimal Example. a Journal, 54:1–16, 2012.

Many thanks for your help
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

natbib | Truncating List of Authors in Bibliography

Post by cgnieder »

Hi mark9630 and justfred,

welcome to the LaTeX community. Unfortunately I don't know how to do that with natbib but as an alternative: biblatex natively supports this:

Code: Select all

\documentclass{article}

\title{Some title}

\usepackage[minnames=2,maxnames=3,style=authoryear,backend=bibtex]{biblatex}
\addbibresource{\jobname.bib}

% make the example self-contained:
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{paper,
  Author = {Loh, N. D. and Hampton, C. Y. and Martin, A. V. and Starodub, D. and
    Sierra, R. G. and Barty, A. and Aquila, A. and Schulz, J. and Lomb, L. and
    Steinbrener, J. and Shoeman, R. L. and Kassemeyer, S. and Bostedt, C. and Bozek,
    J. and Epp, S. W. and Erk, B. and Hartmann, R. and Rolles, D. and Rudenko, A.
    and Rudek, B. and Foucar, L. and Kimmel, N. and Weidenspointner, G. and Hauser,
    G. and Holl, P. and Pedersoli, E. and Liang, M. and Hunter, M. M. and Gumprecht,
    L. and Coppola, N. and Wunderer, C. and Graafsma, H. and Maia, F. R. N. C. and
    Ekeberg, T. and Hantke, M. and Fleckenstein, H. and Hirsemann, H. and Nass, K.
    and White, T. A. and Tobias, H. J. and Farquar, G. R. and Benner, W. H. and
    Hau-Riege, S. P. and Reich, C. and Hartmann, A. and Soltau, H. and Marchesini,
    S. and Bajt, S. and Barthelmess, M. and Bucksbaum, P. and Hodgson, K. O. and
    Struder, L. and Ullrich, J. and Frank, M. and Schlichting, I. and Chapman, H.
    N. and Bogan, M. J.},
  Date = {2012-06-28/print},
  Date-Added = {2012-07-02 08:41:15 +0000},
  Date-Modified = {2012-07-02 08:41:15 +0000},
  Day = {28},
  Isbn = {0028-0836},
  Journal = {Nature},
  L3 = {http://www.nature.com/nature/journal/v486/n7404/abs/nature11222.html#supplementary-information},
  M3 = {10.1038/nature11222},
  Month = {06},
  Number = {7404},
  Pages = {513--517},
  Publisher = {Nature Publishing Group, a division of Macmillan Publishers Limited.
    All Rights Reserved.},
  Title = {Fractal morphology, imaging and mass spectrometry of single aerosol
    particles in flight},
  Ty = {JOUR},
  Url = {http://dx.doi.org/10.1038/nature11222},
  Volume = {486},
  Year = {2012},
  Bdsk-Url-1 = {http://dx.doi.org/10.1038/nature11222}
} 
\end{filecontents}

\begin{document}   
\maketitle
\section{Section}
Content with citation \parencite{paper}.

\printbibliography
\end{document}
maxnames1.png
maxnames1.png (30.74 KiB) Viewed 31109 times

Code: Select all

\documentclass[11pt]{article}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@Article{myref2012,
  author = "A. One and B. Two and C. Three",
  title = "{A Title for a Minimal Example}",
  journal = "{a Journal}",
  volume = 54,
  pages =  {1-16},
  year = 2012,
}
   
@Article{otherref2012,
  author = "D. Four and E. Five and F. Six",
  title = "{Another Title for a Minimal Example}",
  journal = "{a Journal}",
  volume = 50,
  pages =  {1-3},
  year = 2012,
}
\end{filecontents*}

\usepackage[style=numeric,sorting=none,maxnames=2]{biblatex}
\addbibresource{\jobname}

\begin{document}
\cite{otherref2012} and \cite{myref2012}

\printbibliography
\end{document}
maxnames2.png
maxnames2.png (24.32 KiB) Viewed 31109 times
Regards
site moderator & package author
justfred
Posts: 3
Joined: Mon Sep 03, 2012 3:15 pm

Re: natbib | Truncating List of Authors in Bibliography

Post by justfred »

Hi,

thanks for the suggestion to use biblatex. Unfortunately the biblatex packaged with Ubuntu 10.04LTS is not very recent and did not recognize e.g. \addbibresource. So, I had to download and manually install the most recent version.

Now I get a "missing logreq.sty" error and I downloaded it from CTAN but I'm not sure where to put the logreg.def and logreq.sty files in my system (the README file does not explain).

Help appreciated ...
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

natbib | Truncating List of Authors in Bibliography

Post by cgnieder »

If I know it right the TeX Live shipped with Ubuntu currently is TeX Live 2009. The newest version is 2012. So the safest way to get all the new versions you need would be to install a native TeX Live 2012. You can get it from the tug.org website. This would also have the advantage that you could use the TeX Live package manager tlmgr to easily install updates and missing packages.

(Caveat: don't do this if you are in the middle of a large project unless you have the time to fix possible crashes due to updated versions of packages!)

If you don't want to install a current TeX Live then the easiest way to have new packages available is to store them in the same folder as the document you're working on. This is not a very clean and practical way however, since you'd have to copy these files every time you start on a new document.

On How can I manually install a LaTeX package (Debian/Ubuntu Linux)? you can read, well, how to do a manual installation properly.

Regards
site moderator & package author
justfred
Posts: 3
Joined: Mon Sep 03, 2012 3:15 pm

Re: natbib | Truncating List of Authors in Bibliography

Post by justfred »

OK. Thanks.

Indeed after struggling a bit further (installing a new etoolbox as biblatex complained it was outdated but getting stuck with an error in biblatex2.sty (extra \fi on line 4750)) I had figured out that I'd better upgrade the TeXlive to the latest version.

That will be something for the WE ...

I'll post again in case of further difficulties.
Post Reply