I have been doing citations using natbib without bibtex and manually entering citations. I keep getting an issue when compiling stating "Citation 'all citations' on page # undefined on input line #"
\documentclass{article}
\usepackage{graphicx}
\usepackage[round]{natbib}
\usepackage{mathtools}
\usepackage{float}
\begin{document}
\bibliographystyle{plainnat}
\title{my title}
\author{my name}
\date{some date}
\maketitle
\section*{section title}
some text some more text and more \citep{hooper05} and then more \citep{hobbs92}.
And last but not least more and more text \citep{da05}.
\begin{thebibliography}{99}
\bibitem[Daehler,(2005)]{da05} CSE citation here
\bibitem[Hobbs \& Huennke(1992)]{hobbs92} CSE citation here
\bibitem[Hooper et al.(2005)]{hooper05} CSE citation here
\end{thebibliography}
\end{document}
This is an example of the full document used. When I try and place my citations in alphabetical order the output is more and includes "Citation '(all citations)' on page # undefined on input line #". At the moment I only have three citations and am intending on including more and have them in alphabetical order. When i rearrange in the order i placed the citations in the text it compiles just fine.
Best Answer
What you're trying to do is typeset the bibliography manually. This is manageable, but then you have to do all the sorting yourself. Here is the output when compiling a minimal example:
If you now switch around some of the bibliography items, LaTeX will just again typeset it as is:
You mention that you'll be adding references to the bibliography, making it grow. Then I suggest you use the power of BibTeX to actually sort it for you. For that, you can use the following template as a base (I used the following, perhaps fake, references: Hobbs & Huennke, Daehler and Hooper, et al):
So, instead of manually creating a
thebibliography
environment with\bibitem
s, you create a.bib
file and input the contents using a specific BibTeX syntax, and include this bibliography using\bibliography{<bib source>}
.Compile the above use pdfLaTeX, followed by a compiling using BibTeX, then twice again using pdfLaTeX and the output would be:
Note how, even though we cited in the order Hooper, Hobbs, Daehler and
source.bib
has the order Hobbs, Daehler, Hooper, the output has the alphabetical order Dahler, Hobbs, Hooper. That's because BibTeX read the citation information as well as a.bst
(referenced using\bibliographystyle{plainnat}
-plainnat.bst
) and sorted the contents accordingly (outside of LaTeX). BibTeX also created a.bbl
file, which is then included with your call to\bibliography{<bib source>}
.