Modifica del rientro in classe d'esame
Oct 25 2020
Attualmente sto scrivendo un esame e richiedo un rientro specifico a sinistra per corrispondere a quanto segue:
Ho usato la classe degli esami e ora ho risolto il margine destro e i voti degli esami, ma la mia rientranza sinistra non è corretta. Come puoi vedere di seguito, le informazioni dopo che la domanda è stata rientrata, così come l'enumerate. Qualche idea su come risolvere questo problema? Sono un po 'un principiante!
Risposte
1 JohnKormylo Oct 25 2020 at 12:11
Sembra che tu voglia che il rientro della parte e della sottoparte sia uguale. Ho scelto 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}