5

I am using the IOP template from here and the iopart-num package.

Here is iopdebug.bib:

@article{debugitem,
  title = {This is the title},
  author = {Surname, N and Lastname, F},
  journal = {Journ},
  volume = {123},
  number = {1},
  pages = {1--2},
  year = {2000},
  publisher = {Debugging}
}

and this is the minimal working example:

\documentclass[12pt,A4,final]{iopart}
\usepackage{iopams}
\usepackage[breaklinks=true,colorlinks=true,linkcolor=blue,urlcolor=blue,citecolor=blue]{hyperref}

\usepackage{citesort}

\begin{document}
\nocite{*}

Attempt to cite~\cite{debugitem}

\section*{References}
\bibliographystyle{iopart-num}
\bibliography{iopdebug.bib}

\end{document}

I run pdfLaTeX then BibTeX then pdfLaTeX and everything is normal up till here (the reference list displays properly). But when I run pdfLaTeX the third time, I get:

! Missing number, treated as zero.
<to be read again> 
                   \let 
l.10 Attempt to cite~\cite{debugitem}

However, if \cite{debugitem} is omitted then there is no error message.

1 Answer 1

4

At last there are two errors in your code.

The first is that you used command \bibliography with the file extention .bib. Just delete the extention (In my MWE I used package filecontents to have bib file and tex code together in one compilable MWE. Thats the reason I changed the file neame to \jobname.bib).

The second problem is package citesort. It seems to be very old (your used class too) and causes the error you got. Just delete it or comment is (as I did in my MWE). Please see that in your code hyperref should be the last package to be called.

MWE:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{debugitem,
  title   = {This is the title},
  author  = {Surname, N and Lastname, F},
  journal = {Journ},
  volume  = {123},
  number  = {1},
  pages   = {1--2},
  year    = {2000},
  publisher = {Debugging},
}
\end{filecontents*}



\documentclass[12pt,A4,final]{iopart}

%\usepackage{citesort} % <================================ causes error!
\usepackage{iopams}

\usepackage[%
  breaklinks=true,
  colorlinks=true,
  linkcolor=blue,
  urlcolor=blue,
  citecolor=blue
]{hyperref}


\begin{document}
\nocite{*}

Attempt to cite~\cite{debugitem}.

\section*{References}
\bibliographystyle{iopart-num}
\bibliography{\jobname}% \jobname.bib <=================================

\end{document}

and the reult:

result of mwe above

0

You must log in to answer this question.