-
-
Notifications
You must be signed in to change notification settings - Fork 206
Open
Description
Description
When using marginnote with kaobox, Latex throws errors.
Minimal Working Example
\documentclass[12pt]{kaobook}
\begin{document}
\begin{kaobox}[title=Some title]
\blindtext[1]
\marginnote{This is a note in the margin related to the content inside the case environment.}
\newline
\blindtext[1]
\end{kaobox}
\end{document}Expected behavior:
The above Latex code compiles without error and the margin notes are rendered when using kaobox
Actual behavior:
When compiling the code above, I receive the following error:
Example2.tex: error: 10: Float(s) lost. \end{document}
Additional Information
Upon looking into the kao.sty, the issue seems to appear from these lines of code:
% Redefine the command to print marginnotes:
% (a) the optional offset argument goes at the first position
% (b) the offset can also be a multiple of baselineskip, like for snotez's \sidenote
% Usage: \marginnote[<offset>]{Text of the note.}
\let\oldmarginnote\marginnote%
\RenewDocumentCommand\marginnote{ o m }{%
\IfNoValueOrEmptyTF{#1}{%
\IfInFloatingEnvir{%
\oldmarginnote{#2}%
}{%
\marginpar{\@margin@par#2}%
}%
}{%
\oldmarginnote{#2}[\kao@if@nblskip{#1}{\@cdr#1\@nil\baselineskip}{#1}]%
}%
}Marginpar seems to be the prime suspect here.
@fmarotta: Any workarounds to circumvent this issue?
Thanks in advance!
Metadata
Metadata
Assignees
Labels
No labels