The problem is that the section headings disappear and herein there is a minimal example
\documentclass{report}
\usepackage{setspace}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.1]{Scheherazade}
%\usepackage{amsmath, amsfonts, amssymb, amsthm}
%=========================================================
\usepackage{tikz}
\usepackage{etoolbox}
\AtBeginEnvironment{tikzpicture}{\selectlanguage{english}}
\tikzset{font=\selectlanguage{arabic}}
\begin{document}
Some latin text and inline arabic: \textarabic{السلام عليكم}
And for larger blocks of text you can use Arabic environment:
\begin{Arabic}
\section{المتتاليات العددية}
\tikzset{
mybox/.style={
draw=red, fill=blue!20, very thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt
},
fancytitle/.style={
draw=red, fill=blue!20, text=black, rectangle, rounded corners
}
}
\begin{tikzpicture}
\node [mybox] (box){%
\begin{minipage}{.89\textwidth}
العربية أكثر لغات المجموعة السامية متحدثينَ، وإحدى أكثر اللغات انتشارًفي العالم، يتحدثها أكثر من 422 مليون نسمة،1 ويتوزع متحدثوها في المنطقة المعروفة باسم الوطن العربي، بالإضافة إلى العديد من المناطق الأخرى المجاورة كالأحواز وتركيا وتشاد ومالي السنغال وإرتيريا. اللغة العربية ذات أهمية قصوى لدى المسلمين، فهي لغة مقدسة (لغة القرآن)، ولا تتم الصلاة (وعبادات أخرى) في الإسلام إلا بإتقان بعض من كلماتها.
\end{minipage}
};
\node[fancytitle, left=10pt] at (box.north east) {\AR{نظـريـة}};
\node[fancytitle, rounded corners] at (box.south east) {$\clubsuit$};
\end{tikzpicture}%
هذه محاولة ناجحة للكتابة بالعربية مع استخدام التكزد
\section{المحاولة الثانية لكتابة تكزد }
\begin{tikzpicture}
\node [mybox] (box){%
\begin{minipage}{.89\textwidth}
يجب التأكد من جودة الفونت بكل طريقة ممكنة
\end{minipage}
};
\node[fancytitle, left=10pt] at (box.north east) {\AR{نظرية رقم - 2}};
\node[fancytitle, rounded corners] at (box.south east) {$\clubsuit$};
\end{tikzpicture}%
\end{Arabic}
\end{document}
! Package bidi Error: Oops! you have loaded package tikz after bidi package. Please load package tikz before bidi package, and then try to run xelatex on your document again.
On that note, I don’t even get a section title without TikZ … – Qrrbrbirlbel Jul 17 '13 at 3:16