Skip to main content

arabic in Latex, is that possible?

   How to create an Arabic paper with the equations in the usual Latin in Latex??




This question is usually asked by people who need to write a scientific document in the Arabic language, specially scientific students or teachers who needs to make their reports, series or exams.
   Many solutions are avalaible, the most used is the one using Arabtex package. It uses a transliteration system so that you may  typeset Arabic using latin letters, but it take a lot of time for the user to be familiar with the transiliteration.
the following Latex code use the Arabtex package:( or you can visualise it at write LaTeX  here )
\documentclass[12pt]{article}
\usepackage{arabtex}
\begin{document}
\setarab % choose the language specific conventions
\vocalize % switch diacritics for short vowels on
\transtrue % additionally switch on the transliteration
\arabtrue % print arabic text ... is on by default anyway
\centerline {\RL{^gu.hA wa-.himAruhu}}
\begin{RLtext}
'at_A .sadIquN 'il_A ^gu.hA ya.tlubu minhu .himArahu li-yarkabahu
fI safraTiN qa.sIraTiN wa-qAla lahu:
sawfa 'u`Iduhu 'ilayka fI al-masA'i, wa-'adfa`u laka 'u^graTaN.
fa-qAla ^gu.hA:
'anA 'AsifuN ^giddaN 'annI lA 'asta.tI`u 'an 'u.haqqiqa
laka ra.gbataka, fa-al.himAru laysa hunA al-yawma.
wa-qabla 'an yutimmu ^gu.hA kalAmahu
bada'a al-.himAru yanhaqu fI i.s.tablihi.
fa-qAla lahu .sadIquhu:
'innI 'asma`u .himAraka yA ^gu.hA yanhaqu.
fa-qAla lahu ^gu.hA:
.garIbuN 'amruka yA .sadIqI!
'a-tu.saddiqu al-.himAra wa-tuka_d_dibunI?
\end{RLtext}
\end{document}
and the pdf generated by this code is

 

 In this blog, we propose to work with the most living solution which use the Arabi package, with this one you can write Arabic words between English script in the code source and generate an Arabic document with symbols and equations in the usual Latin. For exemple we propose the following Latex code:(or see it at write latex)
\documentclass[11pt,a4paper]{arabart}
\usepackage[utf8]{inputenc}
\usepackage[LAE]{fontenc}
\usepackage[arabic]{babel}
\begin{document}
\begin{center}
قصة جحا والحمير
\end{center}

اشترى جحا عشرة حمير فركب واحدا منها وساق تسعة أمامه، ثم عدّالحمير ونسى
الحمار الذي يركبه فوجدها تسعة، فنزل عن الحمار وعدها فوجدها عشرة، فركب مرة
ثانية وعدها فوجدها تسعة، ثم نزل وعدها فوجدها عشرة وأعاد ذلك مراراً فقال: أنا
أمشي وأربح حمارا خير من أن أركب ويذهب مني حمار فمشى خلف الحمير حتى وصل إلى
منزله.
\end{document}             
and the pdf generated by this code is

Multitude of Heart Pattern

Buy on Amazon

Crimson Passion Vivid Red Heart

Buy on Amazon

The Formula of Us

Buy on Amazon

Abstract Love Heart

Buy on Amazon

The Formula of Us

Buy on Amazon

forget your voice

Buy on Amazon

Valentine's Verdure

Buy on Amazon

Cushion Closeness: Cherishing Our Bond

Buy on Amazon

Popular posts from this blog

A French template: serie of exercises by Latex

The screenshot above come from my french serie of exercises, by clicking on it you will be directed to the overleaf  document with all the details. In this article, I present you a French template that may help you with typing maths in french. the code source I work with is  this : %%%%%%%%%%%%%%%------Document class -------%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass [twocolumn,french]{article} %%%%%%%%%%%%%%%%%%------ packages --------%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage [top=2. 5cm , bottom=2. 5cm , left=0. 5cm , right=0. 5cm ]{geometry} \usepackage [T1]{fontenc} \usepackage [utf8]{inputenc} \usepackage {lmodern} \usepackage { ntheorem } \usepackage {babel} \usepackage {multicol} \usepackage { multirow } \usepackage {fancyhdr} \usepackage {amsfonts} \usepackage {amsmath} \usepackage {amssymb} \usepackage { latexsym } \usepackage {array} \usepackage {graphicx} %%%%%%%%%%%%%%-----NEW COMMAND-------%%%%%%%%%%%%%%%%%%%%%%%%%%%%

How to make a serie of exercises in two columns

For making a two-column document, we need to add an option in the document class in the input file : \documentclass[a4paper,10pt,twocolumn]{arabart} for exemple, the following code show how it looks like when the content is just blind text using the blindtext package: \documentclass [10pt,a4paper,twocolumn]{arabart} \usepackage [utf8]{inputenc}  \usepackage [LAE]{fontenc}  \usepackage [arabic]{babel}   \usepackage {blindtext} %%blind text package%%%%  \begin {document}   \blindtext  \blindtext  \blindtext  \blindtext  \blindtext  \end {document} And for result: You can see it from write latex also : Finally, we propose a typical serie in two column in write latex:

A typical Arabic exam of high school's mathematics written by LaTeX

The following pdf is a result of a .tex file, as you see it produce a pro document:  If you are interested in typing such a pdf file, you can copy the input file (code source) from   here at Write Latex

Colored Arabic Document

             In Order to create a colored document, I needed the package  tcolorbox giving the huge possibilities that it contain like we are going to explain in this article. However, it doesn't work with the arabart   document class (which by the way I used to make this previous documents :   A LANDSCAPE two columns pages of exercices ,  How to make a serie of exercices in two columns ,  A typical Arabic exam of high school's mathematics  ).          So I moved to using the package  polyglossia where compilation must be done with XeLaTeX . The tcolorbox package (2012) originates from the first edition of the book «LATEX – Einführung in das Textsatzsystem » in about 2006 writing by Dr. Thomas F. Sturm, it provides an environment for colored and framed text boxes with a heading line. As for Polyglossia, it is a package for facilitating multilingual typesetting with  XeLaTeX . Let's start with an exemple : the source code below is for a simple bo

A LANDSCAPE two columns pages of exercises

For making a two-column document, we need to add an option in the document class in the input file \documentclass [ 14pt ,a4paper,twocolumn, landscape ]{ arabart } I propose the following code that generate the document showed in the picture above: \documentclass [ 14pt ,a4paper,twocolumn,landscape]{ arabart } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%% importants packages %%%%%%%%%%%%%%%%%%%%%% \usepackage [top=0. 5cm , bottom=1. 5cm , left= 1cm , right= 1cm ]{geometry} \usepackage [utf8]{inputenc} \usepackage [ LAE ]{fontenc} \usepackage [ arabic ]{babel} \usepackage {multicol} \usepackage { multirow } \usepackage {tabularx} \usepackage {amssymb} \usepackage {array} \usepackage {graphicx} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%% new command %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand { \dis }{ \displaystyle } \mathchardef\times="2202 \newcommand { \C }{ \mathbb {C}}

Arabic colored box with a graphic side by side

                      To make an exercise inside a box with a graphic aside, after looking for a solution I found that I can put two minipages separated by a \hfill which fit the box entirely..let's break it down: The following  source code is for the exercise body : %--------document class \documentclass {article} %--------packages \usepackage {amsfonts,amssymb, enumitem } %--------polyglossia package \usepackage { polyglossia } \setdefaultlanguage [ calendar = gregorian , numerals = maghrib ]{ arabic } \newfontfamily\arabicfont [Script= Arabic , Scale=1]{ Amiri } %--------new commands \newcommand { \R }{ \mathbb {R}} \begin {document} لتكن $f$ و $g$ الدالتين المعرفتين على $\R$ بمنحنيهما $(C_f)$ و $(C_g)$ و $A$ نقطة زوج احداثياتها هو $(\frac{3}{2};\frac{1}{2})$ . ( انظر الشكل ) \begin {enumerate}[label={ \arabic* )}] \item\begin {enumerate} \item [(a] حدد جدول تغيرات الدالة $f$ على المجال $[-4;3]$ \ite

Produce your first Arabic document with Latex!

The first line of the input file should normally be like: \documentclass[a4paper,12pt]{article} We can change the commend article with letter or book, but here we will employ arabart: \documentclass[a4paper,12pt]{arabart} If one merly wishes to type in ordinary text, without complicated mathematical formulae or special effects, then one merly can use the command article and type it in as it is. However, arabart has to be applied to avoid errors when Arabic characters are mixed with the Latin ones.  Here is an exemple of a typical Arab Latex input file with the pdf result: As you can  see, this is an exercice of mathematic writed in arabic with formulae in the usual Latin: \documentclass [11pt,a4paper]{ arabart } \usepackage [utf8]{inputenc} \usepackage [ LAE ]{fontenc} \usepackage [ arabic ]{babel} \begin {document} تمرين \\ نعتبر الدالة العددية $f$ للمتغير الحقيقي $x$ المعرفة ب: $ f(x)=\displaystyle\frac{-x^2-x+6}{x^2+2x-8}$ \\ $1$ )

Video : How to get graphic's code from Geogebra to Latex