1.chapterbib和natbib 宏包
若要实现每章具有不同的参考文献需要的命令为:
\usepackage[sectionbib]{natbib}
\usepackage{chapterbib}
chapterbib与 natbib 兼容,用来产生分章节的文献列表。
这个宏包本质上使用 \include 命令来为每一章节添加文献列表。每一章节的参考文献都要单独声明 \bibliographystyle 以及 \bibliography 要导入的 bib 文件。
\bibliographystyle{plain} % 根据情况可以unsrt/alpha
\bibliography{sample} % sample为bib文件名
chapterbib 也有一个 sectionbib 的选项,但是会和 natbib 有冲突。要使其生效,只能对 natbib 使用 sectionbib 选项
2.设置参考文献标识
如果为中文参考文献需要[J] [M] [C]......标识,需要每章节添加语句:
\bibliographystyle{GBT7714-2005}
则每章节最后添加语句为:
\bibliographystyle{GBT7714-2005}
\bibliography{sample}
例子
main.tex
\documentclass[11pt,oneside]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\title{Per-chapter bibliographies with chapterbib}
\usepackage[a4paper]{geometry}
\usepackage[sectionbib]{natbib}
\usepackage{chapterbib}
\begin{document}
\frontmatter
\chapter*{Abstract}
This is \emph{not} a full thesis template! It only demonstrates how to create per-chapter references using the \texttt{chapterbib} package with BibTeX. (Do not use with BibLaTeX!)
Each chapter must be in its own \texttt{.tex} file and \texttt{include}-d into the main \texttt{.tex} file. If compiling on your own machine, run \texttt{bibtex} on \emph{each} generated \texttt{.aux} file, before running \texttt{pdflatex} twice more. (These are done automatically on Overleaf.)
\tableofcontents
\mainmatter
\include{chapters/chap1}
\include{chapters/chap2}
\backmatter
\end{document}
chap1.tex
\chapter{First Chapter}
\section{Section Heading}
Here's a citation! \cite{latex:companion}
%\bibliographystyle{unsrtnat} %% For numerical citations remember to pass "numbers" option to natbib
\bibliographystyle{GBT7714-2005}
\bibliography{sample}
chap2.tex
\chapter{Second Chapter}
\section{Section Heading}
Here's another citation! \cite{lshort}
%\bibliographystyle{unsrtnat} %% For numerical citations remember to pass "numbers" option to natbib
\bibliographystyle{GBT7714-2005}
\bibliography{sample}
注意:
每章tex文件应该与bib和GBT7714-2005文件在同一级目录下