2

I'm creating a test, and I would like to award some points for respecting instructions, like this

\documentclass[addpoints]{exam}
\usepackage[utf8]{inputenc}
\title{sandbox}
\begin{document}
\begin{questions}

\setcounter{question}{0}

\qformat{}  
\question
Points will be given for
\begin{parts}
    \part[1] Quality of drawings
    \part[4] Clear explanation
\end{parts}
\noqformat{}

\question[5]
Draw a ring.
% \setcounter{question}{8}
\question[5]
Add two and two.

\end{questions}
\gradetable[h][questions]
\end{document}

But the setcounter seems to have no effect.

  • Thanks, I think I did that, in my last post. – Rob625 Jan 15 '19 at 20:26
2

I guess (because I don't totally understand), that you want the two last questions to be numbered 1. and 2. In this case, you set the counter to the wrong value (as it has value 0 at this point by default). If you change it to \setcounter{question}{-1} you'll get the correct numbers. To suppress the false entry in the \gradetable I use \item instead of \question. It does produce the correct output (as far as I can see), but I don't know which other things might be implied here.

\documentclass[addpoints]{exam}
\usepackage[utf8]{inputenc}
\title{sandbox}
\begin{document}
\begin{questions}


\setcounter{question}{-1}

\qformat{}  
\item
Points will be given for
\begin{parts}
    \part[1] Quality of drawings
    \part[4] Clear explanation
\end{parts}
\noqformat{}

\question[5]
Draw a ring.
% \setcounter{question}{8}
\question[5]
Add two and two.

\end{questions}
\gradetable[h][questions]
\end{document}

enter image description here

| improve this answer | |
  • Thanks, that gives what I want for the question numbers. Unfortunately the gradetable doesn't work. – Rob625 Jan 14 '19 at 18:37
  • @Rob625 see my edit. – Skillmon likes topanswers.xyz Jan 14 '19 at 18:50
1

Thanks, you have helped me to achieve what I wanted:

output

\documentclass[addpoints]{exam}
\usepackage[utf8]{inputenc}
\title{sandbox}
\begin{document}
\begin{questions}

\setcounter{question}{-1}

\qformat{}  
\item
Points will be given for
\begin{parts}
    \part[1] Quality of drawings
    \part[2] Clear explanation
\end{parts}
\noqformat{}

\question[10]
Draw a ring.
\question[20]
Add two and two.

\qformat{}  
\titledquestion{aesthetic quality} [3]
\noqformat{}    

\end{questions}
\gradetable[h][questions]
\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.