# How to get the right \baselinskip in the annotation with authortitle-dw and smaller font

If I change the font size of the annotations in my bibliography the size changes but the baseline skip doesn’t. I know that TeX uses the last font in a paragraph to calculate the baseline skip, but I don’t know how I can fix this problem.

At this image it’s obvious that the annotations is set with a too big skip.

\documentclass{article}

\usepackage[%
backend=biber,
style=authortitle-dw,
annotation=true,
]{biblatex}

% extreme values make the problem obvious
\renewcommand{\annotationfont}{\scriptsize}
\usepackage[textwidth=3cm]{geometry}

\begin{document}
\nocite{bertram}
\printbibliography
\end{document}


I tried to set the annotation with a \parbox with

\DeclareFieldFormat{annotation}{%
\par\vspace{-0.7\baselineskip}
}


but this leads to an extra period that I can’t delete. Furthermor it seems like a bad hack to me …
(I made \annotationfont red for the next image to make the extra period visible.)

-
+1 for the MWE. – domwass Feb 28 '12 at 13:13

There is a superfluous \finentry command in biblatex-dw’s (re)definition of the bibmacro finentry. If you delete that and put a \par into the DeclareFieldFormat command, it works. I have altered your example accordingly:

\documentclass{article}

\usepackage[%
backend=biber,
style=authortitle-dw,
annotation=true,
]{biblatex}

% extreme values make the problem obvious
\renewcommand{\annotationfont}{\scriptsize}
\usepackage[textwidth=3cm]{geometry}

\DeclareFieldFormat{annotation}{%

\renewbibmacro*{finentry}{%
\ifboolexpr{
test {\iffieldundef{annotation}}
and
test {\iffieldundef{library}}
}
{\finentry}
{\iffieldundef{library}
{}
{\ifbool{bbx:library}
\printfield{library}}
{}}%
\iffieldundef{annotation}
{}
{\ifbool{bbx:annotation}
{\iffieldundef{library}
{}
\printfield{annotation}}
{}}}}

\begin{document}
\cite{bertram,springer}
\printbibliography
\end{document}


I will take care to make this more robust in future releases of biblatex-dw, so that a simple redefinition of the \annotationfont macro will have the desired effect.

Edit: I improved the redefinition of the bibmacro finentry, so that it now also works if the fields library and annotation are both defined.

-
Thank you! It even works if I leave out the \printtext{\par} in \renewbibmacro*{finentry} since this one doubles the \par of \DeclareFieldFormat{annotation}, I guess. – Tobi Feb 28 '12 at 13:24
@Tobi, thanks for pointing to this, I just forgot to delete it after trying some things out. – domwass Feb 28 '12 at 13:31
Ah, OK. I just discovered that \printtext{\par} causes a blank line between the bib entries even if \bibitemsep is set to 0pt. – Tobi Feb 28 '12 at 13:39
@Tobi, do you still have a blank line with my edited code? – domwass Feb 28 '12 at 13:47
The new solution works as expected :-) – Tobi Feb 28 '12 at 15:33