Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidenotes do not avoid each other when called inside definition #282

Open
dwarfmaster opened this issue Oct 17, 2023 · 2 comments
Open

Sidenotes do not avoid each other when called inside definition #282

dwarfmaster opened this issue Oct 17, 2023 · 2 comments

Comments

@dwarfmaster
Copy link

dwarfmaster commented Oct 17, 2023

Description

When adding two sidenotes too close to each other, kaobook manages to place them so that they avoid each other. However, if they are placed inside a definition, it seems the floating behaviour is disabled.

Minimal Working Example

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

\begin{document}
\begin{definition}
Some text\sidenote{Hello}\sidenote{World}
\end{definition}
\end{document}

Expected behavior:
I would expect Hello and World not to overlap.

Actual behavior:
Hello and World actually overlap.

@dwarfmaster
Copy link
Author

Turns out it is linked to the mdframed environment, it works as expected with framed=false.

@fmarotta
Copy link
Owner

Yep, normally the sidenotes avoid each other because they are so-called "floating". However, we turn the floating off when they are inside other floating environments (such as figures and tables) or tcolorbox environments. There is some context in #39, however I think that issue dates back to the mdframed era, that is, before we moved to tcolorbox. We should indeed check whether the "floats lost" issue of #39 still occurs with tcolorbox..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants