RE: content markup newbie questions

Hi David,
 
Thanks for your reply.  I got rid of the <declare> element.  It's not so much presentation (I seem to be able
to get a good presentation markup from cut and paste from MathType).
that I'm looking for, but good content markup.  I include below (at the bottom) the equations as received from
MathType via cut and paste, in presentation markup, where the equivalent (or approaching
equivalent, I hope) content markup is at the top, with each equation documented by a comment.
 
What I want to do is to enable re-usable functions on the one hand.  I would think I need to assign
a symbolic name to the result of the functions in order to reference that equation from elsewhere, but I'm not
quite sure how to do that.  <csymbol> and <declare> don't appear to be the way, and <fn> seems to
be deprecated, so I'm at a bit of a loss.
 
I'm not quite certain what you mean by marking up definitions as equations.  I've got each separate one as a
distinct 1st level <apply> element.  Is there a specific element you would use to capture the result of an apply
as a symbolic value?
 
Pardon my complete newness at this subject!
 
Thanks for any advice!
 
Cheers,
Peter
 
.... here's the markup I've come up with to this point:
(for clarity there's presentation markup at the bottom which if you have a viewer application should show you what
I intend to encode in content markup, at least)
 
<math xmlns="http://www.w3.org/1998/Math/MathML">

<!-- parameters that are supplied for an instance of a particular coordinate reference system:
a => ellipsoid semi-major axis
if => inverse flattening
p1 => phi one, latitude of 1st std parallel
p2 => phi two, latitude of 2nd std parallel
pF => phi False, latitude of false origin
lambdaF => lambda False, longitude of false origin
EsubF => Easting at False origin
NsubF => Northing at False origin

phi, lambda
phi => latitude of the coordinate to be transformed to Northing
lambda => longitude of coordinate to be transformed to Easting
-->

<!-- solve for flattening (f), if you know inverse flattening (if), this is the formula for f -->
<!-- this doesn't have an equivalent in the presentation markup below, it is just used to solve for eccentricity -->
<apply>
<divide/>
<cn>1</cn>
<ci>if</ci>
</apply>

<!-- e is derived from the flattening of the ellipsoid and is used in many of the equations below -->
<!-- solve for eccentricity , or e -->
<apply>
<root/>
<apply>
<times/>
<ci>f</ci>
<apply>
<minus/>
<cn>2</cn>
<ci>f</ci>
</apply>
</apply>
</apply>

<!-- solve for m, this should be a reuseable function because different values of m are used to derive Easting and Northing based on 2 standard parallels -->
<apply>
<divide/>
<apply>
<cos/>
<!-- p, or phi is one of the standard parallels -->
<ci>p</ci>
</apply>
<!-- denominator is an expression -->
<apply>
<power/>
<apply>
<minus/>
<cn type="real">1</cn>
<apply>
<times/>
<apply>
<power/>
<apply>
<!-- eccentricity -->
<ci>e</ci>
</apply>
<cn type="integer">2</cn>
</apply>
<apply>
<power/>
<apply>
<sin/>
<!-- p stands for phi -->
<ci>p</ci>
</apply>
<cn>2</cn>
</apply>
</apply>
</apply>
<cn>0.5</cn>
</apply>
</apply>

<!-- solve for t, this should also be a reusable function -->
<apply>
<divide/>
<!-- numerator is expression based on tan -->
<apply>
<tan/>
<apply>
<minus/>
<apply>
<divide/>
<pi/>
<cn type="real">4</cn>
</apply>
<apply>
<divide/>
<ci>p</ci>
<cn type="real">2</cn>
</apply>
</apply>
</apply>
<!-- denominator is expression based on power of e/2 expression -->
<apply>
<power/>
<apply>
<!-- the expression being raised -->
<apply>
<divide/>
<apply>
<!-- 1 minus e sin phi -->
<minus/>
<cn type="real">1</cn>
<apply>
<times/>
<ci>e</ci>
<apply>
<sin/>
<ci>p</ci>
</apply>
</apply>
</apply>
<apply>
<!-- 1 plus e sin phi -->
<plus/>
<cn type="real">1</cn>
<apply>
<times/>
<ci>e</ci>
<apply>
<sin/>
<ci>p</ci>
</apply>
</apply>
</apply>
</apply>
</apply>
<apply><!-- the value of the exponent is e/2 -->
<divide/>
<ci>e</ci>
<cn type="real">2</cn>
</apply>
</apply>
</apply>

<!-- solve for n, this should be a function -->
<apply>
<!-- quotient -->
<divide/>
<!-- numerator -->
<apply>
<minus/>
<apply>
<ln/>
<cn>m1</cn>
</apply>
<apply>
<ln/>
<cn>m2</cn>
</apply>
</apply>
<!-- denominator -->
<apply>
<minus/>
<apply>
<ln/>
<cn>t1</cn>
</apply>
<apply>
<ln/>
<cn>t2</cn>
</apply>
</apply>
</apply>

<!-- solve for F (not sure what this F is, it's *not* False) -->
<apply>
<!-- quotient -->
<divide/>
<!-- numerator is m1 -->
<ci>m1</ci>
<apply>
<!-- denominator -->
<times/>
<ci>n</ci>
<apply>
<power/>
<ci>t1</ci>
<ci>n</ci>
</apply>
</apply>
</apply>

<!-- solve for radius -->
<apply>
<times/>
<ci>a</ci>
<apply>
<times/>
<ci>F</ci>
<apply>
<power/>
<ci>t</ci>
<ci>n</ci>
</apply>
</apply>
</apply>

<!-- solve for theta -->
<apply>
<times/>
<ci>n</ci>
<apply>
<minus/>
<ci>lambda</ci>
<ci>lambdaF</ci>
</apply>
</apply>

<!-- E , or Easting -->
<apply>
<plus/>
<ci>
<msub>
<mi>E</mi>
<mi>F</mi>
</msub>
</ci>
<apply>
<times/>
<ci>r</ci>
<apply>
<sin/>
<!-- t is theta -->
<ci>t</ci>
</apply>
</apply>
</apply>

<!-- N, or Northing -->
<apply>
<plus/>
<ci>
<!-- the F subscript means False -->
<msub>
<mi>N</mi>
<mi>F</mi>
</msub>
</ci>
<apply>
<minus/>
<ci>
<msub>
<mi>r</mi>
<mi>F</mi>
</msub>
</ci>
<apply>
<times/>
<ci>r</ci>
<apply>
<cos/>
<!-- t is theta -->
<ci>t</ci>
</apply>
</apply>
</apply>
</apply>
<!-- end content markup -->

<!-- begin presentation markup -->
<!-- the following was cut and pasted from MathType and should graphically represent what I'm trying to encode as content markup, above -->
<semantics>
<mtable columnalign='left'>
<mtr>
<mtd>
<mi>E</mi><mo>=</mo><msub>
<mi>E</mi>
<mi>F</mi>
</msub>
<mo>+</mo><mi>r</mi><mi>sin</mi><mo>&#x2061;</mo><mi>&#x03B8;</mi>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>N</mi><mo>=</mo><msub>
<mi>N</mi>
<mi>F</mi>
</msub>
<mo>+</mo><msub>
<mi>r</mi>
<mi>F</mi>
</msub>
<mo>&#x2212;</mo><mi>r</mi><mi>cos</mi><mo>&#x2061;</mo><mi>&#x03B8;</mi>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>m</mi><mo>=</mo><mi>cos</mi><mo>&#x2061;</mo><mi>&#x03C6;</mi><mo>/</mo><msup>
<mrow><mo>(</mo>
<mrow>
<mn>1</mn><mo>&#x2212;</mo><msup>
<mi>e</mi>
<mn>2</mn>
</msup>
<msup>
<mrow>
<mi>sin</mi><mo>&#x2061;</mo>
</mrow>
<mn>2</mn>
</msup>
<mi>&#x03C6;</mi>
</mrow>
<mo>)</mo></mrow>
<mrow>
<mn>0.5</mn>
</mrow>
</msup>

</mtd>
</mtr>
<mtr>
<mtd>
<mi>t</mi><mo>=</mo><mi>tan</mi><mo>&#x2061;</mo><mrow><mo>(</mo>
<mrow>
<mi>&#x03C0;</mi><mo>/</mo><mn>4</mn><mo>&#x2212;</mo><mi>&#x03C6;</mi><mo>/</mo><mn>2</mn>
</mrow>
<mo>)</mo></mrow><msup>
<mrow><mo>[</mo> <mrow>
<mrow><mo>(</mo>
<mrow>
<mn>1</mn><mo>&#x2212;</mo><mi>e</mi><mi>sin</mi><mo>&#x2061;</mo><mi>&#x03C6;</mi>
</mrow>
<mo>)</mo></mrow><mo>/</mo><mrow><mo>(</mo>
<mrow>
<mn>1</mn><mo>+</mo><mi>e</mi><mi>sin</mi><mo>&#x2061;</mo><mi>&#x03C6;</mi>
</mrow>
<mo>)</mo></mrow>
</mrow> <mo>]</mo></mrow>
<mrow>
<mi>e</mi><mo>/</mo><mn>2</mn>
</mrow>
</msup>

</mtd>
</mtr>
<mtr>
<mtd>
<mi>n</mi><mo>=</mo><mrow><mo>(</mo>
<mrow>
<mi>ln</mi><mo>&#x2061;</mo><msub>
<mi>m</mi>
<mn>1</mn>
</msub>
<mo>&#x2212;</mo><mi>ln</mi><mo>&#x2061;</mo><msub>
<mi>m</mi>
<mn>2</mn>
</msub>

</mrow>
<mo>)</mo></mrow><mo>/</mo><mrow><mo>(</mo>
<mrow>
<mi>ln</mi><mo>&#x2061;</mo><msub>
<mi>t</mi>
<mn>1</mn>
</msub>
<mo>&#x2212;</mo><mi>ln</mi><mo>&#x2061;</mo><msub>
<mi>t</mi>
<mn>2</mn>
</msub>

</mrow>
<mo>)</mo></mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>F</mi><mo>=</mo><msub>
<mi>m</mi>
<mn>1</mn>
</msub>
<mo>/</mo><mrow><mo>(</mo>
<mrow>
<mi>n</mi><msub>
<mi>t</mi>
<mn>1</mn>
</msub>

</mrow>
<mo>)</mo></mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>r</mi><mo>=</mo><mi>a</mi><mi>F</mi><msup>
<mi>t</mi>
<mi>n</mi>
</msup>

</mtd>
</mtr>
<mtr>
<mtd>
<mi>&#x03B8;</mi><mo>=</mo><mi>n</mi><mrow><mo>(</mo>
<mrow>
<mi>&#x03BB;</mi><mo>&#x2212;</mo><msub>
<mi>&#x03BB;</mi>
<mi>F</mi>
</msub>

</mrow>
<mo>)</mo></mrow>
</mtd>
</mtr>
</mtable>

<annotation encoding='MathType-MTEF'>
</annotation>
</semantics>

<!-- end presentation markup -->

</math>


 
 

Received on Friday, 19 September 2008 01:34:15 UTC