I'm typesetting an Arabic document using XeLaTeX. I'm using it for about a year now.
The problem I couldn't solve or find a solution for yet is when putting two figures side-by-side, the figures are in the correct order (RTL) in the document but they are reversed in the list of figures.
My minimal working example:
\documentclass{report}
\usepackage{polyglossia}
\setmainlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic,Scale=1]{KacstOne}
\newcommand{\dblimg}
[7][ht]{{\begin{figure}[#1]
\begin{minipage}{0.48\textwidth}\centering
\includegraphics[width=#2\textwidth]{#3}
\caption[#4]{\centering #4}
\end{minipage}\hfill
\begin{minipage}{0.48\textwidth}\centering
\includegraphics[width=#5\textwidth]{#6}
\caption[#7]{\centering #7}
\end{minipage}
\end{figure}
}}
\begin{document}
\listoffigures
\dblimg{1}{a.jpg}{111}
{1}{a.jpg}{222}
\end{document}
The \dblimg
takes the width, path, and caption of the two images.
As you can see, Figure 1 (on the right) is listed before Figure 2; the figures are in the correct order in the document, but not in the list of figures.