2
\documentclass{doublecol-new}
\def\newblock{\hskip .11em plus .33em minus .07em}
\begin{document}
\setcounter{page}{1}
\title{IJKL}

\maketitle

\begin{abstract}
\end{abstract}


\section{Introduction}
\cite{jojo}


\begin{thebibliography}{10}

\bibitem{jojo} ABCD
\end{thebibliography}

\end{document} 

Above is a minimum working example which compiles, but leaves a ? mark when I try to cite the bibitem. Could anyone please help me fix this.

PS: Link to the cls file: http://www.inderscience.com/www/download/latex-double-column.zip. Unzipping the linked file would provide the cls file.

Werner
  • 603,163

2 Answers2

2

The class completely redefines the thebibliography environment to set a regular list for every \bibitem. In fact, there's no citation written to the auxiliary files for use as a \cite within the actual document.

Here's a view of the thebibliography redefinition:

\def\thebibliography#1{%
    \par{\section*{References and Notes}}%
    \list{}{\settowidth\labelwidth{#1}
    \setlength{\topsep}{0pt}
    \labelsep 0pt\labelwidth 0pt
    \leftmargin 8pt
     \itemindent-8pt
    \itemsep  5pt
    \def\bibitem{\item \NINE
     \baselineskip10pt plus 0.3pt minus 0.25pt\relax}}
    \def\newblock{\hskip .11em plus .33em minus .07em}
    \sloppy\clubpenalty4000\widowpenalty4000
    \sfcode`\.=1000\relax}

Note how \bibitem is \defined to be \item and there's no indication that content is written to the .aux file. Now look at the default definition of \bibitem (and friends) from the LaTeX kernel latex.ltx:

\def\bibitem{\@ifnextchar[\@lbibitem\@bibitem}
\def\@lbibitem[#1]#2{\item[\@biblabel{#1}\hfill]\if@filesw
      {\let\protect\noexpand
       \immediate
       \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}
\def\@bibitem#1{\item\if@filesw \immediate\write\@auxout
       {\string\bibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces}

It should be obvious from the above that content is written to the .aux file with any call to \bibitem.

My assumption is the class is not intended to allow the use of \cite. You'll see similar behaviour from the sample.tex file, not just in your minimal example. As such, it seems to be status by design.

As a side note, the class is called doublecol-new, yet it actually provides singlecol through a statement \ProvidesClass{singlecol} at the start of doublecol-new.cls. This class needs some serious work done to it. I'd suggest not using it.

Werner
  • 603,163
  • @Werner- Thanks for the clarification. Since the journal paper requires this class to be used, what changes should I make to be able to cite a paper? – totochan1965 Sep 20 '16 at 17:32
2

If you really want to (or must) make \cite work with the doublecol-new document class -- and I'm really not sure that this is even advisable! -- your best bet is to start by commenting out (or deleting) the following code block, which occupies lines 714 thru 728 of the class file:

\def\thebibliography#1{%
    \par{\section*{References and Notes}}%
    \list{}{\settowidth\labelwidth{#1}
    \setlength{\topsep}{0pt}
    \labelsep 0pt\labelwidth 0pt
    \leftmargin 8pt
     \itemindent-8pt
    \itemsep  5pt
    \def\bibitem{\item \NINE
     \baselineskip10pt plus 0.3pt minus 0.25pt\relax}}
    \def\newblock{\hskip .11em plus .33em minus .07em}
    \sloppy\clubpenalty4000\widowpenalty4000
    \sfcode`\.=1000\relax}

\def\endthebibliography{\endlist}

Next, copy the following (slightly modified) code, obtained from the article document class, into the doublecol-new class file:

\renewenvironment{thebibliography}[1]
     {\section*{References and Notes\HD{0}{0}}%
      %%\@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            %%\@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}

By "slightly modified", I mean that (a) \refname has been changed to References and Notes\HD{0}{0} and (b) two instructions have been commented out; see the lines that begin with %%.

As @Werner has already noted, the doublecol-new document class file looks like it needs a lot of serious work. Don't be surprised if you encounter other problems! (E.g., the abstract environment doesn't appear to work the way one is used to from, e.g., the article class...)

Save the modified document class to, say, doublecol-mod.cls. Then, the following version of your MWE should provide a numeric citation call-out.

\documentclass{doublecol-mod} % note the modified name
\begin{document}
%%\setcounter{page}{1}  % not needed, is it?
\title{IJKL}
\maketitle

\begin{abstract} % does it even work?
\end{abstract}

\section{Introduction}

A citation: \cite{jojo}

\begin{thebibliography}{9}

\bibitem{jojo} ABCD

\end{thebibliography}
\end{document} 
Mico
  • 506,678
  • Quick mention: One could include the thebibliography update between a \makeatletter...\makeatother pair in the preamble. Perhaps that will also be a good indication for the journal that a change has been (needs to be!) done. – Werner Sep 20 '16 at 18:30
  • @Werner - Good point! :-) Indeed, one way or another the authors will need to assure that the journal's editorial and support staff needs are unambiguously made aware of the fact that the thebibliography environment has been modified in a non-trivial way. – Mico Sep 20 '16 at 18:41