3

I would like to ask, please, by which code it may be possible to change the rule belonging to a specific series of footnotes in reledmac. As I have learned from a previous answer, it is possible to achieve right alignment of the footnote rule of for example a series of familiar B-notes by the command

\renewcommand{\footnoteruleB}{\right@footnoterule}

Is it also possible to change width and thickness of the footnote rule in this way, and if, by which code? I would like to know a solution that will work with the following minimum example where an Arabic text ist facing its translation into German:

\documentclass[11pt,twoside,a4paper]{article}

\usepackage{setspace}

\usepackage[series={A,B},nocritical,noend]{reledmac}
\usepackage{reledpar}

\usepackage{polyglossia}

\setmainlanguage[spelling=old,babelshorthands=true]{german}
\setmainfont[Mapping=tex-text,Renderer=ICU]{Charis SIL}

\setotherlanguage{english}
\newfontfamily\englishfont[Mapping=tex-text,Renderer=ICU]{Charis SIL}

\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.4]{Scheherazade}

\linenumincrement*{2}
\firstlinenum*{1}
\setlength{\Lcolwidth}{0.5\textwidth}
\setlength{\Rcolwidth}{0.4\textwidth} 

\newcommand{
\فب
}[1]{\footnoteB{#1}}

\renewcommand*{\thefootnoteB}{\alph{footnoteB}}



\afterruleX[A]{2pt}

\arrangementX[B]{paragraph}
\wrapcontentX[B]{\textarabic}
\bhookgroupX[B]{\RTL}%this is the correct way to set the B-footnotes in     a paragraph, the \arrangementX has to be done first, this was communicated by Maïeul Rouquette, the developer of reledmac, on Fr., the 24.02.2017, on stakexchange: http://tex.stackexchange.com/questions/355398/changing-the-direction-of-footnotes-in-reledmac

\afterruleX[B]{2pt}%to increase the vertical space between footnoteruleB and the B-footnotes, it has to be placed before the following command which puts the B-footnoterule right

\makeatletter
\renewcommand{\footnoteruleB}{\right@footnoterule}
\makeatother

\makeatletter
\renewcommand{\bodyfootmarkA}{\textsuperscript{\hspace{1pt}   (\@thefnmarkA)}}
\renewcommand{\bodyfootmarkB}  {\textarabic{\hspace{1pt}\textsuperscript{(\@thefnmarkB)}}}
\renewcommand{\footfootmarkA}    {\textsuperscript{(\@thefnmarkA)}\hspace{1ex}}
\renewcommand{\footfootmarkB}{\textarabic{\textsuperscript{(\@thefnmarkB)}}\hspace{1ex}}
\makeatother%these commands where communicated by Maïeul Rouquette, the developer of reledmac, on the Thu. the 23.02.2017 on stakexchange: http://tex.stackexchange.com/questions/355182/customising-footnote-marks-with-reledmac, it seems that these commands have to be set after the commands for the arrangement of the footnotes in order to implement all the details, for example the hspace after the footfootmarkA


\begin{document}



%\numberlinefalse

\AtBeginPairs{\sloppy}
\begin{pairs}

\begin{Rightside} 
\begin{RTL}
\begin{Arabic}
\begin{spacing}{2}
\beginnumbering
\pstart
نحمدك اللهمّ على نعم يؤذن\فب{يُؤْذِنُ.} الحمد بازديادها، ونصلي على نبيك محمد     هادي الأمة\فب{يعني أمة محمد.} لرشادها
\pend    
\endnumbering
\end{spacing}
\end{Arabic}
\end{RTL}
\end{Rightside}

\begin{Leftside} 
\begin{german}
\beginnumbering
\pstart
\noindent
Wir preisen dich, Gott, für Gnadengaben, deren Lobpreis von    ihrem\footnoteA{D.h. der Gnadengaben} Anwachsen kündet, und wir bitten um Segen für deinen Propheten Muḥammad, der die Gemeinde auf den rechten Weg führt.
\pend
\endnumbering
\end{german}
\end{Leftside}
\end{pairs}
\Columns


\end{document}
2

Ok, in your case, the problem is quite complexe, because you have both left-to-right footnote rule, and right-to-left footnoterule.

First, I will explain you how the footnoterules are defined in reledmac, then in bidi, and then you will get the answer.

Footnote rules in reledmac

Reledmac have two footnoterules for series of note. For example, for the series A, there are:

  • \Afootnoterule for critical footnotes;
  • \footnoteruleA for familiar footnotes.

In your case, you don't use critical footnotes, and you have only two series of notes, A and B. So you you have \footnoteruleA and \footnoteruleB.

By default, footnote rule of reledmac is "let to" the LaTeX footnote rule, \footnoterule (Read https://tex.stackexchange.com/a/318/7712 to understand exactly what mean a command "let to" an other command, and what is the difference with a command calling an other one) .

When you use bidi, as you do, \footnoterule is modified to calls \left@footnoterule.

So, in your case, you have:

  • \footnoteruleA which is let, when reledmac is loaded, to the value of \footnoterule. As you load reledmac before bidi, you don' call \left@footnoterule
  • \footnoteruleB which calls \right@footnoterule.

The first thing to do is, to simplify the problem, to modify \footnoteruleA to make it calling \left@footnoterule.

So

\makeatletter
\renewcommand{\footnoteruleA}{\left@footnoterule}
\makeatother

Footnoterule in bidi

Now, we can look at the standard definition of footnoterule in bidi. You can find it on footnote-xetex-bidi.def file.

\def\right@footnoterule{%
  \kern-3\p@
  \hbox to \columnwidth{\hskip .6\columnwidth \hrulefill }
  \kern2.6\p@}
\def\left@footnoterule{\kern-3\p@
  \hrule \@width .4\columnwidth \kern 2.6\p@}

In LaTeX, \p@ means pt, the unit of mesure. I will start comment by \left@footnoterule, because it is easier to understand.

Comment of \left@footnoterule

  • \kern-3\p@ and \kern2.6\p@ are vertical space added before/after footnoterule. As reledmac already take account of there space, and as reledmac has it own mechanism, you don't need to change anything.
  • \hrule \@width .4\columnwidth means: a horizontal run of .4\columnwidth. As you are in one column mode (In sense of LaTeX, not of reledpar parallel typesetting), the \columnwidth is width available for text in the page. So your rule is 40% of \columnwidth. By default, the height of the rule is 0.4pt (that is TeX setting).

Comment of \right@footnoterule

  • \kern-3\p@ and \kern2.6\p@ are the same as in \left@footnoterule.
  • \hbox to \columnwidth create and horizontal box which width is \columnwidth The content of this horizontal box is \hskip .6\columnwidth \hrulefill:
    • \hskip .6 \columwidth : an horizontal space of 60 % of \columwidth.
    • \hrulefill: a rule which take all the available space. In this case: \columwidth - .6 \columnwidth = 0.4 \columnwidth.
  • Consequently, you rule have a width of 0.4 \columnwidth. The height of the rule is defined by default to 0.4 pt, as \hrulefill calls \hrule.

Customize footnoterule height and width.

Now, suppose we want to have the following things:

  • A width of rule equals to 10% of \textwidth.
  • A height of rule equals to 3pt.

(These size are caricatural, but it is only for the present demonstration). We have to redefine \left@footnoterule and \right@footnoterule.

\left@footnoterule

\def\left@footnoterule{\kern-3\p@
  \hrule \@width .1\columnwidth \@height 3\p@ \kern 2.6\p@}

The change with the standard definition are:

  • .1\columnwidth instead of .4 \columnwidth
  • \@height 3\p@ to set the height of the rule.

\right@footnoterule

We won't change the definition of \hrulefill, as it is called in many place in \LaTeX. So we we recopy and modify is definition in the definition of \right@footnoterule (\hrulefill is defined on latex.ltx file).

\def\right@footnoterule{%
  \kern-3\p@
  \hbox to \columnwidth{\hskip .9\columnwidth \leaders\hrule \@height 3\p@\hfill}
  \kern2.6\p@}

The change with the initial definition:

  • .9\columnwidth instead of .4\columnwidth. The width of the rule is consquently \columnwitdh-.9\columnwidth=.1\columnwidth.
  • \leaders\hrule \@height 3\p@\hfill instead of \hrulefill. That is inspired of the definition of \hrulefill but:
    • I have not copied some code not need in this specific case.
    • I have added \@height 3\p@, to set the height of the rule.

Final code

\documentclass[11pt,twoside,a4paper]{article}

\usepackage{setspace}

\usepackage[series={A,B},nocritical,noend]{reledmac}
\usepackage{reledpar}

\usepackage{polyglossia}

\setmainlanguage[spelling=old,babelshorthands=true]{german}
\setmainfont[Mapping=tex-text,Renderer=ICU]{Charis SIL}

\setotherlanguage{english}
\newfontfamily\englishfont[Mapping=tex-text,Renderer=ICU]{Charis SIL}

\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.4]{Scheherazade}

\linenumincrement*{2}
\firstlinenum*{1}
\setlength{\Lcolwidth}{0.5\textwidth}
\setlength{\Rcolwidth}{0.4\textwidth} 

\newcommand{
\فب
}[1]{\footnoteB{#1}}

\renewcommand*{\thefootnoteB}{\alph{footnoteB}}



\afterruleX[A]{2pt}

\arrangementX[B]{paragraph}
\wrapcontentX[B]{\textarabic}
\bhookgroupX[B]{\RTL}%this is the correct way to set the B-footnotes in     a paragraph, the \arrangementX has to be done first, this was communicated by Maïeul Rouquette, the developer of reledmac, on Fr., the 24.02.2017, on stakexchange: https://tex.stackexchange.com/questions/355398/changing-the-direction-of-footnotes-in-reledmac

\afterruleX[B]{2pt}%to increase the vertical space between footnoteruleB and the B-footnotes, it has to be placed before the following command which puts the B-footnoterule right

\makeatletter
\def\right@footnoterule{%
  \kern-3\p@
  \hbox to \columnwidth{\hskip .9\columnwidth \leaders\hrule \@height 3\p@\hfill}
  \kern2.6\p@}
\def\left@footnoterule{\kern-3\p@
  \hrule \@width .1\columnwidth \@height 3\p@ \kern 2.6\p@}

\renewcommand{\footnoteruleA}{\left@footnoterule}
\renewcommand{\footnoteruleB}{\right@footnoterule}

%these commands where communicated by Maïeul Rouquette, the developer of reledmac, on the Thu. the 23.02.2017 on stakexchange: https://tex.stackexchange.com/questions/355182/customising-footnote-marks-with-reledmac, it seems that these commands have to be set after the commands for the arrangement of the footnotes in order to implement all the details, for example the hspace after the footfootmarkA
\renewcommand{\bodyfootmarkA}{\textsuperscript{\hspace{1pt}(\@thefnmarkA)}}%Maïeul Rouquette avec corrected spurious space here
\renewcommand{\bodyfootmarkB}  {\textarabic{\hspace{1pt}\textsuperscript{(\@thefnmarkB)}}}
\renewcommand{\footfootmarkA}    {\textsuperscript{(\@thefnmarkA)}\hspace{1ex}}
\renewcommand{\footfootmarkB}{\textarabic{\textsuperscript{(\@thefnmarkB)}}\hspace{1ex}}


\makeatother


\begin{document}



%\numberlinefalse

\AtBeginPairs{\sloppy}
\begin{pairs}

\begin{Rightside} 
\begin{RTL}
\begin{Arabic}
\begin{spacing}{2}
\beginnumbering
\pstart
نحمدك اللهمّ على نعم يؤذن\فب{يُؤْذِنُ.} الحمد بازديادها، ونصلي على نبيك محمد     هادي الأمة\فب{يعني أمة محمد.} لرشادها
\pend    
\endnumbering
\end{spacing}
\end{Arabic}
\end{RTL}
\end{Rightside}

\begin{Leftside} 
\begin{german}
\beginnumbering
\pstart
\noindent
Wir preisen dich, Gott, für Gnadengaben, deren Lobpreis von    ihrem\footnoteA{D.h. der Gnadengaben} Anwachsen kündet, und wir bitten um Segen für deinen Propheten Muḥammad, der die Gemeinde auf den rechten Weg führt.
\pend
\endnumbering
\end{german}
\end{Leftside}
\end{pairs}
\Columns


\end{document}

Addendum

When you call multiple time \makeatletter…\makeatother, it is better to "mutualize" all thing in one \makeatletter…\makeatother, if possible.

Don't hesitate to ask question, because we deal here with some low-level concepts.

  • This works great, thank you very much. Your comprehensive explanation was highly enlightening. What is the disatvantage to just use your code with a \renewcommand and \footnoteruleB command for example as in \renewcommand{\footnoteruleB}{\kern-3\p@\hbox to \columnwidth{\hskip 0.3\columnwidth \hrulefill} \kern 2.6\p@}, which seems to work also (at least at the first glance) – Jens Bakker Feb 25 '17 at 15:34
  • the advantage to call \right@footnoterule and not directly its content is if one day you need more footnote series: you will only one commands for all footnote rules. – Maïeul Feb 25 '17 at 15:42
  • Thanks a lot for this answer, this also works very fine, I just tried successfully to add a further series of RTL footnotes by using your code \renewcommand{\footnoteruleC}{\right@footnoterule}. – Jens Bakker Feb 25 '17 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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