/usr/share/doc/libjs-mathjax-doc/html/_sources/options/input-processors/TeX.rst.txt is in libjs-mathjax-doc 2.7+20171212-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | .. _configure-TeX:
***********************
The TeX input processor
***********************
The options below control the operation of the TeX input processor
that is run when you include ``"input/TeX"`` in the `jax` array of
your configuration or load a combined configuration file that includes
the TeX input jax. They are listed with their default values. To
set any of these options, include a ``TeX`` section in your
:meth:`MathJax.Hub.Config()` call. For example
.. code-block:: javascript
MathJax.Hub.Config({
TeX: {
Macros: {
RR: '{\\bf R}',
bold: ['{\\bf #1}', 1]
}
}
});
would set the ``Macros`` configuration option to cause two new macros
to be defined within the TeX input processor.
.. describe:: TagSide: "right"
This specifies the side on which ``\tag{}`` macros will place the
tags. Set it to ``"left"`` to place the tags on the left-hand side.
.. describe:: TagIndent: ".8em"
This is the amount of indentation (from the right or left) for the
tags produced by the ``\tag{}`` macro.
.. describe:: MultLineWidth: "85%"
The width to use for the `multline` environment that is part of
the ``AMSmath`` extension. This width gives room for tags at
either side of the equation, but if you are displaying mathematics
in a small area or a thin column of text, you might need to change
the value to leave sufficient margin for tags.
.. describe:: equationNumbers: {}
This object controls the automatic equation numbering and the
equation referencing. It contains the following values:
.. describe:: autoNumber: "none"
This controls whether equations are numbered and how. By
default it is set to ``"none"`` to be compatible with earlier
versions of MathJax where auto-numbering was not performed (so
pages will not change their appearance). You can change
this to ``"AMS"`` for equations numbered as the `AMSmath`
package would do, or ``"all"`` to get an equation number for
every displayed equation.
.. describe:: formatNumber: function (n) {return n}
A function that tells MathJax what tag to use for equation
number ``n``. This could be used to have the equations labeled
by a sequence of symbols rather than numbers, or to use section
and subsection numbers instead.
.. describe:: formatTag: function (n) {return '('+n+')'}
A function that tells MathJax how to format an equation number
for displaying as a tag for an equation. This is what appears
in the margin of a tagged or numbered equation.
.. describe:: formatID: function {return 'mjx-eqn-'+String(n).replace(/[:'"<>&]/g,"")}
A function that rells MathJax what ID to use as an anchor for
the equation (so that it can be used in URL references).
.. describe:: formatURL: function (id) {return '#'+escape(id)}
A function that takes an equation ID and returns the URL to
link to it.
.. describe:: useLabelIds: true
This controls whether element ID's use the ``\label`` name or
the equation number. When ``true``, use the label, when
``false``, use the equation number.
See the `MathJax examples page
<https://github.com/mathjax/MathJax/blob/master/test/examples.html>`_ for
some examples of equation numbering.
.. describe:: Macros: {}
This lists macros to define before the TeX input processor begins.
These are `name:value` pairs where the `name` gives the name of
the TeX macro to be defined, and `value` gives the replacement
text for the macro. The `value` can be an array of the form
`[value,n]`, where `value` is the replacement text and `n` is the
number of parameters for the macro. Note that since the `value`
is a javascript string, backslashes in the replacement text must
be doubled to prevent them from acting as javascript escape
characters.
For example,
.. code-block:: javascript
Macros: {
RR: '{\\bf R}',
bold: ['{\\bf #1}', 1]
}
would ask the TeX processor to define two new macros: ``\RR``,
which produces a bold-face "R", and ``\bold{...}``, which takes one
parameter and sets it in the bold-face font.
.. describe:: MAXMACROS: 10000
Because a definition of the form ``\def\x{\x} \x`` would cause MathJax
to loop infinitely, the `MAXMACROS` constant will limit the number of
macro substitutions allowed in any expression processed by MathJax.
.. describe:: MAXBUFFER: 5*1024
Because a definition of the form ``\def\x{\x aaa} \x`` would loop
infinitely, and at the same time stack up lots of a's in MathJax's
equation buffer, the `MAXBUFFER` constant is used to limit the size of
the string being processed by MathJax. It is set to 5KB, which should
be sufficient for any reasonable equation.
|