Document Classeselsarticle, natbib | No output citations

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
diaa_abidou
Posts: 5
Joined: Sun Apr 15, 2012 1:23 pm

elsarticle, natbib | No output citations

Post by diaa_abidou »

I am trying to complete an article in Elsevier format, however, it is my first time in applying Elsevier format with natbib bibliography format. Accordingly, in the following minimal example, the reference is printed correctly, but without its citation in the main text. I am using Winedt 7 with Miktex 2.9.

Code: Select all

\documentclass[review,5p,a4paper,10pt]{elsarticle}
\usepackage{caption,subcaption}
\usepackage{graphicx}
\usepackage[pctex32]{LSCAPE}
\usepackage{epstopdf}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{units}
\usepackage{float}
\usepackage{natbib}
\bibliographystyle{elsarticle-num-names}
\biboptions{square,numbers,sort&compress}

\begin{document}

\begin{frontmatter}
\title{any title}
\begin{abstract}
some abstract
\end{abstract}
\begin{keyword}
something
\end{keyword}
\end{frontmatter}

\section{Intro}

Any citation \cite{test}

\begin{thebibliography}{99}
\bibitem{test}
some info
\end{thebibliography}
\end{document}
It would be appreciated if any help is provided.
Thanks in advance
Last edited by Stefan Kottwitz on Sun Apr 15, 2012 4:11 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10344
Joined: Mon Mar 10, 2008 9:44 pm

elsarticle, natbib | No output citations

Post by Stefan Kottwitz »

I can see the citation in the main text. Note, you have to typeset twice, at the first time just a question mark for an unknown reference would be printed.
citation.png
citation.png (3.47 KiB) Viewed 9586 times
Stefan
LaTeX.org admin
diaa_abidou
Posts: 5
Joined: Sun Apr 15, 2012 1:23 pm

Re: elsarticle, natbib | No output citations

Post by diaa_abidou »

I tried your suggestion and it worked only for my minimal example.

While for my main manuscript, every second compilation time generates an error preventing the compilation process from completion, so I delete the .aux file and then the first compilation time goes smoothly, while having the same problem for the second time without deleting the aux file.

Three successive compilations (including the failed one) work but without generating the manuscript including the citations numbers.

Thanks
Attachments
BBW_System_DA11Apr12.log
Failed compilation log file
(12.32 KiB) Downloaded 401 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10344
Joined: Mon Mar 10, 2008 9:44 pm

elsarticle, natbib | No output citations

Post by Stefan Kottwitz »

diaa_abidou wrote:I tried your suggestion and it worked only for my minimal example.
That's often the problem with an example which is synthesized from scratch - it doesn't contain the issue, so it may be useless.

The better approach is to hack down a copy of the original document. Reducing the copy step by step, you will either get a real and relevant minimal example, or you have narrowed it down to one single step, which contains the issue.

Stefan
LaTeX.org admin
diaa_abidou
Posts: 5
Joined: Sun Apr 15, 2012 1:23 pm

Re: elsarticle, natbib | No output citations

Post by diaa_abidou »

I am sorry for that, you are right. I have found my problem in the author email address field, since I didn't notice the underscore in the address which generates a confused error to me.

Your help is highly appreciated and I am sorry again for my confusion.
Post Reply