4

How can I use LuaLatex/XeLaTex with KOMA-script for Cyrillics? When I try to write:

\documentclass[twoside]{scrartcl}
\usepackage{polyglossia}
\newfontfamily\cyrillicfont{CMU Serif}
\usepackage{microtype}
\setmainlanguage{ukrainian}
\usepackage{lipsum}
\author{А.В. Тор}
\title{Великий об'єм }
\begin{document}
\maketitle
\section{Перший}
\lipsum[1-2]
\end{document}

I get a lot of errors Package polyglossia Error: The current roman font does not contain the Cyrill(polyglossia) Please define \cyrillicfont with \newfontfamily.

6

The error message is indeed far from clear, but the issue is that there's no coverage of Cyrillic in the default sans serif font.

Note that scrartcl uses sans serif font for the titles, by default. So you need to set a Cyrillic font also for sans serif, naming it \cyrillicfontsf.

A similar problem would raise also for the typewriter type family: set \cyrillicfonttt for it.

\documentclass[twoside]{scrartcl}

\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{microtype}
\usepackage{lipsum}

\newfontfamily\cyrillicfont{CMU Serif}[Script=Cyrillic]
\newfontfamily\cyrillicfontsf{CMU Sans Serif}[Script=Cyrillic]

\setmainlanguage{ukrainian}

\begin{document}
\author{А.В. Тор}
\title{Великий об'єм }
\maketitle
\section{Перший}
\lipsum[1-2]
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.