Serbian Latin & Cyrillic Script

I suggest using UTF-8 input. The only problem is with “Dž” and “dž” that should be input \DZ and \dz respectively.

\documentclass{article}
\usepackage[OT2,OT1]{fontenc}
\usepackage[english,serbian]{babel}

\DeclareTextCompositeCommand{\v}{OT2}{C}{Ch}
\DeclareTextCompositeCommand{\v}{OT2}{c}{ch}
\DeclareTextCompositeCommand{\v}{OT2}{S}{Sh}
\DeclareTextCompositeCommand{\v}{OT2}{s}{sh}
\DeclareTextCompositeCommand{\v}{OT2}{Z}{Zh}
\DeclareTextCompositeCommand{\v}{OT2}{z}{zh}
\DeclareTextCompositeCommand{\'}{OT2}{C}{C1}
\DeclareTextCompositeCommand{\'}{OT2}{c}{c1}
\DeclareTextCommand{\DJ}{OT2}{Dj}
\DeclareTextCommand{\dj}{OT2}{dj}
\DeclareTextCommand{\DZ}{OT1}{Dž}
\DeclareTextCommand{\DZ}{OT2}{D2}
\DeclareTextCommand{\dz}{OT1}{dž}
\DeclareTextCommand{\dz}{OT2}{d2}

\makeatletter
\g@addto@macro\@uclclist{\dj\DJ\dz\DZ}
\makeatother

\begin{document}

Možda Novak Đoković može da osvoji meć protiv Nadala na šljaci.

{\footnotesize\MakeUppercase{Možda Novak Đoković može da osvoji meć protiv Nadala na šljaci.}\par}

A B C Č Ć D \DZ\ Đ E F G H I J K L Lj M N Nj O P R S Š T U V Z Ž

a b c č ć d \dz\ đ e f g h i j k l lj m n nj o p r s š t u v z ž

\MakeUppercase{a b c č ć d \dz\ đ e f g h i j k l lj m n nj o p r s š t u v z ž}

\bigskip

\fontencoding{OT2}\selectfont

Možda Novak Đoković može da osvoji meć protiv Nadala na šljaci.

{\footnotesize\MakeUppercase{Možda Novak Đoković može da osvoji meć protiv Nadala na šljaci.}\par}

A B V G D Đ E Ž Z I J K L Lj M N Nj O P R S T Ć U F H C Č \DZ\ Š

a b v g d đ e ž z i j k l lj m n nj o p r s t ć u f h c č \dz\ š

\MakeUppercase{a b v g d đ e ž z i j k l lj m n nj o p r s t ć u f h c č \dz\ š}

\end{document}

enter image description here

A proper solution would be to use XeLaTeX, though, see https://tex.stackexchange.com/a/44740/4427


For Serbian language the best option is to use the cmsrb package. You will also get the correct italic shape of Cyrillic italic letters.

\documentclass{article}
\usepackage{cmsrb}
\usepackage[OT2,T1]{fontenc} %better to use T1, but OT1 will also work
\usepackage[serbian]{babel}
\begin{document}

Mo\v{z}da Novak \DJ{}okovi\'{c} mo\v{z}e da osvoji me\v{c} protiv Nadala na \v{s}ljaci.

\textit{abc\v c\'cdd\v z\dj efghijklljmnnjoprs\v stuvz\v z}

\fontencoding{OT2}\selectfont

Mo\v{z}da Novak \DJ{}okovi\'{c} mo\v{z}e da osvoji me\v{c} protiv Nadala na \v{s}ljaci.

\textit{abc\v c\'cdd\v z\dj efghijklljmnnjoprs\v stuvz\v z}

\end{document}

cmsrb Example

This will also work with UTF-8 input.