1

Citation doesn't work using texniccenter and I received warning of: package natbib warning there were undefined citations and (???) instead of reference

i am using TexnicCenter V 2.02 and Miktex 2.9. enter image description here

However, the code works just fine using Texworks and references are shown properly.

For the following code:

\documentclass[final,3p,times,authoryear]{elsarticle}
\usepackage{hyperref}
\usepackage{float}
\usepackage{cleveref}
\usepackage{amssymb}
\usepackage{lineno}
\linenumbers
\journal{}
\begin{document}
\begin{frontmatter}
\title{}
\author{}
\address{}
\begin{abstract}
\end{abstract}
\end{frontmatter}
\section{Introduction}
Test Test \cite{test}.
\section*{References}
  \bibliographystyle{elsarticle-harv} 
  \bibliography{TankerModel}
\end{document}
\endinput
  • the editor you use to write the file makes no difference to the errors from tex. Have you run latex multiple times to resolve the cross references? warnings about undefined references are expected on the first run. you then need to run bibtex and then run latex at least two more times – David Carlisle Jun 28 '18 at 23:02
  • @DavidCarlisle I built the tex file and bibtex file many times but nothing happen. I always receive these warning – Ameen Mohamed Bassam Jun 28 '18 at 23:06
  • 1
    If you run bibtex by hand, does it work? Best guess without logs is that bibtex is not being run. – cfr Jun 29 '18 at 0:26
  • @cfr How to run it by hand please? – Ameen Mohamed Bassam Jun 30 '18 at 11:50
  • From a menu would probably do. Or on the command line bibtex <name of file without extension>. – cfr Jun 30 '18 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.