summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/stex/reqdoc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-11-12 00:31:31 +0000
committerKarl Berry <karl@freefriends.org>2010-11-12 00:31:31 +0000
commit70e387eb63ce4723858c48592208e193dec294f3 (patch)
tree61ec42df871a70687151ed4a6d1bc6a5c81dc53c /Master/texmf-dist/tex/latex/stex/reqdoc
parent2cee8f6dcf8e9596b5cfe9d1f3e55c61b261a320 (diff)
stex 0.9.3 (11nov10)
git-svn-id: svn://tug.org/texlive/trunk@20410 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/stex/reqdoc')
-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}