Quantcast
Viewing all articles
Browse latest Browse all 3

Answer by Phil Hirschhorn for Changing indent after question exam class

The following seems to work:

\renewcommand{\questionlabel}{\makebox[1cm][l]{\thequestion}}\renewcommand\partlabel{\makebox[1cm][l]{\thequestion.\arabic{partno}}}\renewcommand{\questionshook}{%  \setlength{\leftmargin}{0pt}%  \setlength{\labelsep}{0pt}  \setlength{\labelwidth}{0pt}%}\renewcommand{\partshook}{%  \setlength{\leftmargin}{0pt}%  \setlength{\labelsep}{0pt}  \setlength{\labelwidth}{0cm}%  \def\makelabel##1{##1}%}

Setting \leftmargin to 0pt arranges it so that when a question occupies more than one line, the lines after the first will begin at the left margin.

Setting \labelsep and \labelwidth to 0pt arranges it so that the label will stick out to the right of the 0pt space reserved for it, and no extra space will be left between the label and the beginning of the question.

Setting \questionlabel and \partlabel as above arranges it so that they'll take up 1cm of space, which will stick out to the right of the (zero) space reserved for the label.

The redefinition of \makelabel is needed for the parts environment to counteract the definition of \makelabel in exam.cls, which would otherwise make the label stick out to the left of the margin.

Image may be NSFW.
Clik here to view.
enter image description here


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>