1

This is not working it works either for chessboard and skak or for polyglossia but not for both can anyone help me here

\documentclass[16pt]{article}
\usepackage{geometry}
\geometry{a4paper, portrait, margin=15mm}
\usepackage{skak}
\usepackage{chessboard}
\usepackage{polyglossia}
\setdefaultlanguage[calendar=gregorian,locale=mashriq,numerals=arabic]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.0]{Amiri}


\begin{document}
لعب هذا الدور عام الف و تسعمائة و خمسة و سبعين بلا فائدة تذكر

\def\mylist{Ke1, qe2, kf3}
\setchessboard{setpieces=\mylist}
\def\mylist{Ke1, ra1, ke3}
\chessboard

\end{document}
2

chessboard wasn't written with bidi or arabic in mind. Internally it uses in in a number of places \arabic, which isn't a good idea as it breaks if packages redefines \arabic to print other number systems. Also it doesn't take RTL into account. As a work around restore (locally) the original arabic definition and switch to LTR before printing a board:

\documentclass[16pt]{article}
\usepackage{geometry}
\geometry{a4paper, portrait, margin=15mm}
\usepackage{skak}
\usepackage{chessboard}
\usepackage{polyglossia}
\setdefaultlanguage[calendar=gregorian,locale=mashriq,numerals=arabic]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.0]{Amiri}

\makeatletter\let\ori@arabic\@arabic
\newcommand\restorearabic{\let\@arabic\ori@arabic}
\begin{document}
لعب هذا الدور عام الف و تسعمائة و خمسة و سبعين بلا فائدة تذكر

\selectlanguage{english}
\begingroup
\restorearabic
\def\mylist{Ke1, qe2, kf3}
\setchessboard{setpieces=\mylist}
\def\mylist{Ke1, ra1, ke3}
\chessboard
\endgroup

\end{document}
3
  • Thank you sir for answering my question, initially it compiles with no problems. I will check the rest of the files. May 24 '19 at 20:19
  • I'm not a sir, I'm a women. May 24 '19 at 20:22
  • I've just realised. that very sorry May 25 '19 at 8:23

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.