From ebc411f2bc9cb7b1742ed5211d36a2b2ac57cdb5 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sun, 12 Apr 2015 17:27:32 +0200 Subject: Move test math ontology to "ontologies" folder --- testdata/integration/user_defined_syntax/math.osml | 223 --------------------- .../user_defined_syntax/math_limits.in.osml | 2 +- .../user_defined_syntax/math_various.in.osml | 2 +- .../user_defined_syntax/ontologies/math.osml | 223 +++++++++++++++++++++ 4 files changed, 225 insertions(+), 225 deletions(-) delete mode 100644 testdata/integration/user_defined_syntax/math.osml create mode 100644 testdata/integration/user_defined_syntax/ontologies/math.osml (limited to 'testdata') diff --git a/testdata/integration/user_defined_syntax/math.osml b/testdata/integration/user_defined_syntax/math.osml deleted file mode 100644 index c864d2b..0000000 --- a/testdata/integration/user_defined_syntax/math.osml +++ /dev/null @@ -1,223 +0,0 @@ -\ontology#math{ - %{ - Top level math commands -- block math (equivalent to LaTeX AMS "array") - and inline math. - }% - \struct#math[root=true] - \syntax - \open{$$} - \close{$$} - \field - \childRef[ref=equation] - - \struct#inlineMath - \syntax - \open{$} - \close{$} - \field - \childRef[ref=primitive] - - %{ - Commands for block math -- these are used to define equations, seperable - by the "&" field separator. - }% - \struct#equation[transparent=true, cardinality={>0}] - \syntax - \close{\\\\} - \field - \childRef[ref=field] - \struct#field[transparent=true] - \syntax - \close{&} - \field - \childRef[ref=primitive] - - %{ - All classes derived from "primitive" can be used inside all equations - }% - \struct#primitive - - %{ - Variables and functions - }% - \struct#var[isa=primitive] - \primitive#name[type=string] - \struct#fun[isa=primitive] - \primitive#name[subtree=true,type=string,optional=false] - \field#arguments[subtree=true,optional=true] - \childRef[ref=primitive] - - %{ - Basic mathematical commands, sum, product, fraction, square root - }% - \struct#mathop[isa=primitive] - \field - \childRef[ref=limits] - \struct#sum[isa=mathop] - \struct#prod[isa=mathop] - \struct#int[isa=mathop] - \struct#iint[isa=mathop] - \struct#frac[isa=primitive] - \field#denominator[subtree=true,optional=false] - \childRef[ref=primitive] - \field#nominator[subtree=true,optional=false] - \childRef[ref=primitive] - \struct#sqrt[isa=primitive] - \attributes - \attribute#base[type=int,default=2] - \field - \childRef[ref=primitive] - \struct#root[isa=primitive] - \field#base[subtree=true,optional=true] - \childRef[ref=primitive] - \field - \childRef[ref=primitive] - - % TODO: Differentiate between lower and upper index vs. power operator? - \struct#power[isa=primitive] - \syntax - \short{^} - \field - \childRef[ref=primitive] - \struct#index[isa=primitive] - \syntax - \short{_} - \field - \childRef[ref=primitive] - - %{ - Separators - }% - - \struct#comma[isa=primitive] - \syntax - \short{,} - \struct#colon[isa=primitive] - \syntax - \short{:} - \struct#semicolon[isa=primitive] - \syntax - \short{;} - - %{ - Operators and Relations - }% - \struct#plus[isa=primitive] - \syntax - \short{+} - \struct#minus[isa=primitive] - \syntax - \short{-} - \struct#multiplication[isa=primitive] - \syntax - \short{*} - \struct#division[isa=primitive] - \syntax - \short{/} - \struct#equals[isa=primitive] - \syntax - \short{=} - \struct#equiv[isa=primitive] - \syntax - \short{==} - \struct#smaller[isa=primitive] - \syntax - \short{<} - \struct#larger[isa=primitive] - \syntax - \short{>} - \struct#smallerEq[isa=primitive] - \syntax - \short{<=} - \struct#largerEq[isa=primitive] - \syntax - \short{>=} - \struct#times[isa=primitive] - \struct#circ[isa=primitive] - \struct#cdot[isa=primitive] - \struct#bullet[isa=primitive] - \struct#cup[isa=primitive] - \struct#cap[isa=primitive] - \struct#subset[isa=primitive] - \struct#subseteq[isa=primitive] - \struct#sqcup[isa=primitive] - \struct#sqcap[isa=primitive] - \struct#sim[isa=primitive] - \struct#vee[isa=primitive] - \struct#wedge[isa=primitive] - \struct#pm[isa=primitive] - \struct#mp[isa=primitive] - \struct#infty[isa=primitive] - - %{ - Arrows - }% - \struct#arrow[isa=primitive] - \struct#to[isa=arrow] - \syntax - \short{->} - \struct#mapsto[isa=arrow] - \syntax - \short{|->} - - \struct#leftarrow[isa=arrow] - \syntax - \short{<--} - \struct#Leftarrow[isa=arrow] - \syntax - \short{<==} - \struct#rightarrow[isa=arrow] - \syntax - \short{-->} - \struct#Leftrightarrow[isa=arrow] - \syntax - \short{<=>} - \struct#leftrightarrow[isa=arrow] - \syntax - \short{<->} - \struct#uparrow[isa=arrow] - \struct#Uparrow[isa=arrow] - \struct#downarrow[isa=arrow] - \struct#Downarrow[isa=arrow] - \struct#updownarrow[isa=arrow] - \struct#Updownarrow[isa=arrow] - - \struct#longleftarrow[isa=arrow] - \syntax - \short{<---} - \struct#Longleftarrow[isa=arrow] - \syntax - \short{<===} - \struct#longrightarrow[isa=arrow] - \syntax - \short{--->} - \struct#Longrightarrow[isa=arrow] - \syntax - \short{===>} - \struct#longleftrightarrow[isa=arrow] - \syntax - \short{<-->} - \struct#Longleftrightarrow[isa=arrow] - \syntax - \short{<==>} - - \struct#number[isa=primitive,transparent=true] - \primitive[type=int] - \struct#text[isa=primitive,transparent=true] - \primitive[type=string] - \struct#limits[transparent=true] - \field - \childRef[ref=lowerLimit] - \childRef[ref=upperLimit] - \struct#lowerLimit[cardinality={0,1}] - \syntax - \short{_} - \field - \childRef[ref=primitive] - \struct#upperLimit[cardinality={0,1}] - \syntax - \short{^} - \field - \childRef[ref=primitive] - -} diff --git a/testdata/integration/user_defined_syntax/math_limits.in.osml b/testdata/integration/user_defined_syntax/math_limits.in.osml index dbb21aa..3fdf77b 100644 --- a/testdata/integration/user_defined_syntax/math_limits.in.osml +++ b/testdata/integration/user_defined_syntax/math_limits.in.osml @@ -1,5 +1,5 @@ \document -\import[ontology]{./math} +\import[ontology]{./ontologies/math} \begin{math} \sum_{i=3}^{5} i_{M}^{2} \end{math} diff --git a/testdata/integration/user_defined_syntax/math_various.in.osml b/testdata/integration/user_defined_syntax/math_various.in.osml index c003688..1e8550d 100644 --- a/testdata/integration/user_defined_syntax/math_various.in.osml +++ b/testdata/integration/user_defined_syntax/math_various.in.osml @@ -1,4 +1,4 @@ -\import[ontology]{./math} +\import[ontology]{./ontologies/math} \begin{math} \sum_{i=5}^{10} \\ \int_{\var{x} -> -1}^{\var{x} -> 1} \sqrt{x^{2} - 1} dx &= \frac{π}{2}\\ diff --git a/testdata/integration/user_defined_syntax/ontologies/math.osml b/testdata/integration/user_defined_syntax/ontologies/math.osml new file mode 100644 index 0000000..c864d2b --- /dev/null +++ b/testdata/integration/user_defined_syntax/ontologies/math.osml @@ -0,0 +1,223 @@ +\ontology#math{ + %{ + Top level math commands -- block math (equivalent to LaTeX AMS "array") + and inline math. + }% + \struct#math[root=true] + \syntax + \open{$$} + \close{$$} + \field + \childRef[ref=equation] + + \struct#inlineMath + \syntax + \open{$} + \close{$} + \field + \childRef[ref=primitive] + + %{ + Commands for block math -- these are used to define equations, seperable + by the "&" field separator. + }% + \struct#equation[transparent=true, cardinality={>0}] + \syntax + \close{\\\\} + \field + \childRef[ref=field] + \struct#field[transparent=true] + \syntax + \close{&} + \field + \childRef[ref=primitive] + + %{ + All classes derived from "primitive" can be used inside all equations + }% + \struct#primitive + + %{ + Variables and functions + }% + \struct#var[isa=primitive] + \primitive#name[type=string] + \struct#fun[isa=primitive] + \primitive#name[subtree=true,type=string,optional=false] + \field#arguments[subtree=true,optional=true] + \childRef[ref=primitive] + + %{ + Basic mathematical commands, sum, product, fraction, square root + }% + \struct#mathop[isa=primitive] + \field + \childRef[ref=limits] + \struct#sum[isa=mathop] + \struct#prod[isa=mathop] + \struct#int[isa=mathop] + \struct#iint[isa=mathop] + \struct#frac[isa=primitive] + \field#denominator[subtree=true,optional=false] + \childRef[ref=primitive] + \field#nominator[subtree=true,optional=false] + \childRef[ref=primitive] + \struct#sqrt[isa=primitive] + \attributes + \attribute#base[type=int,default=2] + \field + \childRef[ref=primitive] + \struct#root[isa=primitive] + \field#base[subtree=true,optional=true] + \childRef[ref=primitive] + \field + \childRef[ref=primitive] + + % TODO: Differentiate between lower and upper index vs. power operator? + \struct#power[isa=primitive] + \syntax + \short{^} + \field + \childRef[ref=primitive] + \struct#index[isa=primitive] + \syntax + \short{_} + \field + \childRef[ref=primitive] + + %{ + Separators + }% + + \struct#comma[isa=primitive] + \syntax + \short{,} + \struct#colon[isa=primitive] + \syntax + \short{:} + \struct#semicolon[isa=primitive] + \syntax + \short{;} + + %{ + Operators and Relations + }% + \struct#plus[isa=primitive] + \syntax + \short{+} + \struct#minus[isa=primitive] + \syntax + \short{-} + \struct#multiplication[isa=primitive] + \syntax + \short{*} + \struct#division[isa=primitive] + \syntax + \short{/} + \struct#equals[isa=primitive] + \syntax + \short{=} + \struct#equiv[isa=primitive] + \syntax + \short{==} + \struct#smaller[isa=primitive] + \syntax + \short{<} + \struct#larger[isa=primitive] + \syntax + \short{>} + \struct#smallerEq[isa=primitive] + \syntax + \short{<=} + \struct#largerEq[isa=primitive] + \syntax + \short{>=} + \struct#times[isa=primitive] + \struct#circ[isa=primitive] + \struct#cdot[isa=primitive] + \struct#bullet[isa=primitive] + \struct#cup[isa=primitive] + \struct#cap[isa=primitive] + \struct#subset[isa=primitive] + \struct#subseteq[isa=primitive] + \struct#sqcup[isa=primitive] + \struct#sqcap[isa=primitive] + \struct#sim[isa=primitive] + \struct#vee[isa=primitive] + \struct#wedge[isa=primitive] + \struct#pm[isa=primitive] + \struct#mp[isa=primitive] + \struct#infty[isa=primitive] + + %{ + Arrows + }% + \struct#arrow[isa=primitive] + \struct#to[isa=arrow] + \syntax + \short{->} + \struct#mapsto[isa=arrow] + \syntax + \short{|->} + + \struct#leftarrow[isa=arrow] + \syntax + \short{<--} + \struct#Leftarrow[isa=arrow] + \syntax + \short{<==} + \struct#rightarrow[isa=arrow] + \syntax + \short{-->} + \struct#Leftrightarrow[isa=arrow] + \syntax + \short{<=>} + \struct#leftrightarrow[isa=arrow] + \syntax + \short{<->} + \struct#uparrow[isa=arrow] + \struct#Uparrow[isa=arrow] + \struct#downarrow[isa=arrow] + \struct#Downarrow[isa=arrow] + \struct#updownarrow[isa=arrow] + \struct#Updownarrow[isa=arrow] + + \struct#longleftarrow[isa=arrow] + \syntax + \short{<---} + \struct#Longleftarrow[isa=arrow] + \syntax + \short{<===} + \struct#longrightarrow[isa=arrow] + \syntax + \short{--->} + \struct#Longrightarrow[isa=arrow] + \syntax + \short{===>} + \struct#longleftrightarrow[isa=arrow] + \syntax + \short{<-->} + \struct#Longleftrightarrow[isa=arrow] + \syntax + \short{<==>} + + \struct#number[isa=primitive,transparent=true] + \primitive[type=int] + \struct#text[isa=primitive,transparent=true] + \primitive[type=string] + \struct#limits[transparent=true] + \field + \childRef[ref=lowerLimit] + \childRef[ref=upperLimit] + \struct#lowerLimit[cardinality={0,1}] + \syntax + \short{_} + \field + \childRef[ref=primitive] + \struct#upperLimit[cardinality={0,1}] + \syntax + \short{^} + \field + \childRef[ref=primitive] + +} -- cgit v1.2.3