# Marginnotes and tcolorbox problem

Does \marginnote mess a little when it comes to tcolorbox? I have adapted some code from this other question and the first box renders fine, but the following ones are a disaster. I've struggled a little to reproduce the issue as in my tex file it doesn't happen inmediately after the first marginnote. There are also other effects I don't take into account in the following MWE, for example, sometimes the marginnote is discarded completely (but if it has a counter, it runs over).

\documentclass[twoside,a4paper]{tufte-handout}
\usepackage{etoolbox}%
\usepackage{blindtext}%
\usepackage[tikz]{bclogo}%
\usepackage[skins,breakable]{tcolorbox}%
\usepackage{marginfix}
\newtcolorbox[auto counter]{myexample}{
breakable,
skin= enhanced,
colframe=red!20!white,
interior hidden,
coltitle=black,fonttitle=\bfseries,title={Example \thetcbcounter},
overlay unbroken and first={\node[inner sep=0pt] (logo) at ([xshift=4mm,yshift=-5mm]frame.north west) {\bcinfo};
\draw[red,line width=3.5pt] (logo) -- ([xshift=4mm,yshift=1.5mm]frame.south west);  },
overlay middle and last={\draw[red,line width=3.5pt] ([xshift=4mm,yshift=-1.5mm]frame.north west) -- ([xshift=4mm,yshift=1.5mm]frame.south west); },
}

\begin{document}

\section{First}

\marginnote{
\begin{myexample}
Bla bla Bla bla Bla bla Bla bla Bla bla $5x^2 + 2x + 3$ Bla bla la $x$ Bla bla Bla bla Bla bla
$5\cdot 10^2 + 2\cdot 10 + 3 = 523$
Bla bla Bla bla Bla bla Bla bla Bla bla
\end{myexample}}

\blindtext[4]

\marginnote{
\begin{myexample}
\blindtext
\end{myexample}}

\blindtext[4]

\marginnote{
\begin{myexample}
Bla bla Bla bla Bla bla Bla bla Bla bla $5x^2 + 2x + 3$ Bla bla la $x$ Bla bla Bla bla Bla bla
$5\cdot 10^2 + 2\cdot 10 + 3 = 523$
Bla bla Bla bla Bla bla Bla bla Bla bla
\end{myexample}}

\blindtext[4]

\blindtext[4]
\marginnote{
\begin{myexample}
\blindtext
\end{myexample}}

\blindtext[4]
\blindtext[4]

\end{document}


• Imho a breakable tcolorbox inside a marginnote is madness. – Ulrike Fischer Nov 26 '14 at 18:34
• Arff, well, one more day learning something. Thanks. – Pablo B. Nov 26 '14 at 18:46