# Theorem environment under polyglossia

How to set theorem header font to be normal+bold and theorem body font to be normal+italic in the example below? If I remove the lines starting with \usepackage{fontspec} and ending with \newfontfamily{\serbianfonttt}{DejaVu Serif}, then I get what I need.

\documentclass[10pt, b5paper]{book}

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

\newfontfamily{\serbianfont}[Mapping=ascii-to-serbian, Script=Cyrillic, Language=Serbian]{DejaVu Serif}
\newfontfamily{\serbianfonttt}{DejaVu Serif}

\usepackage{amssymb, amsmath}

\usepackage{ntheorem}
\usepackage[framemethod=default]{mdframed}

\theorembodyfont{\slshape}
\theoremseparator{.}
\newtheorem{teorema}{Teorema}[section]

\begin{document}
\begin{teorema}
ssssssddd
\end{teorema}
\end{document}


Set the main and mono font instead. If you want italics, use \itshape rather than \slshape.

\documentclass[10pt, b5paper]{book}

\usepackage{amssymb, amsmath}

\usepackage{fontspec}
\usepackage{polyglossia}

\usepackage{ntheorem}
\usepackage[framemethod=default]{mdframed}

\setmainlanguage[Script=Cyrillic]{serbian}
\setotherlanguage{english}

\setmainfont{DejaVu Serif}[
Mapping=ascii-to-serbian,
Script=Cyrillic,
Language=Serbian,
]
\setmonofont{DejaVu Serif}

\theorembodyfont{\itshape}
\theoremseparator{.}
\newtheorem{teorema}{Teorema}[section]

\begin{document}

\begin{teorema}
abcde fghijk lmnop qrstu vwxyz
č ć š ž dj
\end{teorema}

\end{document}


• Thx! But now if I insert sections, like \section{Sec}, I receive Package polyglossia Error: The current roman font does not contain the Cyrill(polyglossia) Please define \cyrillicfont with \newfontfamily. \section{Sec} . In addition, after applying your suggestion,I have noticed a long time for compiling the whole document (200 pages) counting around 50 sec. – Zoran Aug 18 '17 at 16:30
• Me again. It seems that if I remove \usepackage{fancyvrb} and \usepackage{inconsolata}, then it compiles without errors (I did not inspect which of them caused the problem). But still, compiling procedure is too long, which is very unplesent (before I applied your suggestion, it took around 7-8 sec). – Zoran Aug 18 '17 at 16:47
• @Zoran Your code loads neither fancyvrb nor Inconsolata. I get no error about \cyrillicfont. – egreg Aug 18 '17 at 17:11
• I am speaking about the code in the whole document not in a short example. Anyway, I also noticed that if I insert \DeclareMathAlphabet{\mathgot}{U}{euf}{m}{n} in the shortcode preamble, and $$\lim$$ in the document body, then I get lim written cyrilic (contrary to the previous situation). – Zoran Aug 18 '17 at 17:41
• @Zoran I understand that, but I can't see your bigger document. – egreg Aug 18 '17 at 17:44