[texhax] Serbian Cyrillic characters

Barbara Beeton bnb at ams.org
Mon Jan 25 22:48:22 CET 2010


dear pedrag,

    After almost 15 years or so I am trying to write something in my 
    native Serbian Cyrillic alphabet. Unfortunately I am having problems
    getting two characters. Namely

    \documentclass{article}
    \usepackage[OT2,T1]{fontenc}
    \newcommand\textcyr[1]{{\fontencoding{OT2}\fontfamily{wncyr}\selectfont #1}}
    \begin{document}
    Serbian alphabet \dots \textcyr{
    A B V G D DJ E Zh Z I J K L LJ M N NJ O P R S T \'C U F Kh C Ch \Dzh Sh
    } 
    \end{document}

    should produce the complete Serbian alphabet. Unfortunately, I can not
    get \'C and \Dzh. Those should be cyr2 fonts as they are non-existing 
    in Russian and Ukrainian languages. I tried removing escape character and
    couple other things like including amsfonts. I have the same problem 
    if I use Babel package which works like a charm for Russian.
    I also have a patch SerbianC for Babel but it requires Serbian keyboard
    and Unicode editor which I have not seen in more than 15 years.

    Could you kindly point me to the relevant documentation.

since the wncyr fonts are part of the
amsfonts collection, and i happen to have
been responsible for much of the original
macro implementation, i went back to the
amsfonts documentation:
  ftp://ftp.ams.org/pub/tex/doc/amsfonts/amsfndoc.pdf

it's too old to cover usage in latex
properly, but the clue is on p.15.
here is a patched version of your file
that does produce the two missing letters.

\documentclass{article}
\usepackage[OT2,T1]{fontenc}
\input{cyracc.def}
\newcommand\textcyr[1]{{\fontencoding{OT2}\fontfamily{wncyr}\selectfont #1}}
\begin{document}S
Serbian alphabet \dots \textcyr{
A B V G D DJ E Zh Z I J K L LJ M N NJ O P R S T \'C U F Kh C Ch \Dzh Sh
} 

Serbian alphabet again \dots \textcyr{\cyracc
A B V G D DJ E Zh Z I J K L LJ M N NJ O P R S T \'C U F Kh C Ch \Dzh\ Sh
} 
\end{document}

it's not beautiful, but it works.  it would,
of course, be better to insert \cyracc in
the \textcyr definition.  i did it this way
to show the difference with and without.

note that i've added a backslash after \Dzh
so that it doesn't run into the next letter.

good luck with this.
						-- bb


More information about the texhax mailing list