1

I think there may be a problem with QRCode when using polyglossia.

In the MWE below, I want to encode a web address (ascii text, no strange unicode characters). I get an error when the main language is Arabic, but no error if the main language is English. I have tried using \begin{english} and also \textenglish but still get an error.

The error message I receive says

Splitting off block ١ Making error block 1

Notice the inconsistent arabic and english digits Then I get

Missing \endcsname inserted.

\documentclass[10pt]{article}
\usepackage{qrcode}
\usepackage{polyglossia}
\setmainlanguage{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic, Scale=1.50]{Times New Roman}
\newfontfamily\englishfont[Script=Latin]{Linux Libertine O}
\begin{document}
\begin{english}
\qrcode{www.google.com}
\end{english}
\end{document}
  • I can't test with Times New Roman and Linux Libertine O, using different fonts there is is no problem – user31729 Oct 27 '15 at 20:45
  • which fonts are you using? – Tim Oct 27 '15 at 22:27
  • 2
    Imho is is a bug in qrcode, it seems to use \theqr@i (which calls \@arabic which is redefined by bidi), in places where a \number\c@qr@i or something like this would be better. – Ulrike Fischer Oct 27 '15 at 22:47
  • 1
    It work fine with \setmainlanguage[numerals=maghrib]{arabic} – Salim Bou Oct 28 '15 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.