I was using the code from this solution to add margin notes in color boxes next to the text in my document. When they are called "too close" to the bottom of the page they don't show at all. The problem seems to be specific to the book class (my example does not fail if I change the class to article). My guess is that they are printing outside the margins of the page but I'm not getting any warnings about overfull or underfull boxes. I tried passing "floatplacement=ht" but it didn't do anything. Any thoughts on how to fix this?
\documentclass[dvipsnames,11pt]{book}
\usepackage[margin=3.5cm,marginparwidth=3cm, marginparsep=4mm]{geometry}
\usepackage{lipsum}
\usepackage{marginnote} % Margin notes
\usepackage[many]{tcolorbox}
% Highlighted notes
\newcounter{mynote}
\newtcolorbox[use counter=mynote]
{mynote}[1][]
{floatplacement=ht
title=Highlight~\thetcbcounter,
width=2.6cm,
left=0pt,
right=0pt,
fonttitle=\bfseries\color{Black},
colframe=Goldenrod,
colback=Goldenrod!10,
#1
}
\newcommand\Highlight[3][]{%
\marginnote[#1]{%
\makebox[0pt][l]{\begin{mynote}[label=#3]
#2
\end{mynote}}}%
}
\begin{document}
\lipsum*[3]
\lipsum*[3]
\lipsum*[3]
\lipsum*[3]
\lipsum*[3]\Highlight{Text.}{label}
\lipsum*[3]
\lipsum*[3]
\end{document}