Skip to content

Commit

Permalink
Allow tex parsing in <code> tags
Browse files Browse the repository at this point in the history
Just using $ as delimiter in markdown document fails since the markdown
parser unknown to the dollar syntax will try to interpret underscores.
Putting the $ delimented formula in backticks will cause the markdown
parser to put the tex-code with the $ delimiters into a code block.
The texcode will then be unchanged. This patch allows for mathJax to
interpret and automagically display the tex-formulas.
  • Loading branch information
Martin Goth committed Apr 16, 2015
1 parent 07197b1 commit 0cb4d10
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugin/math/math.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ var RevealMath = window.RevealMath || (function(){

MathJax.Hub.Config({
messageStyle: 'none',
tex2jax: { inlineMath: [['$','$'],['\\(','\\)']] },
tex2jax: {
inlineMath: [['$','$'],['\\(','\\)']] ,
skipTags: ['script','noscript','style','textarea','pre']
},
skipStartupTypeset: true
});

Expand Down

0 comments on commit 0cb4d10

Please sign in to comment.