EthanDeng / mhlatex

Mostly Harmless LaTeX Techniques
14 stars 7 forks source link

Q26 Delete bibliography title #33

Open Lihua1990 opened 4 years ago

Lihua1990 commented 4 years ago

Use \renewcommand{\bibname}{} in the preamble.

Lihua1990 commented 4 years ago

or change the chapter title directly using \addcontentsline{toc}{chapter}{Bibliography} before \bibliography{references}{} \bibliographystyle{unsrt}

EthanDeng commented 4 years ago

Use \renewcommand{\bibname}{} in the preamble.

你这种方法相当于用涂改液把 Bibliography 涂了,但是在参考文献那一页还会保留那个空白。

EthanDeng commented 4 years ago

正确的方法是:把整个文献部分的标题删了。针对不同的文献支持方式(bibtex/biber)。

natbib/bibtex

bibtex 可以使用

\usepackage{natbib}
\renewcommand{\bibsection}{}

但这样,文献会紧随最后的文字。看你的代码,我猜测你是想保留在目录中的目录信息,鉴于此,后续代码如下:

\newpage
\bibliography{ref}
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{unsrt}

这样,文献的作为标题页的设置没有了,只是作为普通页面存在,并且在目录中也会有章级别的链接。

biblatex/biber

可以在使用 biblatex 宏包之后,在加入参考文献的时候,设置标题:

\printbibliography[heading=none]

参考资料:How to remove the “References” title

Lihua1990 commented 4 years ago

没明白,我现在用的就只是

\addcontentsline{toc}{chapter}{Bibliography}
\bibliography{ref}{}
\bibliographystyle{unsrt}

没有用在导言区用下面这两行

\usepackage{natbib}
\renewcommand{\bibsection}{}

得到的就是我要的效果,我之前想删掉这个标题是因为我本身有标题,后来发现它会自动生成标题,就直接把它作为chapter的标题就好了。

EthanDeng commented 4 years ago

\renewcommand{\bibsection}{} 是完全将这个结构删了。我那个代码的前提是,你不使用 \chapter 命令。