0

I am using biblatex and biber to create the bibliography of my thesis. I am also using kpfonts.

I noticed that in almost every entry of my bibliography there is one line in which a symbol or letter extends over the right border. Take a look:

enter image description here

This problem only occurs in the bibliography section of the document, all normal text paragraphs have proper edges. The problem also does not occur when I am not using kpfonts.

Therefore I am concluding that the problem lays in the interplay of biblatex with kpfonts. Probably biblatex is using a different font internally to determine the spacing?

Here are the relevant code lines:

\documentclass[a4paper,12pt]{book}
\usepackage[nomath]{kpfonts}
\usepackage[backend=biber,style=numeric,citestyle=numeric-comp,bibencoding=utf8,url=false]{biblatex}
\addbibresource{../literature/combined.bib}
...
\begin{document}
...
\addcontentsline{toc}{chapter}{Bibliography}
\setcounter{biburllcpenalty}{7000}
\setcounter{biburlucpenalty}{8000}
\printbibliography

Who has an idea how to solve this?

4
  • 1
    my first try would be \usepackage{microtype}. May 18 '20 at 9:04
  • I had not heard of microtype before, but it did the trick. All problems are solved. How do I mark this question as solved when there is only a comment?
    – terri
    May 18 '20 at 9:09
  • For more help on line breaks in the bibliography see tex.stackexchange.com/q/442308/35864.
    – moewe
    May 18 '20 at 15:39
  • 1
    Not relevant to the question, but style=numeric,citestyle=numeric-comp, is equivalent to the shorter style=numeric-comp,. Usually bibencoding=utf8, is not needed, since the encoding can be inferred from the document (and you probably want to use UTF-8 for both the .tex and .bib file). You can (and should) remove \addcontentsline{toc}{chapter}{Bibliography} in favour of adding heading=bibintoc to the \printbibliography call: \printbibliography[heading=bibintoc]. Usually I would put the \setcounter lines in the preamble.
    – moewe
    May 18 '20 at 15:42
3

Try \usepackage{microtype}, it allows fonts to stretch a bit and so can often help in such cases.

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.