fmarotta / kaobook

A LaTeX class for books, reports or theses based on https://github.com/kenohori/thesis and https://github.com/Tufte-LaTeX/tufte-latex.
https://github.com/fmarotta/kaobook
LaTeX Project Public License v1.3c
858 stars 184 forks source link

Margin citation alignement issue #169

Closed enricostragiotti closed 3 years ago

enricostragiotti commented 3 years ago

Prerequisites

Description

Hi Federico,

I've noticed some problems with the alignement of the sidecite command in kaobook. All the citations of my document have a vertical offset of half line (see attached image).

image

To try fixing the problem and hoping that the \sidecite command worked as the \marginnote command, I've added a vertical offset as optional argument . I'm aware that in your documentation you wrote that at the moment there's no way to offset vertically the sidecite. The first two citations are obtained with \sidecite{wu_topology_2021,wu_design_2021}, while the latter with \sidecite[*0]{wu_design_2021}. The second citation is perfectly aligned, but it's not a float any more and changed the font size (??).

I've made some changes to the {\formatmargincitation} command, but I don't think that they can influence the positioning of the float. Here's what I've written:

% add citenum to show only the citation number
\DeclareCiteCommand{\citenum}
  {}
  {\printfield{labelnumber}}
  {}
  {}
\NewDocumentCommand{\formatmargincitation}{m}{% The parameter is a single citation key
\textcolor{OliveGreen}{\citenum{#1}.} \textcolor{black!60}{\citeauthor*{#1} (\citeyear{#1}), \textit{\citetitle{#1}}}
}

I tried to play as well with the \renewcommand{\marginnotevadjust}{xxx} command, but I hardly saw any change.

I'm compiling the document in windows, VS code, MiKTeX and latexmk environment by the way.

What I'm missing here? Have you got any idea why the \sidecite command is working properly when it's not a float? I do know that in your examples everything is working correctly..

fmarotta commented 3 years ago

Hi, thanks for reporting this. Apparently the problem is solved by not loading the marginfix package. I'll push a fix shortly, please let me know if the problem is solved for you as well.