# Continuous numbering of questions in exam class

How to get the same feature as resume in the enumitem package for the questionsenv in the exam Latex class?

For instance,

\begin{questions}
\question A?
\question B?
\end{questions}
Some text.
\begin{questions}
\question C?
\end{questions}


should give something like

Question 1. A?
Question 2. B?
Some text.
Question 3. C?

• An easy way to handle your situation is to use \fullwidth{Some text.} in the exam class. You do not have to leave the question environment to use it. – Michael S Taylor Oct 25 '17 at 14:47

You can literally do want you want by saving and restoring the question counter.

\documentclass{exam}
\usepackage{showframe}
\begin{document}

\begin{questions}
\question A?
\question B?
\xdef\mycounter{\arabic{question}}% macro
\end{questions}
Some text.
\begin{questions}
\setcounter{question}{\mycounter}%
\question C?
\end{questions}

\end{document}


But exam class already provides you with \uplevel and \fullwidth to manipulate the indentation.

\documentclass{exam}
\usepackage{showframe}
\begin{document}

\begin{questions}
\question A?
\question B?

\fullwidth{Some text.}

\question C?
\end{questions}

\end{document}


I use the exam class for various exercises. The exercises include questions interspersed lengthy passages of text. I outdent the question numbers to help questions standout from the text. My answer does not directly address your question (a resume-like feature) but I wanted to point out that you do not have to leave the question environment to use fullwidth text.

\documentclass{exam}
\usepackage{kantlipsum} % For this example.
\renewcommand{\questionshook}{%
\setlength{\leftmargin}{-\leftskip}%
}

\begin{document}

Here is some introductory text.

\begin{questions}

\question[5]
Here is a question.

\vspace*{3\baselineskip}

Here is some text. \kant[1]

\question[5]
Here is another question.

\vspace*{3\baselineskip}

Here is some more text. \kant[2]

\end{questions}

Final summary text.

\end{document}