adds support to set colors for some box types (support for the LaTeX commands \fcolorbox and \colorbox)
fileformat change
-----------------------
+
+2015-05-16 Uwe Stöhr <uwestoehr@web.de>
+ * Format incremented to 492: support for \colorbox and \fcolorbox
+ in the box dialog.
+ New box parameters:
+ - framcolor
+ - backgroundcolor
+
2015-05-14 Uwe Stöhr <uwestoehr@web.de>
* Format incremented to 491: support for xcolor's default colors
- No new parameter, the \\color parameter can nowhave these values:
+ No new parameter, the \color parameter can now also have these values:
"brown", "darkgray", "gray", "lightgray", "lime", "olive", "orange",
"pink", "purple", "teal", "violet"
("1_6", list(range(277,346)), minor_versions("1.6" , 10)),
("2_0", list(range(346,414)), minor_versions("2.0" , 8)),
("2_1", list(range(414,475)), minor_versions("2.1" , 0)),
- ("2_2", list(range(475,492)), minor_versions("2.2" , 0))
+ ("2_2", list(range(475,493)), minor_versions("2.2" , 0))
]
####################################################################
i = i + 1
+def convert_colorbox(document):
+ " adds color settings for boxes "
+
+ i = 0
+ while True:
+ i = find_token(document.body, "height_special", i)
+ if i == -1:
+ return
+ document.body.insert(i + 2, 'framecolor "black"\nbackgroundcolor "white"')
+ i = i + 2
+
+
+def revert_colorbox(document):
+ " outputs color settings for boxes as TeX code "
+
+ i = 0
+ defaultframecolor = "black"
+ defaultbackcolor = "white"
+ while True:
+ i = find_token(document.body, "framecolor", i)
+ if i == -1:
+ return
+ # read out the values
+ beg = document.body[i].find('"');
+ end = document.body[i].rfind('"');
+ framecolor = document.body[i][beg+1:end];
+ beg = document.body[i+1].find('"');
+ end = document.body[i+1].rfind('"');
+ backcolor = document.body[i+1][beg+1:end];
+ # delete the specification
+ del document.body[i:i+2]
+ # output TeX code
+ # first output the closing brace
+ if framecolor != defaultframecolor or backcolor != defaultbackcolor:
+ document.body[i + 9 : i + 9] = put_cmd_in_ert("}")
+ # now output the box commands
+ if framecolor != defaultframecolor or backcolor != defaultbackcolor:
+ document.body[i - 14 : i - 14] = put_cmd_in_ert("{")
+ if framecolor != defaultframecolor:
+ document.body[i - 9 : i - 8] = ["\\backslash fboxcolor{" + framecolor + "}{" + backcolor + "}{"]
+ if backcolor != defaultbackcolor and framecolor == defaultframecolor:
+ document.body[i - 9 : i - 8] = ["\\backslash colorbox{" + backcolor + "}{"]
+ i = i + 11
+
+
##
# Conversion hub
#
[488, [convert_newgloss]],
[489, [convert_BoxFeatures]],
[490, [convert_origin]],
- [491, []]
+ [491, []],
+ [492, [convert_colorbox]]
]
revert = [
+ [491, [revert_colorbox]],
[490, [revert_textcolor]],
[489, [revert_origin]],
[488, [revert_BoxFeatures]],
#include "GuiBox.h"
+#include "GuiApplication.h"
+#include "ColorCache.h"
#include "LengthCombo.h"
#include "Length.h"
#include "qt_helpers.h"
#include "support/foreach.h"
#include "support/lstrings.h"
+#include <QComboBox>
#include <QLineEdit>
#include <QPushButton>
}
+static QList<ColorPair> colorData()
+{
+ QList<ColorPair> colors;
+ colors << ColorPair(qt_("none"), Color_none);
+ colors << ColorPair(qt_("black"), Color_black);
+ colors << ColorPair(qt_("white"), Color_white);
+ colors << ColorPair(qt_("blue"), Color_blue);
+ colors << ColorPair(qt_("brown"), Color_brown);
+ colors << ColorPair(qt_("cyan"), Color_cyan);
+ colors << ColorPair(qt_("darkgray"), Color_darkgray);
+ colors << ColorPair(qt_("gray"), Color_gray);
+ colors << ColorPair(qt_("green"), Color_green);
+ colors << ColorPair(qt_("lightgray"), Color_lightgray);
+ colors << ColorPair(qt_("lime"), Color_lime);
+ colors << ColorPair(qt_("magenta"), Color_magenta);
+ colors << ColorPair(qt_("olive"), Color_olive);
+ colors << ColorPair(qt_("orange"), Color_orange);
+ colors << ColorPair(qt_("pink"), Color_pink);
+ colors << ColorPair(qt_("purple"), Color_purple);
+ colors << ColorPair(qt_("red"), Color_red);
+ colors << ColorPair(qt_("teal"), Color_teal);
+ colors << ColorPair(qt_("violet"), Color_violet);
+ colors << ColorPair(qt_("yellow"), Color_yellow);
+ return colors;
+}
+
+
+template<typename T>
+void fillComboColor(QComboBox * combo, QList<T> const & list, bool const is_none)
+{
+ QPixmap coloritem(32, 32);
+ QColor color;
+ // frameColorCO cannot be uncolored
+ if (is_none)
+ combo->addItem("none");
+ typename QList<T>::const_iterator cit = list.begin() + 1;
+ for (; cit != list.end(); ++cit) {
+ color = QColor(guiApp->colorCache().get(cit->second, false));
+ coloritem.fill(color);
+ combo->addItem(QIcon(coloritem), cit->first);
+ }
+}
+
+
+template<class P>
+static int findPos2nd(QList<P> const & vec, QString val)
+{
+ for (int i = 0; i != vec.size(); ++i)
+ if (vec[i].first == val)
+ return i;
+ return 0;
+}
+
+
GuiBox::GuiBox(QWidget * parent) : InsetParamsWidget(parent)
{
setupUi(this);
connect(shadowsizeED, SIGNAL(textChanged(QString)), this, SIGNAL(changed()));
connect(shadowsizeUnitsLC, SIGNAL(selectionChanged(lyx::Length::UNIT)),
this, SIGNAL(changed()));
+ connect(frameColorCO, SIGNAL(highlighted(QString)), this, SIGNAL(changed()));
+ connect(backgroundColorCO, SIGNAL(highlighted(QString)), this, SIGNAL(changed()));
heightED->setValidator(unsignedLengthValidator(heightED));
widthED->setValidator(unsignedLengthValidator(widthED));
addCheckedWidget(separationED, separationLA);
addCheckedWidget(shadowsizeED, shadowsizeLA);
+ // initialize colors
+ color = colorData();
+ // the background can be uncolored while the frame cannot
+ fillComboColor(frameColorCO, color, false);
+ fillComboColor(backgroundColorCO, color, true);
+
initDialog();
}
widthCB->setChecked(itype != "none");
pagebreakCB->setChecked(false);
}
+ // assure that the frame color is black for frameless boxes to
+ // provide the color "none"
+ if (frameless && frameColorCO->currentText() != qt_("black"))
+ frameColorCO->setCurrentIndex(0);
+ changed();
+}
+
+
+void GuiBox::on_frameColorCO_currentIndexChanged(int /* index */)
+{
+ // if there is a special frme color the background canot be uncolored
+ if (frameColorCO->currentText() != qt_("black")) {
+ if (backgroundColorCO->currentText() == qt_("none"))
+ backgroundColorCO->setCurrentIndex(findPos2nd(color, qt_("white")));
+ if (backgroundColorCO->itemText(0) == qt_("none"))
+ backgroundColorCO->removeItem(0);
+ } else {
+ if (backgroundColorCO->itemText(0) != qt_("none"))
+ backgroundColorCO->insertItem(0, qt_("none"));
+ }
changed();
}
// LaTeX's default for \shadowsize is 4 pt
shadowsizeED->setText("4");
shadowsizeUnitsLC->setCurrentItem(Length::PT);
+ // the default color is black and none
+ frameColorCO->setCurrentIndex(findPos2nd(color, qt_("black")) - 1);
+ backgroundColorCO->setCurrentIndex(findPos2nd(color, qt_("none")));
}
shadowsizeUnitsLC->setEnabled(type == "Shadowbox");
lengthToWidgets(shadowsizeED, shadowsizeUnitsLC,
(params.shadowsize).asString(), default_unit);
+ // set color
+ frameColorCO->setCurrentIndex(findPos2nd(color, qt_(params.framecolor)) - 1);
+ if (frameColorCO->currentText() != qt_("black"))
+ backgroundColorCO->setCurrentIndex(findPos2nd(color, qt_(params.backgroundcolor)) - 1);
+ else
+ backgroundColorCO->setCurrentIndex(findPos2nd(color, qt_(params.backgroundcolor)));
}
params.shadowsize = Length(widgetsToLength(shadowsizeED, shadowsizeUnitsLC));
else
params.shadowsize = Length("4pt");
+ if (frameColorCO->isEnabled())
+ params.framecolor = fromqstr( color[frameColorCO->currentIndex() + 1].first );
+ else
+ params.framecolor = "black";
+ if (backgroundColorCO->isEnabled()) {
+ if (frameColorCO->currentText() != qt_("black"))
+ params.backgroundcolor = fromqstr(color[backgroundColorCO->currentIndex() + 1].first);
+ else
+ params.backgroundcolor = fromqstr(color[backgroundColorCO->currentIndex()].first);
+ } else
+ params.backgroundcolor = "none";
return from_ascii(InsetBox::params2string(params));
}
shadowsizeED->setText("4");
shadowsizeUnitsLC->setCurrentItem(Length::PT);
}
+ // \fboxcolor and \colorbox cannot be used for fancybox boxes
+ frameColorCO->setEnabled(!pagebreakCB->isChecked() && outer == "Boxed");
+ backgroundColorCO->setEnabled(!pagebreakCB->isChecked() && (frameColorCO->isEnabled() || outer == "Frameless"));
}
return InsetParamsWidget::checkWidgets();
#include "InsetParamsWidget.h"
#include "ui_BoxUi.h"
-
+#include "Font.h"
namespace lyx {
namespace frontend {
+typedef std::pair<QString, ColorCode> ColorPair;
+
class GuiBox : public InsetParamsWidget, public Ui::BoxUi
{
Q_OBJECT
private Q_SLOTS:
void on_innerBoxCO_activated(int);
void on_typeCO_activated(int);
+ void on_frameColorCO_currentIndexChanged(int);
void initDialog();
void on_widthCB_stateChanged(int state);
void on_heightCB_stateChanged(int state);
QStringList ids_spec_;
///
QStringList gui_names_spec_;
+ ///
+ QList<ColorPair> color;
};
} // namespace frontend
<rect>
<x>0</x>
<y>0</y>
- <width>262</width>
- <height>411</height>
+ <width>446</width>
+ <height>283</height>
</rect>
</property>
<property name="windowTitle">
<property name="sizeGripEnabled" stdset="0">
<bool>true</bool>
</property>
- <layout class="QGridLayout" name="gridLayout_4">
+ <layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QGroupBox" name="TypesizeGB">
<property name="title">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_3">
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="widthED">
+ <property name="toolTip">
+ <string>Width value</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="lyx::frontend::LengthCombo" name="widthUnitsLC"/>
+ </item>
+ <item row="2" column="0">
+ <widget class="QCheckBox" name="heightCB">
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="text">
+ <string>&Height:</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ <property name="tristate">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="widthCB">
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="text">
+ <string>&Width:</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ <property name="tristate">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
<item row="0" column="0">
<widget class="QLabel" name="innerBoxLA">
<property name="toolTip">
</property>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QCheckBox" name="heightCB">
- <property name="toolTip">
- <string/>
- </property>
- <property name="text">
- <string>&Height:</string>
- </property>
- <property name="checked">
- <bool>false</bool>
- </property>
- <property name="tristate">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="lyx::frontend::LengthCombo" name="widthUnitsLC"/>
- </item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="widthED">
- <property name="toolTip">
- <string>Width value</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QCheckBox" name="widthCB">
- <property name="toolTip">
- <string/>
- </property>
- <property name="text">
- <string>&Width:</string>
- </property>
- <property name="checked">
- <bool>false</bool>
- </property>
- <property name="tristate">
- <bool>false</bool>
- </property>
- </widget>
- </item>
</layout>
</widget>
</item>
- <item row="1" column="0">
+ <item row="0" column="1">
<widget class="QGroupBox" name="AlignmentGB">
<property name="title">
<string>Alignment</string>
</item>
</widget>
</item>
+ <item row="3" column="1">
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</widget>
</item>
- <item row="2" column="0">
+ <item row="1" column="0">
<widget class="QGroupBox" name="DecorationGB">
<property name="title">
<string>Decoration</string>
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
- <item row="1" column="0">
- <widget class="QLabel" name="thicknessLA">
- <property name="text">
- <string>Line thickness:</string>
- </property>
- </widget>
- </item>
<item row="0" column="1" colspan="2">
<widget class="QComboBox" name="typeCO">
<property name="toolTip">
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="typeLA">
- <property name="toolTip">
- <string/>
- </property>
- <property name="text">
- <string>&Decoration:</string>
- </property>
- <property name="buddy">
- <cstring>typeCO</cstring>
- </property>
- </widget>
- </item>
<item row="1" column="1">
<widget class="QLineEdit" name="thicknessED">
<property name="enabled">
</property>
</widget>
</item>
- <item row="3" column="0">
- <widget class="QLabel" name="shadowsizeLA">
+ <item row="1" column="0">
+ <widget class="QLabel" name="thicknessLA">
<property name="text">
- <string>Shadow size:</string>
+ <string>Line thickness:</string>
</property>
</widget>
</item>
- <item row="1" column="2">
- <widget class="lyx::frontend::LengthCombo" name="thicknessUnitsLC">
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="separationED">
<property name="enabled">
<bool>false</bool>
</property>
+ <property name="toolTip">
+ <string>Separation value</string>
+ </property>
</widget>
</item>
<item row="2" column="0">
</property>
</widget>
</item>
- <item row="2" column="1">
- <widget class="QLineEdit" name="separationED">
+ <item row="0" column="0">
+ <widget class="QLabel" name="typeLA">
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="text">
+ <string>&Decoration:</string>
+ </property>
+ <property name="buddy">
+ <cstring>typeCO</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="shadowsizeLA">
+ <property name="text">
+ <string>Shadow size:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="lyx::frontend::LengthCombo" name="thicknessUnitsLC">
<property name="enabled">
<bool>false</bool>
</property>
- <property name="toolTip">
- <string>Separation value</string>
- </property>
</widget>
</item>
<item row="2" column="2">
</layout>
</widget>
</item>
+ <item row="1" column="1">
+ <widget class="QGroupBox" name="colorGB">
+ <property name="title">
+ <string>Color</string>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_4">
+ <item row="2" column="2">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="backgroundColorLA">
+ <property name="text">
+ <string>Background:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="frameColorLA">
+ <property name="text">
+ <string>Frame:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" colspan="2">
+ <widget class="QComboBox" name="backgroundColorCO"/>
+ </item>
+ <item row="0" column="1" colspan="2">
+ <widget class="QComboBox" name="frameColorCO"/>
+ </item>
+ </layout>
+ </widget>
+ </item>
</layout>
</widget>
<customwidgets>
ColorCode InsetBox::backgroundColor(PainterInfo const &) const
{
- if (params_.type != "Shaded")
+ // we only support background color for 3 types
+ if (params_.type != "Shaded" && params_.type != "Frameless" && params_.type != "Boxed")
return getLayout().bgcolor();
- // FIXME: This hardcoded color is a hack!
- if (buffer().params().boxbgcolor == lyx::rgbFromHexName("#ff0000"))
- return getLayout().bgcolor();
- ColorCode c = lcolor.getFromLyXName("boxbgcolor");
- if (c == Color_none)
- return getLayout().bgcolor();
- return c;
+ if (params_.type == "Shaded") {
+ // FIXME: This hardcoded color is a hack!
+ if (buffer().params().boxbgcolor == lyx::rgbFromHexName("#ff0000"))
+ return getLayout().bgcolor();
+
+ ColorCode c = lcolor.getFromLyXName("boxbgcolor");
+ if (c == Color_none)
+ return getLayout().bgcolor();
+ return c;
+ } else {
+ if (params_.backgroundcolor == "none")
+ return getLayout().bgcolor();
+ ColorCode boxbackground = lcolor.getFromLyXName(params_.backgroundcolor);
+ return boxbackground;
+ }
+ return getLayout().bgcolor();
}
&& (thickness_string.find(defaultThick) != string::npos))
os << "{\\fboxsep " << from_ascii(separation_string);
if (!params_.inner_box && !width_string.empty()) {
- os << "\\framebox";
+ if (params_.framecolor != "black" || params_.backgroundcolor != "none") {
+ os << "\\fcolorbox{" << params_.framecolor << "}{" << params_.backgroundcolor << "}{";
+ os << "\\makebox";
+ } else
+ os << "\\framebox";
// Special widths, see usrguide sec. 3.5
// FIXME UNICODE
if (params_.special != "none") {
<< ']';
if (params_.hor_pos != 'c')
os << "[" << params_.hor_pos << "]";
- } else
- os << "\\fbox";
+ } else {
+ if (params_.framecolor != "black" || params_.backgroundcolor != "none")
+ os << "\\fcolorbox{" << params_.framecolor << "}{" << params_.backgroundcolor << "}";
+ else
+ os << "\\fbox";
+ }
os << "{";
break;
case ovalbox:
}
if (params_.inner_box) {
- if (params_.use_parbox)
+ if (params_.use_parbox) {
+ if (params_.backgroundcolor != "none" && btype == Frameless)
+ os << "\\colorbox{" << params_.backgroundcolor << "}{";
os << "\\parbox";
- else if (params_.use_makebox) {
+ } else if (params_.use_makebox) {
if (!width_string.empty()) {
- os << "\\makebox";
+ if (params_.backgroundcolor != "none")
+ os << "\\colorbox{" << params_.backgroundcolor << "}{";
+ os << "\\makebox{";
// FIXME UNICODE
// output the width and horizontal position
if (params_.special != "none") {
<< ']';
if (params_.hor_pos != 'c')
os << "[" << params_.hor_pos << "]";
- } else
- os << "\\mbox";
- os << "{";
+ } else {
+ if (params_.backgroundcolor != "none")
+ os << "\\colorbox{" << params_.backgroundcolor << "}{";
+ else
+ os << "\\mbox{";
+ }
}
- else
+ else {
+ if (params_.backgroundcolor != "none" && btype == Frameless)
+ os << "\\colorbox{" << params_.backgroundcolor << "}{";
os << "\\begin{minipage}";
+ }
// output parameters for parbox and minipage
if (!params_.use_makebox) {
os << "%\n}";
else
os << "%\n\\end{minipage}";
+ if (params_.backgroundcolor != "none" && btype == Frameless
+ && !(params_.use_makebox && width_string.empty()))
+ os << "}";
}
switch (btype) {
break;
case Boxed:
os << "}";
+ if (!params_.inner_box && !width_string.empty()
+ && (params_.framecolor != "black" || params_.backgroundcolor != "none"))
+ os << "}";
if (!(separation_string.find(defaultSep) != string::npos)
|| !(thickness_string.find(defaultThick) != string::npos))
os << "}";
BoxType btype = boxtranslator().find(params_.type);
switch (btype) {
case Frameless:
+ if (params_.backgroundcolor != "none")
+ features.require("xcolor");
break;
case Framed:
features.require("calc");
break;
case Boxed:
features.require("calc");
+ if (params_.framecolor != "black" || params_.backgroundcolor != "none")
+ features.require("xcolor");
break;
case ovalbox:
case Ovalbox:
height_special("totalheight"), // default is 1\\totalheight
thickness(Length(defaultThick)),
separation(Length(defaultSep)),
- shadowsize(Length(defaultShadow))
+ shadowsize(Length(defaultShadow)),
+ framecolor("black"),
+ backgroundcolor("none")
{}
os << "thickness \"" << thickness.asString() << "\"\n";
os << "separation \"" << separation.asString() << "\"\n";
os << "shadowsize \"" << shadowsize.asString() << "\"\n";
+ os << "framecolor \"" << framecolor << "\"\n";
+ os << "backgroundcolor \"" << backgroundcolor << "\"\n";
}
lex >> "thickness" >> thickness;
lex >> "separation" >> separation;
lex >> "shadowsize" >> shadowsize;
+ lex >> "framecolor" >> framecolor;
+ lex >> "backgroundcolor" >> backgroundcolor;
}
Length separation;
///
Length shadowsize;
+ ///
+ std::string framecolor;
+ ///
+ std::string backgroundcolor;
};
459 beamer: \begin{frame}, \begin_layout Frame
\begin{frame}[plain], \begin_layout PlainFrame
\begin{frame}[fragile] \begin_layout FragileFrame
-466 Powerdot updates:
- \pause[] layout Pause
- \onslide{}{} InsetFlex, InsetArgument
- \onslide*{}{} InsetFlex, InsetArgument
- \onslide+{}{} InsetFlex, InsetArgument
- \twocolumn[]{}{} Layout Twocolumn, InsetArgument
- \item[]<> InsetArgument
- \begin{enumerate|itemize|...}[] InsetArgument
-
+466 Powerdot updates:
+ \pause[] layout Pause
+ \onslide{}{} InsetFlex, InsetArgument
+ \onslide*{}{} InsetFlex, InsetArgument
+ \onslide+{}{} InsetFlex, InsetArgument
+ \twocolumn[]{}{} Layout Twocolumn, InsetArgument
+ \item[]<> InsetArgument
+ \begin{enumerate|itemize|...}[] InsetArgument
+492 commands \fcolorbox and \colorbox InsetBox
General
string thickness = "0.4pt";
string separation = "3pt";
string shadowsize = "4pt";
+ string framecolor = "black";
+ string backgroundcolor = "none";
if (!inner_type.empty() && p.hasOpt()) {
if (inner_type != "makebox")
position = p.getArg('[', ']');
// Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own.
-#define LYX_FORMAT_LYX 491 // uwestoehr: support more text colors
-#define LYX_FORMAT_TEX2LYX 491
+#define LYX_FORMAT_LYX 492 // uwestoehr: support for colorboxes
+#define LYX_FORMAT_TEX2LYX 492
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
#ifndef _MSC_VER