0

I have found a template for a paper (https://academic.oup.com/comjnl/pages/Manuscript_Preparation_Submission; scroll to: Latex 2E And The COMJNL.CLS File), but I am having problems compiling my *.bib in the style that the template requires. The *.bbl is build like:

\begin{thebibliography}{99}

\bibitem{gelenbe06} Gelenbe, E. (2006) Analysis of automated auctions. \newblock {\em ISCIS 2006, LNCS 4263}, Istanbul, Turkey, 1-3 November, pp. 1--12. Springer Verlag, Berlin.

\end{thebibliography}{99}

Which reference style is it? I think, I have to change the referencing style at TeXstudio that the code at the file COMJNL.CLS works. I use TeXstudio and JabRef.

How I have to manipulate the following code (?)

% need to be explicit with `References' for \uppercase'ing
\def\thebibliography#1{\section*{References}\small\list
 {[\arabic{enumi}]}{\labelsep 0.5em%
\hyphenpenalty=50\itemsep=-1pt
 \settowidth\labelwidth{[#1]}\leftmargin\labelwidth
 \advance\leftmargin\labelsep
 \usecounter{enumi}}
 \def\newblock{\hskip .14em plus .38em minus -.1em}
 \sloppy
 \sfcode`\.=1000\relax}
\let\endthebibliography=\endlist

\def@cite#1#2{[{#1\if@tempswa , #2\fi}]} \def@biblabel#1{[#1]}

\let\origthebibliography\thebibliography \def\thebibliography#1{\origthebibliography{\hbox to 1em{\hss}}}

at the COMJNL.CLS that I can use other commands/reference styles like:

\usepackage{csquotes}
\usepackage[style=authoryear-comp, natbib=true,maxcitenames=1,  uniquelist=false, backend=biber]{biblatex} 
\addbibresource{ref.bib}

\begin{document} \printbibliography \end{document}

Ingmar
  • 6,690
  • 5
  • 26
  • 47
Kopi
  • 65

1 Answers1

0

The .zip file available at https://academic.oup.com/comjnl/pages/Manuscript_Preparation_Submission#Latex contains a sample.tex file with working bibliography setup

\nocite{*}

\bibliographystyle{compj} \bibliography{ModellingBidders}

The .zip file also includes the BibTeX style file compj.bst that is referenced there.

This strongly suggests you should not and cannot use biblatex for a submission (biblatex is incompatible with classical BibTeX sytles). Just use BibTeX with compj as suggested by the sample document.

Unfortunately, there is an extremely weird bug in the version of compj.bst (This is a version of cj.bst v1.1 2003-08-18 modified with BibTeX: How to reduce long author lists to "Firstauthor et al."?) that is currently included in the .zip: It says http://format.date when it should say format.date. So open the file and search-and-replace http://format.date with format.date (normally I would say that you should also rename the file and add a short comment at the top of the file to explain the change, but since the file is not administered by your TeX distribution and you probably have to download the .zip again for a new submission to be sure you get the current version of the files that is probably less relevant).

With that change

\documentclass{comjnl}

\usepackage{amsmath}

\begin{document} Lorem \cite{article-full}

\bibliographystyle{compj} \bibliography{xampl} \end{document}

will produce the desired output assuming comjnl.cls and compj.bst are in the same directory as the .tex file.

moewe
  • 175,683
  • Thank you very much. It more or less worked. The bibliography is now translated and inserted into the paper. However, this applies to all sources in my *.bib file, even if only a part of it is referenced. Do you have any idea how to fix this problem? – Kopi Nov 06 '21 at 19:17
  • @Kopi That will be the \nocite{*}. That command adds all entries in the .bib file to the bibliography regardless of whether or not these entries were cited in the text. Remove the \nocite{*} and recompile the document. Then you should only see entries that you actually cited in the bibliography. (As in the example document I posted.) – moewe Nov 07 '21 at 06:34
  • Thank you. That works. – Kopi Nov 07 '21 at 12:59