PHPackages                             benjaminhoegh/parsedown-math - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. benjaminhoegh/parsedown-math

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

benjaminhoegh/parsedown-math
============================

An extension of Parsedown that adds support for LaTeX.

1.2.4(11mo ago)181752MITPHPPHP &gt;=7.4

Since Dec 11Pushed 11mo ago3 watchersCompare

[ Source](https://github.com/BenjaminHoegh/ParsedownMath)[ Packagist](https://packagist.org/packages/benjaminhoegh/parsedown-math)[ Docs](https://github.com/BenjaminHoegh/ParsedownMath)[ Fund](https://paypal.me/BenjaminHoegh)[ Fund](https://www.buymeacoffee.com/BenjaminHoegh)[ RSS](/packages/benjaminhoegh-parsedown-math/feed)WikiDiscussions master Synced today

READMEChangelog (9)DependenciesVersions (7)Used By (0)

[![ParsedownMath](docs/img/parsedownMath.png)](docs/img/parsedownMath.png)

ParsedownMath
=============

[](#parsedownmath)

[![GitHub release](https://camo.githubusercontent.com/3fd06dcd56db84ce791fa2e84badf690680f6d81fbe117f94df5d685c1b779fb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f42656e6a616d696e486f6567682f7061727365646f776e4d6174682e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/3fd06dcd56db84ce791fa2e84badf690680f6d81fbe117f94df5d685c1b779fb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f42656e6a616d696e486f6567682f7061727365646f776e4d6174682e7376673f7374796c653d666c61742d737175617265)[![GitHub](https://camo.githubusercontent.com/dccb229312c3a47ddf75e0a37f7e8f7a96c04e15906e7cac3723b7cdef9eacd3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f42656e6a616d696e486f6567682f7061727365646f776e4d6174682e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/dccb229312c3a47ddf75e0a37f7e8f7a96c04e15906e7cac3723b7cdef9eacd3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f42656e6a616d696e486f6567682f7061727365646f776e4d6174682e7376673f7374796c653d666c61742d737175617265)

Latex support in [Parsedown](https://github.com/erusev/parsedown)

Note

Does not yet include the lasted changes in ParsedownExtended v1.2.0

Features
--------

[](#features)

- Works with both Parsedown and ParsedownExtra
- Tested in php 7.4 to 8.4

Get started
-----------

[](#get-started)

1. Make sure you have downloaded and included [Parsedown](https://github.com/erusev/parsedown) or [ParsedownExtra](https://github.com/erusev/parsedown-extra)
2. Download the [latest release](https://github.com/BenjaminHoegh/ParsedownMath/releases/latest) and include ParsedownMath.php
3. Download and include [Katex.js](https://katex.org) and [auto-render.js](https://katex.org/docs/autorender.html) your HTML

How to write a match section
----------------------------

[](#how-to-write-a-match-section)

**Inline:**

- `\( ... \)`
- `$ ... $` if enabled

**Block:**

- `\[ ... \]`
- `$$ ... $$`

### Examples:

[](#examples)

Inline

```
Inline \(tag{E=mc^2}\) math

Inline $tag{E=mc^2}$ math
```

Block

```
$$
    f(x) = \int_{-\infty}^\infty
    \hat f(\xi)\,e^{2 \pi i \xi x}
    \,d\xi
$$

\[
    f(x) = \int_{-\infty}^\infty
    \hat f(\xi)\,e^{2 \pi i \xi x}
    \,d\xi
\]
```

### Options

[](#options)

You can toggle math by doing the following:

```
$Parsedown = new ParsedownMath([
    'math' => [
        'enabled' => true // Write true to enable the module
    ]
]);
```

Or if you only want inline or block you can use:

```
'math' => [
    ['inline'] => [
        'enabled' => false // false disable the module
    ],
    // Or
    ['block'] => [
        'enabled' => false
    ]
]
```

To enable single dollar sign for inline match:

```
$Parsedown = new ParsedownMath([
    'math' => [
        'matchSingleDollar' => true // default false
    ]
]);
```

###  Health Score

38

—

LowBetter than 84% of packages

Maintenance54

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~253 days

Recently: every ~277 days

Total

6

Last Release

340d ago

PHP version history (4 changes)v2.0-beta1PHP ^7.1||^8.0

1.2.1PHP ^5.6||^8.0

1.2.2PHP ^7.0||^8.0

1.2.3PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/cfdb3902b3df95c33fc7961a6a9a306831759b3992a7c897798cc4652f0a703f?d=identicon)[BenjaminHoegh](/maintainers/BenjaminHoegh)

---

Top Contributors

[![BenjaminHoegh](https://avatars.githubusercontent.com/u/22152591?v=4)](https://github.com/BenjaminHoegh "BenjaminHoegh (49 commits)")[![Noorquacker](https://avatars.githubusercontent.com/u/12421732?v=4)](https://github.com/Noorquacker "Noorquacker (2 commits)")[![brainexcerpts](https://avatars.githubusercontent.com/u/8319592?v=4)](https://github.com/brainexcerpts "brainexcerpts (1 commits)")

---

Tags

latexmarkdownparsedownparsedown-pluginparsermarkdownparsedownlatex

### Embed Badge

![Health badge](/badges/benjaminhoegh-parsedown-math/health.svg)

```
[![Health](https://phpackages.com/badges/benjaminhoegh-parsedown-math/health.svg)](https://phpackages.com/packages/benjaminhoegh-parsedown-math)
```

###  Alternatives

[erusev/parsedown

Parser for Markdown.

15.0k151.8M725](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

2.9k404.0M698](/packages/league-commonmark)[erusev/parsedown-extra

An extension of Parsedown that adds support for Markdown Extra.

84314.8M192](/packages/erusev-parsedown-extra)[tovic/parsedown-extra-plugin

Configurable Markdown to HTML converter with Parsedown Extra.

5933.7k](/packages/tovic-parsedown-extra-plugin)[taufik-nurrohman/parsedown-extra-plugin

Configurable Markdown to HTML converter with Parsedown Extra.

5932.3k](/packages/taufik-nurrohman-parsedown-extra-plugin)[renanbr/bibtex-parser

BibTex Parser provides an API to read .bib files programmatically

39381.9k11](/packages/renanbr-bibtex-parser)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
