使用 Bibtex 与 Texworks,bbl 文件中未定义的控制序列

使用 Bibtex 与 Texworks,bbl 文件中未定义的控制序列

因此我遵循了之前论坛给出的建议:

Compile with PdfLatex to get the .aux file
Compile with Bibtex to get the .bbl file
Compile with Pdflatex to incorporate the .bbl file

但是当我执行最后一步时,文件中出现错误“未定义控制序列” .bbl。我能想到的唯一原因是读取文件时存在一些格式问题.bib。但我不知道如何解决这个问题。

如果有人有解决方案,请帮忙。我正在使用 TexWorks (Texlive 2016)

编辑 这是我的文件:

\documentclass[twocolumn]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{gensymb}
\usepackage{caption}
\usepackage{url}
\usepackage{abstract}
\usepackage{natbib}

\captionsetup{margin=12pt,font=small,labelfont=bf}
\setlength{\absleftindent}{30mm}
\setlength{\absrightindent}{30mm}
\newcommand{\figref}[1]{\figurename~\ref{#1}}
\newcommand{\eqnref}[1]{Equation ~\ref{#1}} \newcommand{\secref}[1]{Section~\ref{#1}}

\begin{document}
    ...
    \cite{2010SPIE.7740E..22M}

    \bibliography{2016SAM_survey}{}
    \bibliographystyle{aa.bst}
\end{document}

使用 Bibtex 和 PdfLatex 再次编译后,出现以下错误:

(./mphys background report2.bbl ! Undefined control sequence. l.6 ...lov}, A., \& {Feldt}, M. 2010, in \procspie , Vol. ?

我的.bbl文件如下所示:

\begin{thebibliography}{1} \expandafter\ifx\csname     natexlab\endcsname\relax\def\natexlab#1{#1}\fi

\bibitem[{{Mller-Nilsson} {et~al.}(2010){Mller-Nilsson}, {Pavlov}, \& {Feldt}}]{2010SPIE.7740E..22M} {Mller-Nilsson}, O., {Pavlov}, A., \& {Feldt}, M. 2010, in \procspie, Vol. 7740, Software and Cyberinfrastructure for Astronomy, 774022
\end{thebibliography}

我的 Bib 文件如下所示:

@INPROCEEDINGS{2010SPIE.7740E..22M,
   author = {{Mller-Nilsson}, O. and {Pavlov}, A. and {Feldt}, M.},
    title = "{SPHERE data reduction software: first insights into data reduction software development for next-generation instruments}",
booktitle = {Software and Cyberinfrastructure for Astronomy},
     year = 2010,
   series = {\procspie},
   volume = 7740,
    month = jul,
      eid = {774022},
    pages = {774022},
      doi = {10.1117/12.857989},
   adsurl = {http://cdsads.u-strasbg.fr/abs/2010SPIE.7740E..22M},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

谢谢,托尼

答案1

因为我没有您的参考书目风格,所以aa.bst我只是使用了plainnat

请注意,该命令\bibliographystyle{aa}不需要扩展.bst

为了消除错误,您必须\procspie在代码中定义所使用的命令,例如

\newcommand{\procspie}{Proceedings of the SPIE} % <=====================

Proceedings of the SPIE根据您的需要进行更改...

以下 MWE 编译时没有错误:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@INPROCEEDINGS{2010SPIE.7740E..22M,
   author = {{Mller-Nilsson}, O. and {Pavlov}, A. and {Feldt}, M.},
    title = "{SPHERE data reduction software: first insights into data reduction software development for next-generation instruments}",
booktitle = {Software and Cyberinfrastructure for Astronomy},
     year = 2010,
   series = {\procspie},
   volume = 7740,
    month = jul,
      eid = {774022},
    pages = {774022},
      doi = {10.1117/12.857989},
   adsurl = {http://cdsads.u-strasbg.fr/abs/2010SPIE.7740E..22M},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
\end{filecontents*}


\documentclass[twocolumn]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{gensymb}
\usepackage{caption}
\usepackage{url}
\usepackage{abstract}
\usepackage{natbib}

\captionsetup{margin=12pt,font=small,labelfont=bf}
\setlength{\absleftindent}{30mm}
\setlength{\absrightindent}{30mm}
\newcommand{\figref}[1]{\figurename~\ref{#1}}
\newcommand{\eqnref}[1]{Equation ~\ref{#1}} \newcommand{\secref}[1]{Section~\ref{#1}}

\newcommand{\procspie}{Proceedings of the SPIE} % <=====================


\begin{document}
\cite{2010SPIE.7740E..22M}

\bibliographystyle{plainnat} % <================================= aa, without .bst
\bibliography{\jobname}

\end{document}

生成的 pdf

相关内容