I would like to have "requirements" in my document numbered. Then I wanted to have list of requirements, but not only number of requirement and corresponding page/section but also theirs text.
I tried with:
\newtheorem{requirement}{Req.}
\begin{requirement}
first requirement
\end{requirement}
some text
\begin{requirement}
second requirement
\end{requirement}
But I couldn't create list of requirements.
I tried solution from (where I think the same problem is presented): Custom list of hypotheses in table of contents format
when I used thmtools I got the same result as using package ntheorem I mean:
Req. ...... 1
Req ....... 2
etc.
While I want something like:
first requirement ..... 1
second requirement .... 2
etc.
I was also thinking about another solution, what I need is to clone "figure" environment and clone table of figures, and then I can keep requirements in captions. However figure is a float, which is not what I want.
I know it is possible to use brackets [], but then I have to have to copies of the same text, one in [] second outside.
Thanks a lot,
Adam
first try:
\documentclass{book}
\usepackage{amsthm}
\renewcommand{\listtheoremname}{List of Requirements}
\newtheorem{requirement}{Req.}
\begin{document}
\listoftheorems{requirement}
\begin{requirement}
first requirement
\end{requirement}
some text.
\begin{requirement}
second requirement
\end{requirement}
\end{document}
second try:
\documentclass{book}
\usepackage{amsthm}
\usepackage{thmtools}
\declaretheorem[numberwithin=chapter]{requirement}
\renewcommand{\listtheoremname}{List of Requirements}
\begin{document}
\listoftheorems[ignoreall,show={requirement}]
\begin{requirement}
first requirement
\end{requirement}
some text.
\begin{requirement}
second requirement
\end{requirement}
\end{document}

