How can I do numbering with a hanging indent to the left into the page margin?

I am compiling some solutions to textbook exercises, and I am trying to do so in the style of the book. The way the book does it is that the body of each exercise appears unindented, left-aligned, where one would expect it to be, at the left margin, but the number for the problem is right-aligned to the left of that.

An impression of the result is this:

     This is the left margin.

1. This is the first problem.

This is the first paragraph of the first solution, which has a normal first-line
indent.
This is the second paragraph of the first solution...

This is a new paragraph following a line break, still in the first solution.

This is the second page of the first solution.

2. This problem follows.
...
10. This is the tenth problem.


I would be equally happy with the following:

This is the left margin.

1. This is the first problem.

2. This problem follows.
...
10. This is the tenth problem.


The numbers are in boldface and wrap around every chapter (so there are multiple 1's, 2's, etc.), and solutions are (to be) typed in between.

-
Is there any reason not to use an enumerate list? As far as I understand this would give you the second layout. And then it would be a matter of changing some list parameters (which I'd have to look up, but I'm sure someone here knows) to get the first one. – Caramdir Jan 7 '11 at 21:30
I honestly don't know enough about the flexibility of the enumerate command (or enumitem package) to be sure. Both the problem statements and solutions can be multi-paragraph, multi-display affairs, and I thought \item got ticked off when you tried to include multiple paragraphs in an item. – jdc Jan 7 '11 at 22:18
Lists are robust enough that you can't break them that way. – Caramdir Jan 7 '11 at 22:20
– barbara beeton Jan 18 '15 at 15:04

enumerate might be one solution. In that case I would use the enumitem package to customize the list according to the requirements.

For longer solutions, you could better customize the sectioning. For this, I would use titlesec. Here's a short example for such hanging headings and formatting like in your comment below:

\documentclass{book}
\usepackage{titlesec}
\titleformat{\section}{\normalfont\slshape}{\makebox[2em][r]{\textbf{\thesection.}}}{1em}{}
\titlespacing*{\section}{-3em}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
\renewcommand*{\thesection}{\arabic{section}}
\begin{document}
\chapter{One}
This is the left margin.
\section{This is the first problem.}
This is the solution.
\section{This problem follows.}

Here \makebox puts the label into a box of fixed width and aligned to the right. Other values cause the overhanging into the left margin.