found no \bibdata command

在CTeX套件的WinEdt编辑器里点击BibTeX按钮后,出现错误:

1
2
I found no \bibdata command---while reading file test.aux
I found no \bibstyle command---while reading file test.aux

有一种原因为.bib文件未保存,因为WinEdt是不会自动保存的,即使点了PDFTexify按钮也不会保存,需要先保存.bib文件再点BibTeX按钮,就不会出现这个错误了。

正确写法参见:
CTeX例子

CTeX例子

test.tex

1
2
3
4
5
6
7
8
\documentclass{article}
\usepackage{ctex}
\usepackage{cite}
\begin{document}
Hello every one!\cite{articleA}大家还好么?
\bibliographystyle{plain}
\bibliography{refs}
\end{document}

refs.bib

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
@ARTICLE{articleA,
author = {Mr.Woodman},
title = {Woodman's Trueman},
journal = {IEEE magzine},
year = {11},
volume = {2(3)},
pages = {4-42},
owner = {trueman},
timestamp = {02}
}
 
@Inbook{Book1,
author="Mrs.Woodman",
editor="Editor Woodman",
title="Woman",
bookTitle="Woodman's woman",
year="1992",
publisher="Woodman House",
address="New York St.1",
pages="33--25",
isbn="111-222-1",
doi="10.1011/111-11-111-1111-1_11",
url="http://url.org/index.html"
}