4

BibLaTeX seems to calculate wrong indentation when I change the fontsize. The lines following the first one are a little to the left than the first line (see the red line).

Picture that shows the problem

MWE:

\documentclass[titlepage,listof=totoc,final]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[style=alphabetic,backend=biber,maxnames=4,minnames=3,maxbibnames=99,block=space,abbreviate=true,firstinits=true]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@online{GLS:datasheet,
    title = "GLS Datasheet",
    organization = "Optoelectronics Research Centre",
    howpublished = "Website",
    date = "2004-09",
    urldate = "2013-07-01",
    url = "http://www.southampton.XXXX",
    address = "Southampton, United Kingdom"
}
@article{Labadie:First_fringes,
    author = {Labadie, L. and Mart\'{\i}n, G. and Anheier, N. C. and Arezki, B. and Qiao, H. A. and Bernacki, B. and Kern, P.},
    title = {First fringes with an integrated-optics beam combiner at 10},
    DOI= "10.1051/0004-6361/201116727",
    journal = {A\&A},
    year = 2011,
    volume = 531,
    pages = "A48"
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\KOMAoptions{fontsize=12pt}
\nocite{*}
\printbibliography

\end{document}

What can be done to avoid this?

P.S.: Some texts in my theses have to be 10pt, and others (like the bibliography) 12pt. Sadly, this is given to me, and I can't do anything about it.

0

1 Answer 1

3

The computing of the length \labelalphawidth is done with the default font size. In your case 11pt. You changed the font size before \printbibliography which has no effect of the computing of \labelalphawidth. The label width is calculated under \bibfont.

The following solution was provided by Audrey in a comment

To get the correct computing by biblatex you can manipulate the command bibfont. In biblatex.def this is defined as:

 \newcommand*{\bibfont}{\normalfont\normalsize}. 

So you could use

 \renewcommand*{\bibfont}{\normalfont\changefontsizes{12pt}}

in the preamble.

With your example:

\documentclass[titlepage,listof=totoc,final]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[style=alphabetic,backend=biber,maxnames=4,minnames=3,maxbibnames=99,block=space,abbreviate=true,firstinits=true]{biblatex}
\renewcommand*{\bibfont}{\normalfont\changefontsizes{12pt}}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@online{GLS:datasheet,
    title = "GLS Datasheet",
    organization = "Optoelectronics Research Centre",
    howpublished = "Website",
    date = "2004-09",
    urldate = "2013-07-01",
    url = "http://www.southampton.XXXX",
    address = "Southampton, United Kingdom"
}
@article{Labadie:First_fringes,
    author = {Labadie, L. and Mart\'{\i}n, G. and Anheier, N. C. and Arezki, B. and Qiao, H. A. and Bernacki, B. and Kern, P.},
    title = {First fringes with an integrated-optics beam combiner at 10},
    DOI= "10.1051/0004-6361/201116727",
    journal = {A\&A},
    year = 2011,
    volume = 531,
    pages = "A48"
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\nocite{*}
\KOMAoptions{fontsize=12pt}
\printbibliography

\end{document}
3
  • Thanks, I guess there is no way to have this automatically done?... Just try something and look whether it looks better or not?
    – MrD
    Apr 12, 2013 at 19:11
  • 2
    @DL6ER The label width is calculated under \bibfont. In biblatex.def this is defined as: \newcommand*{\bibfont}{\normalfont\normalsize}. So you could use \renewcommand*{\bibfont}{\normalfont\changefontsizes{12pt}} in the preamble.
    – Audrey
    Apr 12, 2013 at 20:34
  • Hi Mro, can you please edit according to Change fontsize inside float in KOMA class
    – Johannes_B
    Jan 17, 2015 at 13:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .