Now a regexp inset with a \backslash compiles.

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
This commit is contained in:
Tommaso Cucinotta 2011-06-11 23:21:14 +00:00
parent a9eba2825f
commit 5a4f151fb8

View 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.