.. _tex-enclose: ####### enclose ####### The `enclose` extension gives you access to the MathML ```` element for adding boxes, ovals, strikethroughs, and other marks over your mathematics. It defines the following non-standard macro: .. describe:: \enclose{notation}[attributes]{math} Where ``notation`` is a comma-separated list of MathML ```` notations (e.g., ``circle``, ``left``, ``updiagonalstrike``, ``longdiv``, etc.), ``attributes`` are optional MathML attribute values allowed on the ```` element (e.g., ``mathcolor="red"``, ``mathbackground="yellow"``), and ``math`` is the mathematics to be enclosed. See the `MathML 3 specification `_ for more details on ````. For example .. code-block:: latex \enclose{circle}[mathcolor=red]{x} \enclose{circle}[mathcolor=red]{\color{black}{x}} \enclose{circle,box}{x} \enclose{circle}{\enclose{box}{x}} .. raw:: html

which render as follows:

This extension is loaded automatically when the :ref:`tex-autoload` extension is used. To load the `enclose` extension explicitly, add ``'[tex]/enclose'`` to the :data:`load` array of the :data:`loader` block of your MathJax configuration, and add ``'enclose'`` to the :data:`packages` array of the :data:`tex` block. .. code-block:: javascript window.MathJax = { loader: {load: ['[tex]/enclose']}, tex: {packages: {'[+]': ['enclose']}} }; Alternatively, use ``\require{enclose}`` in a TeX expression to load it dynamically from within the math on the page, if the :ref:`tex-require` extension is loaded. ----- .. _tex-enclose-commands: enclose Commands ---------------- The `enclose` extension implements the following macros: ``\enclose`` |-----|