From: Uwe Stöhr Date: Wed, 26 Oct 2011 01:29:24 +0000 (+0000) Subject: tex2lyx: fix problem that non-empty \date in the preamble would be lost X-Git-Tag: 2.1.0beta1~2483 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6dccac85ce0c673cedf0e8a8766218223468f13a;p=features.git tex2lyx: fix problem that non-empty \date in the preamble would be lost git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39994 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/tex2lyx/preamble.cpp b/src/tex2lyx/preamble.cpp index e988f1af52..6eb0b273ce 100644 --- a/src/tex2lyx/preamble.cpp +++ b/src/tex2lyx/preamble.cpp @@ -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") {