我使用 qformat 来按我想要的方式格式化问题,但是我无法让“问题”像前面的段落一样齐平在左边距。我已附上代码和输出的图像。我真正想要的是问题中的 Q 直接位于表示允许的 A 下方。有人能帮忙吗?
\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}
答案1
就是这个。您应该使用\renewcommand{\questionshook}
并更改左边距。手册第 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}