]> git.lyx.org Git - features.git/commitdiff
Now a regexp inset with a \backslash compiles.
authorTommaso Cucinotta <tommaso@lyx.org>
Sat, 11 Jun 2011 23:21:14 +0000 (23:21 +0000)
committerTommaso Cucinotta <tommaso@lyx.org>
Sat, 11 Jun 2011 23:21:14 +0000 (23:21 +0000)
This is needed when instant preview is on,
so we avoid the empty preview due to latex compilation error.
Fixing issue 1. reported at: http://permalink.gmane.org/gmane.editors.lyx.devel/136992.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39015 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathHull.cpp

index 4e83162b030a675286ec301ab186ccd22fe639a6..804d3d32b1abac602427e0ed7ec3539ae7e024a5 100644 (file)
@@ -742,7 +742,7 @@ void InsetMathHull::validate(LaTeXFeatures & features) const
                        features.addPreambleSnippet(
                                string("\\newcommand{\\regexp}[1]{\\fcolorbox{")
                                + frcol + string("}{")
-                               + bgcol + string("}{\\texttt{#1}}}"));
+                               + bgcol + string("}{\\ensuremath{\\mathtt{#1}}}}"));
                }
        
                // Validation is necessary only if not using AMS math.