In Russian hyphenation does not depend on accents, but right now Typst does not hyphenate Russian accented words at all (though words without accents are hyphenated OK). How can it be fixed?
Hello @pantlmn, it would be helpful if you can provide both non-working and working examples! If you don’t receive an answer, don’t hesitate to also create an issue on Issues · typst/typst · GitHub or post below an existing one for your topic.
Hello @quachpas, here is MWE. Combining acute accent should not affect the hyphenation:
#set page( paper: "a8")
#set text(lang: "ru", size: 24pt, hyphenate: true)
Проверочное
Прове́рочное
2 Likes
Here is the solution:
-
Get hyph-ru.tex from my gist.
It contains originalhyph-ru.texmodified according to this post. -
Use this code:
#import "@preview/hy-dro-gen:0.1.2" as hy
#let trie_ru = hy.trie(
tex: read("hyph-ru.tex"),
bounds: (2, 3)
)
#hy.load-patterns(ru: trie_ru)
#show: hy.apply-patterns("ru")
