]> git.lyx.org Git - features.git/commitdiff
- tex2lyx/text.cpp: a fix for subfloat support
authorUwe Stöhr <uwestoehr@web.de>
Thu, 27 Oct 2011 13:00:09 +0000 (13:00 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Thu, 27 Oct 2011 13:00:09 +0000 (13:00 +0000)
- 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
src/tex2lyx/text.cpp

index 72f606643f99c01fa979f177dc4302860308b5dd..f698ca4d3347748d51561c60632ae61e97422254 100644 (file)
@@ -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}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 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
index df639dbc00729b14c07d5dd7cd87c88dcf12f244..363816991b674dbd622677c74ce84c908b826afe 100644 (file)
@@ -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"