summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty')
-rw-r--r--Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty21
1 files changed, 11 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty b/Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty
index ce58e497acd..c9611171662 100644
--- a/Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty
+++ b/Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty
@@ -8,21 +8,22 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{reqdoc}[2010/06/25 v0.3 Semantic Requirement Documents]
+\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}}
\newif\if@deps\@depsfalse
\DeclareOption{recorddeps}{\@depstrue}
\ProcessOptions
\RequirePackage{sref}
\RequirePackage{longtable}
\newif\ifreqsnum\reqsnumfalse
-\omdaddkey{reqs}{numbering}
-\omdaddkey[R]{reqs}{prefix}
+\addmetakey{reqs}{numbering}
+\addmetakey[R]{reqs}{prefix}
\def\reqs@no{no}
\newenvironment{requirements}[1][]%
-{\omdsetkeys{reqs}{#1}\ifx\reqs@numbering\reqs@no\reqsnumfalse\else\reqsnumtrue\fi}{}
-\omdaddkey{req}{id}
-\omdaddkey{req}{prio}
-\omdaddkey{req}{refs}
-\omdaddkey{req}{num}
+{\metasetkeys{reqs}{#1}\ifx\reqs@numbering\reqs@no\reqsnumfalse\else\reqsnumtrue\fi}{}
+\addmetakey{req}{id}
+\addmetakey{req}{prio}
+\addmetakey{req}{refs}
+\addmetakey{req}{num}
\newcounter{reqnum}[section]
\def\req@do@refs#1#2{\let\@tmpop=\relax\@for\@I:=#1\do{\@tmpop\req@do@ref{\@I}\let\@tmpop=#2}}
\def\req@do@ref#1{\sref@hlink@ifh{#1}{\req@ref{#1}{number}}}
@@ -34,18 +35,18 @@
\def\print@req@label{\sref@target@ifh\req@id{\reqs@prefix\arabic{reqnum}: }}
\def\print@req@refs{\ifx\req@refs\@empty\else\hfill [from~\req@do@refs{\req@refs}{,}]\fi}
\newenvironment{requirement}[1][]%
-{\omdsetkeys{req}{#1}\stepcounter{reqnum}
+{\metasetkeys{req}{#1}\stepcounter{reqnum}
\ifreqsnum\ifx\req@id\@empty\else\req@def\req@id{number}\thereqnum\fi
\noindent\textbf{\print@req@label}\fi
\newcommand{\reqnote}[1]{\par\noindent Note: ##1}
\print@req@prio}
{\medskip\print@req@refs}
-\newenvironment{reqtable}[1][]{\omdsetkeys{reqs}{#1}
+\newenvironment{reqtable}[1][]{\metasetkeys{reqs}{#1}
\begin{center}\begin{longtable}{|l|l|p{6cm}|p{5cm}|l|}\hline
\# & Prio & Requirement & Notes & Refs\\\hline\hline}
{\end{longtable}\end{center}}
\newcommand{\reqline}[3][]%
-{\omdsetkeys{req}{#1}\stepcounter{reqnum}
+{\metasetkeys{req}{#1}\stepcounter{reqnum}
\req@def\req@id{number}\thereqnum% remember the number for reference
\textbf{\sref@target@ifh\req@id{\reqs@prefix\arabic{reqnum}}}&
\req@prio &#2&#3&\req@do@refs\req@refs{,}\tabularnewline\hline}