1

I am trying to use both margin and face some problems.

  1. I cannot start the paragraph with marginpar, i will have to add imaginary space \hspace{0pt}. Otherwise, it will align with previous paragraph. Is there other method to solve this problem?

  2. I have defined \lnote and \rnote with \reversemarginpar and \normalmarginpar respectively to switch both side of margin. However, they need to be separated by empty line otherwise the lnote will take \normalmarginpar instead. And due to the blank line, rnote is not aligned with the paragraph. Any idea to fix this?

  3. Switching the \reversemarginpar and \normalmarginpar make the todonotes overlap each other. There are no option in todonotes that allow v-offset. Do you have any idea how to solve this?enter image description here

\documentclass{article}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage[backgroundcolor=white]{todonotes}

\newcommand{\lnote}[1]{\hspace{0pt}\reversemarginpar\marginpar{\raggedleft #1}\ignorespaces}
\newcommand{\rnote}[2][noline]{\normalmarginpar\todo[#1]{#2}}

\begin{document}
\lnote{\textbf{Photosynthesis}} Photosynthesis is a process used by plants and other organisms to convert light energy into chemical energy. 

\rnote{For more information, see \href{https://en.wikipedia.org/wiki/Photosynthesis}{\textcolor{blue}{here}}}

\lnote{\textbf{Glycolysis}} Glycolysis is the metabolic pathway that converts glucose into energy.

\rnote{For more information, see \href{https://en.wikipedia.org/wiki/Glycolysis}{\textcolor{blue}{here}}}

\end{document}

Thank you!

1

With a customized description environment you can achieve the following:

enter image description here

\documentclass{article}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{enumitem}
\usepackage[backgroundcolor=white]{todonotes}

\newcommand{\lnote}[1]{\hspace{0pt}\reversemarginpar\marginpar{\raggedleft #1}\ignorespaces}
\newcommand{\rnote}[2][noline]{\normalmarginpar\todo[#1]{#2}}

\begin{document}

\begin{description}[itemindent=0mm, labelsep=3mm, align=right,parsep=\baselineskip]
    \item[Photosynthesis]\rnote{For more information, see \href{https://en.wikipedia.org/wiki/Photosynthesis}{\textcolor{blue}{here}}} Photosynthesis is a process used by plants and other organisms to convert light energy into chemical energy.
    \item[Glycolysis]\rnote{For more information, see \href{https://en.wikipedia.org/wiki/Glycolysis}{\textcolor{blue}{here}}} Glycolysis is the metabolic pathway that converts glucose into energy. 
\end{description}

\end{document}

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.