cdocutils.nodes
document
q)q}q(U nametypesq}q(X getting startedqNX configuring mathjaxqNX obtaining and installing mathjaxqNX getting-startedq KX linking mathjax into a web pageq
NX! putting mathematics in a web pageqNX tex and latex inputqNX
subversionq
KX where to go from here?qNX tex-and-latex-inputqKX mathjax download pageqKX mathml inputqNuUsubstitution_defsq}qUparse_messagesq]qUcurrent_sourceqNU
decorationqNUautofootnote_startqKUnameidsq}q(hUid1qhUconfiguring-mathjaxqhU obtaining-and-installing-mathjaxqh Ugetting-startedqh
Ulinking-mathjax-into-a-web-pageqhU!putting-mathematics-in-a-web-pageq hUid2q!h
U
subversionq"hUwhere-to-go-from-hereq#hUtex-and-latex-inputq$hUmathjax-download-pageq%hUmathml-inputq&uUchildrenq']q((cdocutils.nodes
target
q))q*}q+(U rawsourceq,X .. _getting-started:q-Uparentq.hUsourceq/cdocutils.nodes
reprunicode
q0XO /Data/Code/JavaScript/MathJax/Code/SourceForge/trunk/mathjax/docs/rst/start.rstq1q2}q3bUtagnameq4Utargetq5U
attributesq6}q7(Uidsq8]q9Ubackrefsq:]q;Udupnamesq<]q=Uclassesq>]q?Unamesq@]qAUrefidqBhuUlineqCKUdocumentqDhh']qEubcdocutils.nodes
section
qF)qG}qH(h,U h.hh/h2Uexpect_referenced_by_nameqI}qJh h*sh4UsectionqKh6}qL(h<]qMh>]qNh:]qOh8]qP(hheh@]qQ(hh euhCKhDhUexpect_referenced_by_idqR}qShh*sh']qT(cdocutils.nodes
title
qU)qV}qW(h,X Getting StartedqXh.hGh/h2h4UtitleqYh6}qZ(h<]q[h>]q\h:]q]h8]q^h@]q_uhCKhDhh']q`cdocutils.nodes
Text
qaX Getting Startedqbqc}qd(h,hXh.hVubaubcdocutils.nodes
paragraph
qe)qf}qg(h,X MathJax allows you to include mathematics in your web pages, either
using TeX and LaTeX notation, or as MathML. To use MathJax, you will
need to do the following things:qhh.hGh/h2h4U paragraphqih6}qj(h<]qkh>]qlh:]qmh8]qnh@]qouhCKhDhh']qphaX MathJax allows you to include mathematics in your web pages, either
using TeX and LaTeX notation, or as MathML. To use MathJax, you will
need to do the following things:qqqr}qs(h,hhh.hfubaubcdocutils.nodes
enumerated_list
qt)qu}qv(h,U h.hGh/h2h4Uenumerated_listqwh6}qx(UsuffixqyU.h8]qzh:]q{h<]q|Uprefixq}U h>]q~h@]qUenumtypeqUarabicquhCKhDhh']q(cdocutils.nodes
list_item
q)q}q(h,X? Obtain a copy of MathJax and make it available on your server.
qh.huh/h2h4U list_itemqh6}q(h<]qh>]qh:]qh8]qh@]quhCNhDhh']qhe)q}q(h,X> Obtain a copy of MathJax and make it available on your server.qh.hh/h2h4hih6}q(h<]qh>]qh:]qh8]qh@]quhCKh']qhaX> Obtain a copy of MathJax and make it available on your server.qq}q(h,hh.hubaubaubh)q}q(h,X2 Configure MathJax to suit the needs of your site.
qh.huh/h2h4hh6}q(h<]qh>]qh:]qh8]qh@]quhCNhDhh']qhe)q}q(h,X1 Configure MathJax to suit the needs of your site.qh.hh/h2h4hih6}q(h<]qh>]qh:]qh8]qh@]quhCK
h']qhaX1 Configure MathJax to suit the needs of your site.qq}q(h,hh.hubaubaubh)q}q(h,XA Link MathJax into the web pages that are to include mathematics.
qh.huh/h2h4hh6}q(h<]qh>]qh:]qh8]qh@]quhCNhDhh']qhe)q}q(h,X@ Link MathJax into the web pages that are to include mathematics.qh.hh/h2h4hih6}q(h<]qh>]qh:]qh8]qh@]quhCKh']qhaX@ Link MathJax into the web pages that are to include mathematics.qDžq}q(h,hh.hubaubaubh)q}q(h,XD Put mathematics into your web pages so that MathJax can display
it.
qh.huh/h2h4hh6}q(h<]qh>]qh:]qh8]qh@]quhCNhDhh']qhe)q}q(h,XC Put mathematics into your web pages so that MathJax can display
it.qh.hh/h2h4hih6}q(h<]qh>]qh:]qh8]qh@]quhCKh']qhaXC Put mathematics into your web pages so that MathJax can display
it.qޅq}q(h,hh.hubaubaubeubhe)q}q(h,X
Each of these steps is described briefly below, with links to more
detailed explanations. This page gives the quickest and easiest ways
to get MathJax up and running on your web site, but you may want to
read the details in order to customize the setup for your pages.qh.hGh/h2h4hih6}q(h<]qh>]qh:]qh8]qh@]quhCKhDhh']qhaX
Each of these steps is described briefly below, with links to more
detailed explanations. This page gives the quickest and easiest ways
to get MathJax up and running on your web site, but you may want to
read the details in order to customize the setup for your pages.q녁q}q(h,hh.hubaubhF)q}q(h,U h.hGh/h2h4hKh6}q(h<]qh>]qh:]qh8]qhah@]qhauhCKhDhh']q(hU)q}q(h,X Obtaining and Installing MathJaxqh.hh/h2h4hYh6}q(h<]qh>]qh:]qh8]qh@]quhCKhDhh']r haX Obtaining and Installing MathJaxr r }r (h,hh.hubaubhe)r }r (h,X\ The easiest way to set up MathJax is to obtain the
``MathJax-v1.0.zip`` archive from the `MathJax download page
`_. This includes both the MathJax code
and the MathJax webfonts, so this is the only file you need. (This is
different from the beta releases, which had the fonts separate from
the rest of the code).r h.hh/h2h4hih6}r (h<]r h>]r h:]r
h8]r h@]r uhCKhDhh']r
(haX3 The easiest way to set up MathJax is to obtain the
r r }r (h,X3 The easiest way to set up MathJax is to obtain the
r h.j ubcdocutils.nodes
literal
r )r }r (h,X ``MathJax-v1.0.zip``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j h']r haX MathJax-v1.0.zipr r }r (h,U h.j ubah4Uliteralr ubhaX archive from the r! r" }r# (h,X archive from the r$ h.j ubcdocutils.nodes
reference
r% )r& }r' (h,X; `MathJax download page
`_r( h6}r) (Unamer* X MathJax download pager+ Urefurir, X http://www.mathjax.org/download/r- h8]r. h:]r/ h<]r0 h>]r1 h@]r2 uh.j h']r3 haX MathJax download pager4 r5 }r6 (h,U h.j& ubah4U referencer7 ubh))r8 }r9 (h,X#
r: h6}r; (Urefurir< j- h8]r= h%ah:]r> h<]r? h>]r@ h@]rA hauh.j h']rB h4h5ubhaX . This includes both the MathJax code
and the MathJax webfonts, so this is the only file you need. (This is
different from the beta releases, which had the fonts separate from
the rest of the code).rC rD }rE (h,X . This includes both the MathJax code
and the MathJax webfonts, so this is the only file you need. (This is
different from the beta releases, which had the fonts separate from
the rest of the code).rF h.j ubeubhe)rG }rH (h,X Unpack the ``MathJax-v1.0.zip`` archive and place the
resulting MathJax folder onto your web server at a convenient
location where you can include it into your web pages. For example,
making ``MathJax`` a top-level directory on your server would be
one natural way to do this. That would let you refer to the main
MathJax file via the URL ``/MathJax/MathJax.js`` from within any page
on your server.rI h.hh/h2h4hih6}rJ (h<]rK h>]rL h:]rM h8]rN h@]rO uhCK$hDhh']rP (haX Unpack the rQ rR }rS (h,X Unpack the rT h.jG ubj )rU }rV (h,X ``MathJax-v1.0.zip``rW h6}rX (h<]rY h>]rZ h:]r[ h8]r\ h@]r] uh.jG h']r^ haX MathJax-v1.0.zipr_ r` }ra (h,U h.jU ubah4j ubhaX archive and place the
resulting MathJax folder onto your web server at a convenient
location where you can include it into your web pages. For example,
making rb rc }rd (h,X archive and place the
resulting MathJax folder onto your web server at a convenient
location where you can include it into your web pages. For example,
making re h.jG ubj )rf }rg (h,X ``MathJax``rh h6}ri (h<]rj h>]rk h:]rl h8]rm h@]rn uh.jG h']ro haX MathJaxrp rq }rr (h,U h.jf ubah4j ubhaX a top-level directory on your server would be
one natural way to do this. That would let you refer to the main
MathJax file via the URL rs rt }ru (h,X a top-level directory on your server would be
one natural way to do this. That would let you refer to the main
MathJax file via the URL rv h.jG ubj )rw }rx (h,X ``/MathJax/MathJax.js``ry h6}rz (h<]r{ h>]r| h:]r} h8]r~ h@]r uh.jG h']r haX /MathJax/MathJax.jsr r }r (h,U h.jw ubah4j ubhaX% from within any page
on your server.r r }r (h,X% from within any page
on your server.r h.jG ubeubhe)r }r (h,X> Note: While this is the easiest way to set up MathJax initially, there
is a better way to do it if you want to be able to keep your copy of
MathJax up-to-date easily. That uses the `subversion
`_ program, and is described in the
:ref:`Installing MathJax ` document.r h.hh/h2h4hih6}r (h<]r h>]r h:]r h8]r h@]r uhCK,hDhh']r (haX Note: While this is the easiest way to set up MathJax initially, there
is a better way to do it if you want to be able to keep your copy of
MathJax up-to-date easily. That uses the r r }r (h,X Note: While this is the easiest way to set up MathJax initially, there
is a better way to do it if you want to be able to keep your copy of
MathJax up-to-date easily. That uses the r h.j ubj% )r }r (h,X- `subversion
`_r h6}r (Unamer X
subversionr j, X http://subversion.apache.org/r h8]r h:]r h<]r h>]r h@]r uh.j h']r haX
subversionr r }r (h,U h.j ubah4j7 ubh))r }r (h,X
r h6}r (Urefurir j h8]r h"ah:]r h<]r h>]r h@]r h
auh.j h']r h4h5ubhaX" program, and is described in the
r r }r (h,X" program, and is described in the
r h.j ubcsphinx.addnodes
pending_xref
r )r }r (h,X/ :ref:`Installing MathJax `r h.j h4Upending_xrefr h6}r (Ureftyper X refr U reftargetr X getting-mathjax-svnr U refdomainr X stdr h8]r h:]r Urefexplicitr h<]r h>]r h@]r Urefdocr Ustartr uhCK,h']r cdocutils.nodes
emphasis
r )r }r (h,j h6}r (h<]r h>]r (Uxrefr j X std-refr eh:]r h8]r h@]r uh.j h']r haX Installing MathJaxr r }r (h,U h.j ubah4Uemphasisr ubaubhaX
document.r r }r (h,X
document.r h.j ubeubhe)r }r (h,X Once you have MathJax set up on your server, you can test it using the
files in the ``MathJax/test`` directory. Load them in your browser
using its web address rather than opening them locally (i.e., use an
``http://`` URL rather than a ``file://`` URL). When you view the
``index.html`` file, after a few moments you should see a message that
MathJax appears to be working. If not, check that the files have been
transferred to the server completely and that the permissions allow
the server to access the files and folders that are part of the
MathJax directory. (Be sure to verify the MathJax folder's permissions
as well.) Check the server log files for any errors that pertain to
the MathJax installation; this may help locate problems in the
permission or locations of files.r h.hh/h2h4hih6}r (h<]r h>]r h:]r h8]r h@]r uhCK2hDhh']r (haXT Once you have MathJax set up on your server, you can test it using the
files in the r r }r (h,XT Once you have MathJax set up on your server, you can test it using the
files in the r h.j ubj )r }r (h,X ``MathJax/test``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j h']r haX MathJax/testr r }r (h,U h.j ubah4j ubhaXl directory. Load them in your browser
using its web address rather than opening them locally (i.e., use an
r r }r (h,Xl directory. Load them in your browser
using its web address rather than opening them locally (i.e., use an
r h.j ubj )r }r (h,X ``http://``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j h']r haX http://r r }r (h,U h.j ubah4j ubhaX URL rather than a r
r }r (h,X URL rather than a r
h.j ubj )r }r (h,X ``file://``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j h']r haX file://r r }r (h,U h.j ubah4j ubhaX URL). When you view the
r r }r (h,X URL). When you view the
r h.j ubj )r }r (h,X ``index.html``r! h6}r" (h<]r# h>]r$ h:]r% h8]r& h@]r' uh.j h']r( haX
index.htmlr) r* }r+ (h,U h.j ubah4j ubhaX file, after a few moments you should see a message that
MathJax appears to be working. If not, check that the files have been
transferred to the server completely and that the permissions allow
the server to access the files and folders that are part of the
MathJax directory. (Be sure to verify the MathJax folder's permissions
as well.) Check the server log files for any errors that pertain to
the MathJax installation; this may help locate problems in the
permission or locations of files.r, r- }r. (h,X file, after a few moments you should see a message that
MathJax appears to be working. If not, check that the files have been
transferred to the server completely and that the permissions allow
the server to access the files and folders that are part of the
MathJax directory. (Be sure to verify the MathJax folder's permissions
as well.) Check the server log files for any errors that pertain to
the MathJax installation; this may help locate problems in the
permission or locations of files.r/ h.j ubeubeubhF)r0 }r1 (h,U h.hGh/h2h4hKh6}r2 (h<]r3 h>]r4 h:]r5 h8]r6 hah@]r7 hauhCKAhDhh']r8 (hU)r9 }r: (h,X Configuring MathJaxr; h.j0 h/h2h4hYh6}r< (h<]r= h>]r> h:]r? h8]r@ h@]rA uhCKAhDhh']rB haX Configuring MathJaxrC rD }rE (h,j; h.j9 ubaubhe)rF }rG (h,X When you include MathJax into your web pages as described below, it
will load the file ``config/MathJax.js`` (i.e., the file named
``MathJax.js`` in the ``config`` folder of the main ``MathJax``
folder). This file contains the configuration parameters that
control how MathJax operates. There are comments in it that
explain each of the parameters, and you can edit the file to suit
your needs.rH h.j0 h/h2h4hih6}rI (h<]rJ h>]rK h:]rL h8]rM h@]rN uhCKChDhh']rO (haXW When you include MathJax into your web pages as described below, it
will load the file rP rQ }rR (h,XW When you include MathJax into your web pages as described below, it
will load the file rS h.jF ubj )rT }rU (h,X ``config/MathJax.js``rV h6}rW (h<]rX h>]rY h:]rZ h8]r[ h@]r\ uh.jF h']r] haX config/MathJax.jsr^ r_ }r` (h,U h.jT ubah4j ubhaX (i.e., the file named
ra rb }rc (h,X (i.e., the file named
rd h.jF ubj )re }rf (h,X ``MathJax.js``rg h6}rh (h<]ri h>]rj h:]rk h8]rl h@]rm uh.jF h']rn haX
MathJax.jsro rp }rq (h,U h.je ubah4j ubhaX in the rr rs }rt (h,X in the ru h.jF ubj )rv }rw (h,X
``config``rx h6}ry (h<]rz h>]r{ h:]r| h8]r} h@]r~ uh.jF h']r haX configr r }r (h,U h.jv ubah4j ubhaX folder of the main r r }r (h,X folder of the main r h.jF ubj )r }r (h,X ``MathJax``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.jF h']r haX MathJaxr r }r (h,U h.j ubah4j ubhaX
folder). This file contains the configuration parameters that
control how MathJax operates. There are comments in it that
explain each of the parameters, and you can edit the file to suit
your needs.r r }r (h,X
folder). This file contains the configuration parameters that
control how MathJax operates. There are comments in it that
explain each of the parameters, and you can edit the file to suit
your needs.r h.jF ubeubhe)r }r (h,X The default settings are appropriate for pages that use TeX as the
input language, but you might still want to adjust some settings; for
example, you might want to include some additional extensions such as
the ``AMSmath`` and ``AMSsymbols`` extensions. The comments in the
file should help you do this, but more detailed instructions are
included in the :ref:`Configuring MathJax ` document.
There are also ways to configure MathJax other than by using the
``config/MathJax.js`` file; these are descibed on that page as well.r h.j0 h/h2h4hih6}r (h<]r h>]r h:]r h8]r h@]r uhCKKhDhh']r (haX The default settings are appropriate for pages that use TeX as the
input language, but you might still want to adjust some settings; for
example, you might want to include some additional extensions such as
the r r }r (h,X The default settings are appropriate for pages that use TeX as the
input language, but you might still want to adjust some settings; for
example, you might want to include some additional extensions such as
the r h.j ubj )r }r (h,X ``AMSmath``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j h']r haX AMSmathr r }r (h,U h.j ubah4j ubhaX and r r }r (h,X and r h.j ubj )r }r (h,X ``AMSsymbols``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j h']r haX
AMSsymbolsr r }r (h,U h.j ubah4j ubhaXs extensions. The comments in the
file should help you do this, but more detailed instructions are
included in the r r }r (h,Xs extensions. The comments in the
file should help you do this, but more detailed instructions are
included in the r h.j ubj )r }r (h,X* :ref:`Configuring MathJax `r h.j h4j h6}r (Ureftyper X refr j X
configurationr U refdomainr X stdr h8]r h:]r Urefexplicitr h<]r h>]r h@]r j j uhCKKh']r j )r }r (h,j h6}r (h<]r h>]r (j j X std-refr eh:]r h8]r h@]r uh.j h']r haX Configuring MathJaxr r }r (h,U h.j ubah4j ubaubhaXL document.
There are also ways to configure MathJax other than by using the
r r }r (h,XL document.
There are also ways to configure MathJax other than by using the
r h.j ubj )r }r (h,X ``config/MathJax.js``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j h']r haX config/MathJax.jsr r }r (h,U h.j ubah4j ubhaX/ file; these are descibed on that page as well.r r }r (h,X/ file; these are descibed on that page as well.r h.j ubeubeubhF)r }r (h,U h.hGh/h2h4hKh6}r (h<]r h>]r h:]r h8]r hah@]r h
auhCKVhDhh']r (hU)r }r (h,X Linking MathJax into a web pager h.j h/h2h4hYh6}r (h<]r h>]r h:]r h8]r
h@]r uhCKVhDhh']r haX Linking MathJax into a web pager
r }r (h,j h.j ubaubhe)r }r (h,X3 You can include MathJax in your web page by puttingr h.j h/h2h4hih6}r (h<]r h>]r h:]r h8]r h@]r uhCKXhDhh']r haX3 You can include MathJax in your web page by puttingr r }r (h,j h.j ubaubcdocutils.nodes
literal_block
r )r }r (h,XI r h.j h/h2h4U
literal_blockr! h6}r" (Ulinenosr# Ulanguager$ X htmlr% U xml:spacer& Upreserver' h8]r( h:]r) h<]r* h>]r+ h@]r, uhCK]hDhh']r- haXI r. r/ }r0 (h,U h.j ubaubhe)r1 }r2 (h,X in your document's ```` block. Here, ``path-to-MathJax`` should
be replaced by the URL for the main MathJax directory, so if you have
put the ``MathJax`` directory at the top level of you server's web
site, you could user3 h.j h/h2h4hih6}r4 (h<]r5 h>]r6 h:]r7 h8]r8 h@]r9 uhCK^hDhh']r: (haX in your document's r; r< }r= (h,X in your document's r> h.j1 ubj )r? }r@ (h,X
````rA h6}rB (h<]rC h>]rD h:]rE h8]rF h@]rG uh.j1 h']rH haX rI rJ }rK (h,U h.j? ubah4j ubhaX block. Here, rL rM }rN (h,X block. Here, rO h.j1 ubj )rP }rQ (h,X ``path-to-MathJax``rR h6}rS (h<]rT h>]rU h:]rV h8]rW h@]rX uh.j1 h']rY haX path-to-MathJaxrZ r[ }r\ (h,U h.jP ubah4j ubhaXV should
be replaced by the URL for the main MathJax directory, so if you have
put the r] r^ }r_ (h,XV should
be replaced by the URL for the main MathJax directory, so if you have
put the r` h.j1 ubj )ra }rb (h,X ``MathJax``rc h6}rd (h<]re h>]rf h:]rg h8]rh h@]ri uh.j1 h']rj haX MathJaxrk rl }rm (h,U h.ja ubah4j ubhaXC directory at the top level of you server's web
site, you could usern ro }rp (h,XC directory at the top level of you server's web
site, you could userq h.j1 ubeubj )rr }rs (h,XB rt h.j h/h2h4j! h6}ru (j# j$ X htmlrv j& j' h8]rw h:]rx h<]ry h>]rz h@]r{ uhCKfhDhh']r| haXB r} r~ }r (h,U h.jr ubaubhe)r }r (h,XE to load MathJax in your page. For example, your page could look liker h.j h/h2h4hih6}r (h<]r h>]r h:]r h8]r h@]r uhCKghDhh']r haXE to load MathJax in your page. For example, your page could look liker r }r (h,j h.j ubaubj )r }r (h,X
...
...
r h.j h/h2h4j! h6}r (j# j$ X htmlr j& j' h8]r h:]r h<]r h>]r h@]r uhCKthDhh']r haX
...
...
r r }r (h,U h.j ubaubhe)r }r (h,X> Although it is possible to load MathJax from a site other than your
own web server, there are issues involved in doing so that you need to
take into consideration. See the :ref:`Notes About Shared Servers
` for more details. Please do **not** link to
the copy of MathJax at ``www.mathjax.org``, as we do not have the
resources to act as a web service for all the sites on the web that
would like to display mathematics. If you are able to run MathJax
from your own server, please do so (this will probably give you better
response time in any case).r h.j h/h2h4hih6}r (h<]r h>]r h:]r h8]r h@]r uhCKuhDhh']r (haX Although it is possible to load MathJax from a site other than your
own web server, there are issues involved in doing so that you need to
take into consideration. See the r r }r (h,X Although it is possible to load MathJax from a site other than your
own web server, there are issues involved in doing so that you need to
take into consideration. See the r h.j ubj )r }r (h,X8 :ref:`Notes About Shared Servers
`r h.j h4j h6}r (Ureftyper X refr j X cross-domain-linkingr U refdomainr X stdr h8]r h:]r Urefexplicitr h<]r h>]r h@]r j j uhCKuh']r j )r }r (h,j h6}r (h<]r h>]r (j j X std-refr eh:]r h8]r h@]r uh.j h']r haX Notes About Shared Serversr r }r (h,U h.j ubah4j ubaubhaX for more details. Please do r r }r (h,X for more details. Please do r h.j ubcdocutils.nodes
strong
r )r }r (h,X **not**r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j h']r haX notr r }r (h,U h.j ubah4Ustrongr ubhaX link to
the copy of MathJax at r r }r (h,X link to
the copy of MathJax at r h.j ubj )r }r (h,X ``www.mathjax.org``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j h']r haX www.mathjax.orgr r }r (h,U h.j ubah4j ubhaX , as we do not have the
resources to act as a web service for all the sites on the web that
would like to display mathematics. If you are able to run MathJax
from your own server, please do so (this will probably give you better
response time in any case).r r }r (h,X , as we do not have the
resources to act as a web service for all the sites on the web that
would like to display mathematics. If you are able to run MathJax
from your own server, please do so (this will probably give you better
response time in any case).r h.j ubeubeubhF)r }r (h,U h.hGh/h2h4hKh6}r (h<]r h>]r h:]r h8]r h ah@]r hauhCKhDhh']r (hU)r }r (h,X! Putting mathematics in a web pager h.j h/h2h4hYh6}r (h<]r h>]r h:]r h8]r h@]r uhCKhDhh']r haX! Putting mathematics in a web pager r }r (h,j h.j ubaubhe)r }r (h,X: To put mathematics in your web page, you can use either TeX and LaTeX
notation, or MathML notation (or both); the configuration file tells
MathJax which you want to use, and how you plan to indicate the
mathematics when you are using TeX notation. The following sections
tell you how to use each of these formats.r h.j h/h2h4hih6}r (h<]r h>]r h:]r
h8]r h@]r uhCKhDhh']r
haX: To put mathematics in your web page, you can use either TeX and LaTeX
notation, or MathML notation (or both); the configuration file tells
MathJax which you want to use, and how you plan to indicate the
mathematics when you are using TeX notation. The following sections
tell you how to use each of these formats.r r }r (h,j h.j ubaubh))r }r (h,X .. _tex-and-latex-input:r h.j h/h2h4h5h6}r (h8]r h:]r h<]r h>]r h@]r hBh$uhCKhDhh']r ubhF)r }r (h,U h.j h/h2hI}r hj sh4hKh6}r (h<]r h>]r h:]r! h8]r" (h$h!eh@]r# (hheuhCKhDhhR}r$ h$j sh']r% (hU)r& }r' (h,X TeX and LaTeX inputr( h.j h/h2h4hYh6}r) (h<]r* h>]r+ h:]r, h8]r- h@]r. uhCKhDhh']r/ haX TeX and LaTeX inputr0 r1 }r2 (h,j( h.j& ubaubhe)r3 }r4 (h,X To process mathematics that is written in :term:`TeX` or :term:`LaTeX`
format, include ``"input/TeX"`` in your configuration's `jax` array,
and add ``"tex2jax.js"`` to the `extensions` array so that MathJax
will look for TeX-style math delimiters to identify the mathematics on
the page.r5 h.j h/h2h4hih6}r6 (h<]r7 h>]r8 h:]r9 h8]r: h@]r; uhCKhDhh']r< (haX* To process mathematics that is written in r= r> }r? (h,X* To process mathematics that is written in r@ h.j3 ubj )rA }rB (h,X :term:`TeX`rC h.j3 h4j h6}rD (UreftyperE X termrF j X texrG U refdomainrH X stdrI h8]rJ h:]rK UrefexplicitrL h<]rM h>]rN h@]rO j j uhCKh']rP j )rQ }rR (h,jC h6}rS (h<]rT h>]rU (j jI X std-termrV eh:]rW h8]rX h@]rY uh.jA h']rZ haX TeXr[ r\ }r] (h,U h.jQ ubah4j ubaubhaX or r^ r_ }r` (h,X or ra h.j3 ubj )rb }rc (h,X
:term:`LaTeX`rd h.j3 h4j h6}re (Ureftyperf X termrg j X latexrh U refdomainri X stdrj h8]rk h:]rl Urefexplicitrm h<]rn h>]ro h@]rp j j uhCKh']rq j )rr }rs (h,jd h6}rt (h<]ru h>]rv (j jj X std-termrw eh:]rx h8]ry h@]rz uh.jb h']r{ haX LaTeXr| r} }r~ (h,U h.jr ubah4j ubaubhaX
format, include r r }r (h,X
format, include r h.j3 ubj )r }r (h,X ``"input/TeX"``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j3 h']r haX "input/TeX"r r }r (h,U h.j ubah4j ubhaX in your configuration's r r }r (h,X in your configuration's r h.j3 ubcdocutils.nodes
title_reference
r )r }r (h,X `jax`r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j3 h']r haX jaxr r }r (h,U h.j ubah4Utitle_referencer ubhaX array,
and add r r }r (h,X array,
and add r h.j3 ubj )r }r (h,X ``"tex2jax.js"``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j3 h']r haX "tex2jax.js"r r }r (h,U h.j ubah4j ubhaX to the r r }r (h,X to the r h.j3 ubj )r }r (h,X `extensions`r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j3 h']r haX
extensionsr r }r (h,U h.j ubah4j ubhaXg array so that MathJax
will look for TeX-style math delimiters to identify the mathematics on
the page.r r }r (h,Xg array so that MathJax
will look for TeX-style math delimiters to identify the mathematics on
the page.r h.j3 ubeubj )r }r (h,XB extensions: ["tex2math.js"],
jax: ["input/TeX", "output/HTML-CSS"]r h.j h/h2h4j! h6}r (j# j$ X
javascriptr j& j' h8]r h:]r h<]r h>]r h@]r uhCKhDhh']r haXB extensions: ["tex2math.js"],
jax: ["input/TeX", "output/HTML-CSS"]r r }r (h,U h.j ubaubhe)r }r (h,X Note that the default math delimiters are ``$$...$$`` and ``\[...\]``
for displayed mathematics, and ``\(...\)`` for in-line mathematics.
In particular, the ``$...$`` in-line delimiters are **not** used by
default. That is because dollar signs appear too often in
non-mathematical settings, which could cause some text to be treated
as mathematics unexpectedly. For example, with single-dollar
delimiters, "... the cost is $2.50 for the first one, and $2.00 for
each additional one ..." would cause the phrase "2.50 for the first
one, and" to be treated as mathematics since it falls between dollar
signs. For this reason, if you want to use single-dollars for in-line
math mode, you must enable that explicitly in your configuration:r h.j h/h2h4hih6}r (h<]r h>]r h:]r h8]r h@]r uhCKhDhh']r (haX* Note that the default math delimiters are r r }r (h,X* Note that the default math delimiters are r h.j ubj )r }r (h,X ``$$...$$``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j h']r haX $$...$$r r }r (h,U h.j ubah4j ubhaX and r r }r (h,X and r h.j ubj )r }r (h,X ``\[...\]``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j h']r haX \[...\]r r }r (h,U h.j ubah4j ubhaX
for displayed mathematics, and r r }r (h,X
for displayed mathematics, and r h.j ubj )r }r (h,X ``\(...\)``r h6}r
(h<]r h>]r h:]r
h8]r h@]r uh.j h']r haX \(...\)r r }r (h,U h.j ubah4j ubhaX- for in-line mathematics.
In particular, the r r }r (h,X- for in-line mathematics.
In particular, the r h.j ubj )r }r (h,X ``$...$``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j h']r! haX $...$r" r# }r$ (h,U h.j ubah4j ubhaX in-line delimiters are r% r& }r' (h,X in-line delimiters are r( h.j ubj )r) }r* (h,X **not**r+ h6}r, (h<]r- h>]r. h:]r/ h8]r0 h@]r1 uh.j h']r2 haX notr3 r4 }r5 (h,U h.j) ubah4j ubhaX used by
default. That is because dollar signs appear too often in
non-mathematical settings, which could cause some text to be treated
as mathematics unexpectedly. For example, with single-dollar
delimiters, "... the cost is $2.50 for the first one, and $2.00 for
each additional one ..." would cause the phrase "2.50 for the first
one, and" to be treated as mathematics since it falls between dollar
signs. For this reason, if you want to use single-dollars for in-line
math mode, you must enable that explicitly in your configuration:r6 r7 }r8 (h,X used by
default. That is because dollar signs appear too often in
non-mathematical settings, which could cause some text to be treated
as mathematics unexpectedly. For example, with single-dollar
delimiters, "... the cost is $2.50 for the first one, and $2.00 for
each additional one ..." would cause the phrase "2.50 for the first
one, and" to be treated as mathematics since it falls between dollar
signs. For this reason, if you want to use single-dollars for in-line
math mode, you must enable that explicitly in your configuration:r9 h.j ubeubj )r: }r; (h,X1 tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}r< h.j h/h2h4j! h6}r= (j# j$ X
javascriptr> j& j' h8]r? h:]r@ h<]rA h>]rB h@]rC uhCKhDhh']rD haX1 tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}rE rF }rG (h,U h.j: ubaubhe)rH }rI (h,X See the ``config/MathJax.js`` file, or the :ref:`tex2jax configuration
options ` page, for additional configuration
parameters that you can specify for the ``tex2jax`` preprocessor.rJ h.j h/h2h4hih6}rK (h<]rL h>]rM h:]rN h8]rO h@]rP uhCKhDhh']rQ (haX See the rR rS }rT (h,X See the rU h.jH ubj )rV }rW (h,X ``config/MathJax.js``rX h6}rY (h<]rZ h>]r[ h:]r\ h8]r] h@]r^ uh.jH h']r_ haX config/MathJax.jsr` ra }rb (h,U h.jV ubah4j ubhaX file, or the rc rd }re (h,X file, or the rf h.jH ubj )rg }rh (h,X8 :ref:`tex2jax configuration
options `ri h.jH h4j h6}rj (Ureftyperk X refrl j X configure-tex2jaxrm U refdomainrn X stdro h8]rp h:]rq Urefexplicitrr h<]rs h>]rt h@]ru j j uhCKh']rv j )rw }rx (h,ji h6}ry (h<]rz h>]r{ (j jo X std-refr| eh:]r} h8]r~ h@]r uh.jg h']r haX tex2jax configuration
optionsr r }r (h,U h.jw ubah4j ubaubhaXL page, for additional configuration
parameters that you can specify for the r r }r (h,XL page, for additional configuration
parameters that you can specify for the r h.jH ubj )r }r (h,X ``tex2jax``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.jH h']r haX tex2jaxr r }r (h,U h.j ubah4j ubhaX preprocessor.r r }r (h,X preprocessor.r h.jH ubeubhe)r }r (h,X Here is a complete sample page containing TeX mathematics (which
assumes that ``config/MathJax.js`` is configured as described above):r h.j h/h2h4hih6}r (h<]r h>]r h:]r h8]r h@]r uhCKhDhh']r (haXN Here is a complete sample page containing TeX mathematics (which
assumes that r r }r (h,XN Here is a complete sample page containing TeX mathematics (which
assumes that r h.j ubj )r }r (h,X ``config/MathJax.js``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j h']r haX config/MathJax.jsr r }r (h,U h.j ubah4j ubhaX# is configured as described above):r r }r (h,X# is configured as described above):r h.j ubeubj )r }r (h,X
MathJax TeX Test Page
When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
r h.j h/h2h4j! h6}r (j# j$ X htmlr j& j' h8]r h:]r h<]r h>]r h@]r uhCKhDhh']r haX
MathJax TeX Test Page
When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
r r }r (h,U h.j ubaubhe)r }r (h,X There are a number of extensions for the TeX input processor that you
might want to add to the `extensions` array. These include:r h.j h/h2h4hih6}r (h<]r h>]r h:]r h8]r h@]r uhCKhDhh']r (haX_ There are a number of extensions for the TeX input processor that you
might want to add to the r r }r (h,X_ There are a number of extensions for the TeX input processor that you
might want to add to the r h.j ubj )r }r (h,X `extensions`r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j h']r haX
extensionsr r }r (h,U h.j ubah4j ubhaX array. These include:r r }r (h,X array. These include:r h.j ubeubcdocutils.nodes
bullet_list
r )r }r (h,U h.j h/h2h4Ubullet_listr h6}r (Ubulletr X -h8]r h:]r h<]r h>]r h@]r uhCKhDhh']r (h)r }r (h,XF `TeX/AMSmath.js`, which defines the AMS math environments and
macros,
r h.j h/h2h4hh6}r (h<]r h>]r h:]r h8]r h@]r uhCNhDhh']r he)r }r (h,XE `TeX/AMSmath.js`, which defines the AMS math environments and
macros,r h.j h/h2h4hih6}r (h<]r h>]r h:]r h8]r h@]r uhCKh']r (j )r }r (h,X `TeX/AMSmath.js`r h6}r (h<]r h>]r
h:]r h8]r h@]r
uh.j h']r haX TeX/AMSmath.jsr r }r (h,U h.j ubah4j ubhaX5 , which defines the AMS math environments and
macros,r r }r (h,X5 , which defines the AMS math environments and
macros,r h.j ubeubaubh)r }r (h,X^ `TeX/AMSsymbols.js`, which defines the macros for the symbols in
the msam10 and msbm10 fonts,
r h.j h/h2h4hh6}r (h<]r h>]r h:]r h8]r h@]r uhCNhDhh']r he)r }r! (h,X] `TeX/AMSsymbols.js`, which defines the macros for the symbols in
the msam10 and msbm10 fonts,r" h.j h/h2h4hih6}r# (h<]r$ h>]r% h:]r& h8]r' h@]r( uhCKh']r) (j )r* }r+ (h,X `TeX/AMSsymbols.js`r, h6}r- (h<]r. h>]r/ h:]r0 h8]r1 h@]r2 uh.j h']r3 haX TeX/AMSsymbols.jsr4 r5 }r6 (h,U h.j* ubah4j ubhaXJ , which defines the macros for the symbols in
the msam10 and msbm10 fonts,r7 r8 }r9 (h,XJ , which defines the macros for the symbols in
the msam10 and msbm10 fonts,r: h.j ubeubaubh)r; }r< (h,X `TeX/noErrors.js`, which shows the original TeX code rather than
an error message when there is a problem processing the TeX, and
r= h.j h/h2h4hh6}r> (h<]r? h>]r@ h:]rA h8]rB h@]rC uhCNhDhh']rD he)rE }rF (h,X `TeX/noErrors.js`, which shows the original TeX code rather than
an error message when there is a problem processing the TeX, andrG h.j; h/h2h4hih6}rH (h<]rI h>]rJ h:]rK h8]rL h@]rM uhCKh']rN (j )rO }rP (h,X `TeX/noErrors.js`rQ h6}rR (h<]rS h>]rT h:]rU h8]rV h@]rW uh.jE h']rX haX TeX/noErrors.jsrY rZ }r[ (h,U h.jO ubah4j ubhaXp , which shows the original TeX code rather than
an error message when there is a problem processing the TeX, andr\ r] }r^ (h,Xp , which shows the original TeX code rather than
an error message when there is a problem processing the TeX, andr_ h.jE ubeubaubh)r` }ra (h,X `TeX/noUndefined.js`, which prevents undefined macros from
producing an error message, and instead shows the macro name in red.
rb h.j h/h2h4hh6}rc (h<]rd h>]re h:]rf h8]rg h@]rh uhCNhDhh']ri he)rj }rk (h,X `TeX/noUndefined.js`, which prevents undefined macros from
producing an error message, and instead shows the macro name in red.rl h.j` h/h2h4hih6}rm (h<]rn h>]ro h:]rp h8]rq h@]rr uhCKh']rs (j )rt }ru (h,X `TeX/noUndefined.js`rv h6}rw (h<]rx h>]ry h:]rz h8]r{ h@]r| uh.jj h']r} haX TeX/noUndefined.jsr~ r }r (h,U h.jt ubah4j ubhaXk , which prevents undefined macros from
producing an error message, and instead shows the macro name in red.r r }r (h,Xk , which prevents undefined macros from
producing an error message, and instead shows the macro name in red.r h.jj ubeubaubeubhe)r }r (h,X For example,r h.j h/h2h4hih6}r (h<]r h>]r h:]r h8]r h@]r uhCKhDhh']r haX For example,r r }r (h,j h.j ubaubj )r }r (h,Xu extensions: ["tex2math.js","TeX/noErrors.js","TeX/noUndefined.js",
"TeX/AMSmath.js","TeX/AMSsymbols.js"]r h.j h/h2h4j! h6}r (j# j$ X
javascriptr j& j' h8]r h:]r h<]r h>]r h@]r uhCKhDhh']r haXu extensions: ["tex2math.js","TeX/noErrors.js","TeX/noUndefined.js",
"TeX/AMSmath.js","TeX/AMSsymbols.js"]r r }r (h,U h.j ubaubhe)r }r (h,XH loads all four extensions, in addition to the ``tex2math``
preprocessor.r h.j h/h2h4hih6}r (h<]r h>]r h:]r h8]r h@]r uhCKhDhh']r (haX. loads all four extensions, in addition to the r r }r (h,X. loads all four extensions, in addition to the r h.j ubj )r }r (h,X ``tex2math``r h6}r (h<]r h>]r h:]r h8]r h@]r uh.j h']r haX tex2mathr r }r (h,U h.j ubah4j ubhaX
preprocessor.r r }r (h,X
preprocessor.r h.j ubeubeubhF)r }r (h,U h.j h/h2h4hKh6}r (h<]r h>]r h:]r h8]r h&ah@]r hauhCKhDhh']r (hU)r }r (h,X MathML inputr h.j h/h2h4hYh6}r (h<]r h>]r h:]r h8]r h@]r uhCKhDhh']r haX MathML inputr r }r (h,j h.j ubaubhe)r }r (h,X To process mathematics written in :term:`MathML`, include
``"input/MathML"`` in your configuration's `jax` array, and add
``"mml2jax.js"`` to the `extensions` array so that MathJax will
locate the ``