Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have added the bib file refs.bib to the directory but I get errors indicating that the references are undefined.

foo.tex:

\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{natbib}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{fullpage}
\setcounter{secnumdepth}{2}
\date{}
\title{The Database Users Guide}
\author{Me}
\begin{document}
\maketitle 
%...document body
\ref{author2000}

\bibliographystyle{plainnat}
\bibliography{refs}

%... some figures and tables
\end{document}

refs.bib:

@article{author2000,
author = {someone},
journal = {Journal},
number = {1},
pages = {1--2},
title = {{Title}},
volume = {4},
year = {2000}
}
share|improve this question
    
latexlab? wow I did not know this! however modify tags, your question is related to latex in general. –  meduz Jan 25 '11 at 13:52

1 Answer 1

up vote 5 down vote accepted

in your document you make a reference to a label:

\ref{author2000}

This label does not exist, hence the reported error.

While what you want is a reference to a bibliographic item:

\cite{author2000}

so, do:

  1. [optional] clean up your compilation files (foo.aux in particular)
  2. run latex (detects a citation)
  3. run bibtex (formats the citation)
  4. run latex (makes the link)
  5. run latex (you are done)

this sequence is for understanding how it works. When concentrating on writing a paper for instance, there's a lot of tools to automate this (try F1 in texmaker or command-T in texshop for instance)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.