Context: Since my bibliography is constituted of 200+ entries, I want to add margin-notes at each new letter to split the bibliography alphabetically. (I.e., print a "B" in the margin next to the first entry whose author's name starts with B, etc.)
My document uses a KOMA-script class and I use biblatex.
For this, I almost successfully adapted Ulrike Fischer's solution proposed for How to split the bibliography alphabetically?.
Problem: I use KOMA-script's \marginline{<text>} to print text in the margin. However, using this command at the beginning of a paragraph creates a margin-note... that is vertically aligned with the last line of previous paragraph. I thus need to use a \raisebox{-\baselineskip}{<text>} to properly align the marginnote, as shown below.
However, when I do the same in the bibliography, the margin-note is too much "de-raised":
Question: What is the right length to use for lowering the margin note? (and why is it different from \baselineskip?)
Bonus question: The current margin note is a letter with the same font size as the bibliography. I might want to increase its size. The question would be then: How to vertically align the top of the margin note with the top of the relevant bibliographical entry?

MWEB
\documentclass[twoside]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[%
backend=biber, %use biber as processing program
bibstyle=authoryear, %how is LoR organized
sorting=nyt, %how are entries sorted in the LoR
]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{filecontents}
%% Adaptation of Ulrike Fischer's solution https://tex.stackexchange.com/a/150176/64454
\makeatletter
\bibinitsep=1sp %to trigger blx@initsep
\def\blx@initsep{%
\blx@imc@iffieldundef{sortinit}
{}
{%
\ifnum\c@instcount>\@ne
\blx@imc@iffieldequals{sortinit}\blx@previnit
{}
{\marginline{\raisebox{-\baselineskip}{\sffamily\bfseries\printfield{sortinit}}}}
\fi
\global\let\blx@previnit\abx@field@sortinit%
}%
}
\makeatother
%% End of solution
\begin{filecontents}{\jobname.bib}
@InBook{Azerty,
author = {Paul Azerty and Doe, John and Musterman, Erika},
title = {Lorem ipsum dolor sit amet, consectetur adipiscing elit.},
chapter = {Cras bibendum leo mauris, a ornare dolor rutrum egestas.},
publisher = {Donec consequat},
Url = {http://dx.doi.org/10.007/1234567890987654321},
year = 2010}
@Book{Aqsdfgh,
author = {Paul Aqsdfgh and Musterman, John and Doe, Erika},
title = {Mauris bibendum diam lorem},
publisher = {Aliquam},
year = 2010}
@Article{Awxcvb,
Title = {In euismod est eget urna euismod, cursus tincidunt odio dignissim.},
Author = {Paul Awxcvb and Musterdoe, Jerika and Dann, Eron},
Journal = {Maecenas pharetra},
Year = {2010},
Number = {13},
Pages = {13--17},
Publisher = {Pellentesque},
Url = {http://dx.doi.org/10.007/1234567890987654321},
Volume = {17},
}
@InBook{Bzerty,
author = {Paul Bzerty and Doe, John and Musterman, Erika},
title = {Lorem ipsum dolor sit amet, consectetur adipiscing elit.},
chapter = {Cras bibendum leo mauris, a ornare dolor rutrum egestas.},
publisher = {Donec consequat},
year = 2010}
@Book{Bqsdfgh,
author = {Paul Bqsdfgh and Musterman, John and Doe, Erika},
title = {Mauris bibendum diam lorem},
publisher = {Aliquam},
Url = {http://dx.doi.org/10.007/1234567890987654321},
year = 2010}
@Article{Bwxcvb,
Title = {In euismod est eget urna euismod, cursus tincidunt odio dignissim.},
Author = {Paul Bwxcvb and Musterdoe, Jerika and Dann, Eron},
Journal = {Maecenas pharetra},
Year = {2010},
Number = {13},
Pages = {13--17},
Publisher = {Pellentesque},
Volume = {17},
}
@InBook{Dzerty,
author = {Paul Dzerty and Doe, John and Musterman, Erika},
title = {Lorem ipsum dolor sit amet, consectetur adipiscing elit.},
chapter = {Cras bibendum leo mauris, a ornare dolor rutrum egestas.},
publisher = {Donec consequat},
year = 2010}
@Book{Dqsdfgh,
author = {Paul Dqsdfgh and Musterman, John and Doe, Erika},
title = {Mauris bibendum diam lorem},
publisher = {Aliquam},
year = 2010}
@Article{Dwxcvb,
Title = {In euismod est eget urna euismod, cursus tincidunt odio dignissim.},
Author = {Paul Dwxcvb and Musterdoe, Jerika and Dann, Eron},
Journal = {Maecenas pharetra},
Year = {2010},
Number = {13},
Pages = {13--17},
Publisher = {Pellentesque},
Volume = {17},
}
@InBook{Kzerty,
author = {Paul Kzerty and Doe, John and Musterman, Erika},
title = {Lorem ipsum dolor sit amet, consectetur adipiscing elit.},
chapter = {Cras bibendum leo mauris, a ornare dolor rutrum egestas.},
publisher = {Donec consequat},
year = 2010}
@Book{Zqsdfgh,
author = {Paul Dqsdfgh and Musterman, John and Doe, Erika},
title = {Mauris bibendum diam lorem},
publisher = {Aliquam},
year = 2010}
@Article{Zwxcvb,
Title = {In euismod est eget urna euismod, cursus tincidunt odio dignissim.},
Author = {Paul Zwxcvb and Musterdoe, Jerika and Dann, Eron},
Journal = {Maecenas pharetra},
Year = {2010},
Number = {13},
Pages = {13--17},
Publisher = {Pellentesque},
Volume = {17},
}
\end{filecontents}
\usepackage[francais]{babel}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\marginline{Too high}
\lipsum[2]
\marginline{\raisebox{-\baselineskip}{Good}}
\lipsum[3]
\newpage
\nocite*
\printbibliography
\end{document}




