To contradict Martin (slightly), the script can probably be modified to give you something close. I’m not sure exactly how it’ll display, though. If you make it say:
if ($v ne $verse) {
$verse=$v;
print "\\x - \\xo $v\\*";
}
Then similar to how you get an empty footnote saying Chapter X, you’ll then get an empty footnote saying Y (at the first footnote on verse Y) and then the rest of the 1st footnote in that verse. Other footnotes won’t have a chapter or a verse number. BUT you will need to turn on paragraphed notes and probably need to alter some things like the inter-footnote spacing (I can’t remember what it’s called, but I think it’s in the user interface now). Once you’ve turned on paragraphed notes, you won’t be getting verse Y on its own line, unless you include some raw TeX
commands in what the perl is spitting out. (prefixing the footnote contents for verse Y with \penalty -10000\space
might be sufficient).
Probably, at some point in this exercise, then fudging it like this will reach its limits, and either Martin’s answer will become the right way to do it, or very significant changes to the TeX code (which would probably break other people’s projects) will be needed.
On the TeX side of things, you’d need to ‘hijack’ the \xo
macro and make it interpret the chapter:verse parameters as values, before they enter the output stream, and then do the comparison and output redefinition in TeX. The danger is that if anyone had an \xo that wasn’t always followed by chapter:verse, and instead had chapter.verse or similar, the code would give strange and unexpected errors.
Defining robust macros in TeX is hard, and there is no standard that defines what people will put in \xo (nor a guarantee they only use it in cross-references!).
Thinking about it a bit more, it’d actually be far better to define your own macro with a defined terminator, that in turn resolved to \xo, rather than hijacking \xo.
e.g. \def\zmyxrefstyle#1:#2\*{
comparisonde}
to set any prefixes to the callee.
Of course, you’d still have to make the footnote caller generator code put the chapter number and / or verse number before the callee. I’m guessing it would take about a half a week of programming and debugging at the least, but there may be things I’ve forgotten that would push it unto a week or 3.
Without a very clear call from multiple users, it is unlikely that we will find the time to do this any time in the next year.