Alterar recuo na aula de exame

Oct 25 2020

No momento, estou escrevendo um exame e exijo um recuo específico à esquerda para corresponder ao seguinte:

Tenho usado a classe de exame e agora resolvi a margem direita e as notas do exame, mas meu recuo esquerdo não está certo. Como você pode ver abaixo, as informações após a indentação da pergunta, assim como a enumeração. Alguma ideia de como consertar isso? Eu sou um pouco novato!

Respostas

1 JohnKormylo Oct 25 2020 at 12:11

Parece que você deseja que a indentação da parte e da subparte sejam iguais. Eu escolhi arbitrariamente \leftmargini.

\documentclass{exam}
\usepackage{showframe}% MWE only, to show first margin
\marksnotpoints

\renewcommand{\questionlabel}{Question \thequestion.}
\renewcommand{\questionshook}{\leftmargin=0pt%
  \labelwidth=-\labelsep}
  
\renewcommand\partlabel{\hbox to \labelwidth{\alph{partno}.\hfil}}
\renewcommand{\partshook}{\setlength{\leftmargin}{\leftmargini}%
  \setlength{\labelwidth}{\dimexpr \leftmargin-\labelsep}}
  
\renewcommand\subpartlabel{\hbox to \labelwidth{\thesubpart.\hfil}}
\renewcommand{\subpartshook}{\setlength{\leftmargin}{\leftmargini}%
  \setlength{\labelwidth}{\dimexpr \leftmargin-\labelsep}}


\begin{document}
\begin{questions}
\question[4]\hfill

This is the first question.
\begin{parts}
\part
This is a part.
\part
\begin{subparts}
\subpart
This is a subpart.
\subpart
This is a periscope.
\subpart
This is a pair of diving planes.
\end{subparts}
\part
It's sad to be apart.
\end{parts}
\end{questions}
\end{document}