参考书目作为LaTeX/BibTeX中的部分

Mar*_*ijn 20 latex bibtex

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

\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标题.

请注意,如果您加载任何特殊的参考书目包,您可能希望加载这些包之前放置此代码(因此您不会覆盖他们的工作).


小智 12

请参阅bibtex http://www.flakery.org/search/show/568以简单的方式更改参考书目的标题级别和标题文本


Mor*_*uhr 7

看看包装tocibind ;

\usepackage[numbib,notlof,notlot,nottoc]{tocbibind}
Run Code Online (Sandbox Code Playgroud)

numbib确保参考书目编号,而not*-options分别禁用显示数字列表,表格和TOC本身.