- macros << "\\newcommand{\\lyxadded}[3]{\\textcolor{lyxadded}{#3}}\n"
- << "\\newcommand{\\lyxdeleted}[3]{\\textcolor{lyxdeleted}{\\st{#3}}}\n";
+ if (mustProvide("ct-xcolor-soul")) {
+ int const prec = macros.precision(2);
+
+ 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 = rgbFromHexName(lcolor.getX11Name(Color_deletedtext));
+ macros << "\\providecolor{lyxdeleted}{rgb}{"
+ << cdel.r / 255.0 << ',' << cdel.g / 255.0 << ',' << cdel.b / 255.0 << "}\n";
+
+ macros.precision(prec);
+
+ if (isRequired("hyperref"))
+ macros << changetracking_xcolor_soul_hyperref_def;
+ else
+ macros << changetracking_xcolor_soul_def;