]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
HTML for stackrel.
[lyx.git] / src / Buffer.cpp
index 27d0fe9c8e7e3de442cbd57138f47a7988121308..d2eff6ea6bb53af524d7dba0947bc9ca8fba85e1 100644 (file)
@@ -126,7 +126,7 @@ namespace {
 
 // Do not remove the comment below, so we get merge conflict in
 // independent branches. Instead add your own.
-int const LYX_FORMAT = 379; // rgh: xhtml math output type
+int const LYX_FORMAT = 382; // uwestoehr: support to change font color for greyed-out notes
 
 typedef map<string, bool> DepClean;
 typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
@@ -668,6 +668,7 @@ int Buffer::readHeader(Lexer & lex)
        params().pdfoptions().clear();
        params().indiceslist().clear();
        params().backgroundcolor = lyx::rgbFromHexName("#ffffff");
+       params().notefontcolor = lyx::rgbFromHexName("#cccccc");
 
        for (int i = 0; i < 4; ++i) {
                params().user_defined_bullet(i) = ITEMIZE_DEFAULTS[i];
@@ -3269,6 +3270,21 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir,
        // HTML backend
        else if (backend_format == "xhtml") {
                runparams.flavor = OutputParams::HTML;
+               switch (params().html_math_output) {
+               case BufferParams::MathML: 
+                       runparams.math_flavor = OutputParams::MathAsMathML; 
+                       break;
+               case BufferParams::HTML: 
+                       runparams.math_flavor = OutputParams::MathAsHTML; 
+                       break;
+               case BufferParams::Images:
+                       runparams.math_flavor = OutputParams::MathAsImages; 
+                       break;
+               case BufferParams::LaTeX:
+                       runparams.math_flavor = OutputParams::MathAsLaTeX; 
+                       break;                                                                                  
+               }
+               
                makeLyXHTMLFile(FileName(filename), runparams);
        }       else if (backend_format == "lyx")
                writeFile(FileName(filename));
@@ -3928,6 +3944,9 @@ bool Buffer::reload()
                message(bformat(_("Could not reload document %1$s."), disp_fn));
        }       
        setBusy(false);
+       thePreviews().removeLoader(*this);
+       if (graphics::Previews::status() != LyXRC::PREVIEW_OFF)
+               thePreviews().generateBufferPreviews(*this);
        errors("Parse");
        return success;
 }