# Arabic letter in initial, middle and final form

I want to make a table with the Arabic alphabet. This table will contain English text as well as Arabic symbols. I'm using a code that looks like this:

\usepackage[utf8]{inputenc}
\inputencoding{utf8}
\usepackage[LAE,T1]{fontenc}
\usepackage[arabic, english]{babel}

%and

\usepackage{arabtex}

\begin{document}
\end{document}


This allow me to write lines like this:

\foreignlanguage{arabic}{ا} & elif


or to use arabtex like this

 \< k  > & kef


but if I want to write the middle form or the final form of an Arabic letter the first method does not work and I do not know if it is possible with arabtex. What else can I try?

• I recommend that you use this character and the first method ـ – Au101 Dec 27 '18 at 23:08
• For example ـبـ – Au101 Dec 27 '18 at 23:08
• @Au101 that worked. I tried the same with characters drawn from the Apple special characters panel of my computer, and it did not work – Mauricio Dec 27 '18 at 23:11
• Try using U+200D unicode character, called the "zero width joiner". See here for more information: codepoints.net/U+200D – Robert Alessi Dec 27 '18 at 23:13
• @Au101 Also it works for middle letters but for initial and final letters it adds an extra _ that I do not wish to have – Mauricio Dec 27 '18 at 23:21

You can copy the prefix and/or suffix, ـ, and join it with any character. Other than that, I suggest polyglossia and the following setup.

\documentclass[a4paper]{article}
\usepackage{fontspec}
\usepackage{polyglossia}

\setmainlanguage{english}
\setotherlanguage{arabic}

\newfontfamily\arabicfont[Script=Arabic,Scale=1.1]{Amiri}

\begin{document}

\begin{tabular}{rl}
\foreignlanguage{arabic}{ا}   & alif \\
\foreignlanguage{arabic}{بـ}  & ba'a initial \\
\foreignlanguage{arabic}{ـبـ} & ba'a middle \\
\foreignlanguage{arabic}{ـب}  & ba'a final \\
\end{tabular}

\end{document}


• This worked but I will add that I had to use XeLaTeX and Al Bayan as font because my computer does not have Amiri – Mauricio Dec 27 '18 at 23:54
• @Mauricio You can download Amiri for free from its webpage. Libertinus and Libertinus Math (extensions, by the creator of Amiri, of Linux Libertine) are good companion fonts for other scripts. – Davislor Dec 28 '18 at 0:25
• You might also be able to install Amiri from your package manager, or it might be included with your TeX distribution. On Ubuntu Linux, you can sudo apt install fonts-hosny-amiri. – Davislor Dec 28 '18 at 0:27