Difference between revisions of "HowToEnterMathSymbols"

From WeBWorK_wiki
Jump to navigation Jump to search
m (Reverted edits by Aubreyja (talk) to last revision by Gage)
Line 1: Line 1:
Enter mathematics formulas using TeX/LaTeX notation between jsMath delimiters.
 
  +
The '''MathJax''' extension enables [http://www.mathjax.org/ MathJax] (http://www.mathjax.org/), a Javascript library, for typesetting TeX and LaTeX formulae in MediaWiki inside ''math environments''.
The jsMath delimiters are <code class="tex2math_ignore"><nowiki><math>...</math></nowiki></code> for inline math, and <code class="tex2math_ignore"><nowiki><dmath>...</dmath></nowiki></code> for display math.
 
  +
The following math environments are defined for inline style math:
 
  +
* <code><nowiki>$...$</nowiki></code> (can be turned off, even per page),
For example:
 
  +
* <code>\(...\)</code> and
 
  +
* <code>&lt;math&gt;...&lt;/math&gt;</code>.
<table border="1">
 
  +
And the following math environments are defined for display style math:
<tr class="tex2math_ignore">
 
  +
* <code><nowiki>$$...$$</nowiki></code> (can be turned off, even per page),
<td valign="top"><code>Consider the expression
 
  +
* <code>\[...\]</code>,
<nowiki><math>\int_0^\pi \frac{1}{x^2+1} \, ds</math></nowiki>.</code>
 
  +
* <code>\begin{...}...\end{...}</code> and
</td>
 
  +
* <code>:&lt;math&gt;...&lt;/math&gt;</code>.
<td valign="top"><code>Consider the following expression:
 
  +
MathJax produces nice and scalable mathematics, see their website (http://www.mathjax.org/) for a demonstration. This extension also enables the usage of <code>\label{}</code> and <code>\eqref{}</code> tags with automatic formula numbering. If needed you can still hand label by using <code>\tag{}</code>.
<nowiki><dmath>\int_0^\pi \frac{1}{x^2+1} \, ds</dmath></nowiki></code>
 
</td>
 
</tr>
 
<tr>
 
<td valign="top">will <math>\int_0^\pi \frac{1}{x^2+1} \, ds</math> in line.
 
</td>
 
<td valign="top">will display <dmath>\int_0^\pi \frac{1}{x^2+1} \, ds</dmath> in a separate line and larger type
 
</td>
 
</tr>
 
</table>
 
<div class="tex2math_ignore"> To print the markup language as is surround it with: &lt;nowiki&gt;<math>...</math>&lt;nowiki&gt;
 
to get <nowiki> <math>...</math> </nowiki>.
 

Revision as of 10:44, 24 July 2012

The MathJax extension enables MathJax (http://www.mathjax.org/), a Javascript library, for typesetting TeX and LaTeX formulae in MediaWiki inside math environments. The following math environments are defined for inline style math:

  • $...$ (can be turned off, even per page),
  • \(...\) and
  • <math>...</math>.

And the following math environments are defined for display style math:

  • $$...$$ (can be turned off, even per page),
  • \[...\],
  • \begin{...}...\end{...} and
  • :<math>...</math>.

MathJax produces nice and scalable mathematics, see their website (http://www.mathjax.org/) for a demonstration. This extension also enables the usage of \label{} and \eqref{} tags with automatic formula numbering. If needed you can still hand label by using \tag{}.