Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/the-turk/flarum-mathren
An extension that handles TeX math rendering for your Flarum forum.
https://github.com/the-turk/flarum-mathren
flarum flarum-extension katex
Last synced: 2 months ago
JSON representation
An extension that handles TeX math rendering for your Flarum forum.
- Host: GitHub
- URL: https://github.com/the-turk/flarum-mathren
- Owner: the-turk
- License: mit
- Created: 2020-01-03T01:39:57.000Z (almost 5 years ago)
- Default Branch: v1.0.0
- Last Pushed: 2022-10-07T13:39:58.000Z (about 2 years ago)
- Last Synced: 2024-09-29T05:03:34.950Z (3 months ago)
- Topics: flarum, flarum-extension, katex
- Language: JavaScript
- Homepage: https://discuss.flarum.org/d/22439-mathren-tex-math-rendering
- Size: 3.18 MB
- Stars: 13
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-flarum - 2020 - TeX math rendering for your forum. (Extensions / Discussion ([:top:](#table-of-contents)))
README
# MathRen for Flarum
[![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/the-turk/flarum-mathren/blob/master/LICENSE) [![Latest Stable Version](https://img.shields.io/packagist/v/the-turk/flarum-mathren.svg)](https://packagist.org/packages/the-turk/flarum-mathren) [![Total Downloads](https://img.shields.io/packagist/dt/the-turk/flarum-mathren.svg)](https://packagist.org/packages/the-turk/flarum-mathren)
An extension that handles TeX math rendering for your [Flarum](https://github.com/flarum) forum.
![Screenshot](https://i.imgur.com/OuT8Luf.png)
![Action](https://i.imgur.com/GEkwFtR.gif)
[Click to view settings screenshot](https://i.imgur.com/psB1noF.png)
## Features
- Based on [KaTeX](https://github.com/KaTeX/KaTeX) (the fastest math typesetting library on the web).
- Supports [AsciiMath](http://asciimath.org/) syntax.
- 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
```bash
composer require the-turk/flarum-mathren
```## Updating
```bash
composer update the-turk/flarum-mathren
php flarum cache:clear
```## Usage
Enable the extension.
___
#### Block Expressions `displayMode: true`
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 `displayMode: false`
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.
___
Wrap your expression with \`backticks\` or `code` tag to skip rendering.
## Links
- [Flarum Discuss post](https://discuss.flarum.org/d/22439-mathren-tex-math-rendering)
- [Source code on GitHub](https://github.com/the-turk/flarum-mathren)
- [Changelog](https://github.com/the-turk/flarum-mathren/blob/master/CHANGELOG.md)
- [Report an issue](https://github.com/the-turk/flarum-mathren/issues)
- [Download via Packagist](https://packagist.org/packages/the-turk/flarum-mathren)