]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.cpp
Further cleanup of InsetFlex, InsetCollapsable and InsetLayout:
[lyx.git] / src / LaTeXFeatures.cpp
index 98f18badcbc042e87d96c8f80ceff82dddac0d96..1e1b4b22a52885efe8949a17205625d61850f6d6 100644 (file)
@@ -16,8 +16,8 @@
 
 #include "LaTeXFeatures.h"
 
-#include "BufferParams.h"
 #include "Color.h"
+#include "BufferParams.h"
 #include "debug.h"
 #include "Encoding.h"
 #include "Floating.h"
@@ -436,6 +436,7 @@ char const * simplefeatures[] = {
        "txfonts",
        "mathrsfs",
        "ascii",
+       "url",
 };
 
 int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *);
@@ -511,7 +512,7 @@ string const LaTeXFeatures::getPackages() const
        }
        // shadecolor for shaded
        if (mustProvide("framed") && mustProvide("color")) {
-               RGBColor c = RGBColor(lcolor.getX11Name(Color::shadedbg));
+               RGBColor c = rgbFromHexName(lcolor.getX11Name(Color_shadedbg));
                //255.0 to force conversion to double
                //NOTE As Jürgen Spitzmüller pointed out, an alternative would be
                //to use the xcolor package instead, and then we can do
@@ -615,9 +616,8 @@ string const LaTeXFeatures::getMacros() const
                macros << '\n';
        FeaturesList::const_iterator pit  = preamble_snippets_.begin();
        FeaturesList::const_iterator pend = preamble_snippets_.end();
-       for (; pit != pend; ++pit) {
+       for (; pit != pend; ++pit)
                macros << *pit << '\n';
-       }
 
        if (mustProvide("LyX"))
                macros << lyx_def << '\n';
@@ -680,17 +680,17 @@ string const LaTeXFeatures::getMacros() const
        getFloatDefinitions(macros);
 
        // change tracking
-       if (mustProvide("ct-dvipost")) {
+       if (mustProvide("ct-dvipost"))
                macros << changetracking_dvipost_def;
-       }
+
        if (mustProvide("ct-xcolor-soul")) {
                int const prec = macros.precision(2);
        
-               RGBColor cadd = RGBColor(lcolor.getX11Name(Color::addedtext));
+               RGBColor cadd = rgbFromHexName(lcolor.getX11Name(Color_addedtext));
                macros << "\\providecolor{lyxadded}{rgb}{"
                       << cadd.r / 255.0 << ',' << cadd.g / 255.0 << ',' << cadd.b / 255.0 << "}\n";
 
-               RGBColor cdel = RGBColor(lcolor.getX11Name(Color::deletedtext));
+               RGBColor cdel = rgbFromHexName(lcolor.getX11Name(Color_deletedtext));
                macros << "\\providecolor{lyxdeleted}{rgb}{"
                       << cdel.r / 255.0 << ',' << cdel.g / 255.0 << ',' << cdel.b / 255.0 << "}\n";
 
@@ -699,9 +699,9 @@ string const LaTeXFeatures::getMacros() const
                macros << "\\newcommand{\\lyxadded}[3]{{\\color{lyxadded}#3}}\n"
                       << "\\newcommand{\\lyxdeleted}[3]{{\\color{lyxdeleted}\\st{#3}}}\n";
        }
-       if (mustProvide("ct-none")) {
+
+       if (mustProvide("ct-none"))
                macros << changetracking_none_def;
-       }
 
        return macros.str();
 }