summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty.ltxml
blob: fd9fa13a7b8fdfe6e8b11518c11208f9316a702e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package LaTeXML::Package::Pool;
use strict;
use LaTeXML::Package;
RegisterNamespace('r'=>"http://omdoc.org/ontology/requirements#");
RegisterDocumentNamespace('r'=>"http://omdoc.org/ontology/requirements#");
DefEnvironment('{requirements} OptionalKeyVals:reqs',
       "<omdoc:omgroup type='itemize'>#body</omdoc:omgroup>");
DefEnvironment('{requirement} OptionalKeyVals:req',
      "<omdoc:omtext ?&KeyVal(#1,'id')(xml:id='&KeyVal(#1,'id')')() r:dummy='to ensure the namespace'>"
      . "<omdoc:meta property='texttype' content='r:requirement'/>"
     .  "?&KeyVal(#1,'refs')(<omdoc:link rel='r:dependsOn' href='#&KeyVal(#1,'refs')'/>)()"
      .  "#body"
      ."</omdoc:omtext>");
DefConstructor('\reqnote{}',
       "<omdoc:note type='requirement'>#1</omdoc:note>");
DefEnvironment('{reqtable} OptionalKeyVals:reqs',
       "<omdoc:omgroup type='itemize'>#body</omdoc:omgroup>");
DefConstructor('\reqline OptionalKeyVals:req{}{}',
       "<omdoc:omtext type='requirement'><omdoc:CMP>#2</omdoc:CMP></omdoc:omtext>"
      ."<omdoc:omtext type='note'><omdoc:CMP>#3</omdoc:CMP></omdoc:omtext>");
DefConstructor('\importreqs {}',"<omdoc:imports from='#1'/>");
DefMacro('\rinput','\input');
1;