Multibib:如何覆盖参考书目部分标题的默认外观

Multibib:如何覆盖参考书目部分标题的默认外观

使用multibib(和apacite),如果我使用以下行定义两个题为“主要文献”和“次要文献”的书目:

\newcites{prim}{Primary Literature}
\newcites{sec}{Secondary Literature}

然后我写入document块中:

\section{Bibliography}
\nociteprim{ref1,ref2}
\bibliographystyleprim{apacite}
\bibliographyprim{publications}   % 'publications' is the name of a BibTeX file

\section{Bibliography}
\nocitesec{ref3,ref4}
\bibliographystylesec{apacite}
\bibliographysec{publications}   % 'publications' is the name of a BibTeX file

然后我得到了三个部分,分别名为“参考书目”、“主要文献”和“次要文献”。但是,我想让“主要文献”和“次要文献”以 的样式出现,而subsection不是section一个。

任何想法?

答案1

我认为您正在使用 文档类article或基于 构建的类article。如果不是,请告知您使用的文档类。

下面的指令可能会做你想做的事情;把它们放在前言中,在multibib加载之后。

\usepackage{etoolbox}
\BeforeBeginEnvironment{thebibliography}{%
  \let\origsection\section% save the original definition of \section
  \let\section\subsection%  make \section behave like \subsection
}
\AfterEndEnvironment{thebibliography}{%
  \let\section\origsection% restore the original definition of \section
}

以下是完整 MWE(最小工作示例)的输出:

在此处输入图片描述

\RequirePackage{filecontents}
\documentclass{article}
\begin{filecontents*}{publications.bib}
@article{ref1,
  author = "A. Athor",
  title  = "Deep thoughts",
  journal= "Circularity",
  year   = 3001,
  volume = 1,
  pages  = 1,
}
@article{ref2,
  author = "B. Bthor",
  title  = "Deep thoughts",
  journal= "Circularity",
  year   = 3002,
  volume = 2,
  pages  = 1,
}
@article{ref3,
  author = "C. Cthor",
  title  = "Deep thoughts",
  journal= "Circularity",
  year   = 3003,
  volume = 3,
  pages  = 1,
}
@article{ref4,
  author = "D. Dthor",
  title  = "Deep thoughts",
  journal= "Circularity",
  year   = 3004,
  volume = 4,
  pages  = 1,
}
\end{filecontents*}

\usepackage{apacite,multibib}
\newcites{prim}{Primary Literature}
\newcites{sec}{Secondary Literature}
\usepackage{etoolbox}
\BeforeBeginEnvironment{thebibliography}{%
  \let\origsection\section% save original definition of \section
  \let\section\subsection%  make \section behave like \subsection
}
\AfterEndEnvironment{thebibliography}{%
  \let\section\origsection% restore original definition of \section
}
\begin{document}
\nociteprim{ref1,ref2}
\nocitesec{ref3,ref4}

\section{Bibliography}
\bibliographystyleprim{apacite}
\bibliographyprim{publications} 

\bibliographystylesec{apacite}
\bibliographysec{publications}
\end{document}

相关内容