簡體   English   中英

參考書目作為 LaTeX / BibTeX 中的部分

[英]Bibliography as section in LaTeX / BibTeX

我正在使用部分而不是章節作為頂層(文檔類報告)編寫一個簡短的文檔。 然而,

\bibliographystyle{amsplain}
\bibliography{general}

導致將參考書目作為章節而不是節插入。 有什么辦法可以改變這種情況嗎?

默認情況下, 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標題。

請注意,如果您加載任何特殊的書目包,您可能希望加載這些包之前放置此代碼(這樣您就不會覆蓋它們的工作)。

請參閱參考資料,了解使用bibtex更改書目標題級別和標題文本的簡單方法http://www.flakery.org/search/show/568

查看tocibind包;

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

numbib確保參考書目被編號,而not* -options 分別禁用顯示numbib列表、表格和目錄本身。

就我而言,我還更改了 @godbyk 的解決方案以包含部分編號。

@godbyk 的台詞:

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

我的線路:

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

對於章節級別的參考,可以使用:\\addcontentsline{toc}{chapter}{References}。 要將它們放在部分級別,可以使用:\\addcontentsline{toc}{section}{References}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM