PHPackages                             starsrivers/flarum-mathren - 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. starsrivers/flarum-mathren

ActiveFlarum-extension

starsrivers/flarum-mathren
==========================

TeX math rendering for your forum.

1.0.5(3y ago)179[5 PRs](https://github.com/StarsRivers/flarum-mathren/pulls)MITJavaScript

Since Jan 3Pushed 3y agoCompare

[ Source](https://github.com/StarsRivers/flarum-mathren)[ Packagist](https://packagist.org/packages/starsrivers/flarum-mathren)[ RSS](/packages/starsrivers-flarum-mathren/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (31)Used By (0)

MathRen for Flarum
==================

[](#mathren-for-flarum)

[![MIT license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/StarsRivers/flarum-mathren/blob/master/LICENSE) [![Latest Stable Version](https://camo.githubusercontent.com/bbc76fb0eabe91ee2abb6c8c36aa3692b453d8a8e390b2a84f228fd902e4427d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f53746172735269766572732f666c6172756d2d6d61746872656e2e737667)](https://packagist.org/packages/starsrivers/flarum-mathren) [![Total Downloads](https://camo.githubusercontent.com/ee703eb41efb7e35e74c2c71bd58b1603a641e26e67021e1fcf6a136027d3d28/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f53746172735269766572732f666c6172756d2d6d61746872656e2e737667)](https://packagist.org/packages/starsrivers/flarum-mathren)

An extension that handles TeX math rendering for your [Flarum](https://github.com/flarum) forum.

[![Screenshot](https://camo.githubusercontent.com/7ac6c0689cccf91051061630b57c99690c64590e4f0c067a547e86998627004d/68747470733a2f2f692e6962622e636f2f335770485672482f6d61746872656e2e706e67)](https://camo.githubusercontent.com/7ac6c0689cccf91051061630b57c99690c64590e4f0c067a547e86998627004d/68747470733a2f2f692e6962622e636f2f335770485672482f6d61746872656e2e706e67)

[![Action](https://camo.githubusercontent.com/558ad81828bf42df0165c9512a40b826a08433656a8204f2ca389bea4cbaeb1c/68747470733a2f2f692e696d6775722e636f6d2f47456b774674522e676966)](https://camo.githubusercontent.com/558ad81828bf42df0165c9512a40b826a08433656a8204f2ca389bea4cbaeb1c/68747470733a2f2f692e696d6775722e636f6d2f47456b774674522e676966)

[Click to view settings screenshot](https://i.ibb.co/nnVnqZs/mathren-settings.png)

Features
--------

[](#features)

- Based on [KaTeX](https://github.com/KaTeX/KaTeX) (the fastest math typesetting library on the web).
- Display expressions as an inline or a block element.
- Compatible with Markdown and BBCode.
- Copy any expression's source code to the clipboard.
- Integration with `flarum/mentions` extension so you can quote expressions with selection.
- Works on preview mode.

Installation
------------

[](#installation)

```
composer require starsrivers/flarum-mathren
```

Updating
--------

[](#updating)

```
composer update starsrivers/flarum-mathren
php flarum cache:clear
```

Usage
-----

[](#usage)

Enable the extension.

#### Block Expressions

[](#block-expressions)

Wrap your TeX code with `[math]` and `[/math]` or your custom delimiters.

```
[math]\int_{-\infty}^\infty\hat\xi\,e^{2\pi i\xi x}\,d\xi[/math]

```

Block expressions will be wrapped with `.mathren-block` class.

#### Inline Expressions

[](#inline-expressions)

Wrap your TeX code with `[imath]` and `[/imath]` or your custom delimiters.

```
Lorem ipsum dolor [imath]\varDelta = b^2-4ac[/imath] sit amet.

```

Inline expressions will be wrapped with `.mathren-inline` class.

#### Ignoring Expressions

[](#ignoring-expressions)

If you're willing to show the TeX code with delimiters, there are three options:

1. Wrap your expression with `backticks` or `code` tag.

- You must set it as an ignored tag from the settings page.

2. Wrap your expression with an ignored class.

- You can set ignored classes from the settings page.

3. Use a decisive keyword with your expressions.

- The keyword is `ignore` by default. But you can change it or assign multiple keywords from the settings page. You must write one of those keywords inside a BBCode (i.e. `[math=keyword]x^3[/math]`).

`.mathren-ignore` class will be added into ignored expression's wrapper by default. But you can change it from the settings page.

Links
-----

[](#links)

- [Flarum Discuss post](https://discuss.flarum.org/d/22439-mathren-tex-math-rendering)
- [Source code on GitHub](https://github.com/StarsRivers/flarum-mathren)
- [Changelog](https://github.com/StarsRivers/flarum-mathren/CHANGELOG.md)
- [Report an issue](https://github.com/StarsRivers/flarum-mathren/issues)
- [Download via Packagist](https://packagist.org/packages/starsrivers/flarum-mathren)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 71.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 ~40 days

Recently: every ~92 days

Total

24

Last Release

1391d ago

Major Versions

0.2.7 → v02.x-dev2020-05-06

0.3.6 → v03.x-dev2021-06-29

0.3.7 → 1.0.02021-07-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/170022816cdd20a78b255af4fb3dee9b4f3ea59cd8a690813dc7cc425dc2b9e2?d=identicon)[浩瀚星河](/maintainers/%E6%B5%A9%E7%80%9A%E6%98%9F%E6%B2%B3)

---

Top Contributors

[![hasan-ozbey](https://avatars.githubusercontent.com/u/48382593?v=4)](https://github.com/hasan-ozbey "hasan-ozbey (37 commits)")[![SeRazon](https://avatars.githubusercontent.com/u/40968037?v=4)](https://github.com/SeRazon "SeRazon (11 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![vlntsolo](https://avatars.githubusercontent.com/u/25847225?v=4)](https://github.com/vlntsolo "vlntsolo (1 commits)")

---

Tags

mathematicsexpressionsflarumlatexkatextexmathren

### Embed Badge

![Health badge](/badges/starsrivers-flarum-mathren/health.svg)

```
[![Health](https://phpackages.com/badges/starsrivers-flarum-mathren/health.svg)](https://phpackages.com/packages/starsrivers-flarum-mathren)
```

###  Alternatives

[fof/upload

The file upload extension for the Flarum forum with insane intelligence.

188171.7k15](/packages/fof-upload)[fof/byobu

Well integrated, advanced private discussions.

61105.8k9](/packages/fof-byobu)[fof/gamification

Upvotes and downvotes for your Flarum community

4157.1k6](/packages/fof-gamification)[fof/user-bio

Add a user bio to user profiles

2196.5k9](/packages/fof-user-bio)[flarum-lang/russian

Russian language pack for Flarum.

13126.1k](/packages/flarum-lang-russian)[fof/drafts

Allow users to create post and discussion drafts

1771.1k5](/packages/fof-drafts)

PHPackages © 2026

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