我正在使用 exam.cls,之后\question
,在进入之前我有一些描述\part
。
如何为问题的第一行添加缩进?我尝试过indentfirst
包、、,\hspace{}
但\itemindent
这些\parindent
都没有用。
\documentclass[addpoints, a4paper, 12pt]{exam}
\usepackage{setspace, amsmath, pdfpages, mathtools}
\usepackage{times}
\pagestyle{headandfoot}
\setstretch{1.3}
\setlength{\rightpointsmargin}{2.5cm}
\cfoot[\thepage]{\thepage} % page numbering
\qformat % Format for question
{
\textbf{QUESTION \thequestion{} (\pointsofquestion{\thequestion} marks)}
\hfill
\vrule depth 1.7em width 0pt
}
\pointsdroppedatright % enable points at the right margin
\marksnotpoints
\marginpointname{ \points}
% To adjust questions margins
\renewcommand{\questionshook}{%
\setlength{\leftmargin}{0pt}%
\setlength{\labelwidth}{-\labelsep}%
\setlength{\itemsep}{1em}
}
% To adjust parts margins
\renewcommand{\partshook}{%
\setlength{\leftmargin}{1.4cm}%
\setlength{\labelsep}{1cm}
\setlength{\labelwidth}{0cm}%
\setlength{\itemsep}{1em}
}
\begin{document}
\begin{questions}
\question
bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla
\begin{parts}
\part[5]
bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla
\droppoints
\part[4]
bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla
\droppoints
\end{parts}
\end{questions}
\end{document}
提前致谢。
答案1
下面我通过向其添加一个来修补\question
(在环境中定义questions
)\hspace*{1.5em}\ignorespaces
。这会插入起始空格。
\documentclass[addpoints, a4paper, 12pt]{exam}
\setlength{\rightpointsmargin}{2.5cm}
\cfoot[\thepage]{\thepage} % page numbering
\qformat % Format for question
{%
\textbf{QUESTION \thequestion{} (\pointsofquestion{\thequestion} marks)}
\hfill
\vrule depth 1.7em width 0pt
}
\pointsdroppedatright % enable points at the right margin
\marksnotpoints
\marginpointname{ \points}
% To adjust questions margins
\renewcommand{\questionshook}{%
\setlength{\leftmargin}{0pt}%
\setlength{\labelwidth}{-\labelsep}%
\setlength{\itemsep}{1em}%
\let\oldquestion\question% Copy \question into \oldquestion
\renewcommand{\question}{%
\oldquestion% Default question style
\hspace*{1.5em}\ignorespaces% Insert paragraph indent/space
}%
}
% To adjust parts margins
\renewcommand{\partshook}{%
\setlength{\leftmargin}{1.4cm}%
\setlength{\labelsep}{1cm}
\setlength{\labelwidth}{0cm}%
\setlength{\itemsep}{1em}
}
\begin{document}
\begin{questions}
\question
bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla
\begin{parts}
\part[5]
bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla
\droppoints
\part[4]
bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla bla bla bla bla blab bla
\droppoints
\end{parts}
\end{questions}
\end{document}