From 1ddf94a1565cd9f2b3358513907e3c408b13f107 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Fri, 24 Aug 2018 09:39:46 +0200 Subject: [PATCH] tex2lyx: also support rotated xltabulars --- src/tex2lyx/Context.cpp | 2 +- src/tex2lyx/Context.h | 4 ++-- src/tex2lyx/table.cpp | 5 +---- src/tex2lyx/text.cpp | 11 ++++++----- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/tex2lyx/Context.cpp b/src/tex2lyx/Context.cpp index 5112401b08..f28911a3c5 100644 --- a/src/tex2lyx/Context.cpp +++ b/src/tex2lyx/Context.cpp @@ -85,7 +85,7 @@ Context::Context(bool need_layout_, new_layout_allowed(true), merging_hyphens_allowed(true), textclass(textclass_), layout(layout_), parent_layout(parent_layout_), - font(font_), rotlongtable(false) + font(font_), tablerotation(0) { if (!layout) layout = &textclass.defaultLayout(); diff --git a/src/tex2lyx/Context.h b/src/tex2lyx/Context.h index 4fd1ff28bb..64d69e3561 100644 --- a/src/tex2lyx/Context.h +++ b/src/tex2lyx/Context.h @@ -165,8 +165,8 @@ public: TeXFont font; /// font attributes of normal text static TeXFont normalfont; - /// A rotated longtable - bool rotlongtable; + /// Table rotation angle + int tablerotation; private: void begin_layout(std::ostream & os, Layout const * const & l); diff --git a/src/tex2lyx/table.cpp b/src/tex2lyx/table.cpp index c432a2c35f..8beeb2d28f 100644 --- a/src/tex2lyx/table.cpp +++ b/src/tex2lyx/table.cpp @@ -1416,13 +1416,10 @@ void handle_tabular(Parser & p, ostream & os, string const & name, //cerr << "// output what we have\n"; // output what we have - string rotate = "0"; - if (is_long_tabular && context.rotlongtable) - rotate = "90"; os << "\n\n"; os << "