Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
\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
You can’t perform that action at this time.