3

How do you correct an undefined citation? I've clicked the BibTex option several times to let Latex automatically recognize the new references, but this isn't working.

\documentclass[12pt,a4paper]{report} 
\usepackage{natbib} 
\begin{document} 
\section{Introduction} 
\label{sec:intro} 
\subsection{A} 
Text with \cite{hatcher2008} 
\bibliographystyle{plain} 
\bibliography{bibfile} 
\end{document} 

Addendum: Here's an excerpt from the .bib file:

@article{hatcher2008curcumin} 
  title={Curcumin: from ancient medicine to current clinical trials}, 
  author={Hatcher, H. and Planalp, R. and Cho, J. and Torti, FM and Torti, SV}, 
  journal={Cellular and Molecular Life Sciences}, 
  volume={65}, 
  number={11}, 
  pages={1631--1652}, 
  year={2008}, 
  publisher={Springer} 
Mico
  • 506,678
Keith
  • 115
  • 3
    Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. – Benedikt Bauer Oct 22 '12 at 06:30
  • \documentclass[12pt,a4paper]{report} \usepackage{graphicx}{options}{natbib} \pagestyle{headings}

    \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}

    \begin{document}

    \input{./title.tex}

    \section{Introduction} \label{sec:intro} \subsection \subsubsection Text with \cite{hatcher2008} \subsubsection \subsubsection \subsubsection \subsection \subsubsection \subsubsection \subsubsection

    \bibliographystyle{plain}

    \bibliography{bibfile}

    \end{document}

    – Keith Oct 22 '12 at 06:34
  • 1
    You can edit your own questions to add something or correct it. So you don't have to squeeze your working code into a comment without formatting. – Benedikt Bauer Oct 22 '12 at 06:37
  • Not sure how to edit so that formatting is kept in tact – Keith Oct 22 '12 at 06:40
  • 2
    @Keith - I've taken the liberty of stripping down your MWE to something that really focuses on the situation at hand. Please try to compile it (LaTeX, BibTeX, LaTeX, LaTeX) and see if the problem persists. If the problem persists, check if there's an entry named hatcher2008 in your bib file. Also, note that \section and \subsection commands take a mandatory argument; your full MWE has little chance of compiling properly. – Mico Oct 22 '12 at 06:44
  • Right above the text input window there should be some formatting controls. The button with the opening and closing brackets it used to mark code which will then be formatted as code block. Even if this is not working, it's easier to reformat the code when it is put in your question that to squeeze it out of the one-liner comment. – Benedikt Bauer Oct 22 '12 at 06:44
  • @mico - yes, the commands do have arguments. I've just deleted for purposes of clarity. There is hatcher2008 reference in the bibfile. I have compiled three times with the same result. – Keith Oct 22 '12 at 06:51
  • To the down-voters: Please note that on this site, we usually do not downvote badly written questions if the questionner is a new-comer to this site. And we consider it rude to downvote a question and not to mention the exact reasons in the comments. I've upvoted the question to keep it at 0 score. – yo' Oct 22 '12 at 06:53
  • After compiling, I get warnings, indicating citations undefined and, after BibTex, I get "I found no database files while reading thesis.aux." – Keith Oct 22 '12 at 07:05
  • If you strip down LaTeX code too far (e.g., by eliminating the required arguments of \subsection and \subsubsection commands), you render your code uncompilable. That's why it's better to omit such commands entirely for the purpose of providing an MWE. Please edit your question to list the exact error and/or warning messages you get. Without this information, there's little hope figuring out what exactly is going on. The BibTeX error message you report, "... found no database files while reading thesis.aux", strongly suggests that entry "hatcher2008" is not in bibfile.bib. – Mico Oct 22 '12 at 07:14
  • \documentclass[12pt,a4paper]{report} \usepackage{graphicx} \pagestyle{headings}

    \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}

    \begin{document}

    \input{./title.tex}

    \section{Introduction} \label{sec:intro} \subsection \subsubsection Text with \cite{hatcher2008}

    \subsection

    \bibliographystyle{plain}

    \bibliography{bibfile}

    \end{document}

    – Keith Oct 22 '12 at 07:26
  • Preamble

    % BibTeX Entries @article{hatcher2008curcumin} title={Curcumin: from ancient medicine to current clinical trials}, author={Hatcher, H. and Planalp, R. and Cho, J. and Torti, FM and Torti, SV}, journal={Cellular and Molecular Life Sciences}, volume={65}, number={11}, pages={1631--1652}, year={2008}, publisher={Springer}

    – Keith Oct 22 '12 at 07:26
  • 3 errors in BibTek and 12 warnings in pdflatex (citations undefined) – Keith Oct 22 '12 at 07:29
  • I've copied the contents of your comment, in which you provide an excerpt from your bib file, to the body of the question and have also formatted the entry a bit. There are (at least!) three problems with the entry: (i) a comma is missing after the key (hatcher2008curcumin); (ii) a closing right curly brace is missing at the end of the entry (after the publisher field); and (iii) the entry's key (hatcher2008curcumin) is not equal to argument of the \cite command (hatcher2008). Please fix these issues and then recompile. – Mico Oct 22 '12 at 07:49
  • % BibTeX Entries @article{hatcher2008curcumin}, title={Curcumin: from ancient medicine to current clinical trials}, author={Hatcher, H. and Planalp, R. and Cho, J. and Torti, FM and Torti, SV}, journal={Cellular and Molecular Life Sciences}, volume={65}, number={11}, pages={1631--1652}, year={2008}, publisher={Springer} } – Keith Oct 22 '12 at 08:15
  • The entry's key is now equal to the \cite command. I've recompiled by pdflatex for the thesis.tex, bibtex for the bibfile, and then twice pdflatex for the tex. file. ? still represent the int-text citations, and the Bibliography page just says "bibliography." – Keith Oct 22 '12 at 08:19
  • 1
    There should be no closing brace after the key, only a comma: @article{hatcher2008curcumin, title=.... Also bibtex generates a log-file (with the ending .blg), check it for error messages. – Ulrike Fischer Oct 22 '12 at 09:23

0 Answers0