Page MenuHomePhabricator

Shared citations for multiple pages
Open, Needs TriagePublic

Description

One drawback of splitting a source document into multiple pages on wikisource (see T275319#9818815) is that it complicates creating footnotes and endnotes that apply to the entire document.

I believe there are some workarounds currently used, where proper <ref> tags aren't used and instead the footnotes are "faked" by manually created links to an ID embedded in the endnote section.

We'd like to make that more reliable/less hacky. One version would be to add three new ref features to cite:

  1. <ref name="foo" page="Bar"/> This is identical to the current "named references" but it references a named reference *on another page*. You do /not/ have to generate <references> content for this (or the generated <references> content could just be "See [[Page Bar]]". The assumption is that <references> won't be present on the current page, but instead on page "bar", so the exact content of the <references> generated doesn't matter, what's important is that the hyperlink point to Bar#cite-note-foo.
  2. A way to start citation numbering at an arbitrary point, so that footnotes on page N don't always start at 1. (In the Parsoid implementation, reference numbering is done by CSS, so this just entails generating the appropriate CSS to reset the counter.)
  3. <ref name="foo" suppress>....</ref> This generates an entry in the <references> table but does not generate the usual visible [1] markup. This works with feature 1 to create the endnote entry that is linked to from a different location. Note that the usual up-arrow backlink would be omitted for references with suppress, since the backlinks would have to point to a different page.

If you wanted to make backlinks "work" for these "shared reference section" refs, you'd have <ref name="foo" page="bar" id="baz"> syntax for item #1 generate an automatic backlink id (say #cite_ref-baz) on the superscript so that the <ref name="foo" suppress backlink="Page#baz"> syntax for item #3 would generate the appropriate backlink to Page#cite_ref-baz. The limitation is that these references need to be manually named both on the originating page and on the shared-endnotes page. Automatic numbering would introduce a lot of complications where a shared numbering table for all pages would need to be created and maintained on update of all the separate pages -- a lot of extra complexity which probably doesn't scale well as the document size grows. Having a simple editor-defined naming system for references in the source document would avoid this need.