]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/text.cpp
* Added conversion of latex macros with optional parameters
[lyx.git] / src / tex2lyx / text.cpp
index 1993098ff64dd19dbd1a92cf25768db5d01411d7..f49012a55941e2760996d1f3ee760a593ce798e6 100644 (file)
 #include <config.h>
 
 #include "tex2lyx.h"
+
 #include "Context.h"
-#include "Layout.h"
 #include "FloatList.h"
-#include "lengthcommon.h"
+#include "Layout.h"
+#include "Length.h"
+
 #include "support/lstrings.h"
 #include "support/convert.h"
 #include "support/filetools.h"
 
-#include <boost/filesystem/operations.hpp>
 #include <boost/tuple/tuple.hpp>
 
 #include <iostream>
@@ -52,8 +53,6 @@ using support::suffixIs;
 using support::contains;
 using support::subst;
 
-namespace fs = boost::filesystem;
-
 
 void parse_text_in_inset(Parser & p, ostream & os, unsigned flags, bool outer,
                Context const & context)
@@ -2318,14 +2317,10 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                                           opt1 + opt2 +
                                           '{' + p.verbatim_item() + '}';
 
-                       if (opt2.empty()) {
-                               context.check_layout(os);
-                               begin_inset(os, "FormulaMacro");
-                               os << "\n" << ert;
-                               end_inset(os);
-                       } else
-                               // we cannot handle optional argument, so only output ERT
-                               handle_ert(os, ert, context);
+                       context.check_layout(os);
+                       begin_inset(os, "FormulaMacro");
+                       os << "\n" << ert;
+                       end_inset(os);
                }
 
                else if (t.cs() == "vspace") {