0

I have some error in my bibliography, this is the error that shows when I compile the ".bib" archive:

 -line 8 of file articulo.aux
 : \citation{*
 :            }
I'm skipping whatever remains of this command
The style file: abbrv.bst
Database file #1: biblio.bib

In my document is very important the numbering in bibliography. For this I used the bibliogrphy style abbrv. How is shown in the principal code:

\documentclass[5p,times,authoryear]{elsarticle}
\usepackage[spanish]{babel}    
\addto\captionsspanish{
\def\tablename{Tabla}
}
\usepackage[utf8]{inputenc}   
\usepackage{amsmath}          
\usepackage{epstopdf}          
\usepackage{flushend}           
\usepackage{amssymb}
\usepackage[figuresright]{rotating}
\usepackage{subfigure}
\usepackage{xcolor}% paquete añadido para color en mathmode
\usepackage[makeroom]{cancel}%paquete añadido para cancelar terminos con slash(/)
\usepackage{enumitem} %Para cambier formato de items en itemize
% declarations for front matter
\usepackage{caption} % Para generar Caption con el nombre de "fig"
\usepackage{comment}


\begin{document}
\nocite{*}
\begin{frontmatter}
\end{frontmatter}
\cite{david} 
\nocite{*}
\cite{coalmining}
\addcontentsline{toc}{chapter}{Bibliografia}
\bibliographystyle{abbrv}
\bibliography{biblio}

\end{document}

The code of the .bib file is the next one

@book{david,
Author = {Angulo García, David and Olivar Tost, Gerard},
Publisher = {Manizales, 2012.},
Title = {Esquemas de Desarrollo Sostenible : una Aplicación de Redes Complejas a la Región de Caldas = Sustainable development schemes: [recurso electrónico].},
URL = {http://ezproxy.unal.edu.co/login?url=http://search.ebscohost.com/login.aspx?direct=true&db=cat02704a&AN=unc.000723149&lang=es&site=eds-live},
Year = {2012},
}

@article{coalmining,
 author = {Min and Zhou and Bang-jun and Wang and Feng, Ji},
 issn = {1878-5220},
 journal = {Procedia Earth and Planetary Science},
 number = {special issue title: Proceedings of the International Conference on Mining 
 science and Technology (ICMST2009)},
 pages = {1737 - 1743},
 title = {The 6th International Conference on Mining Science and Technology: Coalmining 
 cities' economic growth mechanism and sustainable development analysis based on logistic 
 dynamics model.},
 Volume = {1},
 Year = {2009},
}

@book{pezzey37,
  title={Economic analysis of sustainable growth and sustainable development.},
  author={Pezzey, John and Rusong, W and Hinman, GW and Ruitenbeek, HJ and Kairiukstis, L 
and Buracas, A and Straszak, A and Altieri, MA and Archibugi, F and Nijkamp, D and 
others},
 year={1990},
 publisher={Banco Mundial, Washington, DC (EUA).},
}
@misc{ourfuture51,
  title={Our common future. By World commission on environment and development.(London, 
Oxford University Press, 1987, pp. 383},
  author={Butlin, John},
  year={1989},
  publisher={Wiley Online Library},
}

How could I fix this?

JuanMuñoz
  • 1,454
  • 1
    Holà. Do you have any citation commands in your actual code? We would need to see an MWE that produces the error you are describing on your machine. Make a test directory, test document, paste above code, edit until it produces the error, copy there, paste here. Actually, I just realized you should know how that works; after all, you have 358 reputation ;) – thymaro Nov 11 '17 at 05:15
  • 6
    The error says: "I found no \citation commands". And indeed, your example has no citations in it. Do you still get the error if you if you add \nocite{*} (or \cite{david}) in your main document? – David Purton Nov 11 '17 at 05:21
  • 3
  • Off-topic: The subfigure package is deprecated. Since you're also loading the caption package, you should be loading subcaption instead of subfigure. – Mico Nov 11 '17 at 11:27
  • @thymaro I added a citation command in the actual code, and the error change a little but is still present. – JuanMuñoz Nov 15 '17 at 23:41
  • @David Purton I added \nocite{*} command and the error that is shown is now in the post. – JuanMuñoz Nov 15 '17 at 23:45
  • Does that exact code produce the error you report when you copy-paste compile it to a clean file in a clean directory? – cfr Nov 16 '17 at 01:28
  • You didn't give enough error context. The previous line says that you used \nocite{*} multiple times. Remove one and that error goes away. But you will still get a natbib error. – David Purton Nov 16 '17 at 01:31
  • Two problems. First, the authoryear option of elsarticle is not compatible with the abbrv bibliography style. If you want author year citations, try bibliographystyle{elsarticle-harv}. Secondly, you need to put your URL inside \url{} and add usepackage{url} otherwise LaTeX will complain about the & characters (among other things) in your URL. – David Purton Nov 16 '17 at 01:40
  • @David Purton if I change the "abbrv" to "elsarticle-harv" style, the numbering of bibliography in my document won't be shown, and I need the numbering. – JuanMuñoz Nov 28 '17 at 19:18

1 Answers1

1

Here's a solution for you.

Changes made:

  • tidy up bibliography data a bit
  • load url package
  • use bibliographystyle{elsarticle-harv}
  • remove duplicate \nocite{*}

MWE:

\documentclass[5p,times,authoryear]{elsarticle}
\usepackage{url}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{david,
  author = {Angulo García, David and Olivar Tost, Gerard},
  publisher = {Manizales},
  title = {Esquemas de Desarrollo Sostenible: una Aplicación de Redes Complejas a la Región de Caldas = Sustainable development schemes: [recurso electrónico]},
  url = {http://ezproxy.unal.edu.co/login?url=http://search.ebscohost.com/login.aspx?direct=true&db=cat02704a&AN=unc.000723149&lang=es&site=eds-live},
  year = {2012},
}
@article{coalmining,
 author = {Min and Zhou and Bang-jun and Wang and Feng, Ji},
 issn = {1878-5220},
 journal = {Procedia Earth and Planetary Science},
 number = {special issue title: Proceedings of the International Conference on Mining science and Technology [ICMST2009]},
 pages = {1737-1743},
 title = {The 6th International Conference on Mining Science and Technology: Coalmining cities' economic growth mechanism and sustainable development analysis based on logistic dynamics model},
 Volume = {1},
 Year = {2009},
}
@book{pezzey37,
  title={Economic analysis of sustainable growth and sustainable development},
  author={Pezzey, John and Rusong, W and Hinman, GW and Ruitenbeek, HJ and Kairiukstis, L and Buracas, A and Straszak, A and Altieri, MA and Archibugi, F and Nijkamp, D and others},
  year={1990},
  publisher={Banco Mundial},
  address={Washington, DC},
}
@misc{ourfuture51,
  title={Our common future. By World commission on environment and development},
  author={Butlin, John},
  year={1989},
  publisher={Wiley Online Library},
}
\end{filecontents}
\pagestyle{empty}
\begin{document}
\nocite{*}
\cite{david} 
\cite{coalmining}
\bibliographystyle{elsarticle-harv}
\bibliography{\jobname.bib}
\end{document}

enter image description here

David Purton
  • 25,884
  • with this sugestions the numbering dissapear. In my document is very important the numbering in bibliography. For this I used the bibliogrphy style abbrv. If you change this style you change the numbering. How to fix the number problem?. I need to use a .bib archive for simplify my document. Not to put the bibliography in the main document. – JuanMuñoz Nov 28 '17 at 19:04
  • Now I'm confused as to what style you want for citations and references. Do you want numbered citations [1] and numbered references? Or do you want author, year citations with numbered references? – David Purton Nov 28 '17 at 22:55
  • @JuanMuñoz If you just want numbered style everywhere, then simply remove the authoryear option from the elsarticle class. (This is what your original error told you to do.) Then you can happily use the abbrv bibliography style (or elsarticle-num or elsarticle-num-names). – David Purton Nov 28 '17 at 23:57
  • How I can remove the authoryear option from the elsarticle class – JuanMuñoz Jan 25 '18 at 21:35
  • @JuanMuñoz, use \documentclass[5p,times]{elsarticle} instead of \documentclass[5p,times,authoryear]{elsarticle}. – David Purton Jan 25 '18 at 23:28