Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-13 08:18:27

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,391
Website GitHub Mastodon

Footnotes: Provide jump back to referring link

I’d suggest an addition to Textile’s footnote handling which would add a link to the originating link (superscript) from the footnote index figure, so a reader could easily jump back and forth between references and footnotes.

In detail

This Textile:

a reference[1]
fn1. a footnote

would render this HTML (replace $hash with a random hash):

<p>a reference<a href="#refHASH"<sup class="footnote"><a href="#fn-$hash" id="ref-$hash">1</a></sup></p>
<p id="fn-$hash" class="footnote"><sup><a href="#ref-$hash">1</a></sup> a footnote</p>

resulting in a rendered output like this:

<p>a reference<a href=”#refHASH”<sup class=“footnote”><a href=”#fn-$hash” id=“ref-$hash”>1</a></sup></p>
<p id=“fn-$hash” class=“footnote”><sup><a href=”#ref-$hash”>1</a></sup> a footnote</p>

Offline

#2 2006-10-13 10:35:55

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Footnotes: Provide jump back to referring link

With appropriate title attributes, localized, yup it’s a good idea.

Offline

#3 2006-10-13 14:55:48

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Footnotes: Provide jump back to referring link

Wouldn’t work if the same footnote is referenced more than once. Why not use the back button in the browser?

Last edited by ruud (2006-10-13 14:59:25)

Offline

#4 2006-10-13 20:50:44

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Footnotes: Provide jump back to referring link

I like this idea too, it’d certainly be convenient.

ruud wrote:

Wouldn’t work if the same footnote is referenced more than once. Why not use the back button in the browser?

It’s pretty rare for a footnote to be referenced multiple times, whether in print or web, in my experience.

Offline

#5 2006-10-13 21:03:11

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Footnotes: Provide jump back to referring link

Not as rare as you might think. I see it quite often in combination with tables.
In the case of multiple references to a single footnote, perhaps only the first or the last reference should get an ID attribute, to avoid duplicate IDs.

Offline

#6 2006-10-13 22:35:56

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Footnotes: Provide jump back to referring link

It doesn’t matter, footnotes are already hashed because of that problem.

Offline

#7 2006-10-14 06:56:55

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,391
Website GitHub Mastodon

Re: Footnotes: Provide jump back to referring link

Mary wrote:

It doesn’t matter, footnotes are already hashed because of that problem.

Ruud has a strong point here, as the sending anchor isn’t unique:

a reference[1] mentioned twice[1] looses it's target
fn1. where to go from here?

In my applications, this is a rare case, and I’d personally prefer to have the suggested convenience link.

Last edited by wet (2006-10-14 06:58:07)

Offline

#8 2006-10-14 19:38:17

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Footnotes: Provide jump back to referring link

You could very easily make use of the existing hash, that’s what I’m saying. i.e: instead of this:

<p>reference<sup class="footnote"><a href="#fn19311613645313bcaa26cb">1</a></sup></p>

<p id="fn19311613645313bcaa26cb" class="footnote"><sup>1</sup> note</p>

do this:

<p>reference<sup class="footnote"><a id="fnr19311613645313bcaa26cb" href="#fn19311613645313bcaa26cb">1</a></sup></p>

<p id="fn19311613645313bcaa26cb" class="footnote"><sup>1</sup> note <a href="#fnr19311613645313bcaa26cb">&#8617;</a></p>

Offline

Board footer

Powered by FluxBB