Skip to content

Commit 39b78b1

Browse files
committed
Updated configuration options documentaiton and added SVG and MathEvents documentation
1 parent 4332291 commit 39b78b1

Some content is hidden

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

47 files changed

+1981
-449
lines changed

docs/html/_sources/options/AsciiMath.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ The AsciiMath input processor
66

77
The options below control the operation of the AsciiMath input
88
processor that is run when you include ``"input/AsciiMath"`` in the
9-
`jax` array of your configuration or use a combined configuration file
10-
that includes AsciiMath input. They are listed with their default
11-
values. To set any of these options, include a ``AsciiMath`` section
12-
in your :meth:`MathJax.Hub.Config()` call. For example
9+
`jax` array of your configuration or load a combined configuration
10+
file that includes the AsciiMath input jax. They are listed with
11+
their default values. To set any of these options, include a
12+
``AsciiMath`` section in your :meth:`MathJax.Hub.Config()` call. For
13+
example
1314

1415
.. code-block:: javascript
1516

docs/html/_sources/options/HTML-CSS.txt

Lines changed: 75 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ The HTML-CSS output processor
66

77
The options below control the operation of the HTML-CSS output
88
processor that is run when you include ``"output/HTML-CSS"`` in the
9-
`jax` array of your configuration. They are listed with their default
10-
values. To set any of these options, include a ``"HTML-CSS"`` section
11-
in your :meth:`MathJax.Hub.Config()` call. Note that, because of the
12-
dash, you need to enclose the name in quotes. For example
9+
`jax` array of your configuration or load a combined configuration
10+
file that includes the HTML-CSS output jax. They are listed with
11+
their default values. To set any of these options, include a
12+
``"HTML-CSS"`` section in your :meth:`MathJax.Hub.Config()` call.
13+
Note that, because of the dash, you need to enclose the name in
14+
quotes. For example
1315

1416
.. code-block:: javascript
1517

@@ -25,7 +27,7 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
2527

2628
The scaling factor (as a percentage) of math with respect to the
2729
surrounding text. The `HTML-CSS` output processor tries to match
28-
the en-size of the mathematics with that of the text where it is
30+
the ex-size of the mathematics with that of the text where it is
2931
placed, but you may want to adjust the results using this scaling
3032
factor. The user can also adjust this value using the contextual
3133
menu item associated with the typeset mathematics.
@@ -86,6 +88,68 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
8688
(even if it doesn't contain the needed character), so order these
8789
carefully.
8890

91+
.. describe:: mtextFontInherit: false
92+
93+
This setting controls whether ``<mtext>`` elements will be typeset
94+
using the math fonts or the font of the surrounding text. When
95+
``false``, the font for ``mathvariant="normal"`` will be used;
96+
when ``true``, the font will be inherited from the surrounding
97+
paragraph.
98+
99+
.. describe:: EqnChunk: 50
100+
EqnChunkFactor: 1.5
101+
EqnChunkDelay: 100
102+
103+
These values control how "chunky" the display of mathematical
104+
expressions will be; that is, how often the equations will be
105+
updated as they are processed.
106+
107+
``EqnChunk`` is the number of equations that will be typeset before
108+
they appear on screen. Larger values make for less visual flicker
109+
as the equations are drawn, but also mean longer delays before the
110+
reader sees anything.
111+
112+
``EqChunkFactor`` is the factor by which the ``EqnChunk`` will
113+
grow after each chunk is displayed.
114+
115+
``EqChunkDelay`` is the time (in milliseconds) to delay between
116+
chunks (to allow the browser to respond to other user
117+
interaction).
118+
119+
Set ``EqnChunk`` to 1, ``EqnChunkFactor`` to 1, and
120+
``EqnChunkDelay`` to 10 to get the behavior from MathJax v1.1 and
121+
below.
122+
123+
.. describe:: linebreaks: {}
124+
125+
This is an object that configures automatic linebreaking in the
126+
HTML-CSS output. In order to be backward compatible with earlier
127+
versions of MathJax, only explicit line breaks are performed by
128+
default, so you must enable line breaks if you want automatic
129+
ones. The object contains the following values:
130+
131+
.. describe:: automatic: false
132+
133+
This controls the automatic breaking of expressions: when
134+
``false``, only ``linebreak="newline"`` is processed; when
135+
``true``, line breaks are inserted automatically in long
136+
expressions.
137+
138+
.. describe:: width: "container"
139+
140+
This controls how wide the lines of mathematics can be.
141+
142+
Use an explicit width like ``"30em"`` for a fixed width.
143+
Use ``"container"`` to compute the size from the containing
144+
element.
145+
Use ``"nn% container"`` for a portion of the container.
146+
Use ``"nn%"`` for a portion of the window size.
147+
148+
The container-based widths may be slower, and may not produce
149+
the expected results if the layout width changes due to the
150+
removal of previews or inclusion of mathematics during
151+
typesetting.
152+
89153
.. describe:: styles: {}
90154

91155
This is a list of CSS declarations for styling the HTML-CSS
@@ -96,18 +160,10 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
96160

97161
.. describe:: showMathMenu: true
98162

99-
This controls whether the MathJax contextual menu will be
100-
available on the mathematics in the page. If true, then
101-
right-clicking (on the PC) or control-clicking (on the Mac) will
102-
produce a MathJax menu that allows you to get the source of the
103-
mathematics in various formats, change the size of the mathematics
104-
relative to the surrounding text, get information about
105-
MathJax, and configure other MathJax settings.
106-
107-
Set this to ``false`` to disable the menu. When ``true``, the
108-
``MathMenu`` configuration block determines the operation of the
109-
menu. See :ref:`the MathMenu options <configure-MathMenu>` for
110-
more details.
163+
This value has been moved to the core configuration block, since
164+
it applies to all output jax, but it will still be honored (for
165+
now) if it is set here. See the :ref:`Core configuration options
166+
<configure-hub>` for more details.
111167

112168
.. describe:: tooltip: { ... }
113169

@@ -128,7 +184,8 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
128184
The delay (in milliseconds) before the tooltop is cleared
129185
after the mouse moves out of the ``maction`` element.
130186

131-
.. describe:: offsetX: 10 and offsetY: 5
187+
.. describe:: offsetX: 10
188+
offsetY: 5
132189

133190
These are the offset from the mouse position (in pixels)
134191
where the tooltip will be placed.

docs/html/_sources/options/MMLorHTML.txt

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ The MMLorHTML configuration options
66

77
The options below control the operation of the MMLorHTML configuration
88
file that is run when you include ``"MMLorHTML.js"`` in the `config`
9-
array of your configuration. They are listed with their default
10-
values. To set any of these options, include a ``MMLorHTML`` section
11-
in your :meth:`MathJax.Hub.Config()` call. For example
9+
array of your configuration, or when you use one of the combined
10+
configuration files that ends with ``_HTMLorMML``. They are listed
11+
with their default values. To set any of these options, include a
12+
``MMLorHTML`` section in your :meth:`MathJax.Hub.Config()` call. For
13+
example
1214

1315
.. code-block:: javascript
1416

@@ -28,15 +30,29 @@ Note that if you use the ``MMLorHTML.js`` configuration file, you should
2830
**not** specify an output processor in the `jax` array of your
2931
configuration; `MMLorHTML` will fill that in for you.
3032

31-
.. describe:: prefer: { MSIE: "MML", Firefox: "MML", Opera: "HTML", other: "HTML" }
33+
.. describe:: prefer: {
34+
MSIE: "MML",
35+
Firefox: "HTML",
36+
Safari: "HTML",
37+
Chrome: "HTML",
38+
Opera: "HTML",
39+
other: "HTML"
40+
}
3241

3342
This lets you set the preferred renderer on a browser-by-browser
3443
basis. You set the browser to either ``"MML"`` or ``"HTML"``
3544
depending on whether you want to use the `NativeMML` or `HTML-CSS`
36-
output processor. Note that although Opera does process some MathML
37-
natively, its support is not sufficient to handle the more
38-
complicated output generated by MathJax, so its setting is
39-
``"HTML"`` by default.
45+
output processor. Note that although Opera and Safari do process some MathML
46+
natively, their support is not sufficient to handle the more
47+
complicated output generated by MathJax, so their settings are
48+
``"HTML"`` by default. Although Firefox does support a large
49+
subset of MathJax, it does not implement all the features needed by
50+
MathJax, and so it is also set to ``"HTML"`` by default (this is
51+
new in v2.0).
52+
53+
Note that users can still use the MathJax contextual menu to select
54+
a different renderer after the default one has been chosen by
55+
``MMLorHTML.js``.
4056

4157

4258

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.. _configure-MathEvents:
2+
3+
************************
4+
The MathEvents extension
5+
************************
6+
7+
The options below control the operation of the MathEvents component that
8+
allows handles mouse and menu events attached to mathematics that is
9+
typeset by MathJax. They are listed with their
10+
default values. To set any of these options, include a ``MathEvents``
11+
section in your :meth:`MathJax.Hub.Config()` call. For example
12+
13+
.. code-block:: javascript
14+
15+
MathJax.Hub.Config({
16+
MathEvents: {
17+
hover: 400
18+
}
19+
});
20+
21+
would set the required delay for hovering over a math element to
22+
400 milliseconds.
23+
24+
.. describe:: hover: 500
25+
26+
This value is the time (in milliseconds) that a user must hold the
27+
mouse still over a math element before it is considered to be
28+
hovering over the math.
29+
30+
.. describe:: styles: {}
31+
32+
This is a list of CSS declarations for styling the zoomed
33+
mathematics. See the definitions in ``extensions/MathEvents.js``
34+
for details of what are defined by default. See :ref:`CSS Style
35+
Objects <css-style-objects>` for details on how to specify CSS
36+
style in a JavaScript object.
37+

docs/html/_sources/options/MathML.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ The MathML input processor
66

77
The options below control the operation of the MathML input processor
88
that is run when you include ``"input/MathML"`` in the `jax` array of
9-
your configuration. They are listed with their default values. To
9+
your configuration or load a combined configuration file that includes
10+
the MathML input jax. They are listed with their default values. To
1011
set any of these options, include a ``MathML`` section in your
1112
:meth:`MathJax.Hub.Config()` call. For example
1213

docs/html/_sources/options/MathMenu.txt

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,33 +34,41 @@ would set the ``delay`` option to 600 milliseconds.
3434

3535
.. describe:: showRenderer: true
3636

37-
This controls whether the "Math Renderer" item will be displayed in
38-
the "Settings" submenu of the mathematics contextual menu. It
39-
allows the user to change between the `HTML-CSS` and `NativeMML`
40-
output processors for the mathematics on the page. Set to
41-
``false`` to prevent this menu item from showing.
42-
43-
.. describe:: showContext: false
44-
45-
This controls whether the "Contextual Menu" item will be displayed
46-
in the "Settings" submenu of the mathematics contextual menu.
47-
It allows the user to decide whether the MathJax menu or the
48-
browser's default contextual menu will be shown when the context
49-
menu click occurs over mathematics typeset by MathJax. (The main
50-
reason to allow pass-through to the browser's menu is to gain
51-
access to the MathPlayer contextual menu when the NativeMML output
52-
processor is used in Internet Explorer with the `MathPlayer plugin
53-
<http://www.dessci.com/en/products/mathplayer/>`_.) Set to
54-
``false`` to prevent this menu item from showing.
37+
This controls whether the "Math Renderer" item will be displayed
38+
in the "Math Settings" submenu of the MathJax contextual menu.
39+
It allows the user to change between the `HTML-CSS`, `NativeMML`,
40+
and `SVG` output processors for the mathematics on the page. Set
41+
to ``false`` to prevent this menu item from showing.
5542

5643
.. describe:: showFontMenu: false
5744

5845
This controls whether the "Font Preference" item will be displayed
59-
in the "Settings" submenu of the mathematics contextual menu.
46+
in the "Math Settings" submenu of the MathJax contextual menu.
6047
This submenu lets the user select what font to use in the
6148
mathematics produced by the `HTML-CSS` output processor. Note that
6249
changing the selection in the font menu will cause the page to
6350
reload. Set to ``false`` to prevent this menu item from showing.
51+
52+
.. describe:: showMathPlayer: true
53+
54+
This controls whether the "MathPlayer" item will be displayed in
55+
the "Math Settings" submenu of the MathJax contextual menu. This
56+
submenu lets the user select what events should be passed on to
57+
the `MathPlayer plugin
58+
<http://www.dessci.com/en/products/mathplayer/>`_, when it is
59+
present. Mouse events can be passed on (so that clicks will be
60+
processed by MathPlayer rather than MathJax), and emnu events can
61+
be passed on (to allow the user access to the MathPlayer menu).
62+
Set to ``false`` to prevent this menu item from showing.
63+
64+
.. describe:: showContext: false
65+
66+
This controls whether the "Contextual Menu" item will be displayed
67+
in the "Math Settings" submenu of the MathJax contextual menu.
68+
It allows the user to decide whether the MathJax menu or the
69+
browser's default contextual menu will be shown when the context
70+
menu click occurs over mathematics typeset by MathJax. Set to
71+
``false`` to prevent this menu item from showing.
6472

6573
.. describe:: windowSettings: { ... }
6674

docs/html/_sources/options/MathZoom.txt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,28 @@ section in your :meth:`MathJax.Hub.Config()` call. For example
1414

1515
MathJax.Hub.Config({
1616
MathZoom: {
17-
delay: 600
17+
styles: {
18+
"#MathJax_Zoom": {
19+
"background-color": "#0000F0"
20+
}
21+
}
1822
}
1923
});
2024

21-
would set the ``delay`` option to 600 milliseconds.
25+
would set the background color of the Zoom box to a very light blue.
2226

2327
Mathematics is zoomed when the user "triggers" the zoom by an action,
2428
either clicking on the mathematics, double-clicking on it, or holding
2529
the mouse still over it (i.e., "hovering"). Which trigger is used is
2630
set by the user via the math contextual menu (or by the author using
27-
the ``menuSettings`` configuration section).
31+
the ``menuSettings`` configuration section of the `core configuration
32+
options <configure-hub>`).
2833

29-
.. describe:: delay: 400
34+
.. describe:: delay: 500
3035

31-
This the time (in milliseconds) that the mouse must be still over a
32-
typeset mathematical formula before the zoomed version is displayed
33-
(when the zoom trigger is set to `Hover`).
36+
This value is now stored as the ``hover`` parameter in the
37+
:ref:`MathEvents <configure-MathEvents>` configuration options, and
38+
will have no effect if given here.
3439

3540
.. describe:: styles: {}
3641

0 commit comments

Comments
 (0)