From 0cb4d1050438d4c42ec1c7609b4791f973dfa577 Mon Sep 17 00:00:00 2001 From: Martin Goth Date: Thu, 16 Apr 2015 12:16:22 +0200 Subject: Allow tex parsing in tags 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. --- plugin/math/math.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugin') diff --git a/plugin/math/math.js b/plugin/math/math.js index d55d9d1..f2d724d 100755 --- a/plugin/math/math.js +++ b/plugin/math/math.js @@ -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 }); -- cgit v1.2.3