BibTeX, biblatex and biberFormat for Citations

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
clarkkogan
Posts: 2
Joined: Mon Jul 29, 2013 8:57 pm

Format for Citations

Post by clarkkogan »

Hello,

I am having some simple problems getting natbib to work. I input the following into a .tex file.

Code: Select all

\documentclass[11pt]{article}
\usepackage{natbib}

\begin{document}
  I used \cite{greenwade93} to write this article.

  \bibliographystyle{plain}
  \bibliography{2013-07-24-bibtex}
\end{document}
I then created the .bib file with the following.

Code: Select all

@article{greenwade93,
  author  = "George D. Greenwade",
  title   = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
  year    = "1993",
  journal = "TUGBoat",
  volume  = "14",
  number  = "3",
  pages   = "342--351"
}
This creates the document with the bibliography. The citation is made as a number in small brackets as "[1]". I want he citation not to be a number, but instead to reference the author. I try \citet, however, the output citation is has the word author followed by a question mark and then the numeric citation: "(author?) [1]".

Any suggestions on what I'm missing??

Thanks!!

Clark Kogan
Last edited by localghost on Mon Jul 29, 2013 10:22 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Format for Citations

Post by localghost »

Good example!

For \citet you simply need to replace the bibliography style plain at least with plainnat or another author-year style supported by natbib.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{natbib}

%% The following 12 lines are only for this
%% example here to make it self-contained
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{greenwade93,
  author = {George D. Greenwade},
  title = {The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})},
  year = {1993},
  journal = {TUGBoat},
  volume = {14},
  number = {3},
  pages = {342--351}
}
\end{filecontents*}

\begin{document}
  I used \citet{greenwade93} to write this article.

  \bibliographystyle{plainnat}
  \bibliography{\jobname}
\end{document}
Click on "Open in writeLaTeX" in the above code box to view the resulting output instantly.
For other citations formats please have a look at the natbib manual.


Remarks:
  • It has become very common to enclose the content of the fields in a bibliography database entry better by curly braces than by quotes.

Best regards and welcome to the board
Thorsten
clarkkogan
Posts: 2
Joined: Mon Jul 29, 2013 8:57 pm

Re: Format for Citations

Post by clarkkogan »

Perfect! Exactly what I needed!!

Clark
Post Reply