reutenauer / polyglossia

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

Czech polyglossia break en-dash ligature in some circumstances #563

Closed msourada closed 1 year ago

msourada commented 1 year ago

Every now and then it happens to me, that „--“ is not substituted by „–“. Today I think I have narrowed it down to polyglossia in Czech language. It's worth noting that:

Here’s minimal example:

% !TeX program = xelatex
\documentclass{article}

\usepackage{polyglossia}
\setmainlanguage{czech}

\begin{document}
    \begin{itemize}
        \item 1--5
        \item 1{--}5
        \item 1 -- 5
    \end{itemize}
\end{document}

With xelatex the first item is rendered wrong, with lualatex all of them are correct.

msourada commented 1 year ago

Maybe it’s worth noting that similar bug happens with em-dash where „--- “ without spaces is rendered as „-–“ (hyphen followed by en-dash).

jspitz commented 1 year ago

Works for me: grafik

Which version of polyglossia is this?

msourada commented 1 year ago

From TeXLive 2021 via Fedora, i.e. 2021/04/12 v1.53 (it's usually more than 1 year behind). But your reply prompted me to try this on Windows as well (miktex can update packages fairly easily to their latest versions), the same version is broken, but v1.57 looks OK. Looks like I should have tried newest version first… Thanks for your time and sorry for jumping the gun too early.