Text before references, but after bibliography title with BibTeX
3,391
Solution 1
Since you mentioned BibTeX in your question but tagged it with biblatex 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}
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}
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}
Related videos on Youtube
Author by
Umberto Grandi
Updated on August 16, 2022Comments
-
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 about 11 yearsDo you ask about a
bibtex
solution or one forbiblatex
? In your question you only mention the former, but you used thebiblatex
tag.
-
-
Umberto Grandi about 11 yearsThanks 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 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 about 2 yearsWorks very well! Great! What are the disadvantages of defining the command after \ begin{document}?
-
lorenzo-bettini about 2 yearsIf that's admissible and it doesn't generate an error then I think it's fine