starsrivers / flarum-mathren
TeX math rendering for your forum.
Installs: 69
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 4
Open Issues: 5
Language:JavaScript
Type:flarum-extension
Requires
- flarum/core: >=1.0.2
- dev-master
- v03.x-dev
- v02.x-dev
- 1.0.5
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.3.7
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.7
- 0.2.6
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.0
- dev-dependabot/npm_and_yarn/js/json5-1.0.2
- dev-dependabot/npm_and_yarn/js/json5-and-webpack-and-webpack-cli-and-babel-loader-2.2.3
- dev-dependabot/npm_and_yarn/js/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/js/loader-utils-1.4.2
- dev-dependabot/npm_and_yarn/js/minimatch-3.1.2
- dev-analysis-BMkwKg
This package is auto-updated.
Last update: 2024-12-08 11:44:16 UTC
README
An extension that handles TeX math rendering for your Flarum forum.
Click to view settings screenshot
Features
- Based on 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
composer require starsrivers/flarum-mathren
Updating
composer update starsrivers/flarum-mathren php flarum cache:clear
Usage
Enable the extension.
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
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
If you're willing to show the TeX code with delimiters, there are three options:
- Wrap your expression with `backticks` or
code
tag.
- You must set it as an ignored tag from the settings page.
- Wrap your expression with an ignored class.
- You can set ignored classes from the settings page.
- 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.