Skip to content

Instantly share code, notes, and snippets.

@noureddin
Created January 29, 2017 03:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noureddin/094bf5531e2c02d9e64517e53ccc0673 to your computer and use it in GitHub Desktop.
Save noureddin/094bf5531e2c02d9e64517e53ccc0673 to your computer and use it in GitHub Desktop.
\documentclass{report}
\usepackage{caption}
\usepackage{polyglossia}
\setmainlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic,Scale=1]{KacstOne}
% https://tex.stackexchange.com/questions/350777/side-by-side-figures-are-reversed-in-lof-bidi-xetex
\newcommand{\dblimg}
[7][ht]{{%
\stepcounter{figure}
\addcontentsline{lof}{section}{\protect\numberline{\thefigure}#4}
\addtocounter{figure}{-1}
\begin{figure}[#1]
\begin{minipage}{0.48\textwidth}\centering
\includegraphics[width=#2\textwidth]{#3}
\caption[]{\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}{111}
{1}{b}{222}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment