关于阿拉伯语文本编译的问题

关于阿拉伯语文本编译的问题

我找到了这个 tex 文件,但它给了我很多错误(在 \fancyhfoffset、\mainmatter,..):我使用 xelatex 和 texlive 2017 进行编译

怎么做 ?

谢谢

\documentclass{book}
    \usepackage[dvips]{graphicx}
    \usepackage{boxedminipage}
    \usepackage{slashbox} % PROBLEME
    \usepackage{amssymb}
    \usepackage{amsmath}
    \usepackage{minitoc}
    \usepackage{rotating}
    \usepackage{titlesec, color}
    \usepackage{fmultico}%PERMET MULTICOLUMN ARABE
    %%%----------------------------------------
    \usepackage{fancyhdr}
    \pagestyle{fancy}
    %%%----------------------------------------
    \usepackage{pdflscape}
    %%%----------------------------------------
    \makeatletter\renewcommand*\l@section{\@dottedtocline{1}{3.8pt}{1cm}}
     \makeatother
    %%%----------------------------------------
     \usepackage{enumitem}
    \usepackage{polyglossia}
    \setmainlanguage[numerals=maghrib]{arabic}
    \setotherlanguage{english}
    \newfontfamily{\arabicfont}[Script=Arabic,Scale=1.5]{Traditional Arabic}
    %%%----------------------------------------
    \newfontfamily\headingfont[]{Tahoma}
    \newfontfamily\headingfont[]{Tahoma}
    \titleformat*{\section}{\bf\Large\headingfont}
    \titleformat*{\subsection}{\bf\large\headingfont}
    \definecolor{gray75}{gray}{0.75}
    \newcommand{\hsp}{\hspace{20pt}}
    \titleformat{\chapter}[hang]{\Huge\headingfont}{\Huge\headingfont\thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\Huge\bfseries}
    \topmargin=-2.25cm
    \usepackage{xeindex}%PACKAGE DE LINDEX
    \makeindex
    \usepackage{minitoc}
    \dominitoc
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%footnote a droite %%%%%%%%%%%%%%%%%%%%%%%%%         FOOTNOTE A DROITE AINSI QUE LE TRAIT    %%%%%%%%%%%%%%%%%%%%%%%%%
    \renewcommand{\footnoterule}{\raggedleft\vspace*{-3pt}\rule{2in}{0.4pt}\vspace*{2.6pt}}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \fancyhfoffset{0.1pt}%%%%% Trait du headings
    \rightfootnoterule
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %\rhead[\normalsize\leftmark]{\normalsize\rightmark}
    %\lhead[\normalsize\rightmark]{\normalsize\leftmark}
    %%%%%%%%%%%%%%%%%SINON LE FORMAT DU HEADING EST TROP  PETIT%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%ENTRE CROCHET PAGE PAIRE LAUTRE IMPAIRE
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %\setcounter{tocdepth}{2}%%%%%%%%%%%%%%%%%%JUSQUAUX SOUS-SECTIONS
    \setcounter{minitocdepth}{1}%%%%%%%%%%%%%%%%%%JUSQUAUX SECTIONS POUR MINITOC
    \setlength{\headheight}{100pt}
    \fancyhead[LE,RO]{\bf\normalsize\thepage}
    \fancyhead[LO]{\bf\normalsize\rightmark}
    \fancyhead[RE]{\bf\normalsize\leftmark}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%% NEW COMMAND Polyglossia %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%REDEFINITION DES COMMANDES DE ARABTEX QUE NE CONNAIT PAS POLYGLOSSIA
    \renewcommand{\textarabic}[1]{\mbox{\RL{#1}}}
    %%%\newcommand{\textLR}[1]{\LR{\rmfamily #1}}
    \newcommand{\ARmbox}[1]{\mbox{\RL{#1}}}
    \newcommand{\textLR}[1]{\mbox{\LR{#1}}}
    \newcommand{\textRL}[1]{\mbox{\RL{#1}}}

    \title{\parbox{12cm}{
    %\includegraphics[width=2cm]{uko-logo.png} \\
    \begin{center}\Huge\bf\headingfont
    \rule{12cm}{4pt}
    \medskip
    {الجبر}
     \\[-4mm]
    \rule{12cm}{4pt}
    \end{center}
    \hfill\footnotesize
    تأليف: 
     \\[2cm]
     %{\Large الطبعة }
     \\[2cm]
     }}

    \author{ ترجمة:  كلية العلوم\\جامعة }
    \date{}
    \scrollmode
    %%%----------------------------------------
    \mainmatter
    \pagenumbering{arabic}
    \def\thepage{\arabic{page}}
    \renewcommand{\thethm}{\textbf{{\thechapter}.\textLR{\arabic{thm}}.\arabic{section}}}
    %%%--------------------------------------------
    \begin{document}

    \end{document}

相关内容