[Tex/LaTex] Margin notes on both left and right

marginparmargins

I've been trying to put margin notes in both the left and the right margins at the same time. My attempts have gone something like:

Lorem{\reversemarginpar\marginpar{Left}} ipsum {\normalmarginpar\marginpar{Right}} dolor sit amet, consectetuer adipiscing elit.

But here both notes appear in the right margin. I would be very grateful for ideas on how to solve this.

Best Answer

You cannot change the margin for side notes within the same paragraph.

Therefore you can wait until the next paragraph to do that, or use \marginnote (found in the marginnote package) instead of \marginpar. In this way, even the same note can write different texts depending on which margin appear:

MEW

\documentclass{article}
\usepackage{xcolor}
\usepackage{marginnote}
\begin{document}

\newcommand\Right{\textcolor{red}{(Right) Lorem ipsum  dolor sit amet}}
\newcommand\Left{\textcolor{cyan}{(Left) Lorem ipsum  dolor sit amet}}


\section*{Two \texttt{marginpar} in the same paragraph} 

Lorem \reversemarginpar\marginpar{\Left}
ipsum  dolor sit amet, consectetuer adipiscing elit.\normalmarginpar\marginpar{\Right} Ut purus elit\ldots
\vspace{2cm}


\subsection*{Two \texttt{marginpar} in separate paragraphs} 

Lorem \reversemarginpar\marginpar{\Left}
ipsum  dolor sit amet, consectetuer adipiscing elit.\par\normalmarginpar\marginpar{\Right} Ut purus elit\ldots
\vspace{1cm}

\subsection*{Two \texttt{marginnotes} in the same paragraph} 

\renewcommand*{\raggedleftmarginnote}{\flushleft}

Lorem \reversemarginpar\marginnote{\Left} ipsum  dolor sit amet, consectetuer adipiscing elit.\normalmarginpar\marginnote{\Right}
Ut purus elit\ldots
\vspace{1cm}

\subsection*{One \texttt{marginnote} with and without \texttt{reversemarginpar}} 


Lorem \reversemarginpar\marginnote[\Left]{\Rigth} ipsum  dolor sit amet, consectetuer adipiscing elit.\normalmarginpar\marginnote[\Left]{\Right}
Ut purus elit\ldots


\end{document}