Generalbreaking out of an enumerate for one sentence

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
dmt
Posts: 82
Joined: Sat Mar 15, 2008 8:13 pm

breaking out of an enumerate for one sentence

Post by dmt »

I want to add a sentence in the middle of an enumerate that isn't part of the enumeration. I would like to do this without the need to add any new packages (or at least any non standard ones, since I am trying to make a very easily portable template for others to use).

The idea would be a result something like this:

Code: Select all

This is how you do these problems:
   1.  stuff and stuff
   2.  more stuff and stuff

This is how you do these other problems:
   3. even more stuff and stuff
   4. foo and bar and stuff
I had done this originally by using different enumerate environments, but I would now like the numbering to continue from one "group" to the next.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

breaking out of an enumerate for one sentence

Post by localghost »

The enumitem package makes it possible.

Code: Select all

This is how you do these problems:
\begin{enumerate}
  \item stuff and stuff
  \item more stuff and stuff
\end{enumerate}
This is how you do these other problems:
\begin{enumerate}[resume]
  \item even more stuff and stuff
  \item foo and bar and stuff
\end{enumerate}
Further information can be found in the manual.


Best regards
Thorsten¹
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

breaking out of an enumerate for one sentence

Post by gmedina »

Hi dmt,

if you don't want to use the enumitem package (as localghost suggested), you can reset manually the corresponding counter:

Code: Select all

\documentclass{report}

\begin{document}

This is how you do these problems:
\begin{enumerate}
  \item stuff and stuff
  \item more stuff and stuff
\end{enumerate}
This is how you do these other problems:
\begin{enumerate}
\setcounter{enumi}{2}
  \item even more stuff and stuff
  \item foo and bar and stuff
\end{enumerate}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
dmt
Posts: 82
Joined: Sat Mar 15, 2008 8:13 pm

Re: breaking out of an enumerate for one sentence

Post by dmt »

Thanks you two.

Is the enumitem package standard enough that I can assume most people have it (for example, those that only have some default latex installation)?
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

breaking out of an enumerate for one sentence

Post by gmedina »

dmt wrote:...Is the enumitem package standard enough that I can assume most people have it (for example, those that only have some default latex installation)?
enumitem is not included in the Basic MiKTeX 2.7 installation, for example.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
dmt
Posts: 82
Joined: Sat Mar 15, 2008 8:13 pm

Re: breaking out of an enumerate for one sentence

Post by dmt »

Okay, thanks.
Post Reply