-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tex.rst] clarify environment and macros
Fixes #146
- Loading branch information
Showing
1 changed file
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,6 +68,12 @@ web page. (Note that within TeX mathematics, ``\$`` always has this | |
meaning; ``processEscapes`` only affects the treatment of the *opening* | ||
math delimiter.) | ||
|
||
Note that as opposed to true LaTeX, MathJax processes environments | ||
This comment has been minimized.
Sorry, something went wrong. |
||
when they are wrapped inside math delimiters. By defaut, MathJax will | ||
also render environments outside of delimiters; this can be controlled | ||
via the ``processEnvironments`` option in the :ref:`tex2jax configuration | ||
options <configure-tex2jax>`. | ||
|
||
See the ``config/default.js`` file, or the :ref:`tex2jax configuration | ||
options <configure-tex2jax>` page, for additional configuration | ||
parameters that you can specify for the `tex2jax` preprocessor, | ||
|
@@ -200,9 +206,9 @@ Defining TeX macros | |
You can use the ``\def``, ``\newcommand``, ``\renewcommand``, | ||
``\newenvironment``, ``\renewenvironment``, and ``\let`` commands to | ||
create your own macros and environments. Unlike actual TeX, however, | ||
in order for MathJax to process these, they must be enclosed in math | ||
delimiters (since MathJax only processes macros in math-mode). For | ||
example | ||
in order for MathJax to process macro definitions, they must be | ||
This comment has been minimized.
Sorry, something went wrong.
dpvc
Member
|
||
enclosed in math delimiters (since MathJax only processes macros in | ||
math-mode). For example | ||
|
||
.. code-block:: latex | ||
|
||
|
This is a bit misleading. LaTeX does process some environments within math mode (e.g.,
\begin{array}...\end{array}
). But there are some environments that must used in text-mode, mostly those that produce alignments (e.g.,\begin{align}...\end{align}
, for which there are math-mode versions that can be used inside larger expressions, e.g.,\begin{aligned}...\end{aligned}
). MathJax will process these text-mode environments even if enclosed in math delimiters while LaTeX doesn't. (And whenprocessEnvironments
is true, the math-mode ones can be used without delimiters, though that is not recommended.)