From: Georg Baum Date: Tue, 30 Dec 2014 17:12:35 +0000 (+0100) Subject: Handle \textgreek commands from unicodesymbols X-Git-Tag: 2.2.0alpha1~1400 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d1e530cf5dfe5fcb6a467b3d77273cd0050036f2;p=features.git 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 40a250a5a6..1484d6279c 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 f1537df411..c0380f84a6 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") {