From a92b593949c8e87fdb69f10f8154f5642a9b1d4e Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Mon, 22 Oct 2007 22:24:25 -0500 Subject: [PATCH] SVG in Equations Support the new "svg" environment from itex2MML 1.3. --- app/views/wiki/tex.rhtml | 1 - vendor/plugins/maruku/lib/maruku/ext/math/latex_fix.rb | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/wiki/tex.rhtml b/app/views/wiki/tex.rhtml index 08b529ac..5d10dba2 100644 --- a/app/views/wiki/tex.rhtml +++ b/app/views/wiki/tex.rhtml @@ -35,7 +35,6 @@ % Because of conflicts, \space and \mathop are converted to % \itexspace and \operatorname during preprocessing. -% \over is simply unsupported. % itex: \space{ht}{dp}{wd} % diff --git a/vendor/plugins/maruku/lib/maruku/ext/math/latex_fix.rb b/vendor/plugins/maruku/lib/maruku/ext/math/latex_fix.rb index 90bb53d2..166fa519 100644 --- a/vendor/plugins/maruku/lib/maruku/ext/math/latex_fix.rb +++ b/vendor/plugins/maruku/lib/maruku/ext/math/latex_fix.rb @@ -3,7 +3,8 @@ class String def fix_latex if #{html_math_engine} == 'itex2mml' s = self.gsub("\\mathop{", "\\operatorname{") - s.gsub("\\space{", "\\itexspace{") + s.gsub!(/\\begin{svg}.*?\\end{svg}/m, " ") + s.gsub("\\space{", "\\itexspace{") else self end