I'm trying to typeset a SRS document, and I'd like to create custom macros for integrating elements in a table.
That is, what I want to do is to specify requirements for a software this way:
\SrsReqTableStart
\SrsReqAdd{%
code=A001,
desc=Gestione stati lavorazione,
prior=5
}
\SrsReqTableEnd
The problem is that when combining key-value arguments with table rows, after the first ampersand & character it stops recognizing custom commands.
To make myself clearer, this code defines the macros:
\newcommand{\SrsReqTableStart}{
\vspace{10pt}
\begin{tabular}{ l l l l l }
ID & Nome & Prior. & Sforzo \\
\hline
}
\newcommand{\SrsReqTableEnd}{
\end{tabular}
}
\pgfkeys{
/srsreq/.is family, /srsreq,
code/.estore in = \srsReqCode,
desc/.estore in = \srsReqDesc,
prior/.estore in = \srsReqPrior,
}
\newcommand{\SrsReqAdd}[1]{
\pgfkeys{/srsreq, #1}%
\hyperref[\srsReqCode]{\srsReqCode} \srsReqDesc &%
\tabularnewline
}
And it works this way, but when I write some command (text works) after the & character, it throws an error.
\hyperref[\srsReqCode]{\srsReqCode} & \srsReqDesc %
Tried already researching, changing commands and key/value packages. Nothing changed this situation.
Thanks
\documentclassto\end{document}would be even better. – egreg Apr 23 '17 at 10:07