Skip to content

mcmcclur/discourse-math

Repository files navigation

Discourse Math Plugin for MarksMath

This version of the official discourse-math plugin powers mathematical typesetting at discourse.marksmath.org. This version extends the official version in two main ways:

  • It updates the version of MathJax to V3 and
  • It relaxes and extends the parsing in the follwing ways:
It accepts slash-paren delimited inline math like \(a^2+b^2=c^2\).

It accepts single line double-dolar delimited display math like
$$a^2+b^2=c^2.$$

It accepts single line slash-bracket delimited display math like 
\[a^2+b^2=c^2.\]

It accepts multi line slash-bracket delimited display math like 
\[
a^2+b^2=c^2.
\]

Of course, it still accepts the inputs of the original:

Dollar delimited inline math: $a^2+b^2=c^2$.

Multi-line, double dollar delimited display math:
$$
a^2+b^2=c^2.
$$

There are several public posts on discourse.marksmath.org that illustrate its use. All those posts use MathJax V3 and the post on varied mathematical input illustrates the various types of input you can use.

Installation

Anyone with a standalone Discourse instance can install this plugin using the standard after_code hooks. Just be sure to delete the existing plugin directory first. You can do that in hooks as well. Thus, your code might look like so:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - rm -r discourse-math
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/mcmcclur/discourse-math.git

About

A standalone repo for discourse-math

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published