GeneralVery Basic Question About Enumeration

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
andre
Posts: 1
Joined: Fri Jul 06, 2007 9:31 pm

Very Basic Question About Enumeration

Post by andre »

I want to keep a running tab of examples throughout the text, interspersed with prose. For instance, I might want something like this:
{
Turing Machines never halt, as shown by the following:

(1) M takes itself as an argument
(2) M goes forever

However, if we add an oracle, then the machine will halt if the oracle gives the following information:

(3) You will halt

}

What I am looking for is a way to automatically enumerate (1), (2), (3) while being able to write prose in between. Can anyone help with this? Which environment do I use? Neither enumerate, nor equation, seem to do the job here.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Ted
Posts: 94
Joined: Sat Jun 23, 2007 4:11 pm

Very Basic Question About Enumeration

Post by Ted »

See the enumitem package:

http://www.ctan.org/tex-archive/help/Ca ... mitem.html

You can find its documentation here:

http://www.ctan.org/tex-archive/macros/ ... umitem.pdf

You'll want to find the information about "resume" and "resume*". It simply does not reset the counter on the next enumerate environment. See page 4 of the documentation:

Code: Select all

\usepackage{enumitem}
%...
\begin{enumerate}
\item First item.
\item Second item.
\end{enumerate}
Text.
\begin{enumerate}[resume]
\item Third item
\end{enumerate}
I think that's exactly what you want. NOTE: You may want to use the resume* option instead. That is just like resume but the options from the previous list (or enumerate) are used (you'll see that enumitem lets you change a lot of how the lists are formatted, so you might see a lot of options used).
-- Ted [home/blog]
Post Reply