I have recently encountered weird problem. Following code:
\documentclass[14pt, a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{fontspec}
\usepackage[english, serbianc]{babel}
\usepackage{polyglossia}
\setmainlanguage[Script=Cyrillic]{serbian}
\setotherlanguage{english}
\setmainfont{XCharter}
\begin{document}
\begin{serbian}
\begin{abstract}
Чича Ђорђе жваће шљиве. Његова кћи Љиља меша џем. \textsc{АаБбВвГгДд}.
\end{abstract}
\section{Чича Ђорђе: \textsc{АаБбВвГгДд}.}
Чича Ђорђе: \textsc{АаБбВвГгДд}.
\end{serbian}
\begin{english}
\section{\foreignlanguage{serbian}{Чича Ђорђе: \textsc{АаБбВвГгДд}.}}
Чича Ђорђе: \textsc{АаБбВвГгДд}.
\end{english}
\end{document}
renders this result:
As you can see I'm using XChapter that have rich Cyrillic support, however, it's small caps does not work neither within serbian language environment, nor inside abstract, section names, chapter names etc. What is funny is that small caps do work inside body text inside english language environment. I tested with other fonts with good Cyrillic small caps support and same problem happens.
Does anybody have an idea what the problem might be and how can I make XeTex render XChapter small caps correctly within serbian language environment and in abstract body, section names, chapter names, etc.?
Best Answer
It seems an issue with
polyglossia
. By the way, you shouldn't load both it andbabel
, because they fight each other.Also, don't load
fontenc
when using XeLaTeX or LuaLaTeX.You can also use
polyglossia
, if preferred, but in this case you need to help the package by defining a\serbianfont
family (maybe also\serbianfontsf
and\serbianfonttt
).