6

I hope it's not a duplicate but I was not able to find a solution. I generate my *.bib file using Citavi. The problem is, that if the ISBN number is near the end of the line it generates overfull hboxes, because there is no automatic linebreak within the number (even not at the hyphens).

I use this header:

\usepackage[
    backend=biber, 
    style=alphabetic,
    backref=true]
{biblatex}
\DeclareNameAlias{sortname}{last-first} % Change order of names in bibliography
\DeclareNameAlias{default}{last-first}  % Change order of names in bibliography
\makeatletter   
\@ifpackageloaded{biblatex}{\addbibresource{Chapters/Bibliography.bib}}{\bibliography{Chapters/Bibliography}}
\makeatother

The entry in the *.bib file is:

@book{Hahn.2002,
 author = {Hahn, Hubert},
 year = {2002},
 title = {{Rigid Body Dynamics of Mechanisms}},
 publisher = {Springer-Verlag},
 isbn = {978-3-642-07617-6},
 volumes = {2},
 subtitle = {{1 Theoretical Basis}},
 location = {Berlin and Heidelberg and New York},
 pagetotal = {336},
 file = {http://gso.gbv.de/DB=2.1/PPNSET?PPN=77292189X}
}

which generates WithError

If I add a manual space in the number, I get the desired result

 isbn = {978-3-642- 07617-6},

WithoputError

But it would be much nicer with an automatic solution which does not produce overfull boxes.

MWE (LuaLaTex):

\documentclass[a4paper]{scrbook}
\usepackage{polyglossia}    % instead of babel
\setdefaultlanguage[]{english}
\usepackage[english]{hyperref}
\usepackage{csquotes}% Recommended: http://tex.stackexchange.com/questions/5091/what-to-do-to-switch-to-biblatex
\usepackage{fontspec}
\setromanfont{Cambria}
\setsansfont{Calibri}

\usepackage[%style=numeric-comp, backend=biber]{biblatex} 
    backend=biber, %    natbib=true,
    style=alphabetic,%trad-alpha,   
    sorting=ynt,  % year, name, title
    backref=true]
{biblatex}
\DeclareNameAlias{sortname}{last-first} % Change order of names in bibliography
\DeclareNameAlias{default}{last-first}  % Change order of names in bibliography

\begin{filecontents}{\jobname.bib}
@book{Hahn.2002,
 author = {Hahn, Hubert},
 year = {2002},
 title = {{Rigid Body Dynamics of Mechanisms}},
 publisher = {Springer-Verlag},
 isbn = {978-3-642- 07617-6},
 volumes = {2},
 subtitle = {{1 Theoretical Basis}},
 location = {Berlin and Heidelberg and New York},
 pagetotal = {336},
 file = {http://gso.gbv.de/DB=2.1/PPNSET?PPN=77292189X}
}
@book{Hahn.2012,
 author = {Hahn, Hubert},
 year = {2012},
 title = {{Rigid Body Dynamics of Mechanisms}},
 publisher = {Springer-Verlag},
 isbn = {978-3-642-07617-6},
 volumes = {2},
 subtitle = {{1 Theoretical Basis}},
 location = {Berlin and Heidelberg and New York},
 pagetotal = {336},
 file = {http://gso.gbv.de/DB=2.1/PPNSET?PPN=77292189X}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
ABC
\nocite{*}
\printbibliography
\end{document}

Thanks a lot for help!

11
  • 3
    It is a lualatex problem. It doesn't insert hyphenation points at the hyphen when numbers are involved. (I don't know why). Feb 24, 2015 at 15:01
  • 3
    @UlrikeFischer Interesting. It works if you make digits letters according to the hyphenation system (ie make them lowercase to themselves) luatex breaks 978-3-642-07617-6 if you add \lccode`0=`0 \lccode`1=`1 \lccode`2=`2 \lccode`3=`3 \lccode`4=`4 \lccode`5=`5 \lccode`6=`6 \lccode`7=`7 \lccode`8=`8 \lccode`9=`9 Feb 24, 2015 at 20:08
  • 2
    Issue reported to the LuaTeX team: tug.org/pipermail/luatex/2015-February/005074.html
    – Joseph Wright
    Feb 24, 2015 at 21:34
  • 1
    The bug report tracker.luatex.org/view.php?id=925 suggests that this issue was resolved and should have disappeared in LuaTeX 0.80.0. So I'm inclined to vote to close.
    – moewe
    Apr 5, 2015 at 16:15
  • I have updated the LuaTeX package now (miktex-luatex-bin-2.9; 3/25/2015), but the error is still the same (in my case).
    – Konne
    Apr 7, 2015 at 14:45

1 Answer 1

0

Now in TeXLive 2017 (LuaLaTeX 1.0) it is working :). Thank you all.

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.