I was following this example
\documentclass[12pt,a4paper]{report}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{amsthm}
\usepackage{thmtools}
\usepackage{lipsum}% just to generate text for the example
\usepackage[T1,T2A]{fontenc}
\usepackage[cp1251]{inputenc}
\usepackage[serbianc,english]{babel}
% example style
\declaretheoremstyle[
headfont=\bfseries,
notebraces={[}{]},
bodyfont=\normalfont\itshape,
headpunct={},
postheadspace=\newline,
postheadhook={\textcolor{red}{\rule[.6ex]{\linewidth}{0.4pt}}\\},
spacebelow=\parsep,
spaceabove=\parsep,
mdframed={
backgroundcolor=red!20,
linecolor=red!30,
innertopmargin=6pt,
roundcorner=5pt,
innerbottommargin=6pt,
skipabove=\parsep,
skipbelow=\parsep }
]{myexamplestyle}
% example environment - thmtools
\declaretheorem[
style=myexamplestyle,
name=Примјер,
numberwithin=chapter
]{example}
\begin{document}
\chapter{Test}
\begin{example}[Additional text]
\lipsum[4]
\end{example}
\end{document}
where trying to put Cyrillic name "Примјер" as a name for the 'example', but it does not work. I don't know how to allow T2A encoding within \declaretheorem. Could someone assist me?
cp1251? Isn't UTF-8 better? – egreg Jan 19 '16 at 16:40