3

The title says it all... how?

There are a lot of compound Russian words that have a hyphen and they need to be hyphenated just like any other word.

Polyglossia can do this for German with "- and "= and whatnot, but nothing like that for Russian.

A command to insert a non-hyphenation-suppressing-hyphen would be nice, a command to enable hyphenation in all such words by default would be super helpful.

5
  • Does \setdefaultlanguage[babelshorthands=true]{russian} not give you access to "= etc.? Commented Jun 1, 2013 at 16:58
  • Welcome to TeX.SX! You can have a look on our starter guide to familiarize yourself further with our format. Commented Jun 1, 2013 at 17:15
  • You can use babel instead of polyglossia. The most recent version of babel provides "= and works with all engines including xetex and luatex. Commented Jun 1, 2013 at 17:32
  • @brian-ammon: Tried that, no luck. [babelshorthands=true]{german} does work, just like the manual says, but {russian} does not. Commented Jun 1, 2013 at 17:38
  • @IgorKotelnikov: Yeah, babel can do it, but I have other problems with it. Commented Jun 1, 2013 at 17:46

1 Answer 1

1

Babel shorthands work:

\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{russian}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Old Standard}

\begin{document}
\parbox{3pt}{
\hspace{0pt}штаб"-квартиры

\bigskip

\hspace{0pt}Восточно"-Европейской
}
\end{document}

The \hspace{0pt} is used to overcome the usual problem that the first word in a paragraph would not be hyphenated. The \parbox is to force XeLaTeX to hyphenate whenever possible.

enter image description here

4
  • 1
    Thanks. Apparently I was using babelshorthands incorrectly (option is not the same as option=true, silly me). However "- doesn't seem to work as intended. It produces no hyphen when word fits on the line (ВосточноЕвропейской). -"" seems to do the right things however. Commented Jun 1, 2013 at 18:54
  • There was a bug with "- until last year, which would cause the behaviour you’re observing. It’s fixed in TeX Live 2012 (with Polyglossia version 1.2.1). Commented Jun 5, 2013 at 15:25
  • @ArthurReutenauer: perhaps, you need "= rather than "-. Commented Jun 30, 2013 at 11:34
  • @Igor: I don’t need anything myself, I am only reporting a bug that has been fixed in the mean time. In that particular case, updating may help the original poster. Commented Jul 30, 2013 at 13:18

You must log in to answer this question.

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