# Why does \reversemarginpar retroactively swaps the margins of \todo command?

I used \reversemarginpar after \todo and this retroactively causes the note to go to the wrong margin. I also noted that if I put \normalmarginpar right after \reversemarginpar \marginnote{Inner Margin Note}[-1in] the todo note will go to the correct margin.

Another thing I noted is that putting \reversemarginpar before \todo command seems to not actually reverse the margin. This means that \reversemarginpar is doing pretty much the opposite of what it is supposed to do.

Here is my source code

\documentclass[notitlepage]{book}
\usepackage[no-math]{fontspec}
\usepackage[a4paper]{geometry}

\geometry{text = {0.7\paperwidth, 0.8\paperheight}}

\geometry{twoside=true, showframe=true}

\geometry{hmarginratio=2:3}

\geometry{bindingoffset=0pt}

\geometry{marginparsep=3.5mm, marginparwidth=80pt}

\geometry{vmarginratio=2:3}

\geometry{footskip=24pt}

\usepackage{marginnote}
\usepackage{marginfix}
\usepackage[svgnames]{xcolor}

\usepackage{todonotes}

\begin{document}

\newcommand{\todosample}{This text is intended as a sample for todo tests}

\paragraph{My Paragraph}
This paper proposes an improved single-diode modeling approach for PV modules suitable for a broad range of the PV technologies available today, including modules on tandem cell structures.\todo[color=yellow]{\todosample} After establishing the model (which has an overall of seven parameters), the paper devises a methodology to estimate its parameters using Standard Test Conditions (STC) data, Nominal Operating Cell Temperature (NOCT) data, and temperature coefficients values as provided in most manufacturers' datasheets. Simulation results and their comparison with a previous work show a very accurate prediction of critical points in the current-voltage characteristics curve. The precise prediction happens for both STC and NOCT conditions and the error in predicting maximum power point lies within $1\%$ limit, and the error in its corresponding voltage and current is almost always within $2\%$ limit. Further, for both maximum power point and open-circuit voltage, the statistical variance around manufacturer measurements due to temperature changes is demonstrated to be low for five various module technologies.

\paragraph{My Paragraph}
This paper proposes an improved single-diode modeling approach for PV modules suitable for a broad range of the PV technologies available today, including modules on tandem cell structures. After establishing the model (which has an overall of seven parameters), the paper devises a methodology to estimate its parameters using Standard Test Conditions (STC) data, Nominal Operating Cell Temperature (NOCT) data, \normalmarginpar \marginnote{Outer margin note}  and temperature coefficients values as provided in most manufacturers' datasheets. Simulation results and their comparison with a previous work show a very accurate prediction of critical points in the current-voltage characteristics curve. The precise prediction happens for both STC and NOCT conditions and the error in predicting maximum power point lies within $1\%$ limit, and the error in its corresponding voltage and current is almost always within $2\%$ limit.\reversemarginpar \marginnote{Inner Margin Note}[-1in] Further, for both maximum power point and open-circuit voltage, the statistical variance around manufacturer measurements due to temperature changes is demonstrated to be low for five various module technologies.

\end{document}

• Don't load the marginfix package. – Ulrike Fischer Aug 23 '18 at 8:25
• @UlrikeFischer I moved my comment – daleif Aug 23 '18 at 9:50