Text before references, but after bibliography title with BibTeX

3,391

Solution 1

Since you mentioned BibTeX in your question but tagged it with I will provide solutions for both:

Solution with BibTeX

Assuming you're using the article class you could redefine the thebibliography environment like this:

\documentclass{article}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc {foo,
    author = {Foo, Francis},
    title = {All about Foo},
    year = {2011},
}
\end{filecontents}

\newcommand{\myprenote}{Here goes my text.}

\makeatletter
\renewenvironment{thebibliography}[1]
     {\section*{\refname}%
      \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
      \myprenote
      \list{\@biblabel{\@arabic\[email protected]}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \@[email protected]
            \usecounter{enumiv}%
            \let\[email protected]\@empty
            \renewcommand\theenumiv{\@arabic\[email protected]}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@[email protected]{Empty `thebibliography' environment}}%
      \endlist}
\makeatother

\begin{document}
\bibliographystyle{plain}
\bibliography{\jobname}
\nocite{*}
\end{document}

enter image description here

Solution with biblatex

\documentclass{article}

\usepackage[
    style=authortitle,
    backend=biber,
]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book {foo,
    author = {Foo, Francis},
    title = {All about Foo},
    year = {2011},
    location = {Footown},
}
@book {bar,
    author = {Bar, Bernie},
    title = {Barstory},
    year = {2000},
    location = {Barcity},
}
\end{filecontents}

\addbibresource{\jobname.bib}


\begin{document}
\defbibnote{myprenote}{Here goes my text.}
\printbibliography[prenote=myprenote]
\nocite{*}
\end{document}

enter image description here

Solution 2

If you use natbib, you can simply define \bibpreamble for example

\documentclass{article}
\usepackage{natbib}

\usepackage{filecontents}

\begin{filecontents}{example.bib}
@book {foo,
    author = {Foo, Francis},
    title = {All about Foo},
    year = {2011},
    location = {Footown},
}
@book {bar,
    author = {Bar, Bernie},
    title = {Barstory},
    year = {2000},
    location = {Barcity},
}
\end{filecontents}

\def\bibpreamble{Here goes my text.}

\begin{document}
\bibliographystyle{abbrv} 
\bibliography{example}
\nocite{*}
\end{document} 

enter image description here

Share:
3,391

Related videos on Youtube

Umberto Grandi
Author by

Umberto Grandi

Updated on August 16, 2022

Comments

  • Umberto Grandi
    Umberto Grandi 10 months

    How can I put some introductory text before the references in BibTeX, but after the bibliography title? I have found some reference to \bibintro, but it does not compile. I have tried with a fake reference, but it obviously has to start with many As ;)

    • Simifilm
      Simifilm about 11 years
      Do you ask about a bibtex solution or one for biblatex? In your question you only mention the former, but you used the biblatex tag.
  • Umberto Grandi
    Umberto Grandi about 11 years
    Thanks Thorsten!! Very useful. I just modified it slightly to uniform it with the book style. It was pretty hard to find a solution to this problem! (and sorry for wrong tagging..I meant bibtex in any case)
  • Thorsten
    Thorsten about 11 years
    @UmbertoGrandi I'm glad that my answer helped you :) You can accept my answer by clicking on the checkmark (on the left side of my answer). When you register to this site and gain at least 15 reputation points you are also able to upvote it.
  • Philipp
    Philipp about 2 years
    Works very well! Great! What are the disadvantages of defining the command after \ begin{document}?
  • lorenzo-bettini
    lorenzo-bettini about 2 years
    If that's admissible and it doesn't generate an error then I think it's fine