2

Is there a way of preventing LaTeX class article from printing keyword References. Namely, I would like to get LaTeX to print references from my database processed by BibTeX in the regular fashion but I do not word References to appear on the document.

2
  • 2
    It's not BibTeX that prints "References", but LaTeX. Please, state what class you're using.
    – egreg
    Commented Jan 9, 2012 at 22:29
  • I am using article class. Thanks for the prompt respond! Commented Jan 9, 2012 at 22:32

3 Answers 3

6

article defines the thebibliography environment to typeset the references as a \section*. Additionally, it also modifies the headers appropriately to denote a *References "section". If you want to completely remove this from your output and just set the bibliography items, you could use

\begingroup
  \makeatletter
  \renewcommand{\@startsection}[6]{}% gobble \section*
  \let\@mkboth\@gobbletwo% gobble \@mkboth
  \makeatother
  \bibliographystyle{plain}
  \bibliography{references}% References in references.bib
\endgroup

The first two command redefinitions (of \@startsection and \@mkboth) just gobbles their arguments. Grouping keeps the redefinition local so you can still use \section (and friends) afterword. A "cleaner" redefinition would be to use

\begingroup
  \renewcommand{\section}[5]{}% gobble \section*{..} and \@mkboth{..}{..}
  \bibliographystyle{plain}
  \bibliography{references}% References in references.bib
\endgroup

Here's the original definition of thebibliography, giving rise to the above redefinitions (I've marked the two commands we want to "remove" via the redefinitions):

\newenvironment{thebibliography}[1]
  {\section*{\refname}%                                       <--- want to remove this
   \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%  <--- want to remove this
   \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}

The latter redefinition of \section assumes the 5 arguments (or tokens) absorbed are

  • #1: *
  • #2: \refname (the braces { } are dropped by default)
  • #3: \@mkboth
  • #4: \MakeUppercase\refname
  • #5: \MakeUppercase\refname

and is therefore class-specific. You could even go one step further and redefine it (\section) to do whatever you want as a replacement. For example

\renewcommand{\section}[5]{\par\vspace{20pt}}%

would leave a 20pt vertical space before printing the bibliography entries.

4
  • Why not simply redefine \section with five arguments? Look at my comment to another answer
    – egreg
    Commented Jan 9, 2012 at 23:42
  • In that regard, #1=*, #2=[, #3=??, #4=] and #5=\refname (with the braces dropped, of course)? Or what do the 5 arguments represent?
    – Werner
    Commented Jan 9, 2012 at 23:46
  • Werner, thank you so much for this detailed explanation! It is exactly what I need. Commented Jan 9, 2012 at 23:48
  • 1
    No, you have only to look at \section*{\refname}\@mkboth{...}{...} in the definition of thebibliography: #1=*, #2={\refname}, and so on. :) It doesn't matter how \section was defined, as TeX uses the current definition.
    – egreg
    Commented Jan 9, 2012 at 23:48
5

For article you could use

\renewcommand\refname{}

to suppress the word "References" at the top of the bibliography.

4
  • Exactly what I was looking for! Thank you!!! Commented Jan 9, 2012 at 23:21
  • 2
    @PredragPunosevac: Note that this should still leave a noticeable gap between the end of your text and the start of your bibliography. Also, your headers will be cleared. For example, if you want a previous section's title to continue in the references area.
    – Werner
    Commented Jan 9, 2012 at 23:31
  • A slightly more complicated way would be \begingroup\renewcommand\section[5]{\par\vspace{3\baselineskip}}\bibliography{mydatabase}\endgroup which would give you the possibility to choose the spacing between the text and the references.
    – egreg
    Commented Jan 9, 2012 at 23:31
  • @Werner I noticed and I sort of could deal with it but your answer clarify things completely so that I could deal with them properly. Commented Jan 9, 2012 at 23:50
0

If I understand you right, you should have a look at the \nocite command.

1
  • I don't think is what the OP was after.
    – Werner
    Commented Jan 10, 2012 at 2:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .