BibTeX, biblatex and biberCan't clearpage before bibliography

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
flo12392
Posts: 2
Joined: Mon Sep 15, 2014 4:38 pm

Can't clearpage before bibliography

Post by flo12392 »

Dear all,

I am currently writing my thesis but I have encountered an issue to which I cannot find a solution. I can not use a \clearpage before my bibliography anymore. If i do so, I get the error:

Code: Select all

Error - Line 1 - !LaTeX Error: Something's wrong--perhaps a missing \item. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help... \begin{thebibliography}{20}.
If I remove the \clearpage statement before the biliography statement, the error disappears and the article compiles correctly. Currently, the code for including my bibliography looks as follows:

Code: Select all

\clearpage
\bibliographystyle{plainnat}
\bibliography{references}
\clearpage
Does anyone have an idea what might cause this issue?
Thanks in advance,
Florian
Last edited by Stefan Kottwitz on Mon Sep 15, 2014 7:07 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Can't clearpage before bibliography

Post by Stefan Kottwitz »

Hi Florian,

welcome to the forum!

I think the \clearpage before the bibliography is not the cause of the error, even though you suspect it. The bibliography is produced by several compiler runs (produce the aux file and the bbl file, read the bbl file in and write another aux, ...) so it may seem unclear what the actual cause is, especially if an error occurs not when it's caused but on another tun with another change.

Perhaps post you .bbl file here. The best would be a Infominimal working example. Just try to provide the information you think would allow us to reproduce the problem.

Stefan
LaTeX.org admin
flo12392
Posts: 2
Joined: Mon Sep 15, 2014 4:38 pm

Can't clearpage before bibliography

Post by flo12392 »

Thank you for your quick answer. You were correct in mentioning that the bibliography itself was not the cause of the problem. Somewhere else in my article I used the following code to move an image slightly to the right:

Code: Select all

\captionsetup{width=1\textwidth}
\begin{figure}[H]
\center
\hbox{\hspace{10ex}\includegraphics[scale=.62]{performanceperfactor.pdf}}
\caption{{The average percentage gap between the best know solution for an instance and the solution that was found by the final heuristic per factor.}}
\label{fig:performancebarplot}
\end{figure}
removing the hbox around the Figure resolved my issue. Still no idea why exactly this causes an error when combined with the \clearpage, since the statements are three pages apart, but I can live with that. Thanks for pointing me in the right direction ;)

Regards,
Florian
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Can't clearpage before bibliography

Post by Johannes_B »

A short hint, the command should be \centering.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Can't clearpage before bibliography

Post by Stefan Kottwitz »

In addition to Johannes hint, perhaps see \center vs. \centering. \center is actually \begin{center} and produces additional vertical space.

Stefan
LaTeX.org admin
Post Reply