Latex biblatex: bibliography titles aren't doing a break line, they overflow instead [ ]
Asked Answered
C

2

8

I recently discovered a problem in my bibliography and I somehow can't solve it. It's appearing when the titles are too long, but its working with URLs normally as you see in the 2nd example as long the as the title is short enough.

It seems that symbols like "[]" beeing generated from something and the log is giving me 2x Overfull \hbox (X pt too wide) in paragraph.

generated latex document

setup: document.tex and bib/literature.bib

settings: pdfLatex (using biber and texindy)

Minimal example:

\documentclass[
    11pt,
    a4paper
]{scrreprt}

% add bibliography
\usepackage[style=alphabetic, sorting=anyt]{biblatex}
\addbibresource{bib/literature.bib}

\usepackage[colorlinks, urlcolor=blue]{hyperref}

\begin{document}
    \cite{Gaedke}
    \cite{IOT}

    \printbibliography
\end{document}

literature.bib

@online{Gaedke,
    author = {Gaedke, Martin and Heil, Andreas},
    title = {{GET /dgs HTTP/1.1 Host: www.WebComposition.net.}},
    url = {http://www.mendeley.com/research/dgs-http11-host-wwwwebcompositionnet/},
    urldate={2018-08-19}
}
@online{IOT,
    author = {Litzel, Nico },
    title = {Was ist das Internet of Things?},
    url = {https://www.bigdata-insider.de/was-ist-das-internet-of-things-a-590806/},
    urldate={2018-08-19}
}
Ctn answered 19/8, 2018 at 21:48 Comment(0)
P
8

According to the biblatex documentation:

biburlnumpenalty: If this counter is set to a value greater than zero, biblatex will permit linebreaks after numbers in all strings formatted with the \url command from the url package. This will affect urls and dois in the bibliography. The breakpoints will be penalized by the value of this counter. If urls and/or dois in the bibliography run into the margin, try setting this counter to a value greater than zero but less than 10000 (you normally want to use a high value like 9000). Setting the counter to zero disables this feature. This is the default setting.

So, you can add:

\usepackage[style=alphabetic, sorting=anyt]{biblatex}
\addbibresource{bib/literature.bib

% If you want to break on URL numbers
\setcounter{biburlnumpenalty}{9000}
% If you want to break on URL lower case letters
\setcounter{biburllcpenalty}{9000}
% If you want to break on URL UPPER CASE letters
\setcounter{biburlucpenalty}{9000}
Polystyrene answered 20/11, 2018 at 8:23 Comment(0)
R
0

There are two separate issues:

Robins answered 24/11, 2018 at 11:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.