Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to display math equations in block with markdown

In markdown quick reference, we know that one can display plain code in blocks by enclosing the code in ```. I wonder if there is a simple way to display math equations in block too. Thanks.

like image 403
aonan zhang Avatar asked Oct 25 '25 02:10

aonan zhang


1 Answers

Vanilla Markdown and Markdown Extra don't support mathematics. However, kramdown and MultiMarkdown do very easily, and there's an extension for PHP Markdown Extra that you can use. The syntax is different for each, so it depends on which you're using.

In short, in kramdown, use $$ double dollar signs $$, and in MultiMarkdown or the PHP Markdown Extra Math extension, use \[ LaTeX-style brackets \] for display and \(LaTeX-style parentheses\) for inline mathematics.

like image 73
Kyle Barbour Avatar answered Oct 26 '25 23:10

Kyle Barbour



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!