To make an exercise inside a box with a graphic aside, after looking for a solution I found that I can put two minipages separated by a \hfill which fit the box entirely..let's break it down: The following source code is for the exercise body : %--------document class \documentclass {article} %--------packages \usepackage {amsfonts,amssymb, enumitem } %--------polyglossia package \usepackage { polyglossia } \setdefaultlanguage [ calendar = gregorian , numerals = maghrib ]{ arabic } \newfontfamily\arabicfont [Script= Arabic , Scale=1]{ Amiri } %--------new commands \newcommand { \R }{ \mathbb {R}} \begin {document} لتكن $f$ و $g$ الدالتين المعرفتين على $\R$ بمنحنيهما $(C_f)$ و $(C_g)$ و $A$ نقطة زوج احداثياتها هو $(\frac{3}{2};\frac{1}{2})$ . ( انظر الشكل ) \begin {enumerate}[label={ \arabic* )}] \item\begin {enumerate} \item [(a] حدد جدول تغيرات الدالة $f$ على المجال $[-4;3]$ \ite