LaTeX (backref)
The following LaTeX code uses a citation and the citation contains a list of pages, where the entry is citated. Here it is the first page. Package hyperref
also adds PDF links, the page back reference is red, the citation link is green.
\documentclass{article}
\usepackage[colorlinks,pagebackref]{hyperref}
\begin{document}
Donald E. Knuth is the inventor of \TeX~\cite{knuth}.
\begin{thebibliography}{9}
\bibitem{knuth}
Donald E. Knuth: \textit{The \TeX book}; Addison Wesley, 1984.
\end{thebibliography}
\end{document}

But LaTeX does not require the empty line, the empty line looks superfluous and the example will still work without hyperref
and the empty line:
\documentclass{article}
\begin{document}
Donald E. Knuth is the inventor of \TeX~\cite{knuth}.
\begin{thebibliography}{9}
\bibitem{knuth}
Donald E. Knuth: \textit{The \TeX book}; Addison Wesley, 1984.
\end{thebibliography}
\end{document}

But the links and back reference are gone, thus we reinsert them:
\documentclass{article}
\usepackage[colorlinks,pagebackref]{hyperref}
\begin{document}
Donald E. Knuth is the inventor of \TeX~\cite{knuth}.
\begin{thebibliography}{9}
\bibitem{knuth}
Donald E. Knuth: \textit{The \TeX book}; Addison Wesley, 1984.
\end{thebibliography}
\end{document}
But now the example is broken and will not compile anymore:
Runaway argument?
Donald E. Knuth: \textit {The \TeX book}; Addison Wesley, 1984. \end \ETC.
! File ended while scanning use of \BR@@bibitem.
<inserted text>
\par
<*> knuth
?
What happened? Package hyperref
(or more precise package backref
, which is loaded by hyperref
) wants to get at the end of the bibliography entry to add the back reference list. But the syntax in LaTeX only provides the beginning of the entry by \bibitem
, the end can be anywhere. In this emergency package backref
has added a restriction that \bibitem
has to end the entry with an empty line. Then the package can redefine \bibitem
to put the back references at the end of the entry.
Since the empty line is missing, TeX keeps looking for it, but found the end of file instead and issues the error message.