Page 394 of the memoir manual provides a snippet by Bastian Veelo for making margin comments out over the part of the stock paper that would be cut away. This very handy for making comments only appearing in the draft.

However if I want to comment a float like for example a figure it complains about not being in outer par mode. How can I adopt the code:


{%% do not interfere with settings for other marginal notes 
\marginpar{\flushleft\textbf{\textit{\HUGE !\ }}\small #1}% 
\settowidth{\draftnotesignwidth}{\textbf{\textit{\HUGE\ !}}}% 
\marginpar{\raggedleft\makebox[0pt][r]{%% hack around
}% \fi
\parbox[t]{\draftnotewidth}{%%%%%%%%% funny behaviour 
}}\textbf{\textit{\HUGE\ !}}%
}\@esphack} \else
\newcommand{\draftnote}[1]{\@bsphack\@esphack} \fi

\draftnote{Lorem ipsum}

to work also with floats?

  • 2
    \marginpars are floats, and TeX doesn't allow floats inside floats. (Thanks to egreg for the tip.) Use the marginnote package and its command of the same name to define a new \draftnote command from scratch. – lockstep Aug 29 '11 at 14:56
  • 2
    why? memoir has several other margin writing macros, like \sidepar and friends. Several of these are not floats and thus can be used within floats. – daleif Aug 30 '11 at 8:05
  • @daleif: I stand corrected. I should have said: \draftnote won't work, but chances are high the memoir authors have come up with another command tailor-made for your problem. – lockstep Aug 30 '11 at 22:21
  • @lockstep: Okey, that sounds promising. Only remains finding such a tailor-made command then :) – jonalv Aug 31 '11 at 8:57

You can take the \marginnote macro from the marginnote package. It produces something similar to \marginpar, but it is not a float. I made a small example. In principle you should be able to replace the two \marginpars with \marginnotes, but the upper code does not work for me, even if the \draftnote command is outside of the figure environment, so I could not try that.

enter image description here


\marginnote{This is a comment}
\caption{I am a caption}
  • I fail to see in what way this is relevant for my problem. I wanted to put a margin comment at the same height as a float found inside the textblock area. Such a comment would not be a graphic and it would not have a figure caption. Am I missing something? – jonalv Oct 24 '11 at 13:58
  • I hope this is what you were asking for now. – Andy Oct 24 '11 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.