Skip to content
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.

Commit

Permalink
Disallow inline math
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron O'Mullan committed Aug 21, 2014
1 parent d434ba3 commit eafa018
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions book/plugin.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
require(["gitbook"], function(gitbook) {
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']],
processEscapes: true
}
});
Expand All @@ -10,4 +9,5 @@ require(["gitbook"], function(gitbook) {
gitbook.events.bind("page.change", function() {
MathJax.Hub.Typeset()
});
});
});

4 comments on commit eafa018

@renkun-ken
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder how I can use inline math since it is disabled in this commit?

@vhuber
Copy link

@vhuber vhuber commented on eafa018 Aug 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me either :/

@cben
Copy link

@cben cben commented on eafa018 Aug 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe (untested) MathJax's default will kick in, which is \(...\) but not $...$.
(And both \[...\] and $$...$$ for display)

It does sound from the commit title like the author wanted to disable inline altogether, which is strange.

@pkra
Copy link

@pkra pkra commented on eafa018 Aug 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does sound from the commit title like the author wanted to disable inline altogether, which is strange.

IIUC gitbook has a kramdown-like parser. Kramdown's pre-processes math content into MathJax script tags long before MathJax gets to it. IIRC, kramdown uses $$ as delimiter for both inline and display (stand alone paragraphs force display mode).

BTW, the PR might as well remove the entire surrounding MathJax section since escaping is only useful for $ delimiters (it enables \$ outside of delimiters to write a plain $ in regular text).

Please sign in to comment.