![在文件類考試中如何控制問題的縮排](https://rvso.com/image/461878/%E5%9C%A8%E6%96%87%E4%BB%B6%E9%A1%9E%E8%80%83%E8%A9%A6%E4%B8%AD%E5%A6%82%E4%BD%95%E6%8E%A7%E5%88%B6%E5%95%8F%E9%A1%8C%E7%9A%84%E7%B8%AE%E6%8E%92.png)
我使用 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}