]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.cpp
Remove some spacing above InsetColapsible when possible
[lyx.git] / src / BufferParams.cpp
index 71d16a071bf2db6999ced366244d738ab83632b9..200d695f60b305c8b72a62f4f40816f1c2892306 100644 (file)
@@ -365,7 +365,9 @@ BufferParams::Impl::Impl()
 {
        // set initial author
        // FIXME UNICODE
-       authorlist.record(Author(from_utf8(lyxrc.user_name), from_utf8(lyxrc.user_email)));
+       authorlist.record(Author(from_utf8(lyxrc.user_name),
+                                from_utf8(lyxrc.user_email),
+                                from_utf8(lyxrc.user_initials)));
 }
 
 
@@ -408,6 +410,8 @@ BufferParams::BufferParams()
        save_transient_properties = true;
        track_changes = false;
        output_changes = false;
+       change_bars = false;
+       postpone_fragile_content = true;
        use_default_options = true;
        maintain_unincluded_children = false;
        secnumdepth = 3;
@@ -949,6 +953,10 @@ string BufferParams::readToken(Lexer & lex, string const & token,
                lex >> track_changes;
        } else if (token == "\\output_changes") {
                lex >> output_changes;
+       } else if (token == "\\change_bars") {
+               lex >> change_bars;
+       } else if (token == "\\postpone_fragile_content") {
+               lex >> postpone_fragile_content;
        } else if (token == "\\branch") {
                lex.eatLine();
                docstring branch = lex.getDocString();
@@ -1466,6 +1474,12 @@ void BufferParams::writeFile(ostream & os, Buffer const * buf) const
           << (save_transient_properties ? convert<string>(output_changes) : "false")
           << '\n';
 
+       os << "\\change_bars "
+          << (save_transient_properties ? convert<string>(change_bars) : "false")
+          << '\n';
+
+       os << "\\postpone_fragile_content " << convert<string>(postpone_fragile_content) << '\n';
+
        os << "\\html_math_output " << html_math_output << '\n'
           << "\\html_css_as_file " << html_css_as_file << '\n'
           << "\\html_be_strict " << convert<string>(html_be_strict) << '\n';
@@ -1489,17 +1503,13 @@ void BufferParams::validate(LaTeXFeatures & features) const
                features.require("rtloutputdblcol");
 
        if (output_changes) {
-               bool dvipost    = LaTeXFeatures::isAvailable("dvipost");
                bool xcolorulem = LaTeXFeatures::isAvailable("ulem") &&
                                  LaTeXFeatures::isAvailable("xcolor");
 
                switch (features.runparams().flavor) {
                case OutputParams::LATEX:
                case OutputParams::DVILUATEX:
-                       if (dvipost) {
-                               features.require("ct-dvipost");
-                               features.require("dvipost");
-                       } else if (xcolorulem) {
+                       if (xcolorulem) {
                                features.require("ct-xcolor-ulem");
                                features.require("ulem");
                                features.require("xcolor");
@@ -1523,6 +1533,8 @@ void BufferParams::validate(LaTeXFeatures & features) const
                default:
                        break;
                }
+               if (change_bars)
+                       features.require("changebar");
        }
 
        // Floats with 'Here definitely' as default setting.
@@ -1635,7 +1647,7 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features,
                || find(classpsizes.begin(), classpsizes.end(), string_papersize[papersize]) != classpsizes.end();
 
        if ((!use_geometry || features.isProvided("geometry-light"))
-           && class_supported_papersize)
+           && class_supported_papersize && papersize != PAPER_DEFAULT)
                clsoptions << subst(tclass.pagesizeformat(), "$$s", string_papersize[papersize]) << ",";
 
        // if needed
@@ -2935,7 +2947,7 @@ void BufferParams::readIncludeonly(Lexer & lex)
 }
 
 
-string BufferParams::paperSizeName(PapersizePurpose purpose, string const psize) const
+string BufferParams::paperSizeName(PapersizePurpose purpose, string const psize) const
 {
        PAPER_SIZE ppsize = psize.empty() ? papersize : papersizetranslator().find(psize);
        switch (ppsize) {