diff --git a/docs/syntax/optional.md b/docs/syntax/optional.md index 605e9fe7..5b5de4dc 100644 --- a/docs/syntax/optional.md +++ b/docs/syntax/optional.md @@ -95,8 +95,8 @@ and you will neeed to suppress the `myst.strikethrough` warning Math is parsed by adding to the `myst_enable_extensions` list option, in the sphinx `conf.py` [configuration file](https://www.sphinx-doc.org/en/master/usage/configuration.html) one or both of: -- `"dollarmath"` (added by default) for parsing of dollar `$` and `$$` encapsulated math. -- `"amsmath"` (off by default) for direct parsing of [amsmath LaTeX environments](https://ctan.org/pkg/amsmath). +- `"dollarmath"` for parsing of dollar `$` and `$$` encapsulated math. +- `"amsmath"` for direct parsing of [amsmath LaTeX environments](https://ctan.org/pkg/amsmath). These options enable their respective Markdown parser plugins, as detailed in the [markdown-it plugin guide](markdown_it:md/plugins). @@ -106,7 +106,7 @@ These options enable their respective Markdown parser plugins, as detailed in th ### Dollar delimited math -Enabling dollar math will parse the following syntax: +Enabling `dollarmath` will parse the following syntax: - Inline math: `$...$` - Display (block) math: `$$...$$` @@ -235,7 +235,7 @@ See [the extended syntax option](syntax/amsmath). ### Mathjax and math parsing When building HTML using the [sphinx.ext.mathjax](https://www.sphinx-doc.org/en/master/usage/extensions/math.html#module-sphinx.ext.mathjax) extension (enabled by default), -Myst-Parser injects the `tex2jax_ignore` (MathJax v2) and `mathjax_ignore` (MathJax v3) classes in to the top-level section of each MyST document, and adds the following default MathJax configuration: +If `dollarmath` is enabled, Myst-Parser injects the `tex2jax_ignore` (MathJax v2) and `mathjax_ignore` (MathJax v3) classes in to the top-level section of each MyST document, and adds the following default MathJax configuration: MathJax version 2 (see [the tex2jax preprocessor](https://docs.mathjax.org/en/v2.7-latest/options/preprocessors/tex2jax.html#configure-tex2jax): diff --git a/docs/syntax/syntax.md b/docs/syntax/syntax.md index 36adea90..7311cf68 100644 --- a/docs/syntax/syntax.md +++ b/docs/syntax/syntax.md @@ -368,9 +368,6 @@ header-rows: 1 * - Type - MyST - reStructuredText -* - Math shortcuts - - `$x^2$` - - N/A * - Front matter - ```md --- diff --git a/myst_parser/docutils_renderer.py b/myst_parser/docutils_renderer.py index 66aabe82..4494b549 100644 --- a/myst_parser/docutils_renderer.py +++ b/myst_parser/docutils_renderer.py @@ -595,10 +595,12 @@ def render_fence(self, token: SyntaxTreeNode) -> None: @property def blocks_mathjax_processing(self) -> bool: - """Only add mathjax ignore classes if using sphinx and myst_update_mathjax is True.""" + """Only add mathjax ignore classes if using sphinx, + and using the ``dollarmath`` extension, and ``myst_update_mathjax=True``. + """ return ( self.sphinx_env is not None - and "myst_update_mathjax" in self.sphinx_env.config + and "dollarmath" in self.md_config.enable_extensions and self.md_config.update_mathjax ) @@ -985,6 +987,17 @@ def render_math_block(self, token: SyntaxTreeNode) -> None: self.add_line_and_source_path(node, token) self.current_node.append(node) + def render_amsmath(self, token: SyntaxTreeNode) -> None: + # note docutils does not currently support the nowrap attribute + # or equation numbering, so this is overridden in the sphinx renderer + node = nodes.math_block( + token.content, token.content, nowrap=True, classes=["amsmath"] + ) + if token.meta["numbered"] != "*": + node["numbered"] = True + self.add_line_and_source_path(node, token) + self.current_node.append(node) + def render_footnote_ref(self, token: SyntaxTreeNode) -> None: """Footnote references are added as auto-numbered, .i.e. `[^a]` is read as rST `[#a]_` diff --git a/myst_parser/main.py b/myst_parser/main.py index 508c1104..c26c7edd 100644 --- a/myst_parser/main.py +++ b/myst_parser/main.py @@ -49,7 +49,7 @@ class MdParserConfig: metadata={"help": "Use strict Github Flavoured Markdown parser"}, ) enable_extensions: Sequence[str] = attr.ib( - factory=lambda: ["dollarmath"], metadata={"help": "Enable extensions"} + factory=list, metadata={"help": "Enable extensions"} ) linkify_fuzzy_links: bool = attr.ib( diff --git a/myst_parser/mathjax.py b/myst_parser/mathjax.py index 85a62af3..c108434f 100644 --- a/myst_parser/mathjax.py +++ b/myst_parser/mathjax.py @@ -51,6 +51,8 @@ def override_mathjax(app: Sphinx): None, ) + if "dollarmath" not in app.config["myst_enable_extensions"]: + return if not app.env.myst_config.update_mathjax: # type: ignore[attr-defined] return diff --git a/myst_parser/sphinx_renderer.py b/myst_parser/sphinx_renderer.py index 5b3a175a..f5b31926 100644 --- a/myst_parser/sphinx_renderer.py +++ b/myst_parser/sphinx_renderer.py @@ -186,6 +186,7 @@ def _random_label(self) -> str: return str(uuid4()) def render_amsmath(self, token: SyntaxTreeNode) -> None: + """Renderer for the amsmath extension.""" # environment = token.meta["environment"] content = token.content diff --git a/setup.cfg b/setup.cfg index 92d22a71..2da3d5e0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -79,7 +79,7 @@ testing = pytest>=6,<7 pytest-cov pytest-regressions - pytest-param-files~=0.3.3 + pytest-param-files~=0.3.4 [flake8] max-line-length = 100 diff --git a/tests/test_renderers/fixtures/docutil_syntax_elements.md b/tests/test_renderers/fixtures/docutil_syntax_elements.md index 91add67c..93718030 100644 --- a/tests/test_renderers/fixtures/docutil_syntax_elements.md +++ b/tests/test_renderers/fixtures/docutil_syntax_elements.md @@ -307,56 +307,6 @@ Nested Enumrated List: c . --------------------------- -Inline Math: -. -$foo$ -. - - - - foo -. - --------------------------- -Inline Math, multi-line: -. -a $foo -bar$ b -. - - - a - - foo - bar - b -. - --------------------------- -Inline Math, multi-line with line break (invalid): -. -a $foo - -bar$ b -. - - - a $foo - - bar$ b -. - --------------------------- -Math Block: -. -$$foo$$ -. - - - foo -. - -------------------------- Sphinx Role containing backtick: . diff --git a/tests/test_renderers/fixtures/docutil_syntax_extensions.txt b/tests/test_renderers/fixtures/docutil_syntax_extensions.txt new file mode 100644 index 00000000..5efcb68a --- /dev/null +++ b/tests/test_renderers/fixtures/docutil_syntax_extensions.txt @@ -0,0 +1,139 @@ +[dollarmath] --myst-enable-extensions=dollarmath +. +$foo$ + +a $foo +bar$ b + +$$foo$$ + +$$ +a = 1 +$$ +. + + + + foo + + a + + foo + bar + b + + foo + + + a = 1 +. + +[amsmath] --myst-enable-extensions=amsmath +. +\begin{equation} a \end{equation} + +\begin{equation} +a +\end{equation} + +\begin{equation*} +a +\end{equation*} +. + + + \begin{equation} a \end{equation} + + \begin{equation} + a + \end{equation} + + \begin{equation*} + a + \end{equation*} +. + +[deflist] --myst-enable-extensions=deflist +. +term +: definition +. + + + + + term + + + definition +. + +[fieldlist] --myst-enable-extensions=fieldlist +. +:name: value +. + + + + + name + + + value +. + +[colon_fence] --myst-enable-extensions=colon_fence +. +:::{note} +content +::: +. + + + + content +. + +[replacements] --myst-enable-extensions=replacements +. +(c) (C) (r) (R) (tm) (TM) (p) (P) +- ... +. + + + © © ® ® ™ ™ § § ± … +. + +[strikethrough] --myst-enable-extensions=strikethrough +. +~~foo~~ +. + + + + + Strikethrough is currently only supported in HTML output [myst.strikethrough] + + + foo + + +. + +[tasklist] --myst-enable-extensions=tasklist +. +- [ ] foo +- [x] bar +. + + + + + + + foo + + + + + bar +. diff --git a/tests/test_renderers/fixtures/dollarmath.md b/tests/test_renderers/fixtures/dollarmath.md new file mode 100644 index 00000000..d3acabcb --- /dev/null +++ b/tests/test_renderers/fixtures/dollarmath.md @@ -0,0 +1,81 @@ +-------------------------- +Inline Math: +. +$foo$ +. + + + + foo +. + +-------------------------- +Inline Math, multi-line: +. +a $foo +bar$ b +. + + + a + + foo + bar + b +. + +-------------------------- +Inline Math, multi-line with line break (invalid): +. +a $foo + +bar$ b +. + + + a $foo + + bar$ b +. + +-------------------------- +Math Block: +. +$$foo$$ +. + + + foo +. + +-------------------------- +Math Block With Equation Label: +. +$$foo$$ (abc) +. + + + + foo +. + +-------------------------- +Math Block multiple: +. +$$ +a = 1 +$$ + +$$ +b = 2 +$$ (a) +. + + + + a = 1 + + + + b = 2 +. diff --git a/tests/test_renderers/fixtures/sphinx_syntax_elements.md b/tests/test_renderers/fixtures/sphinx_syntax_elements.md index 0e8cf346..d706780c 100644 --- a/tests/test_renderers/fixtures/sphinx_syntax_elements.md +++ b/tests/test_renderers/fixtures/sphinx_syntax_elements.md @@ -307,88 +307,6 @@ Nested Enumrated List: c . --------------------------- -Inline Math: -. -$foo$ -. - - - - foo -. - --------------------------- -Inline Math, multi-line: -. -a $foo -bar$ b -. - - - a - - foo - bar - b -. - --------------------------- -Inline Math, multi-line with line break (invalid): -. -a $foo - -bar$ b -. - - - a $foo - - bar$ b -. - --------------------------- -Math Block: -. -$$foo$$ -. - - - foo -. - --------------------------- -Math Block With Equation Label: -. -$$foo$$ (abc) -. - - - - foo -. - --------------------------- -Math Block multiple: -. -$$ -a = 1 -$$ - -$$ -b = 2 -$$ (a) -. - - - - a = 1 - - - - b = 2 -. - -------------------------- Sphinx Role containing backtick: . diff --git a/tests/test_renderers/fixtures/tables.md b/tests/test_renderers/fixtures/tables.md index fe0e39b3..65238d3a 100644 --- a/tests/test_renderers/fixtures/tables.md +++ b/tests/test_renderers/fixtures/tables.md @@ -91,7 +91,7 @@ Nested syntax: . | *a* | __*b*__ | | --- | -------- | -|$1$ | {sub}`x` | +|c | {sub}`x` | . @@ -113,8 +113,7 @@ Nested syntax: - - 1 + c diff --git a/tests/test_renderers/test_fixtures_docutils.py b/tests/test_renderers/test_fixtures_docutils.py index 96b5a29d..b1897b1e 100644 --- a/tests/test_renderers/test_fixtures_docutils.py +++ b/tests/test_renderers/test_fixtures_docutils.py @@ -2,10 +2,14 @@ Note, the output AST is before any transforms are applied. """ +import shlex +from io import StringIO from pathlib import Path import pytest +from docutils.core import Publisher, publish_doctree +from myst_parser.docutils_ import Parser from myst_parser.docutils_renderer import DocutilsRenderer, make_document from myst_parser.main import MdParserConfig, create_md_parser @@ -42,3 +46,26 @@ def test_docutils_directives(file_params): parser.options["document"] = document = make_document() parser.render(file_params.content) file_params.assert_expected(document.pformat(), rstrip_lines=True) + + +@pytest.mark.param_file(FIXTURE_PATH / "docutil_syntax_extensions.txt") +def test_syntax_extensions(file_params): + """The description is parsed as a docutils commandline""" + pub = Publisher(parser=Parser()) + option_parser = pub.setup_option_parser() + try: + settings = option_parser.parse_args( + shlex.split(file_params.description) + ).__dict__ + except Exception as err: + raise AssertionError( + f"Failed to parse commandline: {file_params.description}\n{err}" + ) + report_stream = StringIO() + settings["warning_stream"] = report_stream + doctree = publish_doctree( + file_params.content, + parser=Parser(), + settings_overrides=settings, + ) + file_params.assert_expected(doctree.pformat(), rstrip_lines=True) diff --git a/tests/test_renderers/test_fixtures_sphinx.py b/tests/test_renderers/test_fixtures_sphinx.py index 9a09d12e..06a38857 100644 --- a/tests/test_renderers/test_fixtures_sphinx.py +++ b/tests/test_renderers/test_fixtures_sphinx.py @@ -64,6 +64,16 @@ def test_sphinx_roles(file_params): file_params.assert_expected(actual, rstrip_lines=True) +@pytest.mark.param_file(FIXTURE_PATH / "dollarmath.md") +def test_dollarmath(file_params, monkeypatch): + document = to_docutils( + file_params.content, + MdParserConfig(enable_extensions=["dollarmath"]), + in_sphinx_env=True, + ) + file_params.assert_expected(document.pformat(), rstrip_lines=True) + + @pytest.mark.param_file(FIXTURE_PATH / "amsmath.md") def test_amsmath(file_params, monkeypatch): monkeypatch.setattr(SphinxRenderer, "_random_label", lambda self: "mock-uuid") diff --git a/tests/test_renderers/test_myst_refs/duplicate.xml b/tests/test_renderers/test_myst_refs/duplicate.xml index 3bd850d1..35d4e8df 100644 --- a/tests/test_renderers/test_myst_refs/duplicate.xml +++ b/tests/test_renderers/test_myst_refs/duplicate.xml @@ -1,4 +1,4 @@ - + Title diff --git a/tests/test_renderers/test_myst_refs/ref.xml b/tests/test_renderers/test_myst_refs/ref.xml index dad992c0..78e2a49e 100644 --- a/tests/test_renderers/test_myst_refs/ref.xml +++ b/tests/test_renderers/test_myst_refs/ref.xml @@ -1,4 +1,4 @@ - + Title diff --git a/tests/test_renderers/test_myst_refs/ref_colon.xml b/tests/test_renderers/test_myst_refs/ref_colon.xml index 128e0c3c..affccd4a 100644 --- a/tests/test_renderers/test_myst_refs/ref_colon.xml +++ b/tests/test_renderers/test_myst_refs/ref_colon.xml @@ -1,4 +1,4 @@ - + Title diff --git a/tests/test_renderers/test_myst_refs/ref_nested.xml b/tests/test_renderers/test_myst_refs/ref_nested.xml index 8b989e95..34f99c83 100644 --- a/tests/test_renderers/test_myst_refs/ref_nested.xml +++ b/tests/test_renderers/test_myst_refs/ref_nested.xml @@ -1,4 +1,4 @@ - + Title diff --git a/tests/test_sphinx/test_sphinx_builds.py b/tests/test_sphinx/test_sphinx_builds.py index 351f6b7d..c25e17b5 100644 --- a/tests/test_sphinx/test_sphinx_builds.py +++ b/tests/test_sphinx/test_sphinx_builds.py @@ -18,7 +18,10 @@ @pytest.mark.sphinx( - buildername="html", srcdir=os.path.join(SOURCE_DIR, "basic"), freshenv=True + buildername="html", + srcdir=os.path.join(SOURCE_DIR, "basic"), + freshenv=True, + confoverrides={"myst_enable_extensions": ["dollarmath"]}, ) def test_basic( app, @@ -75,6 +78,7 @@ def test_basic( buildername="html", srcdir=os.path.join(SOURCE_DIR, "references"), freshenv=True, + confoverrides={"myst_enable_extensions": ["dollarmath"]}, ) def test_references( app, @@ -483,7 +487,10 @@ def test_gettext_additional_targets( @pytest.mark.sphinx( - buildername="html", srcdir=os.path.join(SOURCE_DIR, "mathjax"), freshenv=True + buildername="html", + srcdir=os.path.join(SOURCE_DIR, "mathjax"), + freshenv=True, + confoverrides={"myst_enable_extensions": ["dollarmath"]}, ) def test_mathjax_warning( app, diff --git a/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.sphinx3.html index 3bc468cc..b6d79f68 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.sphinx3.html +++ b/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.sphinx3.html @@ -1,7 +1,7 @@
-
+

Test diff --git a/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.sphinx4.html index 52f631ec..294bc663 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.sphinx4.html +++ b/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.sphinx4.html @@ -1,7 +1,7 @@
-
+

Test diff --git a/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.xml b/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.xml index 40e45530..d6854662 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.xml +++ b/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.xml @@ -1,5 +1,5 @@ -
+
Test <literal_block language="{note}" xml:space="preserve"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx3.html index 44f950a7..0d29ed85 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx3.html +++ b/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx3.html @@ -1,7 +1,7 @@ <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> - <div class="tex2jax_ignore mathjax_ignore section" id="test"> + <div class="section" id="test"> <h1> Test <a class="headerlink" href="#test" title="Permalink to this headline"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx3.xml b/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx3.xml index 58606693..d6a886f6 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx3.xml +++ b/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx3.xml @@ -1,5 +1,5 @@ <document source="index.md"> - <section classes="tex2jax_ignore mathjax_ignore" ids="test" names="test"> + <section ids="test" names="test"> <title> Test <field_list classes="myst"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx4.html index a4213a7b..bef86e92 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx4.html +++ b/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx4.html @@ -1,7 +1,7 @@ <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> - <section class="tex2jax_ignore mathjax_ignore" id="test"> + <section id="test"> <h1> Test <a class="headerlink" href="#test" title="Permalink to this headline"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx4.xml b/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx4.xml index 7da41c10..60b8a19b 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx4.xml +++ b/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx4.xml @@ -1,5 +1,5 @@ <document source="index.md"> - <section classes="tex2jax_ignore mathjax_ignore" ids="test" names="test"> + <section ids="test" names="test"> <title> Test <field_list classes="myst"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx3.html index 51b7a1db..fb0714c2 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx3.html +++ b/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx3.html @@ -1,7 +1,7 @@ <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> - <div class="tex2jax_ignore mathjax_ignore section" id="footnotes-with-markdown"> + <div class="section" id="footnotes-with-markdown"> <h1> Footnotes with Markdown <a class="headerlink" href="#footnotes-with-markdown" title="Permalink to this headline"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx4.html index 4c6ae19b..70cfb540 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx4.html +++ b/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx4.html @@ -1,7 +1,7 @@ <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> - <section class="tex2jax_ignore mathjax_ignore" id="footnotes-with-markdown"> + <section id="footnotes-with-markdown"> <h1> Footnotes with Markdown <a class="headerlink" href="#footnotes-with-markdown" title="Permalink to this headline"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_footnotes.xml b/tests/test_sphinx/test_sphinx_builds/test_footnotes.xml index e64efc20..950d4f8f 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_footnotes.xml +++ b/tests/test_sphinx/test_sphinx_builds/test_footnotes.xml @@ -1,5 +1,5 @@ <document source="footnote_md.md"> - <section classes="tex2jax_ignore mathjax_ignore" ids="footnotes-with-markdown" names="footnotes\ with\ markdown"> + <section ids="footnotes-with-markdown" names="footnotes\ with\ markdown"> <title> Footnotes with Markdown <paragraph> diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.resolved.sphinx3.xml b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.resolved.sphinx3.xml index 9a742cce..8d9866e6 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.resolved.sphinx3.xml +++ b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.resolved.sphinx3.xml @@ -1,5 +1,5 @@ <document source="index.md"> - <section classes="tex2jax_ignore mathjax_ignore" ids="bold-text-1" names="bold\ text\ 1 texte\ 1\ en\ gras"> + <section ids="bold-text-1" names="bold\ text\ 1 texte\ 1\ en\ gras"> <title> texte 1 en <strong> diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.resolved.sphinx4.xml b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.resolved.sphinx4.xml index 636a2e86..1b1c195b 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.resolved.sphinx4.xml +++ b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.resolved.sphinx4.xml @@ -1,5 +1,5 @@ <document source="index.md"> - <section classes="tex2jax_ignore mathjax_ignore" ids="bold-text-1" names="bold\ text\ 1 texte\ 1\ en\ gras"> + <section ids="bold-text-1" names="bold\ text\ 1 texte\ 1\ en\ gras"> <title> texte 1 en <strong> diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx3.html index 26425e99..1c1f8615 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx3.html +++ b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx3.html @@ -1,7 +1,7 @@ <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> - <div class="tex2jax_ignore mathjax_ignore section" id="bold-text-1"> + <div class="section" id="bold-text-1"> <h1> texte 1 en <strong> diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx3.xml b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx3.xml index a39fabee..ef749eb6 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx3.xml +++ b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx3.xml @@ -1,5 +1,5 @@ <document source="index.md"> - <section classes="tex2jax_ignore mathjax_ignore" ids="bold-text-1" names="bold\ text\ 1 texte\ 1\ en\ gras"> + <section ids="bold-text-1" names="bold\ text\ 1 texte\ 1\ en\ gras"> <title> texte 1 en <strong> diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx4.html index adad986e..825048a1 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx4.html +++ b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx4.html @@ -1,7 +1,7 @@ <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> - <section class="tex2jax_ignore mathjax_ignore" id="bold-text-1"> + <section id="bold-text-1"> <h1> texte 1 en <strong> diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx4.xml b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx4.xml index 9fddb487..0d8dbc79 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx4.xml +++ b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx4.xml @@ -1,5 +1,5 @@ <document source="index.md"> - <section classes="tex2jax_ignore mathjax_ignore" ids="bold-text-1" names="bold\ text\ 1 texte\ 1\ en\ gras"> + <section ids="bold-text-1" names="bold\ text\ 1 texte\ 1\ en\ gras"> <title> texte 1 en <strong> diff --git a/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.resolved.xml b/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.resolved.xml index 54dc2690..e48908dd 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.resolved.xml +++ b/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.resolved.xml @@ -1,5 +1,5 @@ <document source="index.md"> - <section classes="tex2jax_ignore mathjax_ignore" ids="hyphen-1" myst-anchor="index.md#hyphen-1" names="hyphen\ -\ 1"> + <section ids="hyphen-1" myst-anchor="index.md#hyphen-1" names="hyphen\ -\ 1"> <title> Hyphen - 1 <section ids="dot-1-1" myst-anchor="index.md#dot-1-1" names="dot\ 1.1"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.sphinx3.html index 1aa0e1ff..cbf5e049 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.sphinx3.html +++ b/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.sphinx3.html @@ -1,7 +1,7 @@ <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> - <div class="tex2jax_ignore mathjax_ignore section" id="hyphen-1"> + <div class="section" id="hyphen-1"> <h1> Hyphen - 1 <a class="headerlink" href="#hyphen-1" title="Permalink to this headline"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.sphinx4.html index 8418c3e2..b3631a0d 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.sphinx4.html +++ b/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.sphinx4.html @@ -1,7 +1,7 @@ <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> - <section class="tex2jax_ignore mathjax_ignore" id="hyphen-1"> + <section id="hyphen-1"> <h1> Hyphen - 1 <a class="headerlink" href="#hyphen-1" title="Permalink to this headline"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.xml b/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.xml index 54dc2690..e48908dd 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.xml +++ b/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.xml @@ -1,5 +1,5 @@ <document source="index.md"> - <section classes="tex2jax_ignore mathjax_ignore" ids="hyphen-1" myst-anchor="index.md#hyphen-1" names="hyphen\ -\ 1"> + <section ids="hyphen-1" myst-anchor="index.md#hyphen-1" names="hyphen\ -\ 1"> <title> Hyphen - 1 <section ids="dot-1-1" myst-anchor="index.md#dot-1-1" names="dot\ 1.1"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_include_from_rst.xml b/tests/test_sphinx/test_sphinx_builds/test_include_from_rst.xml index 6f325067..9248bd35 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_include_from_rst.xml +++ b/tests/test_sphinx/test_sphinx_builds/test_include_from_rst.xml @@ -2,7 +2,7 @@ <section ids="title" names="title"> <title> Title - <section classes="tex2jax_ignore mathjax_ignore" ids="markdown" names="markdown"> + <section ids="markdown" names="markdown"> <title> Markdown <paragraph> diff --git a/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx3.html index 5ce20bb7..d3f22324 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx3.html +++ b/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx3.html @@ -1,7 +1,7 @@ <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> - <div class="tex2jax_ignore mathjax_ignore section" id="main-title"> + <div class="section" id="main-title"> <h1> Main Title <a class="headerlink" href="#main-title" title="Permalink to this headline"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx3.xml b/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx3.xml index 55f619c4..aee98fee 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx3.xml +++ b/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx3.xml @@ -1,5 +1,5 @@ <document source="index.md"> - <section classes="tex2jax_ignore mathjax_ignore" ids="main-title" names="main\ title"> + <section ids="main-title" names="main\ title"> <title> Main Title <target refid="inc-header"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx4.html index 4407e06a..78662234 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx4.html +++ b/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx4.html @@ -1,7 +1,7 @@ <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> - <section class="tex2jax_ignore mathjax_ignore" id="main-title"> + <section id="main-title"> <h1> Main Title <a class="headerlink" href="#main-title" title="Permalink to this headline"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx4.xml b/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx4.xml index cd66516f..1e8779c5 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx4.xml +++ b/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx4.xml @@ -1,5 +1,5 @@ <document source="index.md"> - <section classes="tex2jax_ignore mathjax_ignore" ids="main-title" names="main\ title"> + <section ids="main-title" names="main\ title"> <title> Main Title <target refid="inc-header"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.resolved.xml b/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.resolved.xml index 69862c18..606e769f 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.resolved.xml +++ b/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.resolved.xml @@ -1,5 +1,5 @@ <document source="other.md"> - <section classes="tex2jax_ignore mathjax_ignore" ids="other-title" myst-anchor="other/other.md#other-title" names="other\ title"> + <section ids="other-title" myst-anchor="other/other.md#other-title" names="other\ title"> <title> Other Title <paragraph> diff --git a/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.sphinx3.html index 5647594d..57f1e159 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.sphinx3.html +++ b/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.sphinx3.html @@ -1,7 +1,7 @@ <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> - <div class="tex2jax_ignore mathjax_ignore section" id="title"> + <div class="section" id="title"> <h1> Title <a class="headerlink" href="#title" title="Permalink to this headline"> @@ -11,7 +11,7 @@ <h1> <div class="toctree-wrapper compound"> <span id="document-other/index"> </span> - <div class="tex2jax_ignore mathjax_ignore section" id="other-index"> + <div class="section" id="other-index"> <h2> Other Index <a class="headerlink" href="#other-index" title="Permalink to this headline"> @@ -21,7 +21,7 @@ <h2> <div class="toctree-wrapper compound"> <span id="document-other/other"> </span> - <div class="tex2jax_ignore mathjax_ignore section" id="other-title"> + <div class="section" id="other-title"> <h3> Other Title <a class="headerlink" href="#other-title" title="Permalink to this headline"> @@ -59,7 +59,7 @@ <h3> </div> <span id="document-other/other2"> </span> - <div class="tex2jax_ignore mathjax_ignore section" id="other-2-title"> + <div class="section" id="other-2-title"> <h3> Other 2 Title <a class="headerlink" href="#other-2-title" title="Permalink to this headline"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.sphinx4.html index 0faa5b75..23ff49f9 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.sphinx4.html +++ b/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.sphinx4.html @@ -1,7 +1,7 @@ <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> - <section class="tex2jax_ignore mathjax_ignore" id="title"> + <section id="title"> <h1> Title <a class="headerlink" href="#title" title="Permalink to this headline"> @@ -11,7 +11,7 @@ <h1> <div class="toctree-wrapper compound"> <span id="document-other/index"> </span> - <section class="tex2jax_ignore mathjax_ignore" id="other-index"> + <section id="other-index"> <h2> Other Index <a class="headerlink" href="#other-index" title="Permalink to this headline"> @@ -21,7 +21,7 @@ <h2> <div class="toctree-wrapper compound"> <span id="document-other/other"> </span> - <section class="tex2jax_ignore mathjax_ignore" id="other-title"> + <section id="other-title"> <h3> Other Title <a class="headerlink" href="#other-title" title="Permalink to this headline"> @@ -59,7 +59,7 @@ <h3> </section> <span id="document-other/other2"> </span> - <section class="tex2jax_ignore mathjax_ignore" id="other-2-title"> + <section id="other-2-title"> <h3> Other 2 Title <a class="headerlink" href="#other-2-title" title="Permalink to this headline"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.xml b/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.xml index bbbd7c38..a209b4f4 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.xml +++ b/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.xml @@ -1,5 +1,5 @@ <document source="other.md"> - <section classes="tex2jax_ignore mathjax_ignore" ids="other-title" myst-anchor="other/other.md#other-title" names="other\ title"> + <section ids="other-title" myst-anchor="other/other.md#other-title" names="other\ title"> <title> Other Title <paragraph> diff --git a/tests/test_sphinx/test_sphinx_builds/test_substitutions.other.xml b/tests/test_sphinx/test_sphinx_builds/test_substitutions.other.xml index 40a5de09..b8f94f50 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_substitutions.other.xml +++ b/tests/test_sphinx/test_sphinx_builds/test_substitutions.other.xml @@ -1,5 +1,5 @@ <document source="other.md"> - <section classes="tex2jax_ignore mathjax_ignore" ids="other" names="other"> + <section ids="other" names="other"> <title> Other <paragraph>