成功应用以下技巧后插入多个手册书目我遇到了一个新问题:每个参考书目都从新页面开始。这看起来不太好,我尝试使用\nopagebreak
(无效) 来抑制它。
经过一番浏览后,我发现该类通过插入新章节book
来处理thebibliography
,但我不知道如何修改行为。
所以,我的问题是:如何停止在文档类thebibliography
中的每个项目后插入新页面/标题book
?
答案1
\clearpage
您可以a)在组内禁用b)添加\chapter*{Bibliography}
和补丁\thebibliography
以便它使用\section*
而不是\chapter*
。
\section*
编辑:添加代码来更正(子)书目的运行标题。
\documentclass{book}
\usepackage{etoolbox}
\makeatletter
\newcommand*{\patchthebibliography}{%
\patchcmd{\thebibliography}{\chapter*}{\section*}{}{}%
\patchcmd{\thebibliography}{%
\@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
}{%
\markright{\MakeUppercase\bibname}%
}{}{} %
}
\makeatother
\newcounter{firstbib}
\begin{document}
\chapter{foo}
Some text \cite{A01,B02}.
\renewcommand{\bibname}{Literary works}
\begin{thebibliography}{9}
\bibitem{A01} A. Author. \emph{Alpha}. 2001.
\setcounter{firstbib}{\value{enumiv}}
\end{thebibliography}
\begingroup
\let\clearpage\relax
\renewcommand{\bibname}{Web references}
\begin{thebibliography}{9}
\setcounter{enumiv}{\value{firstbib}}
\bibitem{B02} B. Buthor. \emph{Bravo}. 2002.
\end{thebibliography}
\endgroup
\begingroup
\patchthebibliography
\chapter*{Bibliography}
\markboth{\MakeUppercase{Bibliography}}{\MakeUppercase{Bibliography}}
\renewcommand{\bibname}{Literary works}
\begin{thebibliography}{9}
\bibitem{A01} A. Author. \emph{Alpha}. 2001.
\setcounter{firstbib}{\value{enumiv}}
\end{thebibliography}
\renewcommand{\bibname}{Web references}
\begin{thebibliography}{9}
\setcounter{enumiv}{\value{firstbib}}
\bibitem{B02} B. Buthor. \emph{Bravo}. 2002.
\end{thebibliography}
\end{document}