From 5a4f151fb87a2db14f2f5810a4b12ac4a060bc7e Mon Sep 17 00:00:00 2001 From: Tommaso Cucinotta Date: Sat, 11 Jun 2011 23:21:14 +0000 Subject: [PATCH] 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 --- src/mathed/InsetMathHull.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- 2.39.2