1

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}
3
  • Sorry, but I don't understand your need. It is not the first time I don't understand it. What do you mean by "ability to have a foonote in one stream be able to reference a footnote in another stream" ? Do you mean using cross referencing between notes. Or do you mean an other thing?
    – Maïeul
    Mar 19, 2018 at 10:00
  • 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.
    – JMR
    Mar 19, 2018 at 10:56
  • Please and this sentence in your question.
    – Maïeul
    Mar 19, 2018 at 11:05

1 Answer 1

1

It is possible with classical \ref and \label.

The problem, in your case, is that you made

\let\footnote\footnoteA
\renewcommand{\thefootnoteA}{\roman{footnote}}

So. 1. You tell that \footnote command is the same as \footnoteA command 2. But you use the value of the footnote counter to print the footnote number for series A, and not the value of footnoteA counter, which should be used. Indeed, you could see that footnote A, with your code, have no number typeset.

So just change \renewcommand{\thefootnoteA}{\roman{footnote}} to \renewcommand{\thefootnoteA}{\roman{footnoteA}}.

Here a MWE of crossref.

\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{footnoteA}}
\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}
\ref{footnoteA:crossref}

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{\label{footnoteA:crossref}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 (see \ref{footnoteA:crossref})} sunt in culpa qui officia deserunt mollit anim id est laborum.

\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .