2

To save typing, I have \newcommand{\q}{\question[1]} defined in my exam documentclass. Then, after the question, I use \droppoints to get [1 pt] printed in the right margin.

But sometimes, my questions have parts, each of which is to be worth 1 point each, like this

\q ...
\begin{parts}
    \part[1] ...
    \part[1] ...
    \part[1] ...
    \part[1] ...
\end{parts}

If I try to use \droppoints here, it will give me a [1 pt], because the last part was worth one point.

If I try to use \droptotalpoints here, it gives me a whole big text that I can't get rid of.

I can, of course, write the question as \question[4] and then after the last part say \droppoints. This works great unless I decide to add or comment out a part.

Is it possible for me to get the same point display at the end of a question while automatically summing up the parts? Also, can this be done relatively simply so that I can understand the answer (and modify in the nearly certain case that I change my mind about what I want).

EDIT Per the comment, here is a (sort of) MWE. But it only shows the problem, not the way I'd like it to look.

1
  • Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Apr 30, 2015 at 22:24

1 Answer 1

2

You can adjust that with \totalformat command.

\totalformat{\fbox{\bfseries Total: \totalpoints\ pts}}

Do your customizations here.

\documentclass[addpoints]{exam}
\totalformat{\fbox{\bfseries Total: \totalpoints\ pts}}
\pointpoints{pt}{pts}
\bracketedpoints

\begin{document}
\begin{questions}
\question How are you?
\droptotalpoints             %% put this here
\begin{parts}
    \part[1] ...
    \droppoints
    \part[2] ...
    \droppoints
    \part[1] ...
    \droppoints
    \part[1] ...
    \droppoints
\end{parts}
%\droptotalpoints            %% put this just after the question
\end{questions}
\end{document}

enter image description here

You must log in to answer this question.

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