Page MenuHomePhabricator

Add a "footnote" tag to the parser
Closed, ResolvedPublic

Description

Author: fgregg

Description:
BUG MIGRATED FROM SOURCEFORGE
http://sourceforge.net/tracker/index.php?func=detail&aid=620592&group_id=34373&atid=411195
Originally submitted by nobody 2002-10-08 21:04

Here's something I've been thinking about which might
be pretty easy to implement. How about a method for
automatically generating nice, neat, numbered
footnotes? You could embed something like [[note: the
North American Land Giraffe is an example of a species
so rare no members have ever existed.]] into the text
of an article, and then when it gets converted to HTML
for display the tag gets replaced with a number that's
linked to an anchor down at the bottom of the page with
the text of the note in it. Wikipedia's hyperlinks
between articles make footnotes not as important as
they would be for a paper encyclopedia, but there are
still situations where they're very handy; annotating
tables of data, for example, where there isn't room to
include the text and it doesn't warrant a whole
separate article. You could even get fancy and have
[[note:]] tags within tables get placed immediately
below the table itself, associating them more directly
with the table.

I see footnotes used occasionally in Wikipedia articles
anyway, and this way they'd be much easier to maintain.

  • Additional comments ------------------------

Date: 2004-07-25 22:07
Sender: lunchboxhero

I wrote a little code to do this.

http://meta.wikimedia.org/wiki/Footnotes

Date: 2004-06-06 04:36
Sender: nobody

I second this. OpenWiki has a great implementation of footnotes:

http://openwiki.com/ow.asp?HelpOnMacros#h16


Version: unspecified
Severity: enhancement

Details

Reference
bz192

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 6:41 PM
bzimport set Reference to bz192.
bzimport added a subscriber: Unknown Object (MLST).

fgregg wrote:

Patches Parser.php to allow footnotes

Attached:

fgregg wrote:

Patch to Skin.php to allow footnotes

Attached:

fgregg wrote:

For more discussion about footnotes and mediawiki, see:
http://meta.wikimedia.org/wiki/Footnotes

stephan.walter wrote:

Pity you can't vote against a bug...

Seriously, I think footnotes are an extremely bad idea. What's the point of
splitting up the text and making the reader scroll down to the bottom and back
again? Either you mention something in a text, or you consider it unimportant
and then you don't mention it.

You might say "But there are a lot of books with footnotes". First, Wikipedia
(or any other wiki, for that matter) is not a book, and second, it doesn't make
them any better just because they're widely used.

Grrr...

(end of rant)

(In reply to comment #4)

We need a better way to cite sources, and footnotes have been the best proposal
for this so far. You don't want this kind of information in the middle of a phrase.

Note that we can, at least theoretically, have a user option to dynamically load
footnote text when you mouseover it. Could be tricky to make it work with the
proposed ESI caching, though.

fgregg wrote:

I agree that footnotes should best be used for citations, and not digressions. If I could figure out a reasonable way to allow only citations, that
wouldn't require the user to work in another input field or learn another and probably limiting syntax, than I would try to implement that. However, I
can't think of any such design. It seems to me the wiki thing not to try to depend only on software design. If we want footnotes to be only used as
citations, than we can announce that as a policy and only remove inappropriate footnotes when we see them.

fgregg wrote:

Also, with the patches I submitted. The text of footnote appears when the link is hovered over. (like the alt text does for images now).

shaun_macpherson2001 wrote:

(In reply to comment #0)

BUG MIGRATED FROM SOURCEFORGE

http://sourceforge.net/tracker/index.php?func=detail&aid=620592&group_id=34373&atid=411195

Originally submitted by nobody 2002-10-08 21:04

Here's something I've been thinking about which might
be pretty easy to implement. How about a method for
automatically generating nice, neat, numbered
footnotes? You could embed something like [[note: the
North American Land Giraffe is an example of a species
so rare no members have ever existed.]] into the text
of an article, and then when it gets converted to HTML
for display the tag gets replaced with a number that's
linked to an anchor down at the bottom of the page with
the text of the note in it. Wikipedia's hyperlinks
between articles make footnotes not as important as
they would be for a paper encyclopedia, but there are
still situations where they're very handy; annotating
tables of data, for example, where there isn't room to
include the text and it doesn't warrant a whole
separate article. You could even get fancy and have
[[note:]] tags within tables get placed immediately
below the table itself, associating them more directly
with the table.

I see footnotes used occasionally in Wikipedia articles
anyway, and this way they'd be much easier to maintain.

  • Additional comments ------------------------

Date: 2004-07-25 22:07
Sender: lunchboxhero

I wrote a little code to do this.

http://meta.wikimedia.org/wiki/Footnotes

Date: 2004-06-06 04:36
Sender: nobody

I second this. OpenWiki has a great implementation of footnotes:

http://openwiki.com/ow.asp?HelpOnMacros#h16

Hello! My goodness, I am getting into the bowels of Wikimedia and am somewhat
bewildered ;). I
think this is the tech bug area to add in the feature of foot/reference notes.
One proposed way
to do reference notes is via a tab system around facts, with the fact being
quoted at the bottom.

An example is here [ http://en.wikipedia.org/w/wiki.phtml?title=Wikipedia:
WikiProject_Fact_and_Reference_Check/Example_2/&action=edit ] where you can how
the tabs work (ad
hoc comment tabs).

In short a <<fact would be tabbed>> with >> or other symbol and it would
autoquote it in a
reference section at the end. You'd be able to add multiple sources references
under the quote.
Come and visit a project page devoted to making Wikipedia the
most authoratitve source of information ever created here [
http://en.wikipedia.org/wiki/
Wikipedia:WikiProject_Fact_and_Reference_Check ] .

ShaunMacPherson

bugzillas+padREMOVETHISdu wrote:

Note that as mentioned in [[Wikipedia:Footnote2#Technical issues]] there is an
implementation already in [[en:]] (without autogeneration of numbers) using the
templates [[Template:f1]], [[Template:f1b]], [[Template:f2]], [[Template:f2b]], etc.

[[Wikipedia talk:Footnotes#Templates]] shows another implementation using
[[Template:see-note]] and [[Template:note]], where the footnote-marker need not
be numeric.

Apart from [[m:footnotes]] & its talk, there is more discussion about this in:
[[Wikipedia:Footnotes]], [[Wikipedia:Footnote2]] & their talks, as well as the
en: village pump: [[Wikipedia:Village pump (proposals)#Footnotes, endnotes and
bibliography]].

Please note that some of those who oppose using footnotes in wikipedia might
support using them in other wikimedia projects like wikibooks. (I myself neither
support nor oppose.)

  • Bug 1484 has been marked as a duplicate of this bug. ***

We don't need footnotes but better support of bibliographic references. People
tend to confuse because references are shown in form of footnotes in printed
media. Maybe footnotes are the best way for references in Wikipedia too but in
general footnotes are bad style - especially for an encyclopaedia. You better
implement references and maybe make them look like footnotes but not vice versa
(implement footnotes and maybe they'll be used for references).

avarab wrote:

Implemented as an extension for some time now, marking this as FIXED in CVS HEAD.

morten wrote:

Ævar, what extension do you refer to?

I did see several extensions implementing footnotes for the latest installment of MediaWiki, but I have yet to
see an implementation which is as elegant as Forest's above (which works for older versions of MediaWiki as
well). The advantages of Forest's solution are several... :

  • The footnotes stay with the text using them. They are copied along, as you copy'n paste a text (and the

numbering is automatically adapting to the changed text).

  • You can jump elegantly between footnote and text, and vice versa.
  • The note text is displayed automatically in a small popup when hovering with the mouse arrow over the note.

...with only one disadvantage, as far as I can see :

  • Text in footnotes aren't parsered and cannot use wikimarkup i.e. wikilinks (which would be very nice!). They

must suffice to contain raw unformatted text or external links.

I have yet to find a solution which have the same advantages, and doesn't have the last drawback.

robchur wrote:

This is implemented via the Cite.php extension, which provides <ref> tags.

morten wrote:

I have looked at the Cite extension and from what I can see it looks very similar. I have yet to install it, as
it works only with the latest MW installments as far as I can tell, while Forest's solution works smoothly with
previous installments (such as ours).

It still doesn't provide the handy hovering 'tips', though - although there's great advantage in being able to
include wikimarkup in the notes.

fgregg wrote:

The only advantages of my extension over Cite.php is that it works on older
versions and that the title attribute works. The lack of title attribute is due
to the Parser not to an omission in the extension:

From [[Meta:Cite.php]]
<quote>
'''"The citation links generated by <ref> and the backlinks generated by
<references> have an empty title attribute (<a href="..." title="">...)'''
Issue with MediaWiki, not this extension. MediaWiki will generate output like <a
href="#foo" title="">bar</a> when given input like bar"
</quote>