Author: uwestoehr
Date: Thu Oct 27 15:00:09 2011
New Revision: 40035
URL: http://www.lyx.org/trac/changeset/40035

Log:
- tex2lyx/text.cpp: a fix for subfloat support
- tex2lyx: some testfile tweaks

Modified:
   lyx-devel/trunk/src/tex2lyx/test/test-structure.tex
   lyx-devel/trunk/src/tex2lyx/text.cpp

Modified: lyx-devel/trunk/src/tex2lyx/test/test-structure.tex
==============================================================================
--- lyx-devel/trunk/src/tex2lyx/test/test-structure.tex Thu Oct 27 14:54:14 
2011        (r40034)
+++ lyx-devel/trunk/src/tex2lyx/test/test-structure.tex Thu Oct 27 15:00:09 
2011        (r40035)
@@ -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

Modified: lyx-devel/trunk/src/tex2lyx/text.cpp
==============================================================================
--- lyx-devel/trunk/src/tex2lyx/text.cpp        Thu Oct 27 14:54:14 2011        
(r40034)
+++ lyx-devel/trunk/src/tex2lyx/text.cpp        Thu Oct 27 15:00:09 2011        
(r40035)
@@ -1084,6 +1084,8 @@
                // 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"

Reply via email to