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.

0

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .