Difference between revisions of "Help:Math"

From SolarSailWiki
Share/Save/Bookmark
Jump to: navigation, search
m (Undo revision 3313 by Ben (Talk))
m (Changed instructions to use Mimetex)
Line 1: Line 1:
==Intro==
+
==Mimetex==
 +
 
 +
Mathematics can be displayed on SolarSailWiki using the [http://www.forkosh.com/mimetex.html Mimetex] program, which uses a subset of the [http://www.latex-project.org/ LaTeX] math formulas.
 +
All you need to do is enclose a valid TeX/LaTeX formula inside <nowiki><tex>...</tex></nowiki> tags.
 +
* [http://www.forkosh.com/mimetexmanual.html Mimetex documentation]
 +
* [http://www.latex-project.org/guides/ LaTeX documentation]
 +
** [http://ctan.tug.org/tex-archive/info/lshort/english/lshort.pdf The Not so Short Introduction to LaTex] - with a very complete chapter on typesetting mathematical formulas
 +
 
 +
Some examples:
 +
 
 +
<nowiki><tex>\sqrt[3]{a x + x^2)</tex></nowiki> produces <tex>\sqrt[3]{a x + x^2)</tex>
 +
 
 +
The acceleration of a solar sail due to solar pressure <tex>\vec a_s</tex> given the position vector from the sun to the sail <tex>\vec r_s</tex> is:
 +
 
 +
<tex>\vec a_s = a_c {AU^2 \over r_s^2} \(\vec r_s \cdot \vec n\)^2 \vec n</tex>
 +
 
 +
where <tex>a_c</tex> is max sail acceleration at Earth's distance from the sun (1 AU), 'AU' is the length of an astronomical unit, <tex>r_s</tex> is the magnitude of <tex>\vec r_s</tex>, and <tex>\vec n</tex> is the unit vector normal to the sail surface.
 +
 
 +
 
 +
==ASCIIMath Not Currently in Use==
 +
 
 +
For the time being, ASCIIMath can be used, but MathML won't be properly displayed because of an incompatibility with Internet Explorer without MathPlayer installed.
  
 
Mathematics can be displayed on SolarSailWiki pages using the PHP version of [http://www.jcphysics.com/ASCIIMath/ ASCIIMath].
 
Mathematics can be displayed on SolarSailWiki pages using the PHP version of [http://www.jcphysics.com/ASCIIMath/ ASCIIMath].

Revision as of 09:46, 2 October 2007

Contents

Mimetex

Mathematics can be displayed on SolarSailWiki using the Mimetex program, which uses a subset of the LaTeX math formulas. All you need to do is enclose a valid TeX/LaTeX formula inside <tex>...</tex> tags.

Some examples:

<tex>\sqrt[3]{a x + x^2)</tex> produces \sqrt[3]{a x + x^2)

The acceleration of a solar sail due to solar pressure \vec a_s given the position vector from the sun to the sail \vec r_s is:

\vec a_s = a_c {AU^2 \over r_s^2} \(\vec r_s \cdot \vec n\)^2 \vec n

where a_c is max sail acceleration at Earth's distance from the sun (1 AU), 'AU' is the length of an astronomical unit, r_s is the magnitude of \vec r_s, and \vec n is the unit vector normal to the sail surface.


ASCIIMath Not Currently in Use

For the time being, ASCIIMath can be used, but MathML won't be properly displayed because of an incompatibility with Internet Explorer without MathPlayer installed.

Mathematics can be displayed on SolarSailWiki pages using the PHP version of ASCIIMath. ASCIIMath has a simple syntax for expressing equations that is converted to MathML which can be rendered by newer web browsers. Browsers that support MathML are:

Getting MathML to work

For Internet Explorer, download and install the Mathplayer plugin.

Mozilla-based browsers do have MathML support built-in, but they may require additional steps to get it working. In particular, the fonts can be a problem, as discussed in this page on Fonts for MathML-enabled Mozilla. Take a look at that page for operating-specific instructions. In general, the approach is:

  • Windows - Download and install the fonts required.
  • MacOS - Download and install the fonts required.
  • Linux - This requires more work, so it is discussed in more detail on its own page Help:MathML in Linux. Firefox may require additional steps.

ASCIIMath

For detailed ASCIIMath usage, look at the ASCIIMathML syntax. One important change is that in this implementation, ASCIIMath is NOT contained in backquotes: `...` Instead, it is contained within "am" tags: <am>...</am> ("am" for "ASCIIMath"). As an example, the cube-root of a-times-x plus x-squared can be expressed using the code:

<am>root3 (a x + x^2)</am>

This is displayed in MathML as: <am>root3 (a x + x^2)</am>

Go the the Sandbox to try it out.

Some other examples:

The acceleration of a solar sail due to solar pressure <am>vec a_s</am> given the position vector from the sun to the sail <am>vec r_s</am> is:

<am>vec a_s = a_c (AU^2)/(r_s^2) ( vec r_s * vec n)^2 vec n</am>

where <am>a_c</am> is max sail acceleration at Earth's distance from the sun (1 AU), <am>AU</am> is the length of an astronomical unit, <am>r_s</am> is the magnitude of <am>vec r_s</am>, and <am>vec n</am> is the unit vector normal to the sail surface.