[OS X TeX] Exercises

George Gratzer gratzer at me.com
Fri Apr 10 12:56:33 EDT 2009


In my new book, I have exercises at the end of each section. I use the  
xcb environment from amsbook.cls:

\newenvironment{xcb}{%
   \setcounter{enumi}{0}%
   \settowidth{\leftmargini}{\labelenumi\hskip\labelsep}%
   \setcounter{enumii}{4}% letter d
   \settowidth{\leftmarginii}{\labelenumii\hskip\labelsep}%
   \@startsection{section}% counter name; ignored because of the
                                 % * below
   {1}% sectioning level
   {\z@}% indent to the left of the section title
   {18\p@\@plus2\p@}% vertical space above
   {1sp}% Space below of 13pt base-to-base, so none needs to be added
       % here; but \z@ would cause the following text to be run-in, so  
we
       % use 1sp instead.
   {\bfseries}% The font of the subsection title
   *% always unnumbered
}{%
   \par
}


modified as follows:

\newenvironment{exercises}
      {
      \begin{xcb}{}\noindent\textbf{Exercises}
      \begin{enumerate}
      \renewcommand{\labelenumi}{\theenumi.}
      \settowidth{\leftmargini}{NN.\hskip\labelsep}
      }
      {\end{enumerate}\end{xcb}}

and then

\begin{exercises}

\item

\begin{exercises}

works well.

Problem: I want the difficult exercises marked with a *:

25*.

How could I do that? How do I modify one number, without effecting the  
rest?

GG



More information about the MacOSX-TeX mailing list