I'm trying to make a template for an Arabic book. I wish to use the babel package with pdflatex as I'm not familiar with xelatex. I was hoping to arabianize the legend orange template (http://www.latextemplates.com/template/the-legrand-orange-book). Now, my problem is that the mdframed always produces solid black boxes for theorems with arabic babel. I mean the whole theorem is replace by a solid black box and you don't see the text. I don't observe this problem for english. The latex code below summarizes
\documentclass[12pt,a4paper]{book}
\usepackage{tikz}
\usepackage{fancyhdr}
\definecolor{ocre}{RGB}{243,102,25}
\graphicspath{{Pictures/}}
\usepackage{amsmath}
\usepackage[LFE,LAE]{fontenc}
\usepackage[utf8]{inputenc} % Required for including letters with accents
\usepackage[english,arabic]{babel} % Arabic language/hyphenation
\newcounter{dummy}
\numberwithin{dummy}{section}
\newtheorem{theoremeT}[dummy]{نظرية}
\RequirePackage[framemethod=default]{mdframed} % Required for creating the theorem, definition, exercise and corollary boxes
% Theorem box
\newmdenv[skipabove=7pt,
skipbelow=7pt,
backgroundcolor=black!1,
linecolor=blue,
innerleftmargin=5pt,
innerrightmargin=5pt,
innertopmargin=5pt,
leftmargin=0cm,
rightmargin=0cm,
innerbottommargin=5pt]{tBox}
%\newenvironment{theorem}{\begin{tBox}\begin{theoremeT}}{\end{theoremeT}\end{tBox}}
\newmdtheoremenv{theorem}{نظرية}
\begin{document}
\newpage
~\vfill
\thispagestyle{empty}
\noindent حقوق الطبع محفوظة \\ % Copyright notice
\noindent \textsc{نشر بواسطة دار المعارف}\\ % Publisher
\noindent يحظر نسخ أي جزء من هذا الكتاب دون علم المؤلفين ودار النشر وفقا لأحكام قانون النشر المصري\\ % License information
\noindent \textit{الطبعة الأولى يناير $2016$} % Printing/edition date
\pagestyle{empty} % No headers
\tableofcontents % Print the table of contents itself
\cleardoublepage % Forces the first chapter to start on an odd page so it's on the right
\pagestyle{fancy} % Print headers again
\chapter{علوم الحاسوب}
يعود تاريخ علوم الحاسوب إلى اختراع أول حاسوب رقمي حديث. فقبل العشرينات من القرن العشرين.
\section{تاريخ}
كان مصطلح حاسوب \textLR{Computer} يشير إلى أي أداة بشرية تقوم بعملية الحسابات. ما هي القضايا أو الأشياء التي يمكن لآلة أن تحسبها باتباع قائمة من التعليمات مع ورقة وقلم، دون تحديد للزمن اللازم ودون أي مهارات أو بصيرة (ذكاء)؟ وكان أحد دوافع هذه الدراسات هو تطوير آلات حاسبة \textLR{computing machines} يمكنها إتمام الأعمال الروتينية والعرضة للخطأ البشري عند إجراء حسابات بشرية.
خلال الأربعينات، مع تطوير آلات حاسبة أكثر قوة وقدرة حسابية، تتطور مصطلح حاسوب ليشير إلى الآلات بدلا من الأشخاص الذين يقومون بالحسابات. وأصبح من الواضح أن الحواسيب يمكنها أن تقوم بأكثر من مجرد عمليات حسابية وبالتالي انتقلوا لدراسة تحسيب أو التحسيب بشكل عام. بدأت المعلوماتية وعلوم الحاسب تأخذ استقلالها كفرع أكاديمي مستقل في الستينات، مع إيجاد أوائل أقسام علوم الحاسب في الجامعات وبدأت الجامعات تعطي إجازات في هذه العلوم [1].
\begin{theorem}
القوة هي حاصل ضرب العجلة في الكتلة
\end{theorem}
\begin{thebibliography}{99}
[1]
من ويكيبيديا، الموسوعة الحرة
\end{thebibliography}
\end{document}
Here's a snpshot of page 5,