Am 16.03.2013 16:24, schrieb Guenter Milde:
Besides try-and error with different Cyrillic-using languages, you can
also look into Babel's *.ldf files for the respective languages. For
example russian.ldf comes with code to set the font encoding to one of
the Cyrillic encodings (OT2, T2A, T2B, T2C, X2). This may be missing in
some cases - where the user is expected to do this "by hand", usually by
giving the respective font encoding as last argument to "fontenc". This
should also be documented in the Babel documentation.
Many thanks for this info. I had a closer look and that Serbian does not load T2A is because this
babel file is designed for Latin Serbian only - as you already pointed out.
For Kazakh there is no babel file available at all, but a colleague of mine is from Kazakhstan and I
will ask him to create one.
I see. But LyX defines \textcyr in the preamble. Why is it not used
for the text?
LyX assumes Babel to set the correct font encoding for Cyrillic-using
languages. \textcyr is inserted if you use Cyrillic characters in a
"non-Cyrillic" language like German or English.
Ah, thanks.
With Serbian (Cyrillic) this means something like
PostBabelPreamble
\input{t2aenc.def}
\AtBeginDocument{\fontencoding{T2A}\selectfont}
\addto\extrasserbian{\fontencoding{T2A}\selectfont}
EndPostBabelPreamble
(check with the documentation whether \extrasserbian exists and is
supported.)
This still does not solve the issue with Latin script for auto-generated
strings (Glava for Chapter, etc.).
Yes, but better than having a non-compilable document as this is the case now. The correct name with
Cyrillic letters can be set by the users in the preamble.
So to provide at least a basic Serbian Cyrillic support, I propose to commit your change, see
attached. OK?
Therefore, the better idea would be to add a serbian-cyrillic ldf file
which should be a merger of serbian.ldf, with Cyrillic auto-strings and
the font encoding code from russian.ldf.
The new Babel maintainer is open for contributions.
http://www.ctan.org/pkg/babel-beta/
Good to know. I thought babel is dead. I know the new babel maintainer and will contact him to
create a Serbian Cyrillic and Kazakh ldf-file.
For other Cyrillic-using languages the state of the art must be checked and
accounted for individually.
I checked them and only the 2 I mentioned are not yet supported. For the supported ones there is no
need to take explicitly care for the fontenc.
best regards
Uwe
diff --git "a/C:\\DOCUME~1\\usti\\LOCALS~1\\Temp\\TortoiseGit\\lanD.tmp\\languages-d883ce5-left" "b/D:\\LyXGit\\Master\\lib\\languages"
index f8bcaa1..66ca2d9 100644
--- "a/C:\\DOCUME~1\\usti\\LOCALS~1\\Temp\\TortoiseGit\\lanD.tmp\\languages-d883ce5-left"
+++ "b/D:\\LyXGit\\Master\\lib\\languages"
@@ -600,6 +600,10 @@ Language kazakh
GuiName "Kazakh"
Encoding pt154
LangCode kk_KZ
+ PostBabelPreamble
+ \input{t2aenc.def}
+ \AtBeginDocument{\fontencoding{T2A}\selectfont}
+ EndPostBabelPreamble
End
Language korean
@@ -813,6 +817,12 @@ Language serbian
QuoteStyle german
Encoding iso8859-5
LangCode sr_RS
+ PostBabelPreamble
+ \input{t2aenc.def}
+ \AtBeginDocument{\fontencoding{T2A}\selectfont}
+ \addto\extrasserbian{\fontencoding{T2A}\selectfont}
+ EndPostBabelPreamble
+
End
Language serbian-latin