# polyglossia or bidi bug: [\d\.] gets inverted to [\.\d]

After bidi was updated to v. 19.6 (2016-05-23), using at least one RTL language with polyglossia leads to number and following dot being inverted. Cf.

\documentclass{book}
\usepackage{polyglossia}
\setotherlanguage{hebrew}
\begin{document}
6.
\end{document}


with and without \setotherlanguage{hebrew}. Note that it is not necessary to actually use that language.

I do not know whether this is a bug in bidi or an incompatible change which polyglossia needs to adapt to. Because of this I have not opened an issue on polyglossia's github page.
Sadly, bidi's contact information are outdated – the sourceforge referred to on CTAN is unused and the github page that is mentioned in the package's readme and PDF does not seem to exist any more either.

The problem might be something along the lines of amsmath - bidi - siunitx possible bug?

Does anybody have the previous version of bidi at hand?

TIA, Dario

• The problem does not occur in this version: Package: bidi 2015/04/30 v17.2 Bidirectional typesetting in plain TeX and LaTeX When I install the bidi directory from that version in a TeX Live 2016 tree, the problem does not occur. So it would appear the problem is with the latest bidi, not polyglossia. This e-mail address which appears in the bidi web page Readme file kicks back e-mails as undeliverable: persian-tex@tug.org – hilbert Jul 21 '16 at 7:16

bidi tests for \if@Latin, so you can get around the problem by setting it to true:

\documentclass{book}
\usepackage{polyglossia}

\setotherlanguage{hebrew}
\makeatletter\@Latintrue\makeatother

\begin{document}
6.
\end{document}


## Edit Februar 2017

\if@Latin is no longer in bidi (v20.9). The work-around is also no longer necessary. The example compiles fine with out it and outputs 6..

• Thanks, this does the trick. What remains open is whether this is a bug in the new bidi version or a change that has to be picked up by polyglossia. – dariok Jun 6 '16 at 7:31
• This also happens without polyglossia, as the ff. MWE: <br> \documentclass{report} \usepackage{fontspec} \usepackage{bidi} \begin{document} The number 12. \end{document}<br> Fixed in this case with<br> \csname @Latintrue\endcsname – Mike Maxwell Jun 25 '16 at 3:42
• sorry, that comment formatted as a mess, and I can't seem to fix it – Mike Maxwell Jun 25 '16 at 3:47
• @MikeMaxwell: Yes the problem exists without polyglossia too. My solution works in this case too. The question is if polyglossia should set the boolean to true for languages like english or if bidi is using the wrong boolean. – Ulrike Fischer Jun 25 '16 at 19:54
• I would like to report this bug (which I stumbled across as well) to the maintainers of bidi. Does anyone know where to find them and where best to report a bug? The CTAN page provides a broken link. – Alex Roberts Jun 30 '16 at 5:44