I am creating one command to define a functional requirement and many non functional requeriment in a table. I wrote the following code:
\newcounter{Number}
\newcommand{\Item}{\stepcounter{Number}\theNumber}
\newcounter{NumberReqF}
\newcommand{\ReqF}{F\stepcounter{NumberReqF}\theNumberReqF ~- }
\newcounter{NumberReqNF}[NumberReqF]
\newcommand{\ReqNF}{NF \stepcounter{NumberReqNF}\theNumberReqF .\theNumberReqNF ~- }
\usepackage{tabularx,calc}
\newcolumntype{Y}[1]{>{\setlength\hsize{#1\hsize}%
\raggedright\arraybackslash}X}
\newcolumntype{F}{|p{\columnwidth-2\tabcolsep-2\arrayrulewidth}|}
\setlength\extrarowheight{2pt}
\newcommand{\TabelaRequisito}[8]{
\setcounter{NumberReqNF}{0}
\begin{table}[h]
\noindent\begin{tabularx}{\columnwidth}{|Y{0.5}|Y{0.25}|Y{0.25}|c|c|}
\hline
\multicolumn{3}{|l|}{\ReqF #1} & \multicolumn{2}{l|}{Hidden (#2)}\tabularnewline
\hline
\multicolumn{5}{F}{#3}\tabularnewline
\hline
\multicolumn{5}{|c|}{Non-Functional Requirements}\tabularnewline
\hline
Name & Restriction & Category & Desirable & Permanent\tabularnewline
\hline
\ReqNF #4 & #5 & #6 & (#7) & (#8)\tabularnewline
\hline
\ReqNF New Non-Functional Requirement Name & & & &\tabularnewline
\hline
% more and more requirements here...
\end{tabularx}
\end{table}
}
So I would reuse this table format all the time with the command
\TabelaRequisito{Functional Requirement Name}{X}{
Functional Requirement description
}{Name}{}{Security}{X}
But I am limited to add just one non-functional requirement, I would like to know a solution that I could add as many as non-functional requirement I want. One, two, three, four,...