1

Is there a way in LaTeX to typeset the correct pen-stroke order to write letters of the Arabic alphabet?

Example:

enter image description here

Typesetting in XeLaTeX with package polyglossia.

UPDATE 1: General note: The writing of Arabic letters, both in it's initial, beginning, middel and last position, have a specific rules for the correct pen-stroke (writing).

imdk4242
  • 163

1 Answers1

5

Here an example for the first letter jim use the same way for other letters, the idea is to add a grid to facilitate placing arrows on the contour of letter based on this answer https://tex.stackexchange.com/a/9562/54817

\documentclass[12pt]{article}
\usepackage{tikz}
\usepackage{polyglossia}
\setdefaultlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}


\def\mygrid{
\begingroup
\draw[help lines,xstep=.1,ystep=.1] (0,0) grid (1,1);
\addfontfeature{Scale=.3}        
 \foreach \x in {1,...,9} { \node [anchor=north] at (\x/10,0) {0.\x}; }
 \foreach \y in {0,1,...,9} { \node [anchor=east] at (0,\y/10) {0.\y}; } 
\endgroup
}

\begin{document}

\begin{center}
\begin{tikzpicture}
{\addfontfeature{Scale=3}
\node(jim)[anchor=south west,font=\bfseries\Huge]{ج};
}
\begin{scope}[x={(jim.south east)},y={(jim.north west)},>=stealth]
%\mygrid
\draw[very thick,red,->](0.3,0.9)node[left]{1} to[out=20,in=200] (0.7,0.9);
\draw[very thick,red,->](0.2,0.6)node[above]{2} to[out=220,in=120] (0.2,0.2); 
\draw[very thick,red,<-](0.65,0.5) -- +(0.15,0.1)node[above right]{3};             
 \end{scope}
\end{tikzpicture}
\end{center}


\end{document}

Salim Bou
  • 17,021
  • 2
  • 31
  • 76