{"id":19263768,"url":"https://github.com/sympy/sphinx-math-dollar","last_synced_at":"2025-04-21T18:31:47.644Z","repository":{"id":35117272,"uuid":"208320821","full_name":"sympy/sphinx-math-dollar","owner":"sympy","description":"Sphinx extension to let you write LaTeX math using $$","archived":false,"fork":false,"pushed_at":"2024-01-31T02:56:11.000Z","size":494,"stargazers_count":33,"open_issues_count":12,"forks_count":11,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-11T23:24:18.169Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.sympy.org/sphinx-math-dollar/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sympy.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"sympy","custom":["https://www.sympy.org/en/donate.html"]}},"created_at":"2019-09-13T18:12:13.000Z","updated_at":"2025-04-01T16:26:31.000Z","dependencies_parsed_at":"2024-01-31T03:45:46.510Z","dependency_job_id":"bb3389a5-ce40-4bd4-a5bb-183e5fa16e6f","html_url":"https://github.com/sympy/sphinx-math-dollar","commit_stats":{"total_commits":96,"total_committers":4,"mean_commits":24.0,"dds":0.05208333333333337,"last_synced_commit":"f8bc7152226fb8a34529ce3e8fb537fbb17e6d3f"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sympy%2Fsphinx-math-dollar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sympy%2Fsphinx-math-dollar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sympy%2Fsphinx-math-dollar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sympy%2Fsphinx-math-dollar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sympy","download_url":"https://codeload.github.com/sympy/sphinx-math-dollar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249222835,"owners_count":21232589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T19:36:48.541Z","updated_at":"2025-04-21T18:31:47.622Z","avatar_url":"https://github.com/sympy.png","language":"Python","readme":"====================\n sphinx-math-dollar\n====================\n\nsphinx-math-dollar is a Sphinx extension to let you write LaTeX math in RST using $$.\n\nTo enable install it\n\n.. code::\n\n   pip install sphinx-math-dollar\n\nor\n\n.. code::\n\n   conda install -c conda-forge sphinx-math-dollar\n\nThen in your ``conf.py``, add ``'sphinx_math_dollar'`` to your extensions list:\n\n.. code:: python\n\n   extensions = ['sphinx_math_dollar', 'sphinx.ext.mathjax']\n\n   mathjax_config = {\n       'tex2jax': {\n           'inlineMath': [ [\"\\\\(\",\"\\\\)\"] ],\n           'displayMath': [[\"\\\\[\",\"\\\\]\"] ],\n       },\n   }\n\n   mathjax3_config = {\n     \"tex\": {\n       \"inlineMath\": [['\\\\(', '\\\\)']],\n       \"displayMath\": [[\"\\\\[\", \"\\\\]\"]],\n     }\n   }\n\n\nThe ``mathjax_config`` is needed to prevent MathJax from parsing dollar signs\nwhich are ignored by the extension because they should not be parsed as math.\n\nYou will now be able to use dollar signs for math, like ``$\\int\\sin(x)\\,dx$``,\nwhich will produce $\\int\\sin(x)\\,dx$. You can also use double dollar signs for\ndisplay math, like ``$$\\int\\sin(x)\\,dx$$``, which produces $$\\int\\sin(x)\\,dx$$\n(if you are reading this on GitHub, look at the version built by Sphinx `here\n\u003chttps://www.sympy.org/sphinx-math-dollar/\u003e`_). The usual Sphinx ``:math:``\nand ``.. math::`` directives will also continue to work.\n\nThe extension will also work with docstrings when combined with the\n`sphinx.ext.autodoc\n\u003chttps://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html\u003e`_\nextension.\n\nConfiguration\n=============\n\nsphinx-math-dollar uses a blacklist to determine which `docutils nodes\n\u003chttp://docutils.sourceforge.net/docs/ref/doctree.html\u003e`_ should not be\nparsed. The default blacklist is\n\n.. code::\n\n   (FixedTextElement, literal, math)\n\n``FixedTextElement`` covers the `Simple Body Elements\n\u003chttp://docutils.sourceforge.net/docs/ref/doctree.html\u003e`_ nodes.\n\nAny docutils node that is contained in a blacklisted node or a subclass of a\nblacklisted node will not have ``$math$`` parsed as LaTeX.\n\nYou can modify this by setting ``math_dollar_node_blacklist`` in ``conf.py``.\nFor example, to also prevent ``$math$`` from rendering in `headers nodes\n\u003chttp://docutils.sourceforge.net/docs/ref/doctree.html#header\u003e`_, add\n\n.. code:: python\n\n   from sphinx_math_dollar import NODE_BLACKLIST\n   from docutils.nodes import header\n\n   math_dollar_node_blacklist = NODE_BLACKLIST + (header,)\n\nNote that configuring this variable replaces the default, so it is recommended\nto always include the above default values (``NODE_BLACKLIST``) in addition to\nadditional nodes.\n\nTo debug which nodes are skipped, set the environment variable\n``MATH_DOLLAR_DEBUG=1`` or set ``math_dollar_debug = True`` in ``conf.py``.\n\nIf you feel a node should always be part of the default blacklist, please make\na `pull request \u003chttps://github.com/sympy/sphinx-math-dollar\u003e`_.\n\nKnown Issues\n============\n\nSee `the issue tracker \u003chttps://github.com/sympy/sphinx-math-dollar/issues\u003e`__\nfor a full list of known issues.\n\n- Absolute values can produce errors like ``Inline substitution_reference\n  start-string without end-string.``. See `issue #16\n  \u003chttps://github.com/sympy/sphinx-math-dollar/issues/16\u003e`__.\n\n  This is because Sphinx parses the vertical bars ``|x|`` as inline\n  substitutions. To work around this, add spaces around the absolute value\n  bars, like ``1 + | x | + y``. If an absolute value bar is at the beginning\n  or end of the math expression, use curly braces (to avoid false positives,\n  sphinx-math-dollar will not parse dollar signs as math if there is a space\n  after the first ``$`` or before the last ``$``). For example, replace ``$|y|\n  \\geq |x^e|$`` with ``${ | y | \\geq | x^e | }$``, which produces ${ | y |\n  \\geq | x^e | }$.\n\nMarkdown\n========\n\nsphinx-math-dollar is designed to work with RST, which does not natively\nsupport dollar signs for LaTeX math. If you prefer Markdown, we recommend\nusing [MyST](https://myst-parser.readthedocs.io/en/latest/), which natively\nsupports dollar math (this extension is not required).\n\nLicense\n=======\n\nMIT.\n","funding_links":["https://github.com/sponsors/sympy","https://www.sympy.org/en/donate.html"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsympy%2Fsphinx-math-dollar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsympy%2Fsphinx-math-dollar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsympy%2Fsphinx-math-dollar/lists"}