the-turk / flarum-mathren

An extension that handles TeX math rendering for your Flarum forum.

Home Page:https://discuss.flarum.org/d/22439-mathren-tex-math-rendering

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MathRen for Flarum

MIT license Latest Stable Version Total Downloads

An extension that handles TeX math rendering for your Flarum forum.

Screenshot

Action

Click to view settings screenshot

Features

  • Based on KaTeX (the fastest math typesetting library on the web).
  • Supports AsciiMath 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

composer require the-turk/flarum-mathren

Updating

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

About

An extension that handles TeX math rendering for your Flarum forum.

https://discuss.flarum.org/d/22439-mathren-tex-math-rendering

License:MIT License


Languages

Language:JavaScript 63.8%Language:PHP 33.6%Language:Less 2.6%