diff options
author | Karl Berry <karl@freefriends.org> | 2010-07-20 22:30:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-07-20 22:30:22 +0000 |
commit | cdfe96a3444a4d0664b9702c4ff6fe6622257834 (patch) | |
tree | 577232accd4bf41d7480fae7c177ceef147c8fea /Master/texmf-dist/tex/latex/stex/statements | |
parent | 47e2d96a8faed88dfedd17ca5352227d585a6710 (diff) |
stex update once more
git-svn-id: svn://tug.org/texlive/trunk@19548 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/stex/statements')
-rw-r--r-- | Master/texmf-dist/tex/latex/stex/statements/statements.sty | 135 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/stex/statements/statements.sty.ltxml | 322 |
2 files changed, 457 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/stex/statements/statements.sty b/Master/texmf-dist/tex/latex/stex/statements/statements.sty new file mode 100644 index 00000000000..e761512a9b3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/statements/statements.sty @@ -0,0 +1,135 @@ +%% +%% This is file `statements.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% statements.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{statements}[2010/06/25 v1.0 Semantic Markup for Statements] +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{omdoc}} +\ProcessOptions +\RequirePackage{omtext} +\RequirePackage{modules} +\RequirePackage[hyperref]{ntheorem} +\theoremstyle{plain} +\def\STpresent#1{#1} +\def\define@statement@env#1{% +\newenvironment{#1}[1][]{\omdsetkeys{omtext}{##1}\sref@target% +\ifx\omtext@display\st@flow\else% +\ifx\omtext@title\@empty\begin{ST#1Env}\else\begin{ST#1Env}[\omtext@title]\fi% +\ifx\sref@id\@empty\else\label{#1.\sref@id}\fi +\csname st@#1@initialize\endcsname\fi +\ifx\sref@id\@empty\sref@label@id{here}\else% +\sref@label@id{\STpresent{\csname ST#1EnvKeyword\endcsname}~\@currentlabel}\fi} +{\csname st@#1@terminate\endcsname\ifx\omtext@display\st@flow\else\end{ST#1Env}\fi}} +\newenvironment{assertion}[1][]{\omdsetkeys{omtext}{#1}\sref@target% +\ifx\omtext@display\st@flow\else% +\ifx\omtext@title\@empty\begin{ST\omtext@type AssEnv}% +\else\begin{ST\omtext@type AssEnv}[\omtext@title]\fi\fi% +\ifx\omtext@type\@empty\sref@label@id{here}\else% +\sref@label@id{\STpresent{\csname ST\omtext@type AssEnvKeyword\endcsname}~\@currentlabel}\fi} +{\ifx\omtext@display\st@flow\else\end{ST\omtext@type AssEnv}\fi} +\def\st@theorem@kw{Theorem} +\def\st@lemma@kw{Lemma} +\def\st@proposition@kw{Proposition} +\def\st@corollary@kw{Corollary} +\def\st@conjecture@kw{Conjecture} +\def\st@falseconjecture@kw{Conjecture (false)} +\def\st@postulate@kw{Postulate} +\def\st@obligation@kw{Obligation} +\def\st@assumption@kw{Assumption} +\def\st@observation@kw{Observation} +\theorembodyfont{\itshape} +\theoremheaderfont{\normalfont\bfseries} +\newtheorem{STtheoremAssEnv}{\st@theorem@kw} +\newtheorem{STlemmaAssEnv}[STtheoremAssEnv]{\st@lemma@kw} +\newtheorem{STpropositionAssEnv}[STtheoremAssEnv]{\st@proposition@kw} +\newtheorem{STcorollaryAssEnv}[STtheoremAssEnv]{\st@corollary@kw} +\newtheorem{STconjectureAssEnv}[STtheoremAssEnv]{\st@conjecture@kw} +\newtheorem{STfalseconjectureAssEnv}[STtheoremAssEnv]{\st@falseconjecture@kw} +\newtheorem{STpostulateAssEnv}[STtheoremAssEnv]{\st@postulate@kw} +\newtheorem{STobligationAssEnv}[STtheoremAssEnv]{\st@obligation@kw} +\newtheorem{STassumptionAssEnv}[STtheoremAssEnv]{\st@assumption@kw} +\newtheorem{STobservationAssEnv}[STtheoremAssEnv]{\st@observation@kw} +\def\st@example@initialize{}\def\st@example@terminate{} +\define@statement@env{example} +\def\st@example@kw{Example} +\theorembodyfont{\upshape} +\newtheorem{STexampleEnv}[STtheoremAssEnv]{\st@example@kw} +\def\st@axiom@initialize{}\def\st@axiom@terminate{} +\define@statement@env{axiom} +\def\st@axiom@kw{Axiom} +\theorembodyfont{\upshape} +\newtheorem{STaxiomEnv}[STtheoremAssEnv]{\st@axiom@kw} +\srefaddidkey{symboldec} +\omdaddkey{symboldec}{functions} +\omdaddkey{symboldec}{role} +\omdaddkey{symboldec}{title} +\omdaddkey{symboldec}{name} +\omdaddkey{symboldec}{display} +\def\symboldec@type{Symbol} +\newenvironment{symboldec}[1][]{\omdsetkeys{symboldec}{#1}\sref@target +\ifx\symboldec@display\st@flow\else{\stDMemph{\symboldec@type} \symboldec@name:}\fi% +\ifx\symboldec@title\@empty~\else~(\stDMemph{\symboldec@title})\par\fi}{} +\newcommand{\symtype}[2]{Type (#1): #2} +\newif\ifst@indef\st@indeffalse +\newenvironment{definition}[1][]{\omdsetkeys{omtext}{#1}\sref@target\st@indeftrue% +\ifx\omtext@display\st@flow\else% +\ifx\omtext@title\@empty\begin{STdefinitionEnv}\else\begin{STdefinitionEnv}[\omtext@title]\fi\fi% +\ifx\sref@id\@empty\sref@label@id{here}\else% +\sref@label@id{\STpresent{\csname STdefinitionEnvKeyword\endcsname}~\@currentlabel}\fi} +{\ifx\omtext@display\st@flow\else\end{STdefinitionEnv}\fi} +\def\st@definition@kw{Definition} +\theorembodyfont{\upshape} +\newtheorem{STdefinitionEnv}[STtheoremAssEnv]{\st@definition@kw} +\def\notemph#1{{\bf{#1}}} +\def\st@notation@terminate{} +\def\st@notation@initialize{} +\define@statement@env{notation} +\def\st@notation@kw{Notation} +\theorembodyfont{\upshape} +\newtheorem{STnotationEnv}[STtheoremAssEnv]{\st@notation@kw} +\def\st@def@target#1#2{\def\@test{#1}% +\@ifundefined{mod@id}% +{\PackageError{statements}{definiendum in unidentified module}% +{\protect\definiendum, \protect\defin, +\protect\twindef, \protect\atwindef\MessageBreak +may only be called in a module with id key}}% +{\ifst@indef\else\PackageWarning{statements} + {definiendum outside definition context\MessageBreak +\protect\definiendum, \protect\defin, +\protect\twindef, \protect\atwindef\MessageBreak +do not make sense semantically outside a definition.\MessageBreak +Consider wrapping the defining phrase in a \protect\inlinedef}\fi +\ifx\@test\@empty% +\expandafter\sref@target@ifh{sref@#2@\mod@id @target}{}\else% +\expandafter\sref@target@ifh{sref@#1@\mod@id @target}{}\fi}} +\newcommand{\definiendum}[2][]{\st@def@target{#1}{#2}\defemph{#2}} +\newcommand{\notatiendum}[2][]{\notemph{#2}} +\newcommand{\defin}[2][]{\definiendum[#1]{#2}\omdoc@index[#1]{#2}} +\newcommand{\definalt}[3][]{\definiendum[#1]{#2}\omdoc@index[#1]{#3}} +\newcommand{\twindef}[3][]{\st@def@target{#1}{#2-#3}\defemph{#2 #3}\@twin[#1]{#2}{#3}} +\newcommand{\twindefalt}[4][]{\definiendum[#1]{#2}\@twin[#1]{#3}{#4}} +\newcommand{\atwindef}[4][]{\st@def@target{#1}{#2-#3-#4}\defemph{#2 #3 #4}\@atwin[#1]{#2}{#3}{#4}} +\newcommand{\atwindefalt}[5][]{\definiendum[#1]{#2}\@atwin[#1]{#3}{#4}{#5}} +\newcommand{\inlinedef}[2][]{\omdsetkeys{omtext}{#1}\sref@target\sref@label@id{here}\st@indeftrue #2} +\omdaddkey[\mod@id]{termref}{cd} +\omdaddkey{termref}{cdbase} +\omdaddkey{termref}{name} +\omdaddkey{termref}{role} +\def\termref@set#1#2{\def\termref@name{#2}\omdsetkeys{termref}{#1}} +\newcommand{\termref}[2][]{\omdsetkeys{termref}{#1}\st@termref{#2}} +\def\st@termref#1{\ifx\termref@name\@empty\def\termref@name{#1}\fi% +\mod@termref\termref@cd\termref@name{#1}} +\newcommand{\twinref}[3][]{\termref@set{#1}{#2-#3}\st@termref{#2 #3}} +\newcommand{\atwinref}[4][]{\termref@set{#1}{#2-#3-#4}\st@termref{#2 #3 #4}} +\newcommand{\termin}[2][]{\termref[#1]{#2}\index{#2}} +\providecommand{\termemph}[1]{#1} +\providecommand{\defemph}[1]{{\textbf{#1}}} +\providecommand{\stDMemph}[1]{{\textbf{#1}}} +\newcommand{\symref}[2]{\@nameuse{mod@symref@#1}{#2}} +\endinput +%% +%% End of file `statements.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/statements/statements.sty.ltxml b/Master/texmf-dist/tex/latex/stex/statements/statements.sty.ltxml new file mode 100644 index 00000000000..709150f1b9d --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/statements/statements.sty.ltxml @@ -0,0 +1,322 @@ +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +RequirePackage('omtext'); +RequirePackage('modules'); +sub lowcase {my ($string) = @_; $string ? return lc(ToString($string)) : return('')}#$ +sub dashed { join('-',map($_->toString,@_));}#$ +sub makeNCName { + my ($name) = @_; + my $ncname=$name; + $ncname=~s/\s/_/g; #Spaces to underscores + $ncname="_$ncname" if $ncname!~/^(\w|_)/; #Ensure start with letter or underscore + ##More to come... + $ncname; +} +sub simple_wrapper { + my @input = @_; + return '' if (!@input); + @input = map(split(/\s*,\s*/,$_->toString),@input); + my $output=join(" ",@input); + $output=~s/(^ )|[{}]//g; #remove leading space and list separator brackets + $output||''; +} +sub hash_wrapper{ + my @input = @_; + return '' if (!@input); + @input = map(split(/\s*,\s*/,$_->toString),@input); + my $output=join(".sym #",@input); + $output=~s/(^\.sym )|[{}]//g; #remove leading space and list separator brackets + "#$output"||''; +} +DefCMPEnvironment('{assertion} OptionalKeyVals:omtext', + "<omdoc:assertion " + . "?&KeyVal(#1,'id')(xml:id='&KeyVal(#1,'id')')() " + . "?&KeyVal(#1,'theory')(theory='&KeyVal(#1,'theory')')() " + . "type='&lowcase(&KeyVal(#1,'type'))'>" + . "?&KeyVal(#1,'title')(<dc:title>&KeyVal(#1,'title')</dc:title>)()" + . "<omdoc:CMP><omdoc:p>#body" + ."</omdoc:assertion>\n"); +DefCMPEnvironment('{example} OptionalKeyVals:omtext', + "<omdoc:example " + . "?&KeyVal(#1,'id')(xml:id='&KeyVal(#1,'id')')() " + . "?&KeyVal(#1,'for')(for='&hash_wrapper(&KeyVal(#1,'for'))')()>" + . "<omdoc:CMP><omdoc:p>#body" + . "</omdoc:example>\n"); +DefCMPEnvironment('{axiom} OptionalKeyVals:omtext', + "<omdoc:axiom " + . "?&KeyVal(#1,'id')(xml:id='&KeyVal(#1,'id')')()>" + . "?&KeyVal(#1,'title')(<dc:title>&KeyVal(#1,'title')</dc:title>)()" + . "<omdoc:CMP><omdoc:p>#body" + . "</omdoc:axiom>\n"); +DefEnvironment('{symboldec} OptionalKeyVals:symboldec', + "<omdoc:symbol " + . " ?&KeyVal(#1,'id')(xml:id='&KeyVal(#1,'id')')" + . "(xml:id='&makeNCName(&KeyVal(#1,'name')).def.sym')" + . "name='&KeyVal(#1,'name')'>" + . "<dc:description>#body</dc:description>" + ."</omdoc:symbol>\n"); +DefConstructor('\symtype{}{}', + "<omdoc:type system='#1'>#2</omdoc:type>"); +sub definitionBody { + my ($doc, $keyvals, %props) = @_; + my $for = $keyvals->getValue('for') if $keyvals; + my $type = $keyvals->getValue('type') if $keyvals; + my %for_attr=(); + if (ToString($for)) { + $for = ToString($for); + $for =~ s/^{(.+)}$/$1/eg; + foreach (split(/,\s*/,$for)) { + $for_attr{$_}=1; + }} + my @symbols = @{$props{defs} || []}; + foreach my $symb(@symbols) { + next if $for_attr{$symb}; + $for_attr{$symb}=1; + $doc->insertElement('omdoc:symbol', undef, (name=>$symb, "xml:id"=>makeNCName("$symb.def.sym"))); + } + my %attrs = (); + $for = join(" ",(keys %for_attr)); + $attrs{'for'} = $for if $for; + my $id = $keyvals->getValue('id') if $keyvals; + $attrs{'xml:id'} = $id if $id; + $attrs{'type'} = $type if $type; + $doc->openElement('omdoc:definition', %attrs); + my $title = $keyvals->getValue('title') if $keyvals; + if ($title) { + $doc->openElement('omdoc:metadata'); + $doc->openElement('dc:title'); + $doc->absorb($title); + $doc->closeElement('dc:title');} + $doc->openElement('omdoc:CMP'); + $doc->openElement('omdoc:p'); + $doc->absorb($props{body}) if $props{body}; + $doc->maybeCloseElement('omdoc:p'); + $doc->maybeCloseElement('omdoc:CMP'); + $doc->closeElement('omdoc:definition'); + return; } +DefCMPEnvironment('{definition} OptionalKeyVals:omtext', sub{definitionBody(@_)}, + afterDigestBegin=>sub { + my ($stomach, $whatsit) = @_; + my @symbols = (); + $whatsit->setProperty(defs=>\@symbols); + AssignValue('defs', \@symbols); return; }, + afterDigest => sub { AssignValue('defs', undef); return; }); +DefCMPEnvironment('{notation} OptionalKeyVals:omtext', + "<omdoc:definition " + . "?&KeyVal(#1,'id')(xml:id='&KeyVal(#1,'id').not')()" + . "?&KeyVal(#1,'for')(for='&simple_wrapper(&KeyVal(#1,'for'))')()>" + . "?&KeyVal(#1,'title')(<dc:title>&KeyVal(#1,'title')</dc:title>)()" + . "<omdoc:CMP><omdoc:p>#body" + . "</omdoc:definition>\n"); +DefConstructor('\notatiendum OptionalKeyVals:notation {}', + "<omdoc:phrase type='notation'>#2</omdoc:phrase>"); +DefConstructor('\definiendum [] {}', + "<omdoc:term role='definiendum' name='#name' cd='#theory'>#2</omdoc:term>", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $whatsit->getArg(2) unless $name; + $whatsit->setProperty(name=>$name->toString); + push(@$addr, $name->toString) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module')); + return; });#$ +DefConstructor('\defin[]{}', + "<omdoc:idx>" + . "<omdoc:idt>" + . "<omdoc:term role='definiendum' name='?#1(#1)(#2)' cd='#theory'>#2</omdoc:term>" + . "</omdoc:idt>" + . "<omdoc:ide index='default'><omdoc:idp>#2</omdoc:idp></omdoc:ide>" + ."</omdoc:idx>", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $whatsit->getArg(2) unless $name; + push(@$addr, $name->toString) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module'));#$ + return; }, + alias=>'\defin'); +DefConstructor('\definalt[]{}{}', + "<omdoc:idx>" + . "<omdoc:idt>" + . "<omdoc:term role='definiendum' name='?#1(#1)(#3)' cd='#theory'>#2</omdoc:term>" + . "</omdoc:idt>" + . "<omdoc:ide index='default'><omdoc:idp>#3</omdoc:idp></omdoc:ide>" + ."</omdoc:idx>", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $whatsit->getArg(3) unless $name; + push(@$addr, $name->toString) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module'));#$ + return; }, + alias=>'\definalt'); +DefConstructor('\twindef[]{}{}', + "<omdoc:idx>" + . "<omdoc:idt>" + . "<omdoc:term role='definiendum' name='?#1(#1)(&dashed(#2,#3))' cd='#theory'>" + . "#2 #3" + . "</omdoc:term>" + . "</omdoc:idt>" + . "<omdoc:ide index='default'>" + . "<omdoc:idp>#2</omdoc:idp>" + . "<omdoc:idp>#3</omdoc:idp>" + . "</omdoc:ide>" + ."</omdoc:idx>", + afterDigest => sub { + my ($stomach, $whatsit) = @_; +my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $name->toString if $name; + $name = $whatsit->getArg(2)->toString.'-'.$whatsit->getArg(3)->toString unless $name; + push(@$addr, $name) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module')); + return; }, + alias=>'\twindef');#$ +DefConstructor('\twindefalt[]{}{}{}', + "<omdoc:idx>" + . "<omdoc:idt>" + . "<omdoc:term role='definiendum' name='?#1(#1)(&dashed(#3,#4))' cd='#theory'>" + . "#2" + . "</omdoc:term>" + . "</omdoc:idt>" + . "<omdoc:ide index='default'>" + . "<omdoc:idp>#3</omdoc:idp>" + . "<omdoc:idp>#4</omdoc:idp>" + . "</omdoc:ide>" + ."</omdoc:idx>", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $name->toString if $name; + $name = $whatsit->getArg(3)->toString.'-'.$whatsit->getArg(4)->toString unless $name; + push(@$addr, $name) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module')); + return; }, + alias=>'\twindef');#$ +DefConstructor('\atwindef[]{}{}{}', + "<omdoc:idx>" + . "<omdoc:idt>" + . "<omdoc:term role='definiendum' cd='#theory' name='?#1(#1)(&dashed(#2,#3,#4))'>#2 #3 #4</omdoc:term>" + . "</omdoc:idt>" + . "<omdoc:ide index='default'>" + . "<omdoc:idp>#2</omdoc:idp>" + . "<omdoc:idp>#3</omdoc:idp>" + . "<omdoc:idp>#4</omdoc:idp>" + . "</omdoc:ide>" + . "</omdoc:idx>", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $name->toString if $name; + $name = $whatsit->getArg(2)->toString.'-'.$whatsit->getArg(3)->toString.'-'.$whatsit->getArg(4)->toString unless $name; + push(@$addr, $name) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module')); + return; }, + alias=>'\atwindef'); +DefConstructor('\atwindefalt[]{}{}{}{}', + "<omdoc:idx>" + . "<omdoc:idt>" + . "<omdoc:term role='definiendum' cd='#theory' name='?#1(#1)(&dashed(#3,#4,#5))'>#2</omdoc:term>" + . "</omdoc:idt>" + . "<omdoc:ide index='default'>" + . "<omdoc:idp>#3</omdoc:idp>" + . "<omdoc:idp>#4</omdoc:idp>" + . "<omdoc:idp>#5</omdoc:idp>" + . "</omdoc:ide>" + . "</omdoc:idx>", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $name->toString if $name; + $name = $whatsit->getArg(3)->toString.'-'.$whatsit->getArg(4)->toString.'-'.$whatsit->getArg(5)->toString unless $name; + push(@$addr, $name) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module')); + return; }, + alias=>'\atwindef'); +DefConstructor('\inlinedef OptionalKeyVals:omtext {}', sub { + my ($document, $keyvals, $body, %props) = @_; + my $for = $keyvals->getValue('for') if $keyvals; + my %for_attr=(); + if (ToString($for)) { + $for = ToString($for); + $for =~ s/^{(.+)}$/$1/eg; + foreach (split(/,\s*/,$for)) { + $for_attr{$_}=1; + }} + my @symbols = @{$props{defs} || []}; + #Prepare for symbol insertion -insert before the parent of the closest ancestor CMP element + my $original_node = $document->getNode; + my $xc = XML::LibXML::XPathContext->new( $original_node ); + $xc->registerNs('omdoc', 'http://omdoc.org/ns'); + my ($statement_ancestor) = $xc->findnodes('./ancestor::omdoc:CMP/..'); + foreach my $symb(@symbols) { + next if $for_attr{$symb}; + $for_attr{$symb}=1; + my $symbolnode = XML::LibXML::Element->new('symbol'); + $symbolnode->setAttribute(name=>$symb); + $symbolnode->setAttribute("xml:id"=>makeNCName("$symb.def.sym")); + $statement_ancestor->parentNode->insertBefore($symbolnode,$statement_ancestor); + } + #Restore the insertion point + $document->setNode($original_node); + my %attrs = (); + $for = join(" ",(keys %for_attr)); + $attrs{'for'} = $for if $for; + my $id = $keyvals->getValue('id') if $keyvals; + $attrs{'xml:id'} = $id if $id; + $attrs{'type'} = 'inlinedef'; + $document->openElement('omdoc:phrase',%attrs); + $document->absorb($body); + $document->closeElement('omdoc:phrase'); }, + #Prepare 'defs' hooks for \defin and \definiendum symbol names + beforeDigest=>sub { + my @symbols = (); + AssignValue('defs', \@symbols); return; }, + #Adopt collected names as 'defs' property, remove hooks + afterDigest=>sub { + my ($stomach, $whatsit) = @_; + my $defsref = LookupValue('defs'); + my @defs = @$defsref; + $whatsit->setProperty('defs',\@defs); + AssignValue('defs',undef); + return; }); +DefConstructor('\termref OptionalKeyVals:termref {}', + "<omdoc:term cd='&KeyVal(#1,'cd')' name='&KeyVal(#1,'name')'>" + . "#2" + ."</omdoc:term>"); +DefConstructor('\twinref OptionalKeyVals:termref {}{}', + "<omdoc:term cd='&KeyVal(#1,'cd')' name='&KeyVal(#1,'name')'>" + . "#2" + ."</omdoc:term>"); +DefConstructor('\atwinref OptionalKeyVals:termref {}{}{}', + "<omdoc:term cd='&KeyVal(#1,'cd')' name='&KeyVal(#1,'name')'>" + . "#2" + ."</omdoc:term>"); +DefConstructor('\termin OptionalKeyVals:term {}', + "<omdoc:idx>" + . "<omdoc:idt>" + . "<omdoc:term cd='&KeyVal(#1,'cd')' name='&KeyVal(#1,'name')'>#2</omdoc:term>" + . "</omdoc:idt>" + . "<omdoc:ide index='default'><omdoc:idp>#2</omdoc:idp></omdoc:ide>" + . "</omdoc:idx>"); +DefConstructor('\symref{}{}', + "<omdoc:term cd='&LookupValue('symdef.#1.cd')' name='&LookupValue('symdef.#1.name')'>" + . "#2" + ."</omdoc:term>"); +Tag('omdoc:assertion',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:definition',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:example',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:requation',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:axiom',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:symbol',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:type',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:term',afterOpen=>\&numberIt,afterClose=>\&locateIt); +1; |