I need the ability to have a foonote in one stream be able to reference a footnote in another stream. There are two series of footnotes defined. I want to be able to cross-reference between the two series of notes. So, I could have a footnote in series A reference a footnote in series B.
The answer must take into account that my MWE is "de-duplicating" footnotes in the second footnotes stream (a problem that was solved here). So, this is a bit different than other posts that attempt the same thing without this added complexity.
\documentclass[12pt]{book}
\usepackage{fontspec}
\usepackage{reledmac}
\usepackage[polutonikogreek]{babel}
\usepackage{setspace}
\usepackage{etoolbox}
\usepackage{perpage} %the perpage package
%footnote sets arrangement
\arrangementX[A]{paragraph}
\arrangementX[B]{twocol}
\colalignX{\justifying}
\makeatletter
\bhooknoteX[A]{\setstretch {\setspace@singlespace}}
\bhookgroupX[A]{\setstretch {\setspace@singlespace}}
\makeatother
\let\footnote\footnoteA
\renewcommand{\thefootnoteA}{\roman{footnote}}
\interfootnotelinepenalty=10000
%This makes the footnote numbering restart for every page
\MakePerPage{footnoteB} %the perpage package command
\let\footnoteBlist\relax%Declare a list
\newcommand{\onlyonefootnoteB}[1]{%The command to be call instead of \footnoteB
\xifinlist{\detokenize{#1}}{\footnoteBlist}%
{}%True : does nothing
{%False : add to the list + add footnote
\listxadd{\footnoteBlist}{\detokenize{#1}}%
\footnoteB{#1}%
}%
}
\bhookgroupX[B]{%
\global\let\footnoteBlist\relax%Declare a list
}
\begin{document}
Lorem ipsum dolor\footnote{test text A} sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna\onlyonefootnoteB{test 1} aliqua. Ut enim ad minim veniam, quis nostrud\footnote{test text B} exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor\footnote{test text A} in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur\onlyonefootnoteB{test 2} sint occaecat cupidatat non proident,\onlyonefootnoteB{test 1} sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{document}