2
 \documentclass{article}
    \usepackage{fontspec}

    \setmainfont[Ligatures=TeX]{Times New Roman}
    \newfontfamily\arabicfont
        [Script=Arabic,     % to get correct arabic shaping
        Scale=1.2]          % make the arabic font bigger, a matter of taste
            {Arial}     % whatever Arabic font you like

    \newcommand{\textarabic}[1]     % Arabic inside LTR
        {\bgroup\textdir TRT\arabicfont #1\egroup}
    \newcommand{\n}         [1]     % for digits inside Arabic text
        {\bgroup\textdir TLT #1\egroup}
    \newcommand{\afootnote} [1]     % Arabic footnotes
        {\footnote{\textarabic{#1}}}
    \newenvironment{Arabic}     % Arabic paragraph
        {\textdir TRT\pardir TRT\arabicfont}{}

    \begin{document}

    English text ``\textarabic{جملة عربية وسط جملة إنجليزية}'' with Arabic in
    between. English paragraph left aligned English paragraph left aligned English
    paragraph left aligned English paragraph left aligned English paragraph left
    aligned English paragraph left aligned English paragraph left aligned English
    paragraph left aligned English paragraph left aligned English paragraph left
    aligned English paragraph left aligned.

    \begin{Arabic}
    فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين \n{١٢٣٤٥} فقرة عربية
    محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين
    فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى
    اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى
    اليمين\afootnote{حاشية عربية.} فقرة عربية محاذاة إلى اليمين.
    \end{Arabic}

    \end{document}

I got the following code from here but when i was trying to compilate it i got this error messege even if i am using Xelatex and lualatex any help please

> ! Fatal fontspec error: "cannot-use-pdftex" ! ! The fontspec package
> requires either XeTeX or LuaTeX. ! ! You must change your typesetting
> engine to, e.g., "xelatex" or ! "lualatex"instead of "latex" or
> "pdflatex". ! ! See the fontspec documentation for further
> information. ! ! For immediate help type H <return>.
F.Marko
  • 85

0 Answers0