Skip to content

Commit 50d1f45

Browse files
committed
Merge branch 'doc-update' into v2.0-candidate
2 parents ab487a0 + ae27155 commit 50d1f45

File tree

176 files changed

+12332
-2391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+12332
-2391
lines changed

docs/html/CSS-styles.html

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<head>
77
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
88

9-
<title>CSS Style Objects &mdash; MathJax v1.1 documentation</title>
9+
<title>CSS Style Objects &mdash; MathJax v2.0 documentation</title>
1010
<link rel="stylesheet" href="_static/mj.css" type="text/css" />
1111
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
1212
<script type="text/javascript">
1313
var DOCUMENTATION_OPTIONS = {
1414
URL_ROOT: '',
15-
VERSION: '1.1',
15+
VERSION: '2.0',
1616
COLLAPSE_INDEX: false,
1717
FILE_SUFFIX: '.html',
1818
HAS_SOURCE: true
@@ -22,7 +22,7 @@
2222
<script type="text/javascript" src="_static/underscore.js"></script>
2323
<script type="text/javascript" src="_static/doctools.js"></script>
2424
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
25-
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
25+
<link rel="top" title="MathJax v2.0 documentation" href="index.html" />
2626
<link rel="next" title="Glossary" href="glossary.html" />
2727
<link rel="prev" title="Describing HTML snippets" href="HTML-snippets.html" />
2828
</head>
@@ -40,7 +40,7 @@ <h3>Navigation</h3>
4040
<li class="right" >
4141
<a href="HTML-snippets.html" title="Describing HTML snippets"
4242
accesskey="P">previous</a> |</li>
43-
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
43+
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
4444
</ul>
4545
</div>
4646

@@ -52,8 +52,8 @@ <h3>Navigation</h3>
5252
<div class="section" id="css-style-objects">
5353
<span id="id1"></span><h1>CSS Style Objects<a class="headerlink" href="#css-style-objects" title="Permalink to this headline"></a></h1>
5454
<p>Many MathJax components allow you to specify CSS styles that control
55-
the look of the elements they create. These are described using CSS
56-
style objects, which are JavaScript objects that represent standard
55+
the look of the elements they create. These are described using <cite>CSS
56+
style objects</cite>, which are JavaScript objects that represent standard
5757
CSS declarations. The main CSS style object is a collection of
5858
<cite>name:value</cite> pairs where the <cite>name</cite> is the CSS selector that is being
5959
defined, and the <cite>value</cite> is an object that gives the style for that
@@ -73,25 +73,27 @@ <h3>Navigation</h3>
7373
declaration:</p>
7474
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">styles</span><span class="o">:</span> <span class="p">{</span>
7575

76+
<span class="s2">&quot;.MathJax_Display&quot;</span><span class="o">:</span> <span class="p">{</span>
77+
<span class="s2">&quot;text-align&quot;</span><span class="o">:</span> <span class="s2">&quot;center&quot;</span><span class="p">,</span>
78+
<span class="nx">margin</span><span class="o">:</span> <span class="s2">&quot;1em 0em&quot;</span>
79+
<span class="p">},</span>
80+
7681
<span class="s2">&quot;.MathJax .merror&quot;</span><span class="o">:</span> <span class="p">{</span>
7782
<span class="s2">&quot;background-color&quot;</span><span class="o">:</span> <span class="s2">&quot;#FFFF88&quot;</span><span class="p">,</span>
7883
<span class="nx">color</span><span class="o">:</span> <span class="s2">&quot;#CC0000&quot;</span><span class="p">,</span>
7984
<span class="nx">border</span><span class="o">:</span> <span class="s2">&quot;1px solid #CC0000&quot;</span><span class="p">,</span>
8085
<span class="nx">padding</span><span class="o">:</span> <span class="s2">&quot;1px 3px&quot;</span><span class="p">,</span>
81-
<span class="s2">&quot;font-family&quot;</span><span class="o">:</span> <span class="s2">&quot;serif&quot;</span><span class="p">,</span>
8286
<span class="s2">&quot;font-style&quot;</span><span class="o">:</span> <span class="s2">&quot;normal&quot;</span><span class="p">,</span>
8387
<span class="s2">&quot;font-size&quot;</span><span class="o">:</span> <span class="s2">&quot;90%&quot;</span>
84-
<span class="p">},</span>
85-
86-
<span class="s2">&quot;.MathJax_Preview&quot;</span><span class="o">:</span> <span class="p">{</span><span class="nx">color</span><span class="o">:</span> <span class="s2">&quot;#888888&quot;</span><span class="p">},</span>
88+
<span class="p">}</span>
8789

8890
<span class="p">}</span>
8991
</pre></div>
9092
</div>
91-
<p>This defines two CSS styles, one for the selector <tt class="docutils literal"><span class="pre">.MathJax</span>
92-
<span class="pre">.merror</span></tt>, which specifies a background color, foreground color,
93-
border, and so on, and a second for <tt class="docutils literal"><span class="pre">.MathJax_Preview</span></tt> that sets its
94-
color.</p>
93+
<p>This defines two CSS styles, one for the selector
94+
<tt class="docutils literal"><span class="pre">.MathJax_Display</span></tt>, which specifies its text alignment and margin
95+
settings, and a second for <tt class="docutils literal"><span class="pre">.MathJax</span> <span class="pre">.merror</span></tt>, which specifies a
96+
background color, foreground color, border, and so on.</p>
9597
<p>You can add as many such definitions to a <tt class="docutils literal"><span class="pre">styles</span></tt> object as you
9698
wish. Note, however, that since this is a JavaScript object, the
9799
selectors must be unique (e.g., you can&#8217;t use two definitions for
@@ -159,11 +161,11 @@ <h3>Navigation</h3>
159161
<li class="right" >
160162
<a href="HTML-snippets.html" title="Describing HTML snippets"
161163
>previous</a> |</li>
162-
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
164+
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
163165
</ul>
164166
</div>
165167
<div class="footer">
166-
&copy; Copyright 2011 Design Science.
168+
&copy; Copyright 2012 Design Science.
167169
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
168170
</div>
169171

docs/html/HTML-snippets.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<head>
77
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
88

9-
<title>Describing HTML snippets &mdash; MathJax v1.1 documentation</title>
9+
<title>Describing HTML snippets &mdash; MathJax v2.0 documentation</title>
1010
<link rel="stylesheet" href="_static/mj.css" type="text/css" />
1111
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
1212
<script type="text/javascript">
1313
var DOCUMENTATION_OPTIONS = {
1414
URL_ROOT: '',
15-
VERSION: '1.1',
15+
VERSION: '2.0',
1616
COLLAPSE_INDEX: false,
1717
FILE_SUFFIX: '.html',
1818
HAS_SOURCE: true
@@ -22,7 +22,7 @@
2222
<script type="text/javascript" src="_static/underscore.js"></script>
2323
<script type="text/javascript" src="_static/doctools.js"></script>
2424
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
25-
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
25+
<link rel="top" title="MathJax v2.0 documentation" href="index.html" />
2626
<link rel="next" title="CSS Style Objects" href="CSS-styles.html" />
2727
<link rel="prev" title="The MathJax Object-Oriented Programming Model" href="api/object.html" />
2828
</head>
@@ -40,7 +40,7 @@ <h3>Navigation</h3>
4040
<li class="right" >
4141
<a href="api/object.html" title="The MathJax Object-Oriented Programming Model"
4242
accesskey="P">previous</a> |</li>
43-
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
43+
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
4444
</ul>
4545
</div>
4646

@@ -156,11 +156,11 @@ <h3>Navigation</h3>
156156
<li class="right" >
157157
<a href="api/object.html" title="The MathJax Object-Oriented Programming Model"
158158
>previous</a> |</li>
159-
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
159+
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
160160
</ul>
161161
</div>
162162
<div class="footer">
163-
&copy; Copyright 2011 Design Science.
163+
&copy; Copyright 2012 Design Science.
164164
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
165165
</div>
166166

docs/html/_sources/CSS-styles.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ CSS Style Objects
55
*****************
66

77
Many MathJax components allow you to specify CSS styles that control
8-
the look of the elements they create. These are described using CSS
9-
style objects, which are JavaScript objects that represent standard
8+
the look of the elements they create. These are described using `CSS
9+
style objects`, which are JavaScript objects that represent standard
1010
CSS declarations. The main CSS style object is a collection of
1111
`name:value` pairs where the `name` is the CSS selector that is being
1212
defined, and the `value` is an object that gives the style for that
@@ -31,24 +31,26 @@ declaration:
3131

3232
styles: {
3333

34+
".MathJax_Display": {
35+
"text-align": "center",
36+
margin: "1em 0em"
37+
},
38+
3439
".MathJax .merror": {
3540
"background-color": "#FFFF88",
3641
color: "#CC0000",
3742
border: "1px solid #CC0000",
3843
padding: "1px 3px",
39-
"font-family": "serif",
4044
"font-style": "normal",
4145
"font-size": "90%"
42-
},
43-
44-
".MathJax_Preview": {color: "#888888"},
46+
}
4547

4648
}
4749

48-
This defines two CSS styles, one for the selector ``.MathJax
49-
.merror``, which specifies a background color, foreground color,
50-
border, and so on, and a second for ``.MathJax_Preview`` that sets its
51-
color.
50+
This defines two CSS styles, one for the selector
51+
``.MathJax_Display``, which specifies its text alignment and margin
52+
settings, and a second for ``.MathJax .merror``, which specifies a
53+
background color, foreground color, border, and so on.
5254

5355
You can add as many such definitions to a ``styles`` object as you
5456
wish. Note, however, that since this is a JavaScript object, the

docs/html/_sources/api/callback.txt

Lines changed: 63 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ A callback specification is any one of the following:
5858
the given function, and it would return their sum, ``5``, when
5959
the callback is executed.
6060

61-
.. describe:: [object, fn]
61+
.. describe:: [object, fn]
6262

6363
An array containing an object to use as `this` and a function to
6464
call for the callback. For example,
@@ -75,7 +75,7 @@ A callback specification is any one of the following:
7575
Similar to the previous case, but with data that is passed to
7676
the function as well.
7777

78-
..describe:: ["method", object]
78+
.. describe:: ["method", object]
7979

8080
Here, `object` is an object that has a method called `method`, and
8181
the callback will execute that method (with the object as
@@ -220,6 +220,26 @@ MathJax.Callback Methods
220220
- **callback** --- the callback specification
221221
:Returns: the callback object
222222

223+
.. method:: Queue([callback,...])
224+
225+
Creates a `MathJax.CallBack.Queue` object and pushes the given
226+
callbacks into the queue. See :ref:`Using Queues <using-queues>`
227+
for more details about MathJax queues.
228+
229+
:Parameters:
230+
- **callback** --- one or more callback specifications
231+
:Returns: the `Queue` object
232+
233+
.. method:: Signal(name)
234+
235+
Looks for a named signal, creates it if it doesn't already exist,
236+
and returns the signal object. See
237+
:ref:`Using Signals <using-signals>` for more details.
238+
239+
:Parameters:
240+
- **name** --- name of the signal to get or create
241+
:Returns: the `Signal` object
242+
223243
.. method:: ExecuteHooks(hooks[, data[,reset]])
224244

225245
Calls each callback in the `hooks` array (or the single hook if it
@@ -231,29 +251,54 @@ MathJax.Callback Methods
231251
execute when all the ones returned by the hooks have been
232252
completed. Otherwise, :meth:`MathJax.Callback.ExecuteHooks()`
233253
returns ``null``.
234-
254+
235255
:Parameters:
236256
- **hooks** --- array of hooks to be called, or a hook
237257
- **data** --- array of arguments to pass to each hook in turn
238258
- **reset** --- ``true`` if the :meth:`reset()` method should be called
239259
:Returns: callback that waits for all the hooks to complete, or ``null``
240260

241-
.. method:: Queue([callback,...])
261+
.. method:: Hooks(reset)
242262

243-
Creates a `MathJax.CallBack.Queue` object and pushes the given
244-
callbacks into the queue. See :ref:`Using Queues <using-queues>`
245-
for more details about MathJax queues.
263+
Creates a prioritized list of hooks that are called in order based
264+
on their priority (low priority numbers are handled first). This
265+
is meant to replace :meth:`MathJax.Callback.ExecuteHooks()` and is
266+
used internally for signal callbacks, pre- and post-filters, and
267+
other lists of callbacks.
246268

247269
:Parameters:
248-
- **callback** --- one or more callback specifications
249-
:Returns: the `Queue` object
270+
- **reset** --- ``true`` if callbacks can be called more than once
271+
:Returns: the `Hooks` object
250272

251-
.. method:: Signal(name)
252-
253-
Looks for a named signal, creates it if it doesn't already exist,
254-
and returns the signal object. See
255-
:ref:`Using Signals <using-signals>` for more details.
256-
257-
:Parameters:
258-
- **name** --- name of the signal to get or create
259-
:Returns: the `Signal` object
273+
The list has the following methods:
274+
275+
.. method:: Add(hook[,priority])
276+
277+
Add a callback to the prioritized list. If ``priority`` is
278+
not provided, the default is 10. The ``hook`` is a `Callback`
279+
specification as described above.
280+
281+
:Parameters:
282+
- **hook** --- callback specification to add to the list
283+
- **priority** --- priority of the hook in the list (default: 10)
284+
:Returns: the callback object being added
285+
286+
.. method:: Remove(hook)
287+
:noindex:
288+
289+
Remove a given hook (as returned from :meth:`Add()` above)
290+
from the prioritized list.
291+
292+
:Parameters:
293+
- **hook** --- the callback to be removed
294+
:Returns: ``null``
295+
296+
.. method:: Execute()
297+
298+
Execute the list of callbacks, resetting them if requested.
299+
If any of the hooks return callbacks, then ``Execute()``
300+
returns a callback that will be executed when they all have
301+
completed.
302+
303+
:Returns: a callback object or ``null``
304+

docs/html/_sources/api/elementjax.txt

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,11 @@ Instance Properties
4242

4343
.. describe:: inputJax
4444

45-
A reference to the input jax that created the element. (In the
46-
future, this will be changed to the name of the input jax.)
45+
The name of the input jax that created the element.
4746

4847
.. describe:: outputJax
4948

50-
A reference to the output jax that has processed this element. (In
51-
the future, this will be changed to the name of the output jax.)
49+
The name of the output jax that has processed this element.
5250

5351
.. describe:: inputID
5452

@@ -89,13 +87,25 @@ Methods
8987
- **callback** --- the callback specification
9088
:Returns: the callback object
9189

90+
.. Method:: Rerender([callback])
91+
:noindex:
92+
93+
Removes the output and produces it again (for example, if CSS has
94+
changed that would alter the spacing of the mathematics). Note
95+
that the internal representation isn't regenerated; only the
96+
output is. The `callback`, if any, is called when the process
97+
completes.
98+
99+
:Parameters:
100+
- **callback** --- the callback specification
101+
:Returns: the callback object
102+
92103
.. Method:: Reprocess([callback])
93104
:noindex:
94105

95-
Removes the output and produces it again. This may be necessary if
96-
there are changes to the CSS styles that would affect the layout
97-
of the mathematics, for example. The `callback`, if any, is
98-
called when the process completes.
106+
Removes the output and then retranslates the input into the
107+
internal form and reredners the output again. The `callback`, if
108+
any, is called when the process completes.
99109

100110
:Parameters:
101111
- **callback** --- the callback specification
@@ -118,6 +128,16 @@ Methods
118128

119129
:Returns: the ``<script>`` element
120130

131+
.. Method:: needsUpdate()
132+
133+
Indicates whether the mathematics has changed so that its output
134+
needs to be updated.
135+
136+
:Returns: ``true`` if the mathematics needs to be reprocessed,
137+
``false`` otherwise
138+
139+
140+
121141
Output jax may add new methods to the base element jax class to
122142
perform exporting to other formats. For example, a MathML output jax
123143
could add ``toMathML()``, or an accessibility output jax could add

docs/html/_sources/api/html.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,15 @@ Methods
9292
- **text** --- the text that is to be the script's new content
9393
:Returns: ``null``
9494

95+
.. method:: getScript(script)
96+
97+
Gets the contents of the ``script`` element, properly taking into
98+
account the browser limitations and bugs.
99+
100+
:Parameters:
101+
- **script** --- the script whose content is to be retrieved
102+
:Returns: the text of the ``script``
103+
95104
.. describe:: Cookie.Set(name,data)
96105

97106
Creates a MathJax cookie using the ``MathJax.HTML.Cookie.prefix``

0 commit comments

Comments
 (0)