Am 14.03.2013 11:50, schrieb Guenter Milde:
Babel's Serbian support misses the auto set-up of a cyrillic font encoding present in Babel's support for Russian and other languages using the Cyrillic script. Instead, it relies on the user to hand-insert the T2A option.
Thanks for this info, I wasn't aware of this.
(According to the documentation in my Debian/testing-TeXLive 2012 system, there is no support for Serbian Cyrillic.)
Yes, our Serbian (Cyrillic) support was added after a user informed us what needs to be done. Its main feature is the inputenc. The time we implemented this the fontenc issueseems to be forgotten.
An alternative to the hardcoded changes in C code would be to edit the languages file and add to Language serbian the following code to load the font encoding file and set the font encoding: PostBabelPreamble \input{t2aenc.def} \fontencoding{T2A}\selectfont EndPostBabelPreamble
I think this is the way to go because T2A must be used if Serbian or Kazakh is used no matter what the main language is. however, I'm curious to now why LyX defines \textcyr in the preamble for Cyrillic letters but never uses this command.
thanks and regards Uwe
Günter LyX currently does not do this for Cyrillic and Greek. I propose a change to "unicodesymbols" to use LICRs instead of hard-coded character numbers, e.g. - 0x0410 "\\textcyr{\\char192}" "textcyr" "" # CYRILLIC CAPITAL LETTER A + 0x0410 "\\textcyr{\\cyrA}" "textcyr" "" # CYRILLIC CAPITAL LETTER A so that LyX-converted cyrillic text works in the PDF sidebar. This requires to change the "textcyr" feature to load t2aenc.def either via an option to "fontenc" or via \input{t2anec.def}. A similar change is required for Greek. The "textcyr/textgreek" from "unicodesymbols" should, however, not append the required font encoding to the options, as IMO, the right thing would be to include a cyrillic font encoding in the fontenc options via the "textcyr" option of "unicodesymbols": pseudo code: for fe in ("T2A", "T2B", "T2C", "X2"): if fe in font_encodings: return font_encodings.append("X2") Maybe we also need