参考书目作为 LaTeX/BibTeX 中的部分 [英] Bibliography as section in LaTeX / BibTeX

查看:16
本文介绍了参考书目作为 LaTeX/BibTeX 中的部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm writing a short document using sections rather than chapters as the top-level (documentclass report). However,

ibliographystyle{amsplain}
ibliography{general}

使参考书目作为章节而不是章节插入.有什么办法可以改变吗?

causes the bibliography to be inserted as a chapter rather than a section. Is there any way to change this?

推荐答案

默认情况下,report 文档类使用 chapter 作为书目标题级别.相比之下,article 文档类使用 section 作为参考书目标题级别.如果您没有在文档中的任何位置使用 chapter,则可能需要使用 article 类.

By default, the report document class uses chapter as the bibliography heading level. In contrast, the article document class uses section as the bibliography heading level. If you're not using chapter anywhere in your document, you might want to use the article class instead.

如果你真的想使用 report 类,你需要重新定义 thebibliography 环境以使用 section 而不是 <代码>章节.在文档的序言中(在 documentclass 行之后但在 egin{document} 行之前,插入以下内容:

If you really want to use the report class, you'll need to redefine the thebibliography environment to use section instead of chapter. In the preamble of your document (after the documentclass line but before the egin{document} line, insert the following:

makeatletter

enewenvironment{thebibliography}[1]
     {section*{ibname}% <-- this line was changed from chapter* to section*
      @mkboth{MakeUppercaseibname}{MakeUppercaseibname}%
      list{@biblabel{@arabicc@enumiv}}%
           {settowidthlabelwidth{@biblabel{#1}}%
            leftmarginlabelwidth
            advanceleftmarginlabelsep
            @openbib@code
            usecounter{enumiv}%
            letp@enumiv@empty
            
enewcommand	heenumiv{@arabicc@enumiv}}%
      sloppy
      clubpenalty4000
      @clubpenalty clubpenalty
      widowpenalty4000%
      sfcode`.@m}
     {def@noitemerr
       {@latex@warning{Empty `thebibliography' environment}}%
      endlist}
makeatother

现在您的参考书目将有一个 section 标题而不是 chapter 标题.

Now your bibliography will have a section heading instead of a chapter heading.

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

Note that if you load any special bibliography packages, you might want to put this code before those packages are loaded (so you don't overwrite their work).

这篇关于参考书目作为 LaTeX/BibTeX 中的部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆