I'm trying to create an environment for homework assignment problems. Most of these problems consists of itemized questions about an introductory paragraph.

I know I can write a problem environment and put an enumerate environment inside it, but I really want is to be able to write something like this:

John was born in 1992.

\item How old is John?
\item How old will John be next year?

Ideally, I should also allow \item[1,0] or something similar to specify the question value. The output should be like:

Question 1. John was born in 1992.

a) How old is John?

b) How old will John be next year?

Is there any enumerating package which supports this behavior? If not, how could I do it manually?

  • What should \item[1,0] translate to in your output?
    – Werner
    Apr 7, 2015 at 18:33
  • 3
    There are some packages devoted to this kind of stuff, namely exsheets, probsoln or the exam class.
    – Johannes_B
    Apr 7, 2015 at 18:34
  • @Werner "a) (1,0 points) How old is John?" for example, although the format is not the biggest issue.
    – villasv
    Apr 7, 2015 at 18:38

1 Answer 1


As Johannes_B points out, there are specialized document classes and packages devoted to this. But if you want something simpler...

\setbox0=\hbox{Question \thequestion.}%
John was born in 1992.

\item How old is John?
\item How old will John be next year?

Mary was born in 1995.

\item How old is Mary?
\item How much older than Mary is John?


enter image description here

  • Amazing, thak you very much. I'll take a look at the exam class too.
    – villasv
    Apr 7, 2015 at 19:09

You must log in to answer this question.

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