新环境下的配准问题

新环境下的配准问题

我定义了一个名为“示例”的新环境

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

但结果会是这样的

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

我想要的是这个......(AND)将精确对齐第一行中“The”单词的起始位置......

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

如何做呢?

答案1

在此处输入图片描述

\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}

相关内容