# Add asterisk in Exam class

I am writing some exercise for students using exam class. I want some question to be after-class exercise and indicate that by putting an asterisk after the question number, something like (a)*. I tried \part[*], but this will give (* point). What can I do, please? Thank you! My code is as follows.

\documentclass[english]{exam}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{bigints}
\usepackage{amssymb}
\usepackage{amsthm}

\begin{document}

\begin{questions}

\question

\begin{parts}

\part $*$ bla bla

\end{parts}

\end{questions}

\end{document}

• Thanks for adding the example code! I've updated my answer with a second option that might be of interest for you. – Gonzalo Medina Feb 16 '15 at 1:28

Here's one way defining two commands \afterclasspart and \standardpart to give the desired formatting:

\documentclass{exam}


\begin{document}

\begin{questions}
\question[10]
Why is there air?
\question
What if there were no air?
\begin{parts}
\part[5]
Describe the effect on the balloon industry.
\afterclasspart
\part[5]
Describe the effect on the aircraft industry.
\standardpart
\part[5]
Describe the effect on the wool industry.
\end{parts}
\question[20]
\begin{parts}
\afterclasspart
\part
Define the universe.
Give three examples.
\standardpart
\part
If the universe were to end, how would you know?
\part
If the universe were not to end, how would you know?
\end{parts}
\end{questions}

\end{document}


The result:

Perhaps this variant gives a better alignment for the labels:

\documentclass{exam}


\begin{document}

\begin{questions}
\question[10]
Why is there air?
\question
What if there were no air?
\begin{parts}
\part[5]
Describe the effect on the balloon industry.
\afterclasspart
\part[5]
Describe the effect on the aircraft industry.
\standardpart
\part[5]
Describe the effect on the wool industry.
\end{parts}
\question[20]
\begin{parts}
\afterclasspart
\part
Define the universe.
Give three examples.
\standardpart
\part
If the universe were to end, how would you know?
\part
If the universe were not to end, how would you know?
\end{parts}
\end{questions}

\end{document}


The result:

## Update

A similar procedure can be applied to add the asterisk to selected questions:

\documentclass{exam}


\begin{document}

\begin{questions}
\afterclassquestion
\question[10]
Why is there air?
\standardquestion
\question
What if there were no air?
\begin{parts}
\part[5]
Describe the effect on the balloon industry.
\afterclasspart
\part[5]
Describe the effect on the aircraft industry.
\standardpart
\part[5]
Describe the effect on the wool industry.
\end{parts}
\question[20]
\begin{parts}
\afterclasspart
\part
Define the universe.
Give three examples.
\standardpart
\part
If the universe were to end, how would you know?
\part
If the universe were not to end, how would you know?
\end{parts}
\end{questions}

\end{document}


• I did not realize to ask how to add asterisk to the question numbers, like 1*, instead of the parts. I assume it should be similar. Could you say something on this as well, please? – LaTeXFan Feb 16 '15 at 4:56
• @LaTeXfan You're welcome! Regarding this new requirement, I added the necessary code in an edit to my answer. – Gonzalo Medina Feb 16 '15 at 5:29