Latex 书籍类删除参考文献前的垂直空格

Latex 书籍类删除参考文献前的垂直空格

我正在使用包含多个章节的乳胶书籍类。每章末尾都有一个参考列表。一切正常。但我唯一想修复的是参考标题前的巨大空白。我从搜索类似答案中了解到,参考列表是由\chapter*书籍类中的命令生成的。我关注了这个问题如何删除参考书目标题中的大空格?,但无法修改空格。请注意,由于间距来自命令chapter,因此每个章节标题前面也有此间距,但我希望保持原样。

那么,如何删除参考文献列表之前的间距,而不修改文档的任何其他部分。

编辑
好的,那么从这个问题开始如何在章节标题前添加一些负垂直空间?,我想到了以下删除空格的想法。而不是\bibliography{refs1.bib,refs2.bib,....},我可以有

\begingroup
\clearpage% Manually insert \clearpage
\let\clearpage\relax% Remove \clearpage functionality
\vspace*{-100pt}% Insert needed vertical retraction
\bibliography{refs1.bib,refs2.bib,...}
\endgroup

现在,有没有办法将上述块重新定义为单个命令,以便我可以用\bibliography新命令替换它并执行上述块?

答案1

book.cls

\newenvironment{thebibliography}[1]
     {\chapter*{\bibname}%
      \@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}

所以你可以

\makeatletter
\renewenvironment{thebibliography}[1]
     {\chapter*{\bibname}%
      \@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

并且改变任何你想改变的东西,也许改变\chapter*\section*是最简单的。

相关内容