[OS X TeX] Intertext like command

Herb Schulz herbs at wideopenwest.com
Mon Jul 12 14:56:14 CEST 2004


On 7/11/04 9:45 PM, "Alain Schremmer" <Schremmer.Alain at verizon.net> wrote:

> Is there a way to have the same effect within \enumerate as
> \intertext{blah}has within a display?
> Regards
> --schremmer
> 

Howdy,

This should work for a level one enumerated list:

\newcounter{savepartcounteri}
\newcommand{\partbreak}[1]{%
    \setcounter{savepartcounteri}{\value{enumi}}\end{enumerate}%
    #1\relax%
    \begin{enumerate}\setcounter{enumi}{\value{savepartcounteri}}
}

Basically this saves the value of the enumerate level one counter and leaves
the en enumerate environment, puts in the text that is the argument of the
\partbreak command, re-enters an enumerate list and restores the level 1
counter. It could be easily generalized to save all the counters and restore
them all so it would work at all levels. You might have to add a \par
command just after the #1.

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)

-----------------------------------------------------
Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.





More information about the macostex-archives mailing list