Skip to content

Commit

Permalink
[tex.rst] clarify environment and macros
Browse files Browse the repository at this point in the history
Fixes #146
  • Loading branch information
pkra committed Apr 13, 2016
1 parent 7439aac commit 1cb2ad6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Copy link
@dpvc

dpvc Apr 17, 2016

Member

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 when processEnvironments is true, the math-mode ones can be used without delimiters, though that is not recommended.)

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,
Expand Down Expand Up @@ -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.

Copy link
@dpvc

dpvc Apr 17, 2016

Member

These are not just macro definitions (they are also environment definitions). That is why I had "these" rather than "macro definitions".

This comment has been minimized.

Copy link
@pkra

pkra Apr 18, 2016

Author Contributor

These are not just macro definitions (they are also environment definitions).
Right.

That is why I had "these" rather than "macro definitions".

I changed it because it was confusing to one reader and I could see why it might be confusing when looking for information about when to use delimiters.

enclosed in math delimiters (since MathJax only processes macros in
math-mode). For example

.. code-block:: latex

Expand Down

0 comments on commit 1cb2ad6

Please sign in to comment.