第 {references} 节未正确显示在参考书目中

第 {references} 节未正确显示在参考书目中

我正在使用 SMC 的 tex 样式。

在我的参考上方,出现了这样的内容:

6. * 
References

这代替了“6. 参考文献”。

我正在使用他们的风格并打印以下参考书目:

\bibliographystyle{IEEEtran}
\bibliography{paper}

我查看了 .sty 文件并发现了以下条目:

\bibliographystyle{IEEEtran}

\def\thebibliography#1{
  \section{References}\list
  {[\arabic{enumi}]}{
  \settowidth\labelwidth{[#1]}\leftmargin 1em
  \advance\leftmargin\labelsep
  \usecounter{enumi}
  }
  \def\newblock{\hskip .01em plus .01em minus .01em}
  \sloppy\clubpenalty4000\widowpenalty4000
  \sfcode`\.=1000\relax
}

\let\endthebibliography=\endlist

\long\def\@makecaption#1#2{
  \vskip 10pt
  \setbox\@tempboxa\hbox{#1. #2}
  \ifdim
    \wd\@tempboxa >\hsize #1. #2\par
  \else
    \hbox
    to\hsize{\hfil\box\@tempboxa\hfil}
  \fi
}

我注意到当我注释掉 \uspackage{amsmath} 时问题就消失了。我尝试添加 \usepackage{amsrefs},但它显示 bib 环境已定义。

这是一个最小工作示例和一个样式文件链接

\documentclass{article}



\usepackage{icmcsmc2014}

 \usepackage[numbers]{natbib}
\usepackage{amsmath}


\begin{filecontents}{paper_test.bib}
@article{herremans2013composing,
  title={Composing Fifth Species Counterpoint Music With A Variable Neighborhood Search Algorithm},
  author={Herremans, Dorien and S{\"o}rensen, Kenneth},
  journal={Expert Systems with Applications},
  volume={40},
  number={16},
  pages={6427--6437},
  year={2013},
  publisher={Pergamon}
}
\end{filecontents}


\usepackage{times}
\usepackage{ifpdf}
\usepackage[english]{babel}
% \usepackage{cite}
%   \usepackage{multibib}



% ***************************************** the document starts here ***************
\begin{document}



\section{Introduction}

Here I want the author name to occur with citet as it is said by \citet{herremans2013composing}.

%   \bibliographystyle{IEEEtran}
%   \bibliographystyle{natbib}
  \bibliography{paper_test}


\end{document}

答案1

该文件icmcsmc2014.sty内部使用IEEEtran参考书目的样式,并且此样式与 不兼容natbib。您有两个选择:

  1. 不要加载natbib和使用IEEEtran您的参考书目的默认样式(当然,现在您不能使用\citet和提供的命令系列natbib):

    \documentclass{article}
    \usepackage{icmcsmc2014}
    \usepackage{amsmath}
    \usepackage{times}
    \usepackage{ifpdf}
    \usepackage[english]{babel}
    
    \begin{filecontents}{paper_test.bib}
    @article{herremans2013composing,
      title={Composing Fifth Species Counterpoint Music With A Variable Neighborhood Search Algorithm},
      author={Herremans, Dorien and S{\"o}rensen, Kenneth},
      journal={Expert Systems with Applications},
      volume={40},
      number={16},
      pages={6427--6437},
      year={2013},
      publisher={Pergamon}
    }
    \end{filecontents}
    
    \begin{document}
    
    \section{Introduction}
    Here I want the author name to occur with cite as it is said by \cite{herremans2013composing}.
    
    \bibliography{paper_test}
    
    \end{document}
    

    在此处输入图片描述

  2. 如果您想使用natbib及其系列引文命令,请转到第 228 行icmcsmc2014.sty并注释掉该行\bibliographystyle{IEEEtran}。现在您可以加载natbib,您需要为文档中的参考书目选择与 natbib 兼容的样式;在下面的示例中,我使用了plainnat。另一件重要的事情是您需要加载natbib icmcsmc2014.sty

    \documentclass{article}
    \usepackage[numbers]{natbib}
    \usepackage{icmcsmc2014}
    \usepackage{amsmath}
    \usepackage{times}
    \usepackage{ifpdf}
    \usepackage[english]{babel}
    
    \begin{filecontents}{paper_test.bib}
    @article{herremans2013composing,
      title={Composing Fifth Species Counterpoint Music With A Variable Neighborhood Search Algorithm},
      author={Herremans, Dorien and S{\"o}rensen, Kenneth},
      journal={Expert Systems with Applications},
      volume={40},
      number={16},
      pages={6427--6437},
      year={2013},
      publisher={Pergamon}
    }
    \end{filecontents}
    
    \begin{document}
    
    \section{Introduction}
    Here I want the author name to occur with citet as it is said by \citet{herremans2013composing}.
    
    \bibliographystyle{plainnat}
    \bibliography{paper_test}
    
    \end{document}
    

在此处输入图片描述

相关内容