]> git.lyx.org Git - features.git/commitdiff
Handle \textgreek commands from unicodesymbols
authorGeorg Baum <baum@lyx.org>
Tue, 30 Dec 2014 17:12:35 +0000 (18:12 +0100)
committerGeorg Baum <baum@lyx.org>
Tue, 30 Dec 2014 17:12:35 +0000 (18:12 +0100)
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.

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

index 40a250a5a65525b520f891df9416f9041859df18..1484d6279c261f04f2d00e0f4178121958c211c6 100644 (file)
@@ -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
index f1537df41135f9de9f31db60a7688dd5813080d3..c0380f84a6e95220d1e68a573d58fa58f0ed0821 100644 (file)
@@ -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") {