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
    It's not BibTeX that prints "References", but LaTeX. Please, state what class you're using. – egreg Jan 9 '12 at 22:29
  • I am using article class. Thanks for the prompt respond! – Predrag Punosevac Jan 9 '12 at 22:32
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.

  • Why not simply redefine \section with five arguments? Look at my comment to another answer – egreg Jan 9 '12 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 Jan 9 '12 at 23:46
  • Werner, thank you so much for this detailed explanation! It is exactly what I need. – Predrag Punosevac Jan 9 '12 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 Jan 9 '12 at 23:48
5

For article you could use

\renewcommand\refname{}

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

  • Exactly what I was looking for! Thank you!!! – Predrag Punosevac Jan 9 '12 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 Jan 9 '12 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 Jan 9 '12 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. – Predrag Punosevac Jan 9 '12 at 23:50
0

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.