使用 natbib 生成参考书目时缺少 = 插入 \ifnum 错误

使用 natbib 生成参考书目时缺少 = 插入 \ifnum 错误

我正在尝试使用 natbib 以 ASA 引用格式插入引文和参考书目。我正在尝试改编朋友发给我的 latex 文件,因为生成参考书目对我来说是新手。参考书目生成得非常好,但所有引文都显示为问号,控制台打印错误:缺少 = 插入 \ifnum

示例代码:

\documentclass[letterpaper,12pt,openany]{memoir}
\usepackage{natbib} % ASA citation style

\begin{document}

\chapter{Introduction}
\thispagestyle{empty}

This is the introduction. \citep{Rubin1974}

%% Bibliography
\bibliographystyle{asa}
\bibliography{testbibliography}

\end{document}

我的 testbibliography 文档如下:

%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/

%% Saved with string encoding Unicode (UTF-8) 

@article{Rubin1974,
    Author = {B. Rubin, Donald},
    Booktitle = {Journal of Educational Psychology},
    Date-Added = {2018-02-02 05:35:05 +0000},
    Date-Modified = {2018-02-02 16:48:13 +0000},
    Journal = {Journal of Educational Psychology},
    Month = {10},
    Title = {Estimating causal effects of treatments in randomized and nonrandomized studies},
    Volume = {66},
    Year = {1974}}

此外,我从以下网址下载了文件 asa.bst 和 asa.sty本网站,因为我最初收到有关缺少这些文件的错误。

我不断收到以下错误:

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex)
 \write18 enabled.
entering extended mode
(./bibliography_test.tex
LaTeX2e <2015/01/01>
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(/usr/local/texlive/2015/texmf-dist/tex/latex/memoir/memoir.cls
Document Class: memoir 2015/04/23 v3.7d configurable book, report, article docu
ment class
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/ifetex/ifetex.sty
(/usr/local/texlive/2015/texmf-dist/tex/plain/ifetex/ifetex.tex))
(/usr/local/texlive/2015/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/etex-pkg/etex.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/memoir/mem12.clo)
(/usr/local/texlive/2015/texmf-dist/tex/latex/memoir/mempatch.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/natbib/natbib.sty)
(./bibliography_test.aux)
./bibliography_test.tex:9: Missing = inserted for \ifnum.
<to be read again> 
                   \def 
l.9 This is the introduction. \citep{Rubin1974}

换句话说,当我尝试插入引文时,我总是会收到此错误(缺少 = 插入 \ifnum)。但是,参考书目本身没有问题,我尝试引用的任何文章都会在参考书目中正确显示。但是,引文本身总是显示为问号。有什么想法这里出了什么问题吗?

相关内容