4
\documentclass[12pt]{article}
\usepackage[authoryear]{natbib} 
\begin{document}
$\alpha$
\bibliographystyle{ims}
\bibliography{mybibliography}
\end{document}

Preview-latex does not work with above code. It works if I remove

\usepackage[authoryear]{natbib} 

I think there is some problem between preview-latex, natbib, and -file-line-error.

Here is error message:

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

Thank you in advance

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.