As Christian suggests, using the enumitem package is probably the best approach. I would go one step further than the answer he refers to and define a new problems
environment for your problems. To do what you want using enumitem
is as simple as:
\newlist{problems}{enumerate}{1}% or 2 or 3 if you want to nest
\setlist[problems]{label=\thechapter.\arabic*,
ref=Problem \thechapter.\arabic*
}
Here I am assuming that you want \ref{...}
to print something like Problem 1.2
. If you just want it to print 1.2
then omit the ref=...
. For more details consult the very readable enumitem
manual.
In fact, as shown below, I would also have the problems
environment automatically add a heading for the problems, which you can do using the before=
option from. enumitem
. Below I have used \section{...}
but perhaps \section*{...}
or \subsection{...}
etc would work better for you.
Here a full minimal working example:
\documentclass{book}
\usepackage{enumitem}
\newlist{problems}{enumerate}{1}% or 2 or 3 if you want to nest
\setlist[problems]{label=\thechapter.\arabic*,
ref=Problem \thechapter.\arabic*,
before={\section{Problems for Chapter \thechapter}}
}
\begin{document}
\chapter{First chapter}
\begin{problems}
\item Is the Riemann hypothesis true? \label{Riemann}
\item Find the first counter-example to the twin primes conjecture
\label{twins}
\end{problems}
Actually, \ref{Riemann} and \ref{twins} are quite hard, so allow at
least an extra week.
\end{document}
For completeness, this produces:
