我正在编写一个简短的文档,使用部分而不是章节作为顶级(文档类报告).然而,
\bibliographystyle{amsplain}
\bibliography{general}
Run Code Online (Sandbox Code Playgroud)
导致参考书目作为章节而不是章节插入.有没有办法改变这个?
god*_*byk 29
默认情况下,report
文档类\chapter
用作参考书目标题级别.相反,article
文档类\section
用作参考书目标题级别.如果您未\chapter
在文档中的任何位置使用,则可能需要使用article
该类.
如果您真的想要使用report
该类,则需要重新定义thebibliography
要使用的环境\section
而不是\chapter
.在文档的序言中(\documentclass
在行之后但在行之前\begin{document}
,插入以下内容:
\makeatletter
\renewenvironment{thebibliography}[1]
{\section*{\bibname}% <-- this line was changed from \chapter* to \section*
\@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
\makeatother
Run Code Online (Sandbox Code Playgroud)
现在你的参考书目将有\section
标题而不是\chapter
标题.
请注意,如果您加载任何特殊的参考书目包,您可能希望在加载这些包之前放置此代码(因此您不会覆盖他们的工作).
看看包装tocibind ;
\usepackage[numbib,notlof,notlot,nottoc]{tocbibind}
Run Code Online (Sandbox Code Playgroud)
numbib
确保参考书目编号,而not*
-options分别禁用显示数字列表,表格和TOC本身.