I am writing an exam and am using the following code to insert the marks for the question on the right in the margin.
\newcommand{\mrks}[1]{
\marginnote{\textbf{#1}}[0em]
\ignorespaces
}
When I build the code, it causes an indent to occur at the location of the \mrks command. For the command \mrks{1}, an indent one character wide is inserted. This is occurring inside the questions environment as defined below.
% question style
\newenvironment{questions}{
% change margins for marks
\begin{adjustwidth}{}{10mm}
% short answer labels
\renewcommand{\labelenumi}{
\textbf{\arabic{enumi}}}
\renewcommand{\labelenumii}{(\alph{enumii})}
% set questions indent and alignment
\setlist[enumerate]{
align=parleft,
labelindent=0em
}
% set space between questions
\setlist[enumerate,1]{
itemsep=0em
}
% set alignment of question parts
\setlist[enumerate,2]{
align=right,
itemsep=0em,
topsep=1em,
labelsep=1em,
}
\begin{enumerate}
}{
\end{enumerate}
\end{adjustwidth}
}
Any idea how I can remove the indent?
\newcommand{\mrks}[1]{SPACE\marginnote{\textbf{#1}}[0em]– David Carlisle Aug 10 '23 at 23:22