I’m editing an Arabic poem with XePersian and the traditionalpoem environment which works fine so far, but I have some questions regarding the line numbers and the paragraph footnotes.
(1) I would like to have line numbers per page and they should change the side of the margin according to even and uneven pages. Is this somehow possible?
(2) If I add a footnote in a specific line of the page, can I refer to this line by a specific counter? If I have different variant readings, I would like to refer to the line of the page, not to a footnote marker.
(3) Is it possible to reduce the spacing between each footnote in the footnote paragraph?
My minimal example:
\documentclass[12pt,a4paper]{book}
%XePersian and Bidipoem
\usepackage[extrafootnotefeatures, Kashida]{xepersian}
\paragraphfootnotes
\settextfont[Mapping=arabicdigits]{Amiri}
\usepackage{bidipoem}
\setdigitfont{Charis SIL}
\setlatintextfont{Charis SIL}
%Linespacing
\linespread{1.6}
%Space between the halfverses
\renewcommand\poemcolsepskip{0.5cm}
%Don’t show footnote markers
\renewcommand*{\thefootnote}{}
%Decrease space between footnotes in the paragraph
\usepackage[para]{footmisc}
\addtolength{\footskip}{0cm}
\makeatletter
\let\splitfootnoterule=\pagefootnoterule
\makeatother
%Linenumbering
\newcount\LineNumber \newcount\templinenumber
\newdimen\linenumberskip \linenumberskip=-1em
\chardef\linestep=2
\def\poemlinenumber{%
\advance\LineNumber1
\templinenumber=\LineNumber
\computelinenumber
}
\def\computelinenumber{%
\ifnum\templinenumber>\linestep
\advance\templinenumber-\linestep
\expandafter\computelinenumber
\else
\ifnum\templinenumber=\linestep
\leavevmode\rlap{\kern\linenumberskip\the\LineNumber}%
\fi
\fi
}
\newenvironment{numberedpoem}
{\everypar{\everypar{\poemlinenumber}}%
\begin{traditionalpoem}}
{\end{traditionalpoem}}
\begin{document}
% In this page, we typeset footnotes from right to left
\setRTLparagraphfootnotes
\begin{numberedpoem}
%%%%%%Verse 1%%%%%%%%%%
قِفَا نَبْكِ مِنْ ذِكْرَى حَبِيبٍ ومَنْزِلِ
&
بِسِقْطِ اللِّوَى بَيْنَ الدَّخُولِ فَحَوْمَلِ
\footnote{
(1)
ذِكْرَى ج : ذكري ب
|| الدخول ج : الذخولي ب.
}
\\
%%%%%%Verse 2%%%%%%%%%%
فَتُوْضِحَ فَالمِقْراةِ لَمْ يَعْفُ رَسْمُها
&
لِمَا نَسَجَتْهَا مِنْ جَنُوبٍ وشَمْألِ
\footnote{
(2)
جَنُوبٍ ج : حنوب ب
}
\\
\end{numberedpoem}
\end{document}