summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/stex/problem/problem.sty.ltxml
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/stex/problem/problem.sty.ltxml')
-rw-r--r--Master/texmf-dist/tex/latex/stex/problem/problem.sty.ltxml55
1 files changed, 55 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/stex/problem/problem.sty.ltxml b/Master/texmf-dist/tex/latex/stex/problem/problem.sty.ltxml
new file mode 100644
index 00000000000..0ef5044333e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/stex/problem/problem.sty.ltxml
@@ -0,0 +1,55 @@
+# -*- CPERL -*-
+package LaTeXML::Package::Pool;
+use strict;
+use LaTeXML::Package;
+RequirePackage('sref');
+RegisterNamespace('prob'=>"http://omdoc.org/ontology/problems#");
+RegisterDocumentNamespace('prob'=>"http://omdoc.org/ontology/problems#");
+DefCMPEnvironment('{problem} OptionalKeyVals:problem',
+ "<omdoc:exercise ?&KeyVal(#1,'id')(xml:id='&KeyVal(#1,'id')')()"
+ . "prob:dummy='for the namespace'"
+ . "?#locator(stex:srcref='#locator')()>"
+ . "?&KeyVal(#1,'title')(<dc:title ?#locator(stex:srcref='#locator')()>&KeyVal(#1,'title')</dc:title>)()"
+ . "?&KeyVal(#1,'min')(<omdoc:meta property='prob:solvedinminutes' "
+ . "?#locator(stex:srcref='#locator')()>&KeyVal(#1,'min')</omdoc:meta>)()"
+ . "?&KeyVal(#1,'pts')(<omdoc:meta property='prob:points' "
+ . "?#locator(stex:srcref='#locator')()>&KeyVal(#1,'pts')</omdoc:meta>)()"
+ . "<omdoc:CMP ?#locator(stex:srcref='#locator')()><omdoc:p>#body"
+ ."</omdoc:exercise>\n");
+DefKeyVal('soln','id','Semiverbatim');
+DefKeyVal('soln','height','Semiverbatim');
+DefKeyVal('soln','for','Semiverbatim');
+DefCMPEnvironment('{solution} OptionalKeyVals:soln',
+ "<omdoc:solution ?&KeyVals(#1,'for')(for='&KeyVal(#1,'for')')() ?#locator(stex:srcref='#locator')()>"
+ . "#body"
+ . "</omdoc:solution>");
+DefCMPEnvironment('{exnote}',
+ "<omdoc:hint ?#locator(stex:srcref='#locator')()>"
+ . "<omdoc:CMP ?#locator(stex:srcref='#locator')()>"
+ . "<omdoc:p>#body<omdoc:p>"
+ . "</omdoc:CMP>"
+ ."</omdoc:hint>");
+DefCMPEnvironment('{hint}',
+ "<omdoc:hint ?#locator(stex:srcref='#locator')()>"
+ . "<omdoc:CMP ?#locator(stex:srcref='#locator')()>"
+ . "<omdoc:p>#body</omdoc:p>"
+ . "</omdoc:CMP>"
+ ."</omdoc:hint>");
+DefConstructor('\pts{}',"");
+DefConstructor('\min{}',"");
+DefKeyVal('prob','pts','Semiverbatim');
+DefKeyVal('prob','min','Semiverbatim');
+DefKeyVal('prob','title','Semiverbatim');
+DefConstructor('\includeproblem OptionalKeyVals:prob Semiverbatim',
+ "<omdoc:ref xref='#2' ?#locator(stex:srcref='#locator')() "
+ . "prob:dummy='for the namespace'>"
+ . "?&KeyVal(#1,'title')(<dc:title ?#locator(stex:srcref='#locator')()>&KeyVal(#1,'title')</dc:title>)()"
+ . "?&KeyVal(#1,'min')(<omdoc:meta property='prob:solvedinminutes' "
+ . "?#locator(stex:srcref='#locator')()>&KeyVal(#1,'min')</omdoc:meta>)()"
+ . "?&KeyVal(#1,'pts')(<omdoc:meta property='prob:points' "
+ . "?#locator(stex:srcref='#locator')()>&KeyVal(#1,'pts')</omdoc:meta>)()"
+ ."</omdoc:ref>");
+Tag('omdoc:exercise',afterOpen=>\&numberIt);
+Tag('omdoc:solution',afterOpen=>\&numberIt);
+Tag('omdoc:hint',afterOpen=>\&numberIt);
+1;