]> git.lyx.org Git - features.git/commitdiff
backporting tex2lyx: the phantom support
authorUwe Stöhr <uwestoehr@web.de>
Wed, 26 Oct 2011 01:38:39 +0000 (01:38 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Wed, 26 Oct 2011 01:38:39 +0000 (01:38 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@39995 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/TODO.txt
src/tex2lyx/text.cpp

index ef2ad02d70ca1110ca8bbb99ec44348430c2c0f6..6d2556d5292ce1d9279f6f5dc3c923d77500b936 100644 (file)
@@ -50,7 +50,6 @@ Format LaTeX feature                        LyX feature
 336    ?                                    \font_cjk
 343    ?                                    \use_default_options
 347    tabular valign                       InsetTabular
-348    \phantom, \hphantom, \vphantom       InsetPhantom
 350    ?                                    \default_output_format
 353    \printsubindex                       InsetIndex
 354    \printindex*, \printsubindex*        InsetIndex
index ff644605df1bf93a353d4f881b54a64ceb64ab39..be0f1a9126a3a4cfec5b03e199f6b0bac840ae9f 100644 (file)
@@ -2431,6 +2431,20 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                        os << "\n\\" << t.cs() << " default\n";
                }
 
+               else if (t.cs() == "phantom" || t.cs() == "hphantom" ||
+                            t.cs() == "vphantom") {
+                       context.check_layout(os);
+                       if (t.cs() == "phantom")
+                               begin_inset(os, "Phantom Phantom\n");
+                       if (t.cs() == "hphantom")
+                               begin_inset(os, "Phantom Hhantom\n");
+                       if (t.cs() == "vphantom")
+                               begin_inset(os, "Phantom Vhantom\n");
+                       os << "status open\n";
+                       parse_text_in_inset(p, os, FLAG_ITEM, outer, context);
+                       end_inset(os);
+               }
+               
                else if (t.cs() == "lyxline") {
                        // swallow size argument (it is not used anyway)
                        p.getArg('{', '}');