X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftex2lyx%2Ftext.cpp;h=f9201cd1a26f73f307979729869a3f243d5d0683;hb=a2b21e3cd4bbfd42e59161143eba6e7681aaa93f;hp=9dc589d5e356a6e82940a615f2298bd857ed803e;hpb=4b0069860c4ac54aff09627582c6f5da7aa9020c;p=lyx.git diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 9dc589d5e3..f9201cd1a2 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -2355,7 +2355,7 @@ void parse_environment(Parser & p, ostream & os, bool outer, p.skip_spaces(); if (!preamble.titleLayoutFound()) preamble.titleLayoutFound(newlayout->intitle); - set const & req = newlayout->requires(); + set const & req = newlayout->required(); set::const_iterator it = req.begin(); set::const_iterator en = req.end(); for (; it != en; ++it) @@ -3533,7 +3533,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer, parse_text_snippet(p, os, FLAG_ITEM, outer, context); if (!preamble.titleLayoutFound()) preamble.titleLayoutFound(newlayout->intitle); - set const & req = newlayout->requires(); + set const & req = newlayout->required(); set::const_iterator it = req.begin(); set::const_iterator en = req.end(); for (; it != en; ++it) @@ -3559,7 +3559,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer, p.skip_spaces(); if (!preamble.titleLayoutFound()) preamble.titleLayoutFound(newlayout->intitle); - set const & req = newlayout->requires(); + set const & req = newlayout->required(); for (set::const_iterator it = req.begin(); it != req.end(); ++it) preamble.registerAutomaticallyLoadedPackage(*it); continue; @@ -3576,7 +3576,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer, p.skip_spaces(); if (!preamble.titleLayoutFound()) preamble.titleLayoutFound(newlayout->intitle); - set const & req = newlayout->requires(); + set const & req = newlayout->required(); for (set::const_iterator it = req.begin(); it != req.end(); ++it) preamble.registerAutomaticallyLoadedPackage(*it); continue; @@ -3590,7 +3590,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer, p.skip_spaces(); if (!preamble.titleLayoutFound()) preamble.titleLayoutFound(newlayout->intitle); - set const & req = newlayout->requires(); + set const & req = newlayout->required(); for (set::const_iterator it = req.begin(); it != req.end(); ++it) preamble.registerAutomaticallyLoadedPackage(*it); continue; @@ -4051,11 +4051,16 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer, continue; } - if (t.cs() == "lyxadded" || t.cs() == "lyxdeleted") { + if (t.cs() == "lyxadded" || t.cs() == "lyxdeleted" || t.cs() == "lyxobjdeleted" + || t.cs() == "lyxdisplayobjdeleted" || t.cs() == "lyxudisplayobjdeleted") { context.check_layout(os); + string initials; + if (p.hasOpt()) { + initials = p.getArg('[', ']'); + } string name = p.getArg('{', '}'); string localtime = p.getArg('{', '}'); - preamble.registerAuthor(name); + preamble.registerAuthor(name, initials); Author const & author = preamble.getAuthor(name); // from_asctime_utc() will fail if LyX decides to output the // time in the text language. @@ -4071,7 +4076,6 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer, os << "\n\\change_deleted "; os << author.bufferId() << ' ' << ptime << '\n'; parse_text_snippet(p, os, FLAG_ITEM, outer, context); - bool dvipost = LaTeXPackages::isAvailable("dvipost"); bool xcolorulem = LaTeXPackages::isAvailable("ulem") && LaTeXPackages::isAvailable("xcolor"); // No need to test for luatex, since luatex comes in @@ -4084,9 +4088,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer, preamble.registerAutomaticallyLoadedPackage("pdfcolmk"); } } else { - if (dvipost) { - preamble.registerAutomaticallyLoadedPackage("dvipost"); - } else if (xcolorulem) { + if (xcolorulem) { preamble.registerAutomaticallyLoadedPackage("ulem"); preamble.registerAutomaticallyLoadedPackage("xcolor"); }