Some alphabets, like the cyrillic, manage acute accented vowels by the help of unicode character 0301, the combining acute accent. This can lead to hyphenation problems, because the hyphenation character sometimes is placed between the vowel and the accent character, resulting in a misplacement of the accent like in the following example (compiled in LuaLaTex):
The word 'со́гре́ши́вши́я' is correctly hyphenated: 'о' 'U0301' - 'г'
The word 'при́сно́' has instead an incorrect hyphenation: 'и' - 'U0301' 'с'
resulting in the misplacement of the accent at the beginning of the forth line.
Actually the problem can be locally avoided driving the hyphenation with the usual при́\-сно́
, but I want to avoid this bug globally.
NOTE: this question is partially issued in the question Avoid hyphenation around a specific character, but I can't see how the command \lccode
can handle combining accents.
This is the reference code:
\documentclass[a5paper]{memoir}
\usepackage[russian]{babel}
\usepackage{fontspec}
\setmainfont{Linux Libertine}
\setlength{\spinemargin}{55mm}
\setlrmarginsandblock{\spinemargin}{*}{1}
\checkandfixthelayout
\newcommand\TextRus{ди́це́, при́зри́ на́ лю́ди́ со́гре́ши́вши́я, яви́ я́ко́ при́сно́ си́лу Тво́ю: при́зыва́е́м.}
\begin{document}
\begin{hyphenrules}{russian}
\noindent\TextRus
\end{hyphenrules}
\end{document}