Anyway,有時,像是在寫書時,會想要在各章後放各章的參考文獻,但是一般來說參考文獻都會被放在文件的最後面,如果想要在各章之後 show 出來的話該怎麼做呢?這時就要用 chapterbib 這個 package 了。
底下是我這次所測試出來可以用的例子。
Example/
|-article.tex
|-Chap01/
|-reference.bib
|-section01.tex
|-section02.tex
|-chap01.tex
|-Chap02/
|-reference.bib
|-section01.tex
|-section02.tex
|-chap02.tex
|-Makefile
[article.tex]
\documentclass{book}
\usepackage[sectionbib]{chapterbib}
\usepackage{CJKutf8}
\begin{document}
\begin{CJK*}{UTF8}{bkai}
\include{chap01}
\include{chap02}
\end{CJK*}
\end{document}
[chap01.tex]
\chapter{Chapter 01}
\input Chap01/section01.tex
\input Chap01/section02.tex
\newpage
\bibliographystyle{plain}
\bibliography{Chap01/reference.bib}
[chap02.tex]
\chapter{Chapter 02}
\input Chap02/section01.tex
\input Chap02/section02.tex
\newpage
\bibliographystyle{plain}
\bibliography{Chap02/reference.bib}
[Makefile]
all:
latex article
bibtex chap01
bibtex chap02
latex article
latex article
pdflatex article
clean:
rm -rf *.aux *.bbl *.blg *.dvi *.log *.pdf
如果不加上 sectionbib 的話,就會是在文件最後面才會依章列出所用的參考文獻。
Reference:
http://www.eng.cam.ac.uk/help/tpl/textprocessing/bibliographies.html
沒有留言:
張貼留言