Coder Social home page Coder Social logo

starsrivers / flarum-mathren Goto Github PK

View Code? Open in Web Editor NEW

This project forked from the-turk/flarum-mathren

1.0 0.0 0.0 3.43 MB

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

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

License: MIT License

JavaScript 67.74% PHP 28.70% Less 3.56%

flarum-mathren's Introduction

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).
  • 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:

  1. Wrap your expression with `backticks` or code tag.
  • You must set it as an ignored tag from the settings page.
  1. Wrap your expression with an ignored class.
  • You can set ignored classes from the settings page.
  1. 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

flarum-mathren's People

Contributors

the-turk avatar starsrivers avatar dependabot[bot] avatar vlntsolo avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.