0

I wrote the following reference in my .bib file through Mendeley:

\begin{thebibliography}{2}
\providecommand{\natexlab}[1]{#1}
\providecommand{\url}[1]{\texttt{#1}}
\expandafter\ifx\csname urlstyle\endcsname\relax
  \providecommand{\doi}[1]{doi: #1}\else
  \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi

\bibitem[Reichstein et~al.(2019)Reichstein, Camps-Valls, Stevens, Jung,
  Denzler, Carvalhais, and Prabhat]{Reichstein2019}
Markus Reichstein, Gustau Camps-Valls, Bjorn Stevens, Martin Jung, Joachim
  Denzler, Nuno Carvalhais, and Prabhat.
\newblock {Deep learning and process understanding for data-driven Earth system
  science}.
\newblock \emph{Nature}, 566:\penalty0 195--204, 2019.
\newblock ISSN 0028-0836.
\newblock \doi{10.1038/s41586-019-0912-1}.
\newblock URL \url{www.nature.com/nature}.

\end{thebibliography}

Because of this reference, LaTeX gave me a warning:

underful \hbox (badness 1158)

I believe the cause of this error is the name of the last author. He has a single word name. If I put some word as his last name, latex gave me no error.

How can I solve this error without modifying his name for his honor?

3
  • It would be better you show us a short compilable tex code building your bibliography and add the complete used bib entry from your menderly file to your question. Your shown *.bbl file is compiled, we have to guess what you did in the tex code I mentioned before ...
    – Mensch
    Jun 20 '19 at 21:45
  • Thanks for your suggestion. I should have well learned how to ask questions here before I did.
    – T. B.
    Jun 20 '19 at 21:51
  • Well, it is not to late to add the mentioned informations :-) You can edit your question!
    – Mensch
    Jun 20 '19 at 23:05
1

The bib-label cannot spann over multiple lines. I would remove all the names from the bib-label and put them afterwards:

\documentclass{article}

\begin{document}

\cite{Reichstein2019}


\begin{thebibliography}{2}
\providecommand{\natexlab}[1]{#1}
\providecommand{\url}[1]{\texttt{#1}}
\expandafter\ifx\csname urlstyle\endcsname\relax
  \providecommand{\doi}[1]{doi: #1}\else
  \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi

\bibitem[Reichstein et~al.(2019)]{Reichstein2019}
Markus Reichstein, Gustau Camps-Valls, Bjorn Stevens, Martin Jung, Joachim
  Denzler, Nuno Carvalhais, and Prabhat.
\newblock {Deep learning and process understanding for data-driven Earth system
  science}.
\newblock \emph{Nature}, 566:\penalty0 195--204, 2019.
\newblock ISSN 0028-0836.
\newblock \doi{10.1038/s41586-019-0912-1}.
\newblock URL \url{www.nature.com/nature}.

\end{thebibliography}

\end{document}

enter image description here

1
  • Thank you for your quick answer. I tried your code on my Texstudio, but still got an error. The error is 'line 16 underfull \hbox (badness5519) in paragraph'.
    – T. B.
    Jun 20 '19 at 21:42
0

It's not an error: just warning you that tex stretched the inter-word spaces a bit to much on that line. You could simply ignore it. 1158 is not that bad: Normally latex doesn't warn if badness is under 1000, so you could set

\hbadness=1200

before your bibliography and it won't warn about this either.

2
  • while this is true in general, your particular case of an et al shortened list followed by the full name list looks very strange, is that really the output you want? I may delete this answer as it just answers the tex issue rather than the content (as you did not provide a usable example) Jun 20 '19 at 21:43
  • Thank you for your help. I changed the badness number and it worked. Honestly, I did not care the strange 'et al' which were generated by Mendeley automatically.
    – T. B.
    Jun 20 '19 at 21:46

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.