Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion input/tex/extensions/autoload.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ The default autoload definitions are the following:
enclose: ['enclose'],
extpfeil: ['xtwoheadrightarrow', 'xtwoheadleftarrow', 'xmapsto',
'xlongequal', 'xtofrom', 'Newextarrow'],
html: ['href', 'class', 'style', 'cssId'],
html: ['data', 'href', 'class', 'style', 'cssId'],
mhchem: ['ce', 'pu'],
newcommand: ['newcommand', 'renewcommand', 'newenvironment', 'renewenvironment', 'def', 'let'],
unicode: ['unicode'],
Expand Down
10 changes: 8 additions & 2 deletions input/tex/extensions/html.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ html
####

The `html` extension gives you access to some HTML features like
styles, classes, element ID's, and clickable links. It defines the
styles, classes, element ID's, data-* attributes, and clickable links. It defines the
following non-standard macros:

.. describe:: \\href{url}{math}
Expand Down Expand Up @@ -37,6 +37,10 @@ following non-standard macros:
Adds the give ``css`` declarations to the element associated with
``math``.

.. describe:: \\data{dataset}{math}

Adds `data-* <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-*>`__ attributes to the element associated with ``math``.

For example:

.. code-block:: latex
Expand All @@ -47,6 +51,8 @@ For example:

(x+1)^2 = \cssId{step1}{\style{visibility:hidden}{(x+1)(x+1)}}

x = \data{during=quadratic}{\frac{-b\pm\sqrt{b^2-4ac}}{2a}}

.. Note::

For the ``\href`` macro, the `url` parameter is not processed
Expand Down Expand Up @@ -81,7 +87,7 @@ html Commands
-------------

The `html` extension implements the following macros:
``\class``, ``\cssId``, ``\href``, ``\style``
``\class``, ``\cssId``, ``\data``, ``\href``, ``\style``


|-----|
3 changes: 2 additions & 1 deletion input/tex/extensions/textmacros.rst
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ HTML Commands
-------------

.. list-table::

* - ``\data``
- specify data-* attributes
* - ``\href``
- make hyperlink
* - ``\style``
Expand Down
2 changes: 2 additions & 0 deletions input/tex/macros/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,8 @@ D
- **ams**
* - ``\dashv``
-
* - ``\data``
- **html**
* - ``\dbinom``
- **ams**
* - ``\dblcolon``
Expand Down