試験クラスのインデントの変更
Oct 25 2020
私は現在試験を書いていますが、以下に一致するように左側に特定のインデントが必要です。
私は試験クラスを使用していて、右マージンと試験マークを整理しましたが、左インデントが正しくありません。以下に示すように、質問の後の情報は、列挙されているようにインデントされています。これを修正する方法についてのアイデアはありますか?私は少し初心者です!
回答
1 JohnKormylo Oct 25 2020 at 12:11
パーツとサブパーツのインデントを等しくしたいようです。恣意的に選びました\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}