Document Classesexam class with exercises and points in range

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
benoitldr
Posts: 8
Joined: Sat Sep 13, 2014 6:35 pm

exam class with exercises and points in range

Post by benoitldr »

Hello everybody,

I use the exam class for writing my exam http://www.ctan.org/tex-archive/macros/ ... ntrib/exam
The problem is for counting the points when you have several exercise (so several questions environments)

Normally you have solution in the exam class but I must use this options in a wrong way.

You can find a basic examples which didn't work...

Code: Select all

\documentclass[a4paper,11pt]{exam}                                                   
%\printanswers % pour imprimer les réponses (corrigé)
\noprintanswers % Pour ne pas imprimer les réponses (énoncé)
\addpoints % Pour compter les points
\pointsinrightmargin % Pour avoir les points dans la marge à droite
\usepackage{lmodern}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[francais]{babel}

\begin{document}

\textbf{Exercice 1 : \pointsinrange{ex1} pts}

\begin{questions}
  \begingradingrange{ex1}
  \question[1] question1
  \question[2] question2
  \question 
  \begin{parts}
    \part[1] question3a
    \part[2] question3.b
   \end{parts}
   \endgradingrange{ex1}
\end{questions}

\partialgradetable{ex1}[h][questions]

\textbf{Exercice 2 : \pointsinrange{ex2} pts}

\begin{questions}
  \begingradingrange{ex2}
  \question[2] question1
  \question[1] question2
  \question 
  \begin{parts}
    \part[2] question3a
    \part[3] question3.b
  \end{parts}
  \endgradingrange{ex2}
\end{questions}

\partialgradetable{ex2}[h][questions]

\end{document}
Thanks you in advance ;)

Benoit

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

exam class with exercises and points in range

Post by Johannes_B »

This has also been posted at TeX.SX. Please read about cross-posting: Gimme Pizza
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply