I am trying to build a minitoc in a marginpar. It can span several pages. Everything is fine while there is no figures on the top of the page. I need the contents to start from the top of typing area in second page.
MWE:
\documentclass{article}
\usepackage{marginfix}
\usepackage{geometry}
\textwidth=2in
\geometry{paperwidth=4in, paperheight=3in, lmargin=1cm, rmargin=4cm, bottom=1.5em, nohead}
\marginparsep=20pt
\usepackage[frame]{crop}
\usepackage{filecontents}
\begin{filecontents}{mytoc.tex}
\marginpar{This text gets written}
\marginpar{This text gets written}
\marginpar{This text gets written}
\marginpar{This text gets written}
\marginpar{This text gets written}
\marginpar{This text gets written}
\marginpar{This text gets written}
\marginpar{This text gets written}
\end{filecontents}
\begin{document}
\input mytoc.tex
some text some text some text some text some text
some text some text some text some text some text
some text some text some text some text some text
some text some text some text some text some text
some text some text some text some text some text
some text some text some text some text some text
some text some text some text some text some text
some text some text some text some text some text
some text some text some text some text some text
some text some text some text some text some text
some text some text some text some text some text
\begin{figure}
\fbox{\vbox to 2cm{\hsize=2cm \null\hfill}}
\end{figure}
\end{document}
output:
Or maybe there is a special package for margin contents?