0

I need to have an environment like \begin{question} to sort questions as what \begin{enumerate} does. I mean something like this:

Problems:

1) Prove that ....
2) Show that ....
3) ...
...

I know this environment works in exam class, but how can I do it in another classes? My document class is book and I can't change this class.

Thanks for your help.

2
  • in what way is your required output different from enumerate Dec 17, 2014 at 15:17
  • @DavidCarlisle has a point, but you may want to consider the exsheets package if you want good control over how the questions are presented. It implements many LaTeX3 ideas, as far as I understand. Dec 17, 2014 at 15:34

1 Answer 1

4

xsim

\documentclass{article}
\usepackage{amssymb}
\usepackage{xsim}

\begin{document}
\begin{exercise}
  \begin{enumerate}
    \item State the Mean Value Theorem.
    \item Consider the function $g:\mathbb{R} \rightarrow \mathbb{R}$
  \end{enumerate}
\end{exercise}
\end{document}

exsheets

As of May 2017, exsheets is officially superseded by xsim. As of June 2019, exsheets is no longer compatible with the current expl3. The implementation below is kept for posterity.

\documentclass{article}
\usepackage{amssymb}
\usepackage{exsheets}

\begin{document}
\begin{question}
  \begin{enumerate}
    \item State the Mean Value Theorem.
    \item Consider the function $g:\mathbb{R} \rightarrow \mathbb{R}$
  \end{enumerate}
\end{question}

\SetupExSheets{headings=runin,question/name=Problem}
\begin{question}
  blah
\end{question}
\end{document}

output

I do not have the means right now to include the second example (after the \SetupExSheets command), but it gets closer to what exam does by default.

I'll note that the exsheets package is highly configurable thanks to its LaTeX3 ideas :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .