4

I'm creating my own exam paper and I have 15 different questions. Using the code

\gradetable[h][questions]

I'm getting a grade table. However as I have so many questions the table it too big

enter image description here

I'm trying to split the table in half and put them under each other but I cant get any code to work.

When I have been using the command

\begin{center}

\setlength{\doublerulesep}{0.25in}

\multirowgradetable{2}[questions]

\end{center}

It just keeps on coming up with a error

enter image description here

5
  • 3
    Welcome to TeX.SE! Please -- as usual here -- show us a short compliable tex code resulting in your shown screenshot.
    – Mensch
    Feb 11, 2019 at 15:31
  • Try \noindent\gradetable[h][questions].
    – user31034
    Feb 11, 2019 at 15:48
  • If a vertical table is ok try \gradetable[v][questions] Feb 11, 2019 at 18:25
  • \multirowgradetable{2}[questions] you can replace 2 by any numbre Feb 11, 2019 at 18:28
  • Yous should always provide A so called MWE (minimal working example) a code that starts with \documentclass and ends with \end{document} and that reproduces the issue you are facing. This helps who try to help you to better understand the question. Feb 12, 2019 at 6:07

2 Answers 2

4

As mentionned in the exam class manual:

If you want to print a horizontal grading table but the table would be too large for the page, you can print a grading table with multiple rows by giving the command: \multirowgradetable{numrows}[questions or pages]

The MWE

\documentclass[addpoints,answers]{exam}
\usepackage{pgffor}

\begin{document}
\begin{questions}

\foreach \i in {1,...,10}
{
\question[\i]

a nice question

\begin{solution}
my solution
\end{solution}
}



\end{questions}

\multirowgradetable{2}



\end{document}

enter image description here

6
  • i have tried the multirow command but it just comes up with a error or some reason. i have been just tried the code posted above but still a error using the code \begin{center} \setlength{\doublerulesep}{0.25in} \multirowgradetable{2}[questions] \end{center} just keeps giving a error Feb 11, 2019 at 22:05
  • @JettieBaker \multirowgradetable command is a new feature in the exam class. May be you should update your TeX installation! Feb 12, 2019 at 4:02
  • Im using overleaf.com for my latex but i have copied and pasted your code but it comes up with the same error. Feb 12, 2019 at 14:42
  • @JettieBaker the TeX distribution in overleaf is not updated. I have tried the code with TeXlive 2018 and it works perfectly. Try to download the latest exam class from ctan and add it to your project. Take a look to this question Feb 12, 2019 at 18:34
  • 1
    @JettieBaker download the exam package and upload the exam.cls file to your project in overleaf Feb 12, 2019 at 18:53
2

In addition to answer of Hafid Boukhoulda (using his code), you can adjust the cell width of gradetable with \cellwidth command (exam class manual, p.89).

\documentclass[addpoints]{exam}
\usepackage[showframe]{geometry} % For testing the gradetable is in frame?
\usepackage{pgffor}

\begin{document}
\begin{questions}

\foreach \i in {1,...,15}
{
\question[\i]
a nice question
}
\end{questions}

\cellwidth{0.3cm}

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

enter image description here

1
  • i dont want to squish the table i just want to split it but for some reason its just not working Feb 11, 2019 at 23:57

You must log in to answer this question.

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