From a3e5f3cd47f0264fd9d611d7080b3de4b5fa6b20 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Thu, 27 Oct 2011 13:00:09 +0000 Subject: [PATCH] - tex2lyx/text.cpp: a fix for subfloat support - tex2lyx: some testfile tweaks git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40035 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/tex2lyx/test/test-structure.tex | 8 +++----- src/tex2lyx/text.cpp | 2 ++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tex2lyx/test/test-structure.tex b/src/tex2lyx/test/test-structure.tex index 72f606643f..f698ca4d33 100644 --- a/src/tex2lyx/test/test-structure.tex +++ b/src/tex2lyx/test/test-structure.tex @@ -1,6 +1,6 @@ %% LyX trick_preamble_code_into_believing_that_this_was_created_by_lyx created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. -\documentclass[legalpaper,french,german,english]{article} +\documentclass[legalpaper,french,german,english,dummyoption]{article} \usepackage[latin9]{inputenc} \usepackage{color} \usepackage{rotfloat} @@ -29,10 +29,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. \newenvironment{foo}{==[}{]==} -% LyX will also recognize this command: -% \@ifundefined{date}{}{\date{}} -% and also this: -% \date{} +\date{} \@ifundefined{showcaptionsetup}{}{% \PassOptionsToPackage{caption=false}{subfig}} @@ -49,6 +46,7 @@ \title{Title} +% this should be recognized as empty date: \date{} \maketitle diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index df639dbc00..363816991b 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -1084,6 +1084,8 @@ void parse_environment(Parser & p, ostream & os, bool outer, // we must make sure that the next item gets a \begin_layout. parent_context.new_paragraph(os); p.skip_spaces(); + // the float is parsed thus delete the type + float_type = ""; } else if (unstarred_name == "sidewaysfigure" -- 2.39.2