From 7439464374fb1ac8a52e43bdb15209b8561cb308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20St=C3=B6hr?= Date: Wed, 26 Oct 2011 21:47:27 +0000 Subject: [PATCH] backporting tex2lyx: the support for strike out and underlined (by Georg) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40022 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/tex2lyx/TODO.txt | 2 -- src/tex2lyx/preamble.cpp | 6 ++++++ src/tex2lyx/text.cpp | 11 ++++++++++- status.20x | 2 ++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/tex2lyx/TODO.txt b/src/tex2lyx/TODO.txt index 151f56c99c..5b40782073 100644 --- a/src/tex2lyx/TODO.txt +++ b/src/tex2lyx/TODO.txt @@ -50,8 +50,6 @@ Format LaTeX feature LyX feature 350 ? \default_output_format 353 \printsubindex InsetIndex 354 \printindex*, \printsubindex* InsetIndex -355 \sout fonts -356 \uuline, \uwave fonts 358 custom bibtex command \bibtex_command 358 custom makeindex command \index_command 363 horizontal longtable alignment InsetTabular diff --git a/src/tex2lyx/preamble.cpp b/src/tex2lyx/preamble.cpp index 58c82f077e..6dbc6eda4e 100644 --- a/src/tex2lyx/preamble.cpp +++ b/src/tex2lyx/preamble.cpp @@ -628,6 +628,12 @@ void handle_package(Parser &p, string const & name, string const & opts, else if (name == "setspace") ; // ignore this +#if 0 + // do not ignore as long as we don't support all commands (e.g. \xout is missing) + else if (name == "ulem") + ; // ignore this +#endif + else if (name == "geometry") ; // Ignore this, the geometry settings are made by the \geometry // command. This command is handled below. diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index d6b22bcc66..3ead579014 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -2423,7 +2423,16 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer, os << "\n\\bar default\n"; } - else if (t.cs() == "emph" || t.cs() == "noun") { + else if (t.cs() == "sout") { + context.check_layout(os); + os << "\n\\strikeout on\n"; + parse_text_snippet(p, os, FLAG_ITEM, outer, context); + context.check_layout(os); + os << "\n\\strikeout default\n"; + } + + else if (t.cs() == "uuline" || t.cs() == "uwave" || + t.cs() == "emph" || t.cs() == "noun") { context.check_layout(os); os << "\n\\" << t.cs() << " on\n"; parse_text_snippet(p, os, FLAG_ITEM, outer, context); diff --git a/status.20x b/status.20x index 434b75e21e..00a6268a3f 100644 --- a/status.20x +++ b/status.20x @@ -54,6 +54,8 @@ What's new - recognized custom width for nomenclature list (\printnomenclature) +- all types of underlined or striked out text are recognized + * USER INTERFACE