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
This commit is contained in:
Uwe Stöhr 2011-10-26 01:38:39 +00:00
parent 3e9d409771
commit b19cfd71ee
2 changed files with 14 additions and 1 deletions

View 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

View 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('{', '}');