3

I also have a question about Serbian Cyrillic latter in latex. So I write some code in latex to have Serbian (Latin and Cyrillic) and English language in a same document. Fortunately, in my case when I transform to italic I got Russian Cyrillic letter.

This is my code:

\documentclass{article}
\usepackage[OT2,T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage[serbian,english]{babel}
%\usepackage{serbian-def-cyr}
\input{cyracc.def}
\newcommand\textcyr[1]{{\fontencoding{OT2}\fontfamily{wncyr}\selectfont #1}}

\begin{document}

Text in English.\\ \textit{Ili probaću da pišem kako treba latiničnim pismom.}

\begin{otherlanguage*}{serbian}
\textcyr{\cyracc ja bih bio tamo gde je deda voleo biti. Gde \'ce biti deda?}

\textit{\textcyr{\cyracc ja bih bio tamo gde je deda voleo biti}}
\end{otherlanguage*}

A word and another 
\foreignlanguage{serbian}{\textcyr{\cyracc \textit{slovo}}}

\end{document}

and I got this:

enter image description here

but I would like to have g, d, p and t latter on Serbian Cyrillic like on picture:

enter image description here

Also I'm interested in how can I use just one letter to define one letter in Cyrillic. So here I make alphabet, but I would like to write just š instead sh, or ć instead \'c... etc.

\documentclass{article}
\usepackage[OT2,T1]{fontenc}
\input{cyracc.def}
\newcommand\textcyr[1]{{\fontencoding{OT2}\fontfamily{wncyr}\selectfont #1}}
\begin{document}
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
}
\textcyr{\cyracc \\Ja sam bio kod babe i dede. Tako sam pokushao da uradim neshto lepo.
\\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}

Any help!? Thanks!

5
  • Didn't we have this question yesterday? No, something different, related though: problem with serbian italics
    – Johannes_B
    Commented Apr 9, 2015 at 8:48
  • Yes, but I was add as a comment on another question with similar topic, and not as a single issue. That was the reason of posting this problem again as a question.
    – user75801
    Commented Apr 9, 2015 at 8:51
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
    – Symbol 1
    Commented Apr 9, 2015 at 8:55
  • The wncyr fonts don't support the Serbian variants for italic letters. Only a few OpenType fonts do: Linux Libertine, Old Standard and EB Garamond, for instance. But they require typesetting with XeLaTeX or LuaLaTeX.
    – egreg
    Commented Apr 9, 2015 at 9:02
  • 1
    the definitions in cyracc.def were intended for use with the wncyr fonts, which , as @egreg says, don't support the serbian variants for italic letters. these definitions were devised for a specific purpose: to implement the math reviews conventions for cyrillic transliteration, based on plain tex requirements as of the early 1980s. no single-letter input is possible, nor is it likely to be; cyracc.def should be considered an obsolete artifact, and should be used only for reprocessing existing old documents. Commented Apr 9, 2015 at 13:33

2 Answers 2

3

The Washington University fonts for Cyrillic don't support variant shapes of letters for Serbian.

There is no font available for pdflatex that does, as far as I know.

Some OpenType fonts do support variant shapes for Serbian in the italic font, notably Linux Libertine, Old Standard an EB Garamond, but they need XeLaTeX or LuaLaTeX

You may not be satisfied by the shapes though, but this is just stylistic choice.

For inputting Serbian with the AMS transliteration scheme in XeLaTeX, you can follow my answer at Serbian Cyrillic using LuaTeX and XeTeX

Here's an example document using Old Standard:

\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage[Script=Cyrillic]{serbian}

\setmainfont{Old Standard}
\newfontfamily{\serbianfont}{Old Standard}[
  Mapping=ascii-to-serbian,
  Script=Cyrillic,
  Language=Serbian,
]

\begin{document}

Serbian alphabet again \textserbian{%
A B V G D DJ E Zh Z I J K L LJ M N NJ O P R S T C1 U F Kh C Ch Dzh Sh \\
Ja sam bio kod babe i dede. Tako sam pokushao da uradim neshto lepo. \\
a b v g d dj e zh z i j k l lj m n nj o p r s t c1 u f kh c ch dzh sh}

Also \textserbian{'C 'c D1 d1}

\itshape

Serbian alphabet again \textserbian{%
A B V G D DJ E Zh Z I J K L LJ M N NJ O P R S T C1 U F Kh C Ch Dzh Sh \\
Ja sam bio kod babe i dede. Tako sam pokushao da uradim neshto lepo. \\
a b v g d dj e zh z i j k l lj m n nj o p r s t c1 u f kh c ch dzh sh}

\end{document}

enter image description here

The same, but with EB Garamond instead:

enter image description here

2

You can use cmsrb package:

\documentclass{article}
\usepackage{cmsrb}
\usepackage[OT2,T1]{fontenc}
\usepackage[utf8]{inputenc}
\newcommand\textcyr[1]{{\fontencoding{OT2}\selectfont #1}}

\begin{document}

Serbian alphabet again \dots \textcyr{
A B V G D Đ E Ž Z I J K L LJ M N NJ O P R S T Ć U F H C Č DŽ Š
}
\textcyr{ \\ Ja sam bio kod babe i dede. Tako sam pokušao da uradim nešto lepo.
\\a b v g d đ e ž z i j k l lj m n nj o p r s t ć u f h c č dž š }

\itshape

Serbian alphabet again \dots \textcyr{
A B V G D Đ E Ž Z I J K L LJ M N NJ O P R S T Ć U F H C Č DŽ Š
}
\textcyr{ \\ Ja sam bio kod babe i dede. Tako sam pokušao da uradim nešto lepo.
\\a b v g d đ e ž z i j k l lj m n nj o p r s t ć u f h c č dž š }

\end{document}

Result: cmsrb example

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .