reutenauer / polyglossia

An alternative to Babel for XeLaTeX and LuaLaTeX
http://www.ctan.org/pkg/polyglossia
MIT License
185 stars 52 forks source link

babel shorthands / TeX ligatures broken in language=russian? #631

Closed yurytch closed 4 months ago

yurytch commented 4 months ago

How are '--' and '---' and " U+0022 and suchlike supposed to work in Russian language?

In the following MWE, if I set the 'english' option for polyglossia I get endash and emdash and 'upper 99' quotemarks and cyrillics typeset too, but with the 'russian' option, both with and without 'babelshorthands' option I get literal '--' and '---' and " U+0022 in the output.

I've tried to read #445 which is what the search engine suggests, but lost the thread quickly.

My tex distro is 2023 texlive in xetex mode.

The MWE:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Liberation Serif}[Ligatures=TeX]
\newfontfamily\cyrillicfont{Liberation Serif}[Script=Cyrillic]
\usepackage{polyglossia}
\setdefaultlanguage[babelshorthands=true]{russian}
%\setdefaultlanguage{english}
% tested with: \ProvidesPackage{polyglossia}[2023/02/11 v1.60
\begin{document}

................  кириллица

-- ~ "en-dash"

--- ~ "em-dash"

\end{document}
yurytch commented 4 months ago

Ligatures=TeX was needed for \newfontfamily.