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.

Home Page:https://github.com/fmarotta/kaobook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shifted `\sidecite`s overlap

AlexanderZeilmann opened this issue · comments

Description

When shifting two subsequent \sidecites they will overlap although the nonshifted sidecites did not.

Minimal Working Example

\documentclass{kaobook}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{kaobiblio}
\usepackage{kaotheorems}
\usepackage{kaorefs}

\addbibresource{test.bib}

\begin{document}

\title{Bug Report}
\author{Author}
\date{\today}

\frontmatter
\maketitle
\mainmatter
\setchapterstyle{kao}

\chapter{First Chapter}
\blindtext

\sidecite{Book}
\sidecite{Article}

\blindtext

\sidecite[3cm]{Book}
\sidecite[3cm]{Article}

\blindtext

\end{document}

And the test.bib file

@article{Article,
	author = {LastName, FirstName},
	title  = {{{Article Title}}},
	date   = {2022}
}

@book{Book,
	author = {LastName, FirstName},
	title  = {{{Book Title}}},
	date   = {2022}
}

Expected behavior:
Each of the citations should be shifted down by 3cm and not overlap.

Actual behavior:
The citations overlap, see bottom right of the screenshot.
Bildschirmfoto 2022-06-03 um 10 21 52

I don't think that this is an actual bug. Specifying the distance between the citation and the citeside does not set automatically the distance between sidecites. In other words, '\sidecite[3cm]{key}' forces the sidecite to be 3cm lower than the in-text citation, regardless whether other sidecites exist or not.

I think that the best you can do is to leave some space, something like '\sidecite[3cm]{key1]', '\sidecite[3.05cm]{key2}' (I haven't tested, though)

Interesting. I agree with @yordiak .. to be more explicit, my guess is that non-floating margin stuff (such as sidecites when you specify an offset) has an 'anchor' in the main text, and in this case, because there is no actual content between the two \sidecites, they both have the same anchor, so when you shift them, they both shift 3 cm with respect to the same point. I think it would be different if you added a \par or some other vertical space in between the two.

But at any rate, I think the best way to solve the problem would be to put both keys in the same sidecite, e.g. \sidecite[3cm]{Book,Article}, no?