TransWikia.com

Can I make a footnote for a footnote? (reledmac)

TeX - LaTeX Asked on December 13, 2021

I would like to ask, how can I make a footnote in a footnote? Like when the footnote is explaining the main text, and then the second footnote is explaining the footnote.

Here is my mini example:

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

usepackage{setspace}
usepackage[series={A,B},nocritical,noend,noeledsec]{reledmac}
usepackage{reledpar}
usepackage{polyglossia}

setmainlanguage{arabic}
setmainfont[Script=Arabic,Scale=1.3]{Scheherazade}


newcommand{فا}[1]{footnoteA{#1}}
renewcommand*{thefootnoteA}{alph{footnoteA}}
newcommand{فب}[1]{footnoteB{#1}}
renewcommand*{thefootnoteB}{arabic{footnoteB}}


arrangementX[A]{paragraph}
bhookgroupX[A]{RTL}

arrangementX[B]{paragraph}
bhookgroupX[B]{RTL}


makeatletter
defright@footnoterule{%
kern-3p@
 hbox to columnwidth{hskip .6columnwidth leadershrule @height .4p@hfill}
  kern2.6p@}
defleft@footnoterule{kern-3p@
  hrule @width 1columnwidth @height .4p@ kern 2.6p@}

afterruleX[A]{2pt}
renewcommand{footnoteruleA}{hrule width textwidth}
afterruleX[B]{2pt}
renewcommand{footnoteruleB}{hrule width textwidth}


renewcommand{bodyfootmarkA}{hspace{1pt}textsuperscript{)hspace{1pt}@thefnmarkAhspace{1pt}(}}
renewcommand{bodyfootmarkB}{hspace{1pt}textsuperscript{)hspace{1pt}@thefnmarkBhspace{1pt}(}}

renewcommand{footfootmarkA}{textsuperscript{)hspace{1pt}@thefnmarkAhspace{1pt}(}hspace{1ex}}
renewcommand{footfootmarkB}{textsuperscript{)hspace{1pt}@thefnmarkBhspace{1pt}(}hspace{1ex}}


usepackage{perpage}
MakePerPage{footnoteA@typeset}
MakePerPage{footnoteB@typeset}


lineation*{page}
setlength{headheight}{15pt}




sloppy
begin{document}


فرض الوضوءفا{- قوله {فرض الوضوء}: قال الله تعالى  يَا أَيُّهَا الَّذِينَ آمَنُواْ إِذَا قُمْتُمْ إِلَى الصَّلاةِ فَاغْسِلُواْ وُجُوهَكُمْ وَأَيْدِيَكُمْ إِلَى الْمَرَافِقِ وَامْسَحُواْ بِرُؤُوسِكُمْ وَأَرْجُلَكُمْ إِلَى الْكَعْبَيْنِ. ففرض الطهارة غسل العضاء الثلاثة ومسح الرأس.}: غسل الوجه واليدين ومسح ربع الرأس وغسل الرجلين.فب{سورة المائدة: ٦.}



end{document}

So this is now fully working and looks very fine as well, but I would like to have the footnote from فب within the footnote فا

So it should look like this:

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

usepackage{setspace}
usepackage[series={A,B},nocritical,noend,noeledsec]{reledmac}
usepackage{reledpar}
usepackage{polyglossia}

setmainlanguage{arabic}
setmainfont[Script=Arabic,Scale=1.3]{Scheherazade}


newcommand{فا}[1]{footnoteA{#1}}
renewcommand*{thefootnoteA}{alph{footnoteA}}
newcommand{فب}[1]{footnoteB{#1}}
renewcommand*{thefootnoteB}{arabic{footnoteB}}


arrangementX[A]{paragraph}
bhookgroupX[A]{RTL}

arrangementX[B]{paragraph}
bhookgroupX[B]{RTL}


makeatletter
defright@footnoterule{%
kern-3p@
 hbox to columnwidth{hskip .6columnwidth leadershrule @height .4p@hfill}
  kern2.6p@}
defleft@footnoterule{kern-3p@
  hrule @width 1columnwidth @height .4p@ kern 2.6p@}

afterruleX[A]{2pt}
renewcommand{footnoteruleA}{hrule width textwidth}
afterruleX[B]{2pt}
renewcommand{footnoteruleB}{hrule width textwidth}


renewcommand{bodyfootmarkA}{hspace{1pt}textsuperscript{)hspace{1pt}@thefnmarkAhspace{1pt}(}}
renewcommand{bodyfootmarkB}{hspace{1pt}textsuperscript{)hspace{1pt}@thefnmarkBhspace{1pt}(}}

renewcommand{footfootmarkA}{textsuperscript{)hspace{1pt}@thefnmarkAhspace{1pt}(}hspace{1ex}}
renewcommand{footfootmarkB}{textsuperscript{)hspace{1pt}@thefnmarkBhspace{1pt}(}hspace{1ex}}


usepackage{perpage}
MakePerPage{footnoteA@typeset}
MakePerPage{footnoteB@typeset}


lineation*{page}
setlength{headheight}{15pt}




sloppy
begin{document}


فرض الوضوءفا{- قوله {فرض الوضوء}: قال الله تعالى  يَا أَيُّهَا الَّذِينَ آمَنُواْ إِذَا قُمْتُمْ إِلَى الصَّلاةِ فَاغْسِلُواْ وُجُوهَكُمْ وَأَيْدِيَكُمْ إِلَى الْمَرَافِقِ وَامْسَحُواْ بِرُؤُوسِكُمْ وَأَرْجُلَكُمْ إِلَى الْكَعْبَيْنِ.فب{سورة المائدة: ٦.} ففرض الطهارة غسل العضاء الثلاثة ومسح الرأس.}: غسل الوجه واليدين ومسح ربع الرأس وغسل الرجلين.



end{document}

How can I make it work? Can please someone help me?

The solution with footnotemark and footnotetext is working, but I don’t like it, as it looks confusing. Also I am aware of bigfoot, but I would like to use reledmac, because it works really fine and easy with arabic texts.

One Answer

Pretty much, you can't. The footnotemarkfootnotetext solution is the only way to make it work.

If you're up for doing programming work and are willing to deal with a potentially fragile solution, you might be able to make it work (or perhaps someone will care to do the work on this outline and create a working prototype)

Th idea would be that inside of a footnote, footnote is redefined to

  • Output the footnotemark
  • Store the footnote text in a macro (you'll need to handle the case where there are multiple footnotes, also remember that you're operating inside a group so you need to make it a global definition)
  • When the footnote is output, the stored footnote text(s) are output via footnotetext (one for each footnote text).

That said, I'm not entirely sure that footnotes within footnotes are very reader friendly. Most style guides explicitly prohibit them. I think maybe David Foster Wallace has done this in some of his work, but that's done in a spirit of irony.

Answered by Don Hosek on December 13, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP