# A list of all the labelled sentences

I keep adding a class of sentences in different areas of my tex:

\section{...}
...
sentence1
...
\subsection{...}
...
sentence2
...
\section{...}
...
sentence3
...


I would like to make a add mechanisms, label all the sentences and later summarize them in a place by listallthesentences:

\section{...}
...
...
\subsection{...}
...
...
\section{...}
...
...
\section{summary}
\listallthesentences


In the summary, it will be better, if all the sentences are repeated and have a reference pointed to their initial place.

Does anyone know how to realize this?

-
This is too vague; what would you list in the "List of all sentences"? –  egreg Oct 17 '12 at 9:37
Just repeat the sentences which are labelled with add, and have a reference pointed to their initial place... –  SoftTimur Oct 17 '12 at 9:38
Use the package tocloft, see also tex.stackexchange.com/questions/61086/…;. –  canaaerus Oct 17 '12 at 11:12
In my answer below I provided a solution for generating the list; it's not clear, however, what you mean with "labelled sentences". Could you please ellaborate a little more about this labelling? –  Gonzalo Medina Oct 17 '12 at 13:09

You can use \@starttoc to generate a list similar to the ToC, Lof or LoT (it's not clear from the description, however, what "labelled sentence" means):

\documentclass{article}
\usepackage{hyperref}

\makeatletter
\newcommand\listofsentences{\@starttoc{los}}
\makeatother

\begin{document}

\section{Test Section One}
\section{Test Section Two}

\section{Summary}
\listofsentences

\end{document}


A variant (requested in a comment) without page numbers and with normal font for the entries in the new list:

\documentclass{article}
\usepackage{hyperref}

\makeatletter
\newcounter{sentence}
\newcommand\listofsentences{\@starttoc{los}}
\stepcounter{sentence}%
\newcommand\l@sentence[2]{\par\noindent#1}
\makeatother

\begin{document}

\section{Test Section One}