Here's an attempt at doing this with the expex
package which is especially for linguistics.
Updated answer using \quranayah
You can use \quranayah[1][1]
to insert each ayah. The problem is that the whole ayah is placed in a box which can't be broken across lines. So if you leave things justified you will get ugly overfull or underfull boxes everywhere. You could also try using \raggedleft
but this doesn't look great either. My best option is to use a combination of \quranayah
and manually broken lines as shown in the following MWE. I've adjusted a few other spacing settings to improve the output.
MWE
\documentclass{article}
\usepackage{xepersian}
\settextfont{Yas}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\usepackage[trans=fa]{quran}
\usepackage{expex}
\makeatletter
\lingset{%
everygl=\def\qt@no##1{ \hfill ##1},
everygla=\arabicfont\large\rule{0pt}{5ex},
everyglb=\footnotesize,
glrightskip=0pt,
glhangstyle=none,
glspace=.5em plus 3em minus .15em
}
\makeatother
\pagestyle{empty}
\begin{document}
\begingl
\gla
\quranayah*[1][1]
\quranayah*[1][2]
\quranayah*[1][3]
\quranayah*[1][4]
\quranayah*[1][5]
{اهدِنَا الصِّراطَ} {المُستَقيمَ \hfill ﴿٦﴾}
\quranayah*[1][7]
//
\glb
\quranayahfa*[1][1]
\quranayahfa*[1][2]
\quranayahfa*[1][3]
\quranayahfa*[1][4]
\quranayahfa*[1][5]
{ما را به راه راست} {هدايت فرما، \hfill (6)}
\quranayahfa*[1][7]
//
\endgl
\end{document}

Original answer
Sorry that I've probably lined up the words wrong as I don't understand Arabic or Persian.
One issue is that I'm having trouble changing the line spacing. It seems to be the same issue as here. I've used the same work-around as in that question.
There are lots of options for controlling these structures in expex
. Have a look at §9 of the manual.
MWE
I used the Qur'an text and Farsi translation from qurantext-simple.def
and qurantext-fa.translation.def
respectively.
I gave up at ayah 5 because ayah 6 was too confusing for me to decide what should go under what :).
I was unable to get it working with the quran
package for the text. I think this is because \quransurah
is not expandable.
\documentclass{article}
\usepackage{xepersian}
\settextfont{Yas}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\usepackage{expex}
\lingset{everygla=\arabicfont\large\rule{0pt}{25pt}, everyglb=\footnotesize,
glwordalign=center}
\begin{document}
\begingl
\gla بِسمِ اللَّهِ الرَّحمٰنِ الرَّحيمِ ١
الحَمدُ لِلَّهِ رَبِّ العالَمينَ ٢
الرَّحمٰنِ الرَّحيمِ ٣
مالِكِ يَومِ الدّينِ ٤
إِيّاكَ نَعبُدُ وَإِيّاكَ نَستَعينُ ٥
//
\glb {به نام} خداوند رحمتگر مهربان (١)
ستايش خدايى {را كه پروردگار} جهانيان، (٢)
رحمتگر مهربان، (٣)
{[و] خداوند} روز جزاست. (٤)
{[بار الها] تنها تو را} مىپرستيم، {و تنها از تو يارى} مىجوييم. (٥)
//
\endgl
\end{document}

expex
package. But\quransurah
is not expandable, so I think you'd need to enter your text directly for it to work.