BibTeX, biblatex and bibernatbib | Reference Labels change

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
Kuo000
Posts: 4
Joined: Sat Nov 12, 2011 7:54 am

natbib | Reference Labels change

Post by Kuo000 »

Hi all,

I want the bibliographies to have labels with author names and years instead of just numbers. E.g.,
[Getoor and Taskar, 2007] Getoor, L. and Taskar, B. (2007). Introduction to Statistical Relational Learning
I could achieve this using apalike style without using natbib. But once I use it, the reference labels are gone (still with the apalike style). I tried generating my own style with makebst from custom-bib, mostly following the default options, but it still did not get what I wanted. I suppose this has something to do with natbib, not any particular style files. Is there a simple way to get the reference labels I want with natbib?

Thanks a lot.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

natbib | Reference Labels change

Post by josephwright »

This is exactly what you'd usually get with natbib if you use an author-year style. Please create a small demo ('minimal working example') of what you are currently doing.
Joseph Wright
Kuo000
Posts: 4
Joined: Sat Nov 12, 2011 7:54 am

natbib | Reference Labels change

Post by Kuo000 »

josephwright wrote:This is exactly what you'd usually get with natbib if you use an author-year style. Please create a small demo ('minimal working example') of what you are currently doing.
Below is my LaTeX source:

Code: Select all

\documentclass{article}
\usepackage[square]{natbib}

\title{Hello World \LaTeX{} File for Testing the \TeX{} System}

\author{Anonymous author}
\date{}

\begin{document}
\maketitle

Hello world \citep{sep-aristotle-mathematics}.

\bibliographystyle{apalike}
\bibliography{aristotle}

\end{document}
The resulting PDF has in the References section:

Mendell, H. (2008). Aristotle and mathematics. In Zalta, E. N., editor, The
Stanford Encyclopedia of Philosophy. Winter 2008 edition.


without the reference label [Mendell, 2008].

Can you see the difference from the example in my initial post? I want the author-year to also appear in the reference label before the actual reference.

Thanks again.
Post Reply