On 2013-03-19, Uwe Stöhr wrote:
> Am 19.03.2013 12:27, schrieb Guenter Milde:

> I found now a babel support for Serbian Cyrillic:
> http://www.ctan.org/tex-archive/macros/latex/contrib/babel-contrib/serbianc

> it works fine, the same as the other non-native babel support files
> like e.g. for Lithuanian, Mongolian, etc.

This is nice to know.

However, as these are "optional" contributed files we should add checks
for the language support and some feedback.

Thinking about it, I realize that also the basic support for other languages
is optional -- my Debian system has lots of "texlive-language-*" packages.
I don't think we should completely disable using a language that is not
properly supported, but a warning would be in place.


> I had a look in the ldf-files for Cyrillic. They contain a lot of code
> I don't understand, so i fear I cannot go on with Kazakh support.

...

>> So, maybe for the time beeing it could be better to just exclude Kazach from
>> the "Cyrillic languages" to let the "textcyr" feature work.

> Sounds reasonable but I don't know enough if this could have
> side-effects. But as Kazakh documents are currently not translatable,
> we cannot do much wrong.

Yes, Kazakh seems only supported with Polyglossia and should be marked as
unsupported with Babel.


Some test revealed, that the "textcyr" and "textgreek" features do not
consider the current language. Instead they 

* fail whenever a font-encoding switch is required but the character does
  not need translating (e.g. with utf-8 or koi-something).
  
  E.g.
  
    \documentclass[ngerman,russian]{article}
    \usepackage{lmodern}
    \usepackage[T2A,T1]{fontenc}
    \usepackage[utf8]{inputenc}
    \usepackage{babel}
    
    \begin{document}
    
     Ш = SCH
    
    \selectlanguage{ngerman} SCH = Ш 
    
    \end{document}
    
  fails with
  
    ! LaTeX Error: Command \CYRSH unavailable in encoding T1.

  but works OK with 

    \selectlanguage{ngerman} SCH = \textcyrillic{Ш}

  
* insert a spurious font-encoding switch if the character needs translating
  but the font-encoding is OK.

    \textcyr{\char216} = SCH
    
  for the russian line in ASCII, where
    
    \CYRSH = SCH
  
  would be the correct choice.
  
I suggest to add a "font encoding" or "script" tag to the language
descriptions so that e.g. Russian can be marked as

   script: cyrillic
   
or 
  
   font-encoding: T2A
   
in the "languages" files and this info be used by the "textcyr" and
"textgreek" features.

Günter        

Reply via email to