Difference between revisions of "HowToEnterMathSymbols"

From WeBWorK_wiki
Jump to navigation Jump to search
Line 14: Line 14:
 
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>.
 
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>.
   
This extension allows for typical LaTeX math integration.
 
  +
For example:
 
  +
== Example ==
  +
  +
== Latex Code ==
  +
 
<syntaxhighlight lang="latex">
 
<syntaxhighlight lang="latex">
 
<!-- some LaTeX macros we want to use: -->
 
<!-- some LaTeX macros we want to use: -->
Line 47: Line 50:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
(Which comes from a preprint of ''Jon M. Borwein, et. al. Some arithmetic properties of short random walk integrals.'')
 
(Which comes from a preprint of ''Jon M. Borwein, et. al. Some arithmetic properties of short random walk integrals.'')
  +
  +
=== Rendered text ===
   
 
This renders as http://www.cs.kuleuven.be/~dirkn/Extension_MathJax/MathJaxExample.png.
 
This renders as http://www.cs.kuleuven.be/~dirkn/Extension_MathJax/MathJaxExample.png.
Line 52: Line 57:
 
<!-- some LaTeX macros we want to use: -->
 
<!-- some LaTeX macros we want to use: -->
 
$
 
$
\newcommand{\Re}{\mathrm{Re}\,}
+
\newcommand{\Re}{\mathrm{Re}\,}
\newcommand{\pFq}[5]{{}_{#1}\mathrm{F}_{#2} \left( \genfrac{}{}{0pt}{}{#3}{#4} \bigg| {#5} \right)}
+
\newcommand{\pFq}[5]{{}_{#1}\mathrm{F}_{#2} \left( \genfrac{}{}{0pt}{}{#3}{#4} \bigg| {#5} \right)}
 
$
 
$
   
Line 78: Line 83:
 
The reason for \eqref{eq:W3k} was long a mystery, but it will be explained
 
The reason for \eqref{eq:W3k} was long a mystery, but it will be explained
 
at the end of the paper.
 
at the end of the paper.
  +
  +
== Additional Information ==
   
 
This documentation comes from the [http://www.mediawiki.org/wiki/Extension:MathJax MathJax Extension page]. Additional documentation on using MathJax can be found at [http://www.mathjax.org www.mathjax.org].
 
This documentation comes from the [http://www.mediawiki.org/wiki/Extension:MathJax MathJax Extension page]. Additional documentation on using MathJax can be found at [http://www.mathjax.org www.mathjax.org].

Revision as of 10:04, 24 July 2012

We use the MathJax Extension by Dirk Nuyens. This extension enables MathJax (http://www.mathjax.org/) which is a Javascript library written by Davide Cervone.

Usage

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{}.


Example

Latex Code

<syntaxhighlight lang="latex"> $

 \newcommand{\Re}{\mathrm{Re}\,}
 \newcommand{\pFq}[5]{{}_{#1}\mathrm{F}_{#2} \left( \genfrac{}{}{0pt}{}{#3}{#4} \bigg| {#5} \right)}

$

We consider, for various values of $s$, the $n$-dimensional integral \begin{align}

 \label{def:Wns}
 W_n (s)
 &:=
 \int_{[0, 1]^n}
   \left| \sum_{k = 1}^n \mathrm{e}^{2 \pi \mathrm{i} \, x_k} \right|^s \mathrm{d}\boldsymbol{x}

\end{align} which occurs in the theory of uniform random walk integrals in the plane, where at each step a unit-step is taken in a random direction. As such, the integral \eqref{def:Wns} expresses the $s$-th moment of the distance to the origin after $n$ steps.

By experimentation and some sketchy arguments we quickly conjectured and strongly believed that, for $k$ a nonnegative integer \begin{align}

 \label{eq:W3k}
 W_3(k) &= \Re \, \pFq32{\frac12, -\frac k2, -\frac k2}{1, 1}{4}.

\end{align} Appropriately defined, \eqref{eq:W3k} also holds for negative odd integers. The reason for \eqref{eq:W3k} was long a mystery, but it will be explained at the end of the paper. </syntaxhighlight> (Which comes from a preprint of Jon M. Borwein, et. al. Some arithmetic properties of short random walk integrals.)

Rendered text

This renders as http://www.cs.kuleuven.be/~dirkn/Extension_MathJax/MathJaxExample.png.

$

\newcommand{\Re}{\mathrm{Re}\,}
\newcommand{\pFq}[5]{{}_{#1}\mathrm{F}_{#2} \left( \genfrac{}{}{0pt}{}{#3}{#4} \bigg| {#5} \right)}

$

We consider, for various values of $s$, the $n$-dimensional integral \begin{align}

 \label{def:Wns}
 W_n (s)
 &:=
 \int_{[0, 1]^n}
   \left| \sum_{k = 1}^n \mathrm{e}^{2 \pi \mathrm{i} \, x_k} \right|^s \mathrm{d}\boldsymbol{x}

\end{align} which occurs in the theory of uniform random walk integrals in the plane, where at each step a unit-step is taken in a random direction. As such, the integral \eqref{def:Wns} expresses the $s$-th moment of the distance to the origin after $n$ steps.

By experimentation and some sketchy arguments we quickly conjectured and strongly believed that, for $k$ a nonnegative integer \begin{align}

 \label{eq:W3k}
 W_3(k) &= \Re \, \pFq32{\frac12, -\frac k2, -\frac k2}{1, 1}{4}.

\end{align} Appropriately defined, \eqref{eq:W3k} also holds for negative odd integers. The reason for \eqref{eq:W3k} was long a mystery, but it will be explained at the end of the paper.

Additional Information

This documentation comes from the MathJax Extension page. Additional documentation on using MathJax can be found at www.mathjax.org.