From 2149a73b7b8d958105dc4da7b3cea200ed025c73 Mon Sep 17 00:00:00 2001 From: Michael Schmitt Date: Sat, 16 Jun 2007 16:09:26 +0000 Subject: [PATCH] * src/LaTeXFeatures.cpp: fix \providecolor macros for change tracking output git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18804 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LaTeXFeatures.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index d03f964d03..00234b796c 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -499,7 +499,7 @@ string const LaTeXFeatures::getPackages() const //in InsetNote::validate(). int const stmSize = packages.precision(2); packages << "\\definecolor{shadecolor}{rgb}{" - << c.r/255.0 << ',' << c.g/255.0 << ',' << c.b/255.0 << "}\n"; + << c.r / 255.0 << ',' << c.g / 255.0 << ',' << c.b / 255.0 << "}\n"; packages.precision(stmSize); } @@ -662,13 +662,17 @@ string const LaTeXFeatures::getMacros() const macros << changetracking_dvipost_def; } if (mustProvide("ct-xcolor-soul")) { + int const prec = macros.precision(2); + RGBColor cadd = RGBColor(lcolor.getX11Name(Color::addedtext)); macros << "\\providecolor{lyxadded}{rgb}{" - << cadd.r/255 << ',' << cadd.g/255 << ',' << cadd.b/255 << "}\n"; + << cadd.r / 255.0 << ',' << cadd.g / 255.0 << ',' << cadd.b / 255.0 << "}\n"; RGBColor cdel = RGBColor(lcolor.getX11Name(Color::deletedtext)); macros << "\\providecolor{lyxdeleted}{rgb}{" - << cdel.r/255 << ',' << cdel.g/255 << ',' << cdel.b/255 << "}\n"; + << cdel.r / 255.0 << ',' << cdel.g / 255.0 << ',' << cdel.b / 255.0 << "}\n"; + + macros.precision(prec); macros << "\\newcommand{\\lyxadded}[3]{{\\color{lyxadded}#3}}\n" << "\\newcommand{\\lyxdeleted}[3]{{\\color{lyxdeleted}\\st{#3}}}\n";