## LaTeX forum ⇒ Document Classes ⇒ Basic problem with the exam class Topic is solved

Information and discussion about specific document classes and how to create your own document classes.
Johannes_B
Site Moderator
Posts: 4173
Joined: Thu Nov 01, 2012 4:08 pm

### Basic problem with the exam class

Do you need al the fuzz the exam class is adding? You don't want to print the points, as all questions have the same amount of points. A table summing up how many points are available for each question seems a bit pointless as well.

The screenshot you have shown just shows enumerated lists. Easy to do, no need for a special class or package.
See https://en.wikibooks.org/w/index.php?ti ... cial_lists

You can also have a look at Teacher's Corner, which covers exsheets, but not yet xsim.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Cham
Posts: 936
Joined: Sat Apr 02, 2011 4:06 pm
Stefan Kottwitz wrote:Do you have a current good-looking example to test? I lost the one I worked it when my computer crashed right now.

Here's a working code which is very close to what I need :
\documentclass[11pt]{exam}\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}\usepackage[french]{babel}\usepackage{microtype}\usepackage[margin=1in]{geometry} \setlength\answerskip{4ex}\setlength\answerlinelength{0.5in} \begin{document} \pointsinmargin\pointformat{} A few questions to disturb you : \bigskip \begin{questions} \question[2] Who's buried in Grant's tomb? \answerline \question[2] Blabla? \answerline A few more questions to annoy you : \bigskip \question[3] Which is heavier: A pound of feathers, or a pound of lead? \answerline A few choices questions : \bigskip \question[3] Blabla : 	\begin{choices}		\choice John		\choice Paul		\choice George		\choice Ringo		\choice Socrates	\end{choices} \end{questions} \end{document}

It just need three things to be modified :

1. Slide the answer line to the left, with a slight offset (indent).
2. Remove the answer line number (it's useless if it's at the left)
3. Change the choices capital letters to small letters, or maybe numbers?

Cham
Posts: 936
Joined: Sat Apr 02, 2011 4:06 pm
Another glitch : the vertical spacing of the choice answer (in the choices environment) is a bit too large. Is there an option or some command to reduce it ? The manual isn't clear to me about this. Here's a MWE code to try :

\documentclass[11pt]{exam}\usepackage[T1]{fontenc}\usepackage[margin=1in]{geometry} \begin{document} \begin{questions} \question[3] Who are you ? 	\begin{choices}		\choice John		\choice Paul		\choice George		\choice Ringo		\choice Socrates		\choice Me		\choice You		\choice Him	\end{choices} \end{questions} \end{document}

Cham
Posts: 936
Joined: Sat Apr 02, 2011 4:06 pm
I solved the answer line problem (simple line at left, without a number). A simple macro does it :

\newcommand{\TFLine}{\vspace{0.75cm}\hspace{1cm}\rule{1.5cm}{0.5pt}\vspace{0.25cm}}

My exam is almost done ! I only need to customize the choices capital letters to some other symbols (small letters or numbers). I would prefer something like a), b), ... instead of A, B, .... Any suggestion about this ?

Johannes_B
Site Moderator
Posts: 4173
Joined: Thu Nov 01, 2012 4:08 pm
\renewcommand\thechoice{\alph{choice})}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Cham
Posts: 936
Joined: Sat Apr 02, 2011 4:06 pm
Cool ! It's working. Unfortunately, it leaves a point after the ")". It should be "a)", instead of "a)."

Also, what other options could we have ? Numbers instead of letters ?

Or circles to mark with an X ? (I think that the last one is described in the manual. I'll check this).

Stefan Kottwitz
Posts: 9595
Joined: Mon Mar 10, 2008 9:44 pm

Or, if you consider ) ad part of the label only:


The latter macro had the period.

Stefan

Cham
Posts: 936
Joined: Sat Apr 02, 2011 4:06 pm
It's all working great. Thanks a lot!

Now, while the result seems pretty with "a)", I'm not sure anymore that it's better looking than "A." ! At least, I now have a choice in the code.

A long time ago, I was creating this kind of exams with a WYSIWYG word processor (pesky Word and the likes). The printed output was good, but editing was always a pain in the arse. Now that I have a full LaTeX version, I could throw away Word to the trash bin. Adios, Micro\$ !

Codyben123
Posts: 1
Joined: Mon Mar 11, 2019 12:18 am
In the exam class the comments you want are called "Instructions for a group of questions" (see section 6.1 of the examdoc.pdf document).
In your case type \uplevel{A few questions to annoy you:}
That's all you need.