mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
Now the coloured box around the regexp is visible also if InsetPreview is enabled.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33336 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0f3c445dd4
commit
33dca1df0f
@ -22,6 +22,7 @@
|
|||||||
#include "Buffer.h"
|
#include "Buffer.h"
|
||||||
#include "BufferParams.h"
|
#include "BufferParams.h"
|
||||||
#include "BufferView.h"
|
#include "BufferView.h"
|
||||||
|
#include "ColorSet.h"
|
||||||
#include "CutAndPaste.h"
|
#include "CutAndPaste.h"
|
||||||
#include "Encoding.h"
|
#include "Encoding.h"
|
||||||
#include "FuncRequest.h"
|
#include "FuncRequest.h"
|
||||||
@ -636,9 +637,15 @@ void InsetMathHull::validate(LaTeXFeatures & features) const
|
|||||||
if (ams())
|
if (ams())
|
||||||
features.require("amsmath");
|
features.require("amsmath");
|
||||||
|
|
||||||
if (type_ == hullRegexp)
|
if (type_ == hullRegexp) {
|
||||||
|
features.require("color");
|
||||||
|
string frcol = lcolor.getLaTeXName(Color_regexpframe);
|
||||||
|
string bgcol = "white";
|
||||||
features.addPreambleSnippet(
|
features.addPreambleSnippet(
|
||||||
"\\newcommand{\\regexp}[1]{\\fbox{\\texttt{#1}}}");
|
string("\\newcommand{\\regexp}[1]{\\fcolorbox{")
|
||||||
|
+ frcol + string("}{")
|
||||||
|
+ bgcol + string("}{\\texttt{#1}}}"));
|
||||||
|
}
|
||||||
|
|
||||||
// Validation is necessary only if not using AMS math.
|
// Validation is necessary only if not using AMS math.
|
||||||
// To be safe, we will always run mathedvalidate.
|
// To be safe, we will always run mathedvalidate.
|
||||||
|
Loading…
Reference in New Issue
Block a user