Generalenumerate environment question

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
christina_t
Posts: 27
Joined: Tue Sep 16, 2008 1:16 am

enumerate environment question

Post by christina_t »

Hi again! It looks as though I have so many questions!! sorry about that... you have been extremely helpful!

to the point: I want to get a list of only the heading from the enumerate list.

I have this:

Code: Select all

\documentclass[10pt,a4paper]{article}

\usepackage{setspace}

\singlespacing

\title{TITLE}
\author{}
\date{}
\begin{document}
\maketitle
\begin{enumerate}
\item \textbf{first entry}\\
text \\
text\\
text\\
text\\
\item \textbf{second entry}\\

text \\
text \\
text \\
text \\

\end{enumerate}
\end{document}

How can I get a page with only these?:

1. \textbf{first entry}
2. \textbf{second entry}

Is that possible?

Many thanks again in advance!

Christina

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

enumerate environment question

Post by Juanjo »

Try this:

Code: Select all

\documentclass[a4paper]{article}

\usepackage{setspace}
\singlespacing

% Package that generates blind text, just
% for testing purposes
\usepackage{lipsum} 


% --- Macros to get the list of heading entries ---
\newtoks\List \List={\begin{enumerate}}
\def\AppendToks#1{\toks0={#1}%
   \edef\Act{\noexpand\List={\the\List \the\toks0}}\global\Act}
\def\HeadingEntry#1{\textbf{#1}\AppendToks{\item \textbf{#1}}}   
% --------

\begin{document}

\title{TITLE}
\author{}
\date{}
\maketitle

\begin{enumerate}

\item \HeadingEntry{First entry} \\
      \lipsum[1-2]
      
\item \HeadingEntry{Second entry} \\
      \lipsum[3-4]

\item \HeadingEntry{Third entry} \\
      \lipsum[5-6]

\end{enumerate}

% Now we write the list of heading entries
\newpage
\AppendToks{\end{enumerate}}
\the\List

\end{document}
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
christina_t
Posts: 27
Joined: Tue Sep 16, 2008 1:16 am

Re: enumerate environment question

Post by christina_t »

thank you very much! It works perfectly!
Post Reply