# alignment problem under new environment

i have defined a new environment called "example"

 \newenvironment{ex}{\begin{quote}%
\refstepcounter{examplecounter}%
\textbf{Example \arabic{chapter}.\arabic{examplecounter}}%
}{%
\end{quote}%
}


However the outcome would be like that

Example 1.2 The function x blah blah blah...(till the right of the page)
*AND it continues here....


What i want is this... the (AND) will align exactly where the "The" words starts in the 1st line...

Example 1.2 The function x blah blah blah...(till the right of the page)
*AND it continues here....


How can it be done?

-
Should the rest of the example content all be indented according to your display, even if you have multiple paragraphs in the example? What about Example 1.11 (double-digit numbering)? – Werner Sep 4 '12 at 16:23

\documentclass{report}
\newcounter{examplecounter}[chapter]
\newenvironment{ex}{%
\refstepcounter{examplecounter}%
\list{}{%
\rightmargin\leftmargin
\settowidth\labelwidth{Example \arabic{chapter}.\arabic{examplecounter}}%
}
\item[Example \arabic{chapter}.\arabic{examplecounter}]
}{%
\endlist
}

\begin{document}

\begin{ex}
One two three One two three One two three One two three
One two three One two three One two three One two three
One two three One two three One two three One two three
\end{ex}

\end{document}

-