1

In this document class "exam" a question has 6.5 points and another has 4.5 points.

Why do the scores 6.5 and 4.5 not appear in the table? And also the sum of the points is wrong. I would like the scores to appear in the table. Furthermore, there are 5.5.5 numbers that I have not written. How can I correct my script?

Thanks a lot.enter image description here

\documentclass[addpoints]{exam}
\usepackage[italian]{babel} 
\usepackage[T1]{fontenc} 
\usepackage[utf8]{inputenc} 
\usepackage[a4paper,top=1.5cm,bottom=1.5cm,left=1.5cm,right=1.5cm]{geometry}

  \usepackage{enumerate}



\makeatletter
\newcommand*{\ExamResetAfterFirstRun}{%
  \renewcommand*{\PgInfo@write}[1]{}%
  \renewcommand*{\label}[1]{\@bsphack\@esphack}%
}
\makeatother

\pointpoints{Punto}{Punti}
\bonuspointpoints{punto (bonus)}{punti (bonus)}






\newcommand{\makenonemptybox}[2]{%
  \par\nobreak\vspace{\ht\strutbox}\noindent
  \fbox{%
    \parbox[c][\dimexpr#1-2\fboxsep][t]{\dimexpr\linewidth-2\fboxsep}{
      \hrule width \hsize height 0pt
      #2
    }%
  }%
  \par\vspace{\ht\strutbox}
}






\begin{document}

\large 



\newcounter{copynum} % copy number, to be printed in the footer 
\newcounter{NumCopy} % how many copies do we want?
\setcounter{NumCopy}{1} % we want 3
\whiledo{\thecopynum<\theNumCopy}{%
  \setcounter{page}{1} % start numbering pages for the current copy at 1
  \addtocounter{copynum}{1} % the number of the current copy
  \setcounter{question}{1} % make questions start at 1 again
  \setcounter{part}{1}  % make parts start at 1 again
  \setcounter{numquestions}{0}
  \setcounter{numpoints}{0}
  \setcounter{numbonuspoints}{0}
  \setcounter{numparts}{0}
  \setcounter{numsubparts}{0}
  \setcounter{numsubsubparts}{0}
  \ifnum\value{copynum}>1 %
    \ExamResetAfterFirstRun
  \fi




\begin{center}

Institute bla bla bla

\begin{minipage}{.40\textwidth}
\centering
{\textbf{TEST}}
\end{minipage}


\end{center}
\vspace{0.2in}
\noindent {\makebox[\textwidth]{Name:\enspace\hrulefill} }

  \begin{questions}



\question[10] Question 1 bla bla bla
\question[6.5] Question 2 bla bla bla
\question[4.5] Question 3 bla bla bla


    \end{questions} 
{
 { 
  \begin{center}
  \hqword{EX}
  \hpword{Pt}
  \bhpword{Bonus Pt:}
  \htword{\textbf{Tot}}
  \hsword{tot 2}
  \cellwidth{1.0em}
  \gradetable[h][questions]
  \end{center}
  \begin{center}
 {\footnotesize  bla bla bla}
  \end{center}}
  }




}

\end{document}
1

Change .5 to \half

\documentclass[addpoints]{exam}
\usepackage[italian]{babel} 
\usepackage[T1]{fontenc} 
\usepackage[utf8]{inputenc} 
\usepackage[a4paper,top=1.5cm,bottom=1.5cm,left=1.5cm,right=1.5cm]{geometry}
\usepackage{enumerate}

\makeatletter
\newcommand*{\ExamResetAfterFirstRun}{%
  \renewcommand*{\PgInfo@write}[1]{}%
  \renewcommand*{\label}[1]{\@bsphack\@esphack}%
}
\makeatother

\pointpoints{Punto}{Punti}
\bonuspointpoints{punto (bonus)}{punti (bonus)}

\newcommand{\makenonemptybox}[2]{%
  \par\nobreak\vspace{\ht\strutbox}\noindent
  \fbox{%
    \parbox[c][\dimexpr#1-2\fboxsep][t]{\dimexpr\linewidth-2\fboxsep}{
      \hrule width \hsize height 0pt
      #2
    }%
  }%
  \par\vspace{\ht\strutbox}
}
\begin{document}
\large 
\newcounter{copynum} % copy number, to be printed in the footer 
\newcounter{NumCopy} % how many copies do we want?
\setcounter{NumCopy}{1} % we want 3
\whiledo{\thecopynum<\theNumCopy}{%
  \setcounter{page}{1} % start numbering pages for the current copy at 1
  \addtocounter{copynum}{1} % the number of the current copy
  \setcounter{question}{1} % make questions start at 1 again
  \setcounter{part}{1}  % make parts start at 1 again
  \setcounter{numquestions}{0}
  \setcounter{numpoints}{0}
  \setcounter{numbonuspoints}{0}
  \setcounter{numparts}{0}
  \setcounter{numsubparts}{0}
  \setcounter{numsubsubparts}{0}
  \ifnum\value{copynum}>1 %
    \ExamResetAfterFirstRun
  \fi

\begin{center}

Institute bla bla bla

\begin{minipage}{.40\textwidth}
\centering
{\textbf{TEST}}
\end{minipage}

\end{center}
\vspace{0.2in}
\noindent {\makebox[\textwidth]{Name:\enspace\hrulefill} }

\begin{questions}
\question[10] Question 1 bla bla bla
\question[6\half] Question 2 bla bla bla
\question[4\half] Question 3 bla bla bla

\end{questions} 
{
 { 
  \begin{center}
  \hqword{EX}
  \hpword{Pt}
  \bhpword{Bonus Pt:}
  \htword{\textbf{Tot}}
  \hsword{tot 2}
  \cellwidth{1.0em}
  \gradetable[h][questions]
  \end{center}
  \begin{center}
 {\footnotesize  bla bla bla}
  \end{center}}
  }
}
\end{document}

enter image description here

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.