BibTeX, biblatex and biberRemove Biblio heading (references word and space)

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
verbunk
Posts: 18
Joined: Fri Nov 14, 2008 10:48 pm

Remove Biblio heading (references word and space)

Post by verbunk »

Hi Guys,

How do I remove the mini-heading that the biblio inserts when it's called? In this heading it prints "References" and some whitespace/rule. I can remove the word by using,

Code: Select all

\renewcommand{\refname}{}
,

but can't figure out how to get rid of the whitespace and horizontal rule.

I checked in plain.bst (for instance) but there is no mention of that functionality.

-J

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Remove Biblio heading (references word and space)

Post by localghost »

Unfortunately your post contains only very few useful information. From the \refname command I guess that you are using the article class (or one that is based on it). For your purpose you have to modify the thebibliography environment which is also used when creating the reference list with BibTeX. To do so, add the lines below to your preamble.

Code: Select all

\makeatletter
\renewenvironment{thebibliography}[1]{%
%     \section*{\refname}%
%      \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
      \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
This code block is taken from the original »article.cls« file. The commented lines become superfluous in this case.


Best regards
Thorsten
verbunk
Posts: 18
Joined: Fri Nov 14, 2008 10:48 pm

Re: Remove Biblio heading (references word and space)

Post by verbunk »

Hey Thorsten,

Thx for the reply! Yes, I'm using article.cls and I was looking for this block of code (even though I didn't know it then). If I want to permanently make this change how would I go about doing that? I have tried to edit article.cls (and save under a different name) then re-index using mktexslr but it doesn't work. I get many compile-time errors.

-J
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Remove Biblio heading (references word and space)

Post by localghost »

As an alternative you could put this code into a small package of your own and save that into the local TDS tree.

Code: Select all

%%
%% This is file `mods.sty'
%% -------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{mods}[2010/02/28 v0.1 Some modifications]
\renewenvironment{thebibliography}[1]{%
%     \section*{\refname}%
%      \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
      \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}
%%
%% End of file `mods.sty'.
Save this code as »mods.sty« and put it where the LaTeX system can find it. The MiKTeX Manual has more information about local directory trees [1]. I'm not very familiar with this system so that is all I can advice.

[1] MiKTeX 2.8 Manual
Post Reply