Dear LyX developers, thank you for very helpful and powerful code. It seems that LyX has a cyrillic-specific bug.
There are ligatures << and >> for left and right quotes which are defined practically in all cyrillic fonts, at list in cmr and all PostScript or ttf fonts. These ligatures are desroyed by LyX as follows. When LyX imports LaTeX, characters <> are imported "as is", when LyX exports buffer or compiles it, characters <> are substituted by commands \textless and \textgreater. As a result, quoted text, like <<a>>, after importing and exporting/compiling is transformed in damaged text like \textless\textless a\textgreater\textgreater. Such a behaviour is observed for both 1.3.5 stable and 1.4.0 cvs. Replacing of <> by commands was introduced in reLyX 2.8.1.1. ASCII characters < and > can be freely used in both text and math modes. What is a reason to convert them? I tried to mask entires \textgreater and \textgreater in files ...../reLyX/BasicLyX.pm and ..../reLyX/syntax.default, but the characters <> are still substituded by the commands. Can I tune LyX to prevent conversion of < and > ? Alexey Kuznetsov P.S. One can use ERT to prevent splitting of ligatures, but this seems to be a wrong way.
