commit d1e530cf5dfe5fcb6a467b3d77273cd0050036f2
Author: Georg Baum <[email protected]>
Date:   Tue Dec 30 18:12:35 2014 +0100

    Handle \textgreek commands from unicodesymbols
    
    This is the second part of bug #8553: The symbols defined in unicodesymbols
    are now detected correctly and converted to unicode, so no ERT anymore.

diff --git a/src/tex2lyx/test/box-color-size-space-align.lyx.lyx 
b/src/tex2lyx/test/box-color-size-space-align.lyx.lyx
index 40a250a..1484d62 100644
--- a/src/tex2lyx/test/box-color-size-space-align.lyx.lyx
+++ b/src/tex2lyx/test/box-color-size-space-align.lyx.lyx
@@ -2120,39 +2120,7 @@ from textcomp: №™
 \begin_layout Standard
 
 \size normal
-from textgreek and textcyr: 
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-textgreek
-\end_layout
-
-\end_inset
-
-
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-{
-\end_layout
-
-\end_inset
-
->a
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-}
-\end_layout
-
-\end_inset
-
-в
+from textgreek and textcyr: ἀв
 \end_layout
 
 \begin_layout Standard
diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp
index f1537df..c0380f8 100644
--- a/src/tex2lyx/text.cpp
+++ b/src/tex2lyx/text.cpp
@@ -4552,8 +4552,9 @@ void parse_text(Parser & p, ostream & os, unsigned flags, 
bool outer,
                        // Only use text mode commands, since we are in text 
mode here,
                        // and math commands may be invalid (bug 6797)
                        string name = t.asInput();
-                       // handle the dingbats and Cyrillic
-                       if (name == "\\ding" || name == "\\textcyr")
+                       // handle the dingbats, cyrillic and greek
+                       if (name == "\\ding" || name == "\\textcyr" ||
+                           (name == "\\textgreek" && 
!preamble.usePolyglossia()))
                                name = name + '{' + p.getArg('{', '}') + '}';
                        // handle the ifsym characters
                        else if (name == "\\textifsymbol") {

Reply via email to