The Problem
When I insert a \todo with one or more lines of text, the text shifts a bit down due to inserted \par.
MWE
This example is only partially minimal in case parts like memoir impact the problem.
\documentclass{memoir}
\usepackage{todonotes}
\copypagestyle{mystyle}{headings}
\makeevenhead{mystyle}{\thepage}{}{\rightmark}
\makeoddhead{mystyle}{\rightmark}{}{\thepage}
\makeevenfoot{mystyle}{}{hello}{}
\makeoddfoot{mystyle}{}{hello}{}
\pagestyle{mystyle}
\makeheadrule{mystyle}{\textwidth}{\normalrulethickness}
\begin{document}
\chapter{the chapter}
{%
\thispagestyle{mystyle}
\clearpage
\todo{this is my todo\it has several\lines}
\section{mysection}
blah blah
}%
\clearpage
\pagestyle{plain}
{%
\thispagestyle{mystyle}
\clearpage
\section{mysection}
blah blah
}%
\end{document}
The Question
How do I prevent this such that the spacing is always consistent (like section 1.2 rather than section 1.1 in the MWE)?
\todois equivalen to\hbox{}. It takes up no horizontal space, but by itself will create a line of text.\vspace{-\baselineskip}will help. I would put the\todoinside the section name (but not the optional short name). – John Kormylo Dec 23 '22 at 23:46\todoitems will not be part of the final version of the document, so why bother about pagination and spaces when the document is not yet in final form? To the contrary, if the parts you're inserting with\todoare probably just margin paragraphs (maybe decorated). – egreg Dec 24 '22 at 13:42\todooutside of its intended purpose, but I am always open to learning about a new tool. I originally tried usingmarginnotesand\marginpar, but I had trouble getting the decorations I wanted (not pictured in the MWE for this question). I switched totodonotessince it had more and more user-friendly options built in. I remember having similar problems with paragraph spacing in the other two options I tried. – WesH Dec 24 '22 at 19:16\baselineskipdoes not shift the section heading correctly, possibly due to the issue here. Using\vspace{-30pt}for the MWE gets me close, but this does not have the automagic quality for me doing weird things in the\todonot mentioned in the MWE. See comment above about me doing silly things. – WesH Dec 24 '22 at 19:33\section. You can achive the same affect using\csname @minipagetrue\endcsnamebut it is still slightly off. But as @egreg noted, why bother when it is going to be removed eventually? – John Kormylo Dec 24 '22 at 21:59