Wie kann ich in der Documentclass-Prüfung die Einrückung einer Frage steuern?

Wie kann ich in der Documentclass-Prüfung die Einrückung einer Frage steuern?

Ich habe qformat verwendet, um die Frage nach meinen Wünschen zu formatieren, aber ich kann „Frage“ nicht so bündig am linken Rand platzieren wie in den vorherigen Absätzen. Ich habe den Code und ein Bild der Ausgabe eingefügt. Was ich wirklich möchte, ist, dass das Q in „Frage“ direkt unter dem A für „Zulassen“ steht. Kann mir jemand dabei helfen?

\documentclass{exam}
\usepackage[a4paper,left=1cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{setspace}
\setlength\parindent{0pt}

\begin{document}
 \qformat{\textbf{\quad Question \thequestion. (Marks \totalpoints)\hfill} }
 {\huge\textbf{Section II}}

 {\large\textbf{Attempt All Questions}
        
\textbf{Allow about 45 Minutes for these questions}\newline}

%\newgeometry{left=0.5cm}
\begin{questions}
   

%\fillwithlines{2cm}
\question What is the time

\question[3]
Whas is the color of the ocean


\question[3]
What is the color of the sky

\fillwithlines{2cm}
\singlespacing
\end{questions}
\end{document}

Bildbeschreibung hier eingeben

Das ist die Art von Layout, die ich suche. Bildbeschreibung hier eingeben

Antwort1

Hier ist es. Sie sollten \renewcommand{\questionshook}den linken Rand verwenden und ändern. Weitere Informationen finden Sie im Handbuchabschnitt 4.4.

\documentclass{exam}
\usepackage[a4paper,left=1cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{setspace}
\setlength\parindent{0pt}

\renewcommand{\questionshook}{%
\setlength{\leftmargin}{0pt}%
\setlength{\labelwidth}{-\labelsep}%
}

\begin{document}
\qformat{\textbf{Question \thequestion. (Marks \totalpoints)}\hfill}
 
{\huge\textbf{Section II}}

{\large\textbf{Attempt All Questions}
        
\textbf{Allow about 45 Minutes for these questions}\newline}

\begin{questions}
\question What is the time

\question[3]
Whas is the color of the ocean


\question[3]
What is the color of the sky

\fillwithlines{2cm}
\singlespacing
\end{questions}
\end{document}

Ergebnis

verwandte Informationen