L2M4M


NameL2M4M JSON
Version 1.0.4 PyPI version JSON
download
home_pageNone
SummaryExtends Markdown to convert LaTeX to MathML.
upload_time2024-06-15 16:49:04
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseLICENCE
keywords markdown latex mathml
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # L2M4M

L2M4M (_LaTeX2MathML4Markdown_) is a Python package that extends the 
functionality of [Markdown][md] to support LaTeX math expressions by converting 
them to MathML, using [Latex2MathML][l2m]. This package is particularly 
useful for those who want to include mathematical notation in their Markdown 
documents without relying on external JavaScript libraries.

## Installation

To install L2M4M, use pip:

```bash
pip install L2M4M
```

## Usage

```python
import markdown
from l2m4m import LaTeX2MathMLExtension

# Sample Markdown text with LaTeX
text = """
Here is an inline math equation: $E = mc^2$.

Here is a block math equation:

$$ 
\\frac{d}{dx} e^x = e^x
$$

And here is an alternative notation for a block math equation:

\[
x^n + y^n = z^n
\]
"""

# Convert the Markdown text to HTML with LaTeX2MathMLExtension
html = markdown.markdown(text, extensions=[
    LaTeX2MathMLExtension()
])

print(html)
```

[md]: https://pypi.org/project/Markdown/
[l2m]: https://pypi.org/project/latex2mathml/

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "L2M4M",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "markdown, latex, mathml",
    "author": null,
    "author_email": "\"M. P. van de Weerd\" <michael@parcifal.dev>",
    "download_url": "https://files.pythonhosted.org/packages/1d/71/2548c288ef1b27f3419285e45430b8f10b9be8f4c34b4d2ecec2d34baf42/l2m4m-1.0.4.tar.gz",
    "platform": null,
    "description": "# L2M4M\n\nL2M4M (_LaTeX2MathML4Markdown_) is a Python package that extends the \nfunctionality of [Markdown][md] to support LaTeX math expressions by converting \nthem to MathML, using [Latex2MathML][l2m]. This package is particularly \nuseful for those who want to include mathematical notation in their Markdown \ndocuments without relying on external JavaScript libraries.\n\n## Installation\n\nTo install L2M4M, use pip:\n\n```bash\npip install L2M4M\n```\n\n## Usage\n\n```python\nimport markdown\nfrom l2m4m import LaTeX2MathMLExtension\n\n# Sample Markdown text with LaTeX\ntext = \"\"\"\nHere is an inline math equation: $E = mc^2$.\n\nHere is a block math equation:\n\n$$ \n\\\\frac{d}{dx} e^x = e^x\n$$\n\nAnd here is an alternative notation for a block math equation:\n\n\\[\nx^n + y^n = z^n\n\\]\n\"\"\"\n\n# Convert the Markdown text to HTML with LaTeX2MathMLExtension\nhtml = markdown.markdown(text, extensions=[\n    LaTeX2MathMLExtension()\n])\n\nprint(html)\n```\n\n[md]: https://pypi.org/project/Markdown/\n[l2m]: https://pypi.org/project/latex2mathml/\n",
    "bugtrack_url": null,
    "license": "LICENCE",
    "summary": "Extends Markdown to convert LaTeX to MathML.",
    "version": "1.0.4",
    "project_urls": {
        "Bug Tracker": "https://gitlab.com/parcifal/l2m4m/-/issues",
        "Homepage": "https://gitlab.com/parcifal/l2m4m"
    },
    "split_keywords": [
        "markdown",
        " latex",
        " mathml"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f68a500639fe4b0b1dfc7775633b9173d96a474bbc0811578e916595c9b323f0",
                "md5": "f8cb1f4e4edfe89fcf4573b911ccd98f",
                "sha256": "766e232b28cfdc6397e9c47162a938dba26e5ab90bddec8d82eccb7896ab46d1"
            },
            "downloads": -1,
            "filename": "L2M4M-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f8cb1f4e4edfe89fcf4573b911ccd98f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 14985,
            "upload_time": "2024-06-15T16:49:03",
            "upload_time_iso_8601": "2024-06-15T16:49:03.880108Z",
            "url": "https://files.pythonhosted.org/packages/f6/8a/500639fe4b0b1dfc7775633b9173d96a474bbc0811578e916595c9b323f0/L2M4M-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1d712548c288ef1b27f3419285e45430b8f10b9be8f4c34b4d2ecec2d34baf42",
                "md5": "a818b80f1892a7e99ded9bb3eac3774c",
                "sha256": "7fc451edb281604c1eb9d6fa626a8cce874e8a0d3641cca581c20b7544f51396"
            },
            "downloads": -1,
            "filename": "l2m4m-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "a818b80f1892a7e99ded9bb3eac3774c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16567,
            "upload_time": "2024-06-15T16:49:04",
            "upload_time_iso_8601": "2024-06-15T16:49:04.798405Z",
            "url": "https://files.pythonhosted.org/packages/1d/71/2548c288ef1b27f3419285e45430b8f10b9be8f4c34b4d2ecec2d34baf42/l2m4m-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-15 16:49:04",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "parcifal",
    "gitlab_project": "l2m4m",
    "lcname": "l2m4m"
}
        
Elapsed time: 0.26209s