I am using Lyx to write a document in Arabic Language. My problem in numbering of the sections and subsections.
In arabic, text direction is from right to left. So when I created sections and subsections, say for example in the following shot:
So Section 2 is ok, but for subsection it should be ".1.2" (so that we read it from right to left correctly) but as you see in the shot it is ".2.1".
So please tell me there is a way to fix this. (please note that I depend on these section and subsections numbering to create Table Of Content automatically).
I hope my question is clear. Thanks in Advance
Please see the following sample code for debugging
% Preview source code
%% LyX 2.1.2 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[11pt]{report}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Arial}
\setsansfont[Mapping=tex-text]{Arial}
\setmonofont{Arial}
\usepackage[a4paper]{geometry}
\geometry{verbose,tmargin=2.5cm,bmargin=2.5cm,lmargin=3.5cm,rmargin=2.5cm}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{float}
\usepackage{setspace}
\onehalfspacing
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\fancyhf{}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\fancyhead[L]{\nouppercase \leftmark}
\fancyhead[R]{\nouppercase \rightmark}
%\fancyfoot[L]{\scriptsize Design and Verification of MP3 Decoding Stage}
\fancyfoot[R]{\thepage}
%\fancyfoot[R]{\scriptsize Mohammed Ibrahim}
\makeatother
\usepackage{xunicode}
\usepackage{polyglossia}
\setdefaultlanguage{arabic}
\begin{document}
\section{المقدمات العامة }
\subsection{تعريفه: }
لغةً هو التحسين. اصطلاحاً هو علم يبحث في الكلمات
\subsection{موضوعه: }
الكلمات
\subsection{نسبته: }
أحد العلوم
\end{document}
{}
, which will highlight it properly as code.