Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
add comment

1 Answer

(1)+(2): This can be done with the eledmac package; no need to reinvent the wheel here. It has clear documentation, so I see no need to rewrite the relevant paragraphs from it; the original documentation will in any case always be more comprehensive.

(3): You can redefine the \footnote command for that purpose thus:

\let\OLDfootnote\footnote
\renewcommand{\footnote}[1]{\OLDfootnote{\setstretch{0}#1}

\setstretch is provided by the setspace package.

Good luck ☺!

share|improve this answer
    
A small example for (1) and (2) would improve your answer. –  egreg Feb 7 at 10:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.