]> git.lyx.org Git - features.git/commitdiff
Fix tex2lyx script output
authorGeorg Baum <baum@lyx.org>
Wed, 11 Mar 2015 21:20:44 +0000 (22:20 +0100)
committerGeorg Baum <baum@lyx.org>
Wed, 11 Mar 2015 21:20:44 +0000 (22:20 +0100)
tex2lyx did not use the InsetLayout for the script insets, so it did not know
that it had to use Plain Layout. However, there is still a possible pitfall:
InsetScript uses a hard coded plain layout for the InsetText constructor, so
if anybody would remove ForcePlain 1 and MultiPar false from the InsetLayout
then LyX would still write script insets with plain layout, but tex2lyx would
output standard layout again.

src/tex2lyx/test/box-color-size-space-align.lyx.lyx
src/tex2lyx/test/test-insets.lyx.lyx
src/tex2lyx/text.cpp

index 1b590c8353af71b7ce7254246b9841a8c23bfc95..b08a0bfc41cecfe649b42f8ad1642fb154487c1c 100644 (file)
@@ -2119,9 +2119,7 @@ from textgreek and textcyr: ἀв
 from subscript: 
 \begin_inset script subscript
 
-\begin_layout Standard
-
-\size normal
+\begin_layout Plain Layout
 4
 \end_layout
 
index 58015616526829321575a483579d54cc7d17ab68..1fb8cdc696f37fd11f9b5d1e6799be107edb85e9 100644 (file)
@@ -6063,7 +6063,7 @@ ow
 
 \begin_inset script superscript
 
-\begin_layout Standard
+\begin_layout Plain Layout
 Wow
 \end_layout
 
@@ -6131,7 +6131,7 @@ TIPA
 e̥ e̊ e̬ e̤ ḛ e̼ e̪ e̺ e̻ e
 \begin_inset script superscript
 
-\begin_layout Standard
+\begin_layout Plain Layout
 h
 \end_layout
 
@@ -6140,7 +6140,7 @@ h
  e̹ e̜ e̟ e̠ e̠ ë e̽ e̩ e̩ e̯ e˞e
 \begin_inset script superscript
 
-\begin_layout Standard
+\begin_layout Plain Layout
 w
 \end_layout
 
@@ -6149,7 +6149,7 @@ w
  e
 \begin_inset script superscript
 
-\begin_layout Standard
+\begin_layout Plain Layout
 j
 \end_layout
 
@@ -6158,7 +6158,7 @@ j
  e
 \begin_inset script superscript
 
-\begin_layout Standard
+\begin_layout Plain Layout
 ɣ
 \end_layout
 
@@ -6167,7 +6167,7 @@ j
  e
 \begin_inset script superscript
 
-\begin_layout Standard
+\begin_layout Plain Layout
 ʕ
 \end_layout
 
@@ -6176,7 +6176,7 @@ j
  e̴ e̝ e̞ e̘ e̙ ẽ e
 \begin_inset script superscript
 
-\begin_layout Standard
+\begin_layout Plain Layout
 n
 \end_layout
 
@@ -6185,7 +6185,7 @@ n
  e
 \begin_inset script superscript
 
-\begin_layout Standard
+\begin_layout Plain Layout
 l
 \end_layout
 
@@ -6867,7 +6867,7 @@ status collapsed
 A sub
 \begin_inset script subscript
 
-\begin_layout Standard
+\begin_layout Plain Layout
 sc
 \emph on
 ript
@@ -6880,7 +6880,7 @@ ript
  and super
 \begin_inset script superscript
 
-\begin_layout Standard
+\begin_layout Plain Layout
 script with 
 \begin_inset Formula $a^2+b^2=c^2$
 \end_inset
index 5a55b87e7f686bf82b0b28eae832f350f0430a60..68f4ec9dd051086b5beec66cee8d68240fef63b0 100644 (file)
@@ -3635,7 +3635,8 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                        context.check_layout(os);
                        begin_inset(os, "script ");
                        os << t.cs().substr(4) << '\n';
-                       parse_text_in_inset(p, os, FLAG_ITEM, false, context);
+                       newinsetlayout = findInsetLayout(context.textclass, t.cs(), true);
+                       parse_text_in_inset(p, os, FLAG_ITEM, false, context, newinsetlayout);
                        end_inset(os);
                        if (t.cs() == "textsubscript")
                                preamble.registerAutomaticallyLoadedPackage("subscript");