I'm writing a document where I have to define multiple requirements. These requirements are scattered all over the document, since they belong in different sections and are explained seperately.
It would be good to have a central overview of all these requirements in one place, e.g. a table. Unfortunately I can't figure out, how to do this, so I don't have to write the text of the requirement manually into the table (in case I am changing the words in one of them later, it should also automatically change in the overview, similar to a glossary or a ToC).
I already made an own counter, so I don't have to number everything manually, since it's possible that I'm adding a requirement later on. However, I also tried to solve this problem before with an additional glossary, but these packages are quite... difficult to handle for me, so I failed with this approach.
A perfect solution would be, if I just have to write \newreq{Requirement description} and it would generate an automatically numbered output like R01 Requirement description - and in addition I can use a command like \printreqoverview which is printing the table.
Details like formatting or appearance I can modify later, but I am currently stuck with this referencing - and it would really help, since I have to write every description two times and check for spelling mistakes every time - a reference would help.
I'm sorry, I can't describe the problem very well I guess...
I added a minimum working example, which does not contain any referencing, just automatic numbering:
\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{fmtcount}
\newcounter{rcount}
\setcounter{rcount}{0}
\newcommand{\newreq}{
\stepcounter{rcount}
\textbf{R\padzeroes[2]{\decimal{rcount}}}
}
\begin{document}
\section{First Chapter}
\lipsum[4]
\begin{enumerate}
\item[\newreq] This is the first requirement.
\item[\newreq] This is the second requirement.
\end{enumerate}
\lipsum[4]
\begin{enumerate}
\item[\newreq] This is the third requirement.
\end{enumerate}
\lipsum[4]
\section{Overview Table}
\begin{tabular}{|l|l|}
\hline
\# & Requirement \\ \hline
\hline
R01 & Text of R01 \\ \hline
R02 & Text of R02 \\ \hline
R03 & Text of R03 \\ \hline
\end{tabular}
\end{document}
\addtocontents{lor}{\protect...}and not\addcontentsline. – Matthew Leingang Aug 13 '13 at 17:31