0

I am creating an exam using the exam class. To conform with the standard format, I need to be able to count the number of questions (which can be done using \numquestions) and display them as words (i.e. 1 --> one, 2 --> two etc). I have tried using fmtcount but I can;t get the two packages to work together. Any help would be greatly appreciated! Here is a MWE:

\documentclass{exam}

\begin{document}

\section*{Here are \numquestions\ questions}

\begin{questions}
    \question This is the first question.
    \question This is the second question.
\end{questions}

\end{document}

I would like the \numquestions in the section title to be in words (i.e two) instead of just the number 2.

Thanks!

  • you might want to have a look at this question: http://tex.stackexchange.com/questions/28326/convert-any-number-to-corresponding-word – ArTourter Mar 23 '15 at 22:04

1 Answers1

2
% arara: pdflatex

\documentclass{exam}
\usepackage{fmtcount}

\begin{document}
\section*{Here are \numberstringnum\numquestions{} questions}

\begin{questions}
    \question This is the first question.
    \question This is the second question.
\end{questions}
\end{document}

enter image description here

LaRiFaRi
  • 43,807