# Bibliography file failing

I have a paper I am working on for a journal, and the bibliography file ends up with an error after I compile it. I'm using TexShop Version 2.47, and choosin the XeLeTex option for the compilation. When I compile the bib file using bibtex, the resulting bib file looks like so

\begin{thebibliography}{10}

\bibitem{NewOperatorsDGA1999}
Bruno Bosacchi, David~B. Fogel, and James~C. Bezdek, editors.
\newblock {\em {Investigation of new operators for a diploid genetic
algorithm}}, 1999.

... more bibitems

\end{thebibliography}


and I get the error:

./IJICC_submission.bbl:3: LaTeX Error: Something's wrong--perhaps a missing \item
See The Latex manual or LaTeX Companion for Explanation.
Type H <return> for immediate help.
...

l.3 {NewOperatorsDGA1999}


If I remove the first \bibitem the error just moves to the next \bibitem

However, if I remove the {10}, so the file now looks like:

\begin{thebibliography}

\bibitem{NewOperatorsDGA1999}
Bruno Bosacchi, David~B. Fogel, and James~C. Bezdek, editors.
\newblock {\em {Investigation of new operators for a diploid genetic
algorithm}}, 1999.

... more bibitems

\end{thebibliography}


the file compiles wonderfully, but I get no numbering on the bibliography... and one of the reviewers said we need numbering on the bibliography

The bibliography section from the cls file looks like so:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Bibliography %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\let\@internalcite\cite
\def\cite{\def\@citeseppen{-1000}%
\def\@cite##1##2{[{##1\if@tempswa , ##2\fi}]}%
\def\citeauthoryear##1##2{##1 (##2)}\@internalcite}
\def\shortcite{\def\@citeseppen{1000}%
\def\@cite##1##2{[{##1\if@tempswa , ##2\fi}]}%
\def\citeauthoryear##1##2{##2}\@internalcite}
%
\def\citeauthor#1{\def\@citeseppen{1000}%
\def\@cite##1##2{{##1\if@tempswa , ##2\fi}}%
\def\citeauthoryear##1##2{##1}\@citedata{#1}}
%
\def\citeyear#1{\def\@citeseppen{1000}%
\def\@cite##1##2{{##1\if@tempswa , ##2\fi}}%
\def\citeauthoryear##1##2{##2}\@citedata{#1}}
%
\def\@citedata#1{\@tempswafalse%
\if@filesw\immediate\write\@auxout{\string\citation{#1}}\fi
\def\@citea{}\@cite{\@for\@citeb:=#1\do
{\@citea\def\@citea{,\penalty\@citeseppen\ }\@ifundefined
{b@\@citeb}{{\bf ?}\@warning
{Citation \@citeb' on page \thepage \space undefined}}%
{\csname b@\@citeb\endcsname}}}{}}
%
\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string
\citation{#2}}\fi
\let\@citea\@empty
\@cite{\@for\@citeb:=#2\do
{\@citea\def\@citea{;\penalty\@citeseppen\ }%
\def\@tempa##1##2\@nil{\edef\@citeb{\if##1\space##2\else##1##2\fi}}%
\expandafter\@tempa\@citeb\@nil
\@ifundefined{b@\@citeb}{{\bf ?}\@warning
{Citation \@citeb' on page \thepage \space undefined}}%
{\csname b@\@citeb\endcsname}}}{#1}}
%\def\@biblabel#1{\def\citeauthoryear##1##2{##1, ##2}}
\def\@biblabel#1{}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%
\def\@refcitex[#1]#2{\if@filesw\immediate\write\@auxout
{\string\citation{#2}}\fi
\def\@citea{}\@refcite{\@for\@citeb:=#2\do
{\@citea\def\@citea{, }\@ifundefined
{b@\@citeb}{{\bf ?}\@warning
{Citation \@citeb' on page \thepage \space undefined}}
\hbox{\csname b@\@citeb\endcsname}}}{#1}}
\def\@refcite#1#2{{#1\if@tempswa\typeout
{Emerald warning: optional citation argument
ignored: #2'} \fi}}
\def\refcite{\@ifnextchar[{\@tempswatrue
\@refcitex}{\@tempswafalse\@refcitex[]}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newdimen\bibindent
\bibindent=1.5em
\newenvironment{thebibliography}%[1]
{\section*{\bibname}\bibfont%
\list{}%
{\leftmargin\parindent
\itemindent-\parindent
\itemsep0pt\parsep0pt
\usecounter{enumiv}%
\renewcommand\theenumiv{\arabic{enumiv}}}%
\sloppy\clubpenalty4000\widowpenalty4000%
\sfcode\.=\@m}
{\def\@noitemerr
{\@latex@warning{Empty thebibliography' environment}}%
\endlist}
\newcommand\newblock{}
%


And the document looks like this:

\documentclass{ijicc}

\usepackage{graphics}
\usepackage{epsfig}
\usepackage{times}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{lscape}
\usepackage{rotating}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{hyperref}
\usepackage{amsfonts}
\usepackage{color}
\usepackage{lipsum}
\usepackage{wrapfig}
%\usepackage{subfig}

\newcommand{\figref}[1]{Figure \ref{#1}}
\newcommand{\secref}[1]{Section \ref{#1}}
\newcommand{\tabref}[1]{Table \ref{#1}}

\begin{document}
... the document


Anything I can do to troubleshoot this

EDIT: Added the bibliography description from ijicc.cls, not sure what other info is required

• Show a complete example. The definition of the environment and of \bibitem depends on your class and the packages you use. – Ulrike Fischer Aug 12 '15 at 22:03
• epsfig and times are obsolete. graphics is entirely unnecessary if graphicx is loaded. Why are you loading lipsum? Consider xcolor rather than color. Does the journal really permit lscape's landscape environment and wrapfig? Similarly, I'd expect the journal's class to configure captions and hyperlinks according to the house style. – cfr Aug 12 '15 at 22:39

The following lines shows that thebibliography environment for this class accepts no arguments:

\newenvironment{thebibliography}%[1]
{\section*{\bibname}\bibfont%


The standard classes would have something like

\newenvironment{thebibliography}[1]


The commenting of the [1] means that the environment created cannot take any arguments. So you get an error because you are trying to pass an argument to the environment which doesn't take one. So it tries to read the contents of that argument as part of the content of the environment. But the bibliography is a list and should begin with a \bibitem. Since 10 does not, you get an error.

Perhaps the class is not intended for use with BibTeX?

• I uncommented the %[1] and indeed it took care of the error, but the bibliography is still not numbered (although references contain numbers which are links to the bibliography). What do I add to add numbers? Also, you are right that the class required me to put the \bibitem's one by one into the .tex file, but I don't think I should have to do that... – desperateForBibliography Aug 12 '15 at 22:45
• @desperateForBibliography If this is for a journal submission, you must not change the class file! The journal will want code which compiles with that class - they will not change the style of the journal for your particular paper. As for the \bibitems, the journal should provide instructions telling you how these should be formatted, and you should follow those instructions. – cfr Aug 12 '15 at 22:49
• ya, the removal of %[1] is a bit of a hack, but their version forces me to copy-paste each \bibitem into the .tex file, and then change it since it needs to have a \protected[] field and a few other nuances, is there any way to automate this? we have computers for a reason – desperateForBibliography Aug 12 '15 at 23:14
• @desperateForBibliography That is a different question and I suggest posting a new question to ask it. You would need to provide a link to the class and instructions or templates for authors, and to provide a complete MWE with sample bibliography. However, I would not hold your breath: automating a process for creating a bibliography for a journal which creates it non-standardly is likely to be more trouble than it is worth, I suspect. Because you have to end up, in the end, with a document which will compile-as-is with the journal's class. – cfr Aug 12 '15 at 23:24
• well , you make a lot of valid points. I am going to redo all the other suggested edits and send them the file as is, they can deal with compiling the bibliography, if they want to reinvent the wheel, they are free to carve it out themselves – desperateForBibliography Aug 12 '15 at 23:28