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.

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

2 Answers 2

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

2
  • Thanks, that gives what I want for the question numbers. Unfortunately the gradetable doesn't work.
    – Rob625
    Jan 14, 2019 at 18:37
  • @Rob625 see my edit.
    – Skillmon
    Jan 14, 2019 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}
1
  • 1
    Well I never knew what exactly you wanted to achieve... Glad I was of help anyway.
    – Skillmon
    Jan 15, 2019 at 16:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .