! 未定义的控制序列。出现在引用中

! 未定义的控制序列。出现在引用中

我在 Ubuntu 14.04 中使用 Texmaker 4.1。这是我的.tex文件的一部分。

\documentclass[useAMS,usenatbib]{mn2e}
\usepackage{epsfig}
\usepackage{graphicx}
\usepackage{times}
\usepackage{color}
\usepackage{amssymb}
\bibliographystyle{mn2e} %using mnras bibliography style

\begin{document}

\section{Introduction}

The two-point correlation function (\citep{totsuji_1969})........
So the spatial correlation $\xi(s)$ directly (e.g.\citep{davis_peebles_1983})......


\bibliography{clustering_paper}

\end{document}

当我使用快速构建进行编译时,(pdflatex + bibtex + pdflatex(2) + view pdf)第 5 行和第 11 行出现错误!

! Undefined control sequence.
l.5 {Davis} M., {Peebles} P.~J.~E., 1983, \apj
, 267, 465

! Undefined control sequence.
l.11 {Totsuji} H., {Kihara} T., 1969, \pasj
, 21, 221

如您所见,第 5 行是\usepackage{color},但错误表明它在我的clustering_paper.bib文件中。

clustering_paper.bib这是我的文件中导致错误的两个参考。

@ARTICLE{totsuji_1969,
   author = {{Totsuji}, H. and {Kihara}, T.},
    title = "{The Correlation Function for the Distribution of Galaxies}",
  journal = {\pasj},
     year = 1969,
   volume = 21,
    pages = {221},
   adsurl = {http://adsabs.harvard.edu/abs/1969PASJ...21..221T},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{davis_peebles_1983,
   author = {{Davis}, M. and {Peebles}, P.~J.~E.},
    title = "{A survey of galaxy redshifts. V - The two-point position and velocity correlations}",
  journal = {\apj},
 keywords = {Cosmology, Galactic Clusters, Galaxies, Red Shift, Correlation, Line Of Sight, Mass Distribution, Position (Location), Velocity Distribution},
     year = 1983,
    month = apr,
   volume = 267,
    pages = {465-482},
      doi = {10.1086/160884},
   adsurl = {http://adsabs.harvard.edu/abs/1983ApJ...267..465D},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

我的.bib文件位于包含我的.tex文件的文件夹中。当我说它\citep{}确实识别了我的参考密钥并提示自动完成时,我确信它识别了我的.bib文件。但我无法找出错误所在!!

答案1

错误不是在引用,而是\apj没有定义,bib 文件大概是想让你加载一个包来定义它,如果没有就\newcommand\apj{some journal name}这么做。

无关,但不要加载epsfig包,除非你真的想模拟 20 世纪 80 年代的文档(这也是我编写该包的原因)。

相关内容