3

I am tying to customly set the font size of my bibliography with biber. I found a solution here that works for the standard defined fontsizes \small, \large etc. When I use \fontsize{size}{skip} however only certain fields are affected by the changed font size, see pdf output: How can I solve this? Thank you in advance.

MWE:

\documentclass{scrartcl}
\usepackage[backend=biber]{biblatex}
\usepackage{filecontents}
\addbibresource{mybib.bib}

\begin{filecontents}{mybib.bib}
@article{greenwade93,
    author  = "George D. Greenwade",
    title   = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
    year    = "1993",
    journal = "TUGBoat",
    volume  = "14",
    number  = "3",
    pages   = "342--351"
}
@book{goossens93,
    author    = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
    title     = "The LaTeX Companion",
    year      = "1993",
    publisher = "Addison-Wesley",
    address   = "Reading, Massachusetts"
}
\end{filecontents}

\begin{document}
    \nocite{*}
    \AtNextBibliography{\fontsize{15}{18}}
    \printbibliography
\end{document}
4

You need to add \selectfont after your \fontsize{}{} invocation.

I strongly prefer \bibfont over \AtBibliography or \AtNextBibliography for font changes. Of course \bibfont applies to all bibliographies, so that will only work in case you only have one bibliography (or several and you want to increase the font size for all of them). \AtNextBibliography is really only a good idea if you have several bibliographies and you want to have stuff apply only to one specific bibliography.

The great advantage of \bibfont is that it applies to the label width measuring. If you use \AtNextBibliography{\fontsize{15}{18}\selectfont} you'll find that the second lines of your bibliography entries are not perfectly aligned with the first line. That is because in that case the label width is calculated using the normal document font size. If you use \bibfont biblatex will use that font size to measure the label width.

\documentclass{scrartcl}
\usepackage[backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}

\renewcommand*{\bibfont}{\fontsize{15}{18}\selectfont}

\begin{document}
  \nocite{sigfridsson,worman}
  \printbibliography
\end{document}

Bibliography in large font size


Compare \renewcommand*{\bibfont}{\fontsize{15}{18}\selectfont}

The lines in the bibliography entries line up perfectly.

with \AtNextBibliography{\fontsize{15}{18}\selectfont}

The first line of each bibliography entry is just a tad too far to the right.

  • Thank you, I was missing the \selectfont command. That's why renewing \bibfont (which I tried before too) didn't work either – Jonathan Feb 15 at 13:26

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.