]> git.lyx.org Git - features.git/commitdiff
tex2lyx: fix problem that non-empty \date in the preamble would be lost
authorUwe Stöhr <uwestoehr@web.de>
Wed, 26 Oct 2011 01:29:24 +0000 (01:29 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Wed, 26 Oct 2011 01:29:24 +0000 (01:29 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39994 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/preamble.cpp

index e988f1af52dd0093d9bdaa414a2cc4a8b77642b5..6eb0b273ce3fa395830907cd2b8fd8f0c91d410f 100644 (file)
@@ -917,8 +917,11 @@ void parse_preamble(Parser & p, ostream & os,
                        h_paperpagestyle = p.verbatim_item();
 
                else if (t.cs() == "date") {
-                       if (p.verbatim_item().empty())
+                       string argument = p.getArg('{', '}');
+                       if (argument.empty())
                                h_suppress_date = "true";
+                       else
+                               h_preamble << t.asInput() << '{' << argument << '}';
                }
 
                else if (t.cs() == "color") {