latex如何让每章或每节有单独的参考文献
使用chapterbib包
使用chapterbib
包可以让每一章节有单独的参考文献,在导言区(preamble)中使用包
\usepackage[sectionbib]{chapterbib}
- 这里
sectionbib
选项更改了已经存在的thebibliography环境。
例子
main.tex
main.tex内容为:
\documentclass{book}
\usepackage{ctex}
\usepackage[sectionbib]{chapterbib}
\begin{document}
\include{chapters/ch1}
\include{chapters/ch2}
\end{document}
chp1.tex
chp1.tex内容为:
\chapter{chapter 1}
这是章节1。\cite{en1}\cite{cn1}
\bibliographystyle{plain}
\bibliography{reference}
chp2.tex
chp2.tex内容为:
\chapter{chapter 2}
这是章节2。\cite{en2}\cite{cn2}
\bibliographystyle{plain}
\bibliography{reference}
编译
首先对main
文件编译
xelatex main.tex
这时候需要对独立的ch.aux
进行bibtex
,而不能对main.aux
进行bibtex
bibtex chapters/ch1.aux
bibtex chapters/ch2.aux
再对main.tex
编译即可。
xelatex main.tex
xelatex main.tex
结果
附件
关于这篇文章的小例程:chapter_bibliography.7z