I'm trying to move the alphabetical category headers into the left marginpar. I followed this post for ordering the bibliography alphabetically and that worked well. I was able to use marginpar instead of a section header, but they appear in the wrong line and there is additional space between the categories. The relevant code is
\renewcommand*{\do}[1]{\defbibheading{#1}{\marginpar[left]{\hfill #1}}}
It does make sense that the marginpar floats on the previous line, as that's where bibheading is called, but I cannot make sense of the spacing. There does not seem to be any combination of \baselineskip, \bibitemsep or \bibinitsep of vspace between the categories. When I move the marginpar down by adding a \vspace{FANTASY_DIM} it only sporadically lines up with the first category entry.
This is the atrocity that my current code produces:
I want the category marginpars to line up with it's first entry and even spacing between all the bibliography entries (no extra space between categories). For my bibliography I currently use biblatex with the natbib=true option-


biblatexcore source code (biblatex.sty), but for many applications it can be useful to have a short look at the style definitions (biblatex.def,standard.bbx, ...). The documentation mainly documents the package interface, which may not always be enough to know what exactly one has to do to change the style output. – moewe Nov 29 '20 at 11:28