From: Uwe Stöhr Date: Wed, 26 Oct 2011 01:38:39 +0000 (+0000) Subject: backporting tex2lyx: the phantom support X-Git-Tag: 2.0.2~121 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b19cfd71eece37d9a8891fbca8c44ea9ef6f2a1e;p=features.git backporting tex2lyx: the phantom support git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@39995 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/tex2lyx/TODO.txt b/src/tex2lyx/TODO.txt index ef2ad02d70..6d2556d529 100644 --- a/src/tex2lyx/TODO.txt +++ b/src/tex2lyx/TODO.txt @@ -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 diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index ff644605df..be0f1a9126 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -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('{', '}');