使用 natbib 时 Preview-LaTeX 不起作用(在 Emacs 24.5.1、AUCTeX 11.89 上)

使用 natbib 时 Preview-LaTeX 不起作用(在 Emacs 24.5.1、AUCTeX 11.89 上)
\documentclass[12pt]{article}
\usepackage[authoryear]{natbib} 
\begin{document}
$\alpha$
\bibliographystyle{ims}
\bibliography{mybibliography}
\end{document}

Preview-latex 无法与上述代码配合使用。如果我删除它,它就可以正常工作

\usepackage[authoryear]{natbib} 

我认为 preview-latex、natbib 和 -file-line-error 之间存在一些问题。

错误信息如下:

Running `Preview-LaTeX' on `_region_' with ``xelatex  -file-line-error  --synctex=1 "\nonstopmode\nofiles\PassOptionsToPackage{active,tightpage,auctex}{preview}\AtBeginDocument{\ifx\ifPreview\undefined\RequirePackage[displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\fi}" "\input" "_region_.tex"''
This is XeTeX, Version 3.14159265-2.6-0.99992 (MiKTeX 2.9)
entering extended mode
LaTeX2e <2015/10/01> patch level 2
Babel <3.9m> and hyphenation patterns for 69 languages loaded.

No auxiliary output files.

(_region_.tex  !name(test.tex)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size12.clo"))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\natbib\natbib.sty"

C:\Program Files (x86)\MiKTeX 2.9\tex\latex\natbib\natbib.sty:795: LaTeX Error:
 \makeindex undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help
)
No file _region_.aux.
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\preview\preview.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\preview\prtightpage.def")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\preview\prauctex.def"
No auxiliary output files.


) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\preview\prfootnotes.def")
Preview: Fontsize 12pt
Preview: PDFoutput 1
)  !name(test.tex) !offset(-3)
_region_.tex:7: Preview: Snippet 1 started
Preview: Tightpage -32891 -32891 32891 32891
_region_.tex:7: Preview: Snippet 1 ended.(338603+0x494792)
[1]

Package natbib Warning: Citation `PKH15' on page 1 undefined on input line 9.

No file _region_.bbl.

Package natbib Warning: There were undefined citations.

 )
(see the transcript file for additional information)
Output written on _region_.pdf (1 page).
SyncTeX written on _region_.synctex.gz.
Transcript written on _region_.log.

TeX Output exited as expected with code 1 at Thu Aug 25 14:05:28
LaTeX: LaTeX found no preview images

先感谢您

相关内容