2

I'm constructing an exercise sheet and would like to mark the thougher exercises.

Based on Placing symbol in margin I'm placing an symbol in the left margin. It works pretty well, but when I enumerate in more levels the horizontal position of the image shifts.

Is there a way to fix the horizontal position at like 2 cm from the page bound?

MWE

\documentclass[a4paper,oneside, 11pt]{article}

\usepackage{tabto} %%symbol in left margin
\usepackage{manfnt}
\def\warningsymbol{\protect\marginsymbolhelper}
\def\marginsymbolhelper{\tabto*{-2cm} {\dbend} \tabto*{\TabPrevPos}}

\begin{document}
\begin{enumerate}
    \item \warningsymbol Exercise 1
    \item Exercise 2
    \begin{enumerate}
        \item \warningsymbol Subexercise 1
    \end{enumerate}
\end{enumerate}
\end{document}

enter image description here

3

If you aren't using \marginpar for anything else... You can adjust the distance using \marginparsep.

\documentclass[a4paper,oneside, 11pt]{article}

\usepackage{manfnt}
\reversemarginpar
\newcommand{\marginsymbol}{\marginpar{\hfill\dbend}}
\usepackage{showframe}% debugging tool

\begin{document}
\begin{enumerate}
    \item Exercise 1 \marginsymbol
    \item Exercise 2
    \begin{enumerate}
        \item Subexercise 1 \marginsymbol
    \end{enumerate}
\end{enumerate}
\end{document}

demo

  • I had to add \leavevmode in front of the \marginpar, but it works like a charm! Thanks! – dietervdf Jul 25 '17 at 9:51

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.