LaTeX / BibTeX 中的参考书目部分

问题描述 投票:0回答:4

我正在编写一个简短的文档,使用部分而不是章节作为顶层(文档类报告)。然而,

\bibliographystyle{amsplain}
\bibliography{general}

导致参考书目作为章节而不是节插入。有什么办法可以改变这个吗?

latex bibtex
4个回答
32
投票

默认情况下,

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

现在您的参考书目将有

\section
标题,而不是
\chapter
标题。

请注意,如果您加载任何特殊的参考书目包,您可能需要将此代码放在之前加载这些包(这样您就不会覆盖他们的工作)。


11
投票

看包tocibind

\usepackage[numbib,notlof,notlot,nottoc]{tocbibind}

numbib
确保参考书目得到编号,而
not*
-选项则分别禁用显示图表列表、表格和目录本身。


0
投票

就我而言,我还更改了@godbyk的解决方案以包含节号。

@godbyk 的台词:

{\section*{\bibname}% <-- this line was changed from \chapter* to \section*

我的台词:

{\section{\bibname}% <-- this line was changed from \chapter* to \section

0
投票

要获得章节级别的参考,可以使用:

\addcontentsline{toc}{chapter}{References}

要将它们置于部分级别,可以使用:

\addcontentsline{toc}{section}{References}
© www.soinside.com 2019 - 2024. All rights reserved.