From 6dccac85ce0c673cedf0e8a8766218223468f13a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Wed, 26 Oct 2011 01:29:24 +0000 Subject: [PATCH] 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 --- src/tex2lyx/preamble.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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") { -- 2.39.2