1

When I put a margin not at the beginning of a paragraph, latex assumes it is at the end of the previous paragraph. I'd like the margin note to align with the top of the paragraph it is in. It seems this is possible with individual notes. How do I achieve that globally without having to put the margin note inside the text of the paragraph. Follows the MWE:

\documentclass{article}
\usepackage{lipsum}
\begin{document}

\marginpar{some note} This is what it should look like in the source code. \lipsum[1]

\marginpar{another note} Good in source code, but bad in PDF. \lipsum[2]

Cluttered\marginpar{yet another note}source code, but produces desired effect in PDF. \lipsum[3]

\leavevmode\marginpar{individual solution to be implemented globally} Would be nice, you know. \lipsum[4]

\end{document}

EDIT:

I tried with a \newcommand:

\newcommand*{\annot}[1]{
    \leavevmode\marginpar{#1}}
}

but

\annot{margintext}Text.

produces an extra indentation, so this is not the end of the solution. Actually this is the one that needs fixation.

thymaro
  • 1,507

0 Answers0