Dear LyX devels,

The current handling of combining Unicode characters clashes with the
handling of LaTeX font-encoding changes ("textgreek" and "textcyr"
in LYXDIR/unicodesymbols).

Current behaviour
=================

Conversion of a document with combining accents on non-Latin
characters results in these accents placed *before* (instead of *above*)
the to-be-accented character or failure:

          Input      LaTeX                    PDF (look)  text-extract

Latin:    x̃ x̊        \~{x} \r{x}              x̃ x̊         x ˚ ˜x

Greek:    α̃ α̊        \~{\textgreek{a}}        ~α ° α      ˜α ˚α
                     \r{\textgreek{a}}
Kyrillic: и̃ и̊        \~{\textcyr{\char232}}   fails¹
                     \r{\textcyr{\char232}}

Used programs: LyX 1.6.7, pdflatex, evince.


¹ With \usepackage[T2A,T1]{fontenc} in the LaTeX preamble, the PDF
  output is ˜и ˚и and the text extract è ˚è.

  With \usepackage{cmap}\usepackage[T2A,T1]{fontenc}, the PDF looks like
  ~и °и and the text extract is˜и ˚и.

Proposed solution
=================

Inverting font-selection and accent macro in the generated LaTeX source:

Greek:    α̃ α̊        \textgreek{\~a}  \textgreek{\r{a}}

          Due to a re-definition in LyX's Greek font setup, accent-tilde
          (perispomeni) only works with supported chars and only if there
          are no braces around the to-be-accented character.

Kyrillic: и̃ и̊        \textcyr{\~{\cyri}} \textcyr{\r{\cyri}}

          Accenting cyrillic characters requires the use of the symbolic
          names. This works fine with \usepackage[T2A]{fontenc} or
          \input{t2aenc.def} instead of
          \AtBeginDocument{\DeclareFontEncoding{T2A}{}{}} (see
          Document>Settings>LaTeX-Preamble).


This is reported at http://www.lyx.org/trac/ticket/6463
where you can also find the LyX example file
accents-with-greek-and-cyrillic.lyx

Günter


Reply via email to