]> git.lyx.org Git - lyx.git/blobdiff - src/Font.cpp
At least for now, this has to be done differently.
[lyx.git] / src / Font.cpp
index 0290f91961cc16fe4e58628eeda9de978e7f4508..4bf3040cd7fb8af60765f3a66266d4b71c4ff801 100644 (file)
@@ -554,21 +554,25 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
        if (f.underbar() == FONT_ON) {
                os << "\\uline{";
                count += 10;
+               runparams.inulemcmd = true;
                env = true; //We have opened a new environment
        }
        if (f.strikeout() == FONT_ON) {
                os << "\\sout{";
-               count += 6;
+               count += 9;
+               runparams.inulemcmd = true;
                env = true; //We have opened a new environment
        }
        if (f.uuline() == FONT_ON) {
                os << "\\uuline{";
-               count += 8;
+               count += 11;
+               runparams.inulemcmd = true;
                env = true; //We have opened a new environment
        }
        if (f.uwave() == FONT_ON) {
                os << "\\uwave{";
-               count += 7;
+               count += 10;
+               runparams.inulemcmd = true;
                env = true; //We have opened a new environment
        }
        // \noun{} is a LyX special macro
@@ -638,21 +642,25 @@ int Font::latexWriteEndChanges(odocstream & os, BufferParams const & bparams,
        if (f.underbar() == FONT_ON) {
                os << '}';
                ++count;
+               runparams.inulemcmd = false;
                env = true; // Size change need not bother about closing env.
        }
        if (f.strikeout() == FONT_ON) {
                os << '}';
                ++count;
+               runparams.inulemcmd = false;
                env = true; // Size change need not bother about closing env.
        }
        if (f.uuline() == FONT_ON) {
                os << '}';
                ++count;
+               runparams.inulemcmd = false;
                env = true; // Size change need not bother about closing env.
        }
        if (f.uwave() == FONT_ON) {
                os << '}';
                ++count;
+               runparams.inulemcmd = false;
                env = true; // Size change need not bother about closing env.
        }
        if (f.noun() == FONT_ON) {
@@ -819,7 +827,7 @@ void Font::validate(LaTeXFeatures & features) const
                LYXERR(Debug::LATEX, "Noun enabled. Font: " << to_utf8(stateText(0)));
        }
        if (bits_.underbar() == FONT_ON) {
-               LYXERR(Debug::LATEX, "font.underline: " << bits_.strikeout());
+               LYXERR(Debug::LATEX, "font.underline: " << bits_.underbar());
                features.require("ulem");
                LYXERR(Debug::LATEX, "Underline enabled. Font: " << to_utf8(stateText(0)));
        }