From: Tommaso Cucinotta Date: Sat, 11 Jun 2011 23:21:14 +0000 (+0000) Subject: Now a regexp inset with a \backslash compiles. X-Git-Tag: 2.1.0beta1~3075 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5a4f151fb87a2db14f2f5810a4b12ac4a060bc7e;p=features.git 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 --- diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 4e83162b03..804d3d32b1 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -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.