Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

reveal.js: How to write Mathjax formulas inline?

So far, every math formula I've written using MathJax in reveal.js puts it on a line of its own. I want to be able to write them on the same line as say, text in a <p> tag, and control line breaks for the formulae.

The MathJax dependency specified in the dependencies array of the object passed to the Reveal.initialize call is:

{ src: '/plugin/math/math.js', async: true }

Which is the same as that shown at the reveal.js github documentation. In other words, I did not configure MathJax in any other way.

Thanks!

like image 345
yanhan Avatar asked Sep 27 '13 00:09

yanhan


1 Answers

Make sure you use the in-line math delimiters $...$ or \(...\) not display math delimiters $$...$$ or \[...\] which (among other things) cause the math to be displayed on a separate line.

like image 108
Davide Cervone Avatar answered Nov 08 '22 22:11

Davide Cervone