Topic on Extension talk:Cite

Allow defining references not used in page text?

4
Miranche (talkcontribs)

Hello,

Noone has responded to this question for months, so let me try rephrasing it without superfluous information:

Question: Is there a need in Ext:Cite to allow for adding references that would appear in the references list using <refereces/> or {{reflist}}, but without corresponding footnote marks inside the text?

I need this functionality in an extension I'm writing, and as I'm thinking of hacking my own local version of Cite to allow for it, I'm wondering if this can be of wider use. Original message below.

Thank you!


I have recently upgraded to MediaWiki 1.20 and noticed that an extension I wrote to keep track of bibliographies (Miranche/BiblioTex) was partly broken. The extension adds functionality to Extension:Cite to use BibTex bibliographic information, both provided in wiki text or stored on the local file system. The references are included in wiki text via <cite>...</cite> tags, which basically just unwrap into corresponding <ref>...</ref> tags. These parallel LaTeX usage, and accordingly I have also added <nocite>...</nocite> tags for references that I want to appear in the reference list but not in the text. Using a previous version of Ext:Cite, probably over 2 years old now, this worked no problem. Now, I get cite_error_references_missing_key.

The way I would deal with this locally would be to hack Ext:Cite to add an option, say $wgCiteAllowMissingKey, to allow for such references. I wanted to check, though,

  • Is there a relevant past discussion on why references in the text are now required?
  • Would an option to relax this requirement be useful in the public version of the Cite extension?

Thank you!

Miranche (talkcontribs)

No replies for 4 months, replying to myself to bump the thread up.

קיפודנחש (talkcontribs)

it seems that your actual question is not really what you mean.

you asked "Is there a need in Ext:Cite to allow for adding references that would appear in the references list using <refereces/> or {{reflist}}, but without corresponding footnote marks inside the text?"

but it seems that what you really mean is not "is there a need" but rather "is it possible".

if the question is indeed "is there a need", then the answer (at least my answer) is "probably not".

if you ask "is it possible", i think the answer is still "probably not", but it should not be all that difficult to hack the extension to add "no cite mark" option, e.g. by adding a new attribute to the "ref" tag which will cause it to not display the link inside the text. (so some of the references will look like so: <ref nomark="true"> or somesuch) however, this requirement seems somewhat redundant: if you want to maintain a bibliographic list at the bottom of the page, why even use the "Cite" extension? you can just add such a list using standard wiki code, no?

peace.

Miranche (talkcontribs)

קיפודנחש, thanks for the reply.

Clarification: "if you want to maintain a bibliographic list at the bottom of the page, why even use the "Cite" extension?" Good question. Most of the refs in bibliographies I'm using are linked in the text, but not all. In other words, I want to be able to intersperse entries with refs in text and those without.

I know that this is possible in principle because it used to work a couple of years ago. The extension I wrote piggybacks on Cite -- it unwraps a <cite> tag into a <ref> tag in the text, and adds the ref given in <nocite> into Cite's internal list of refs without affecting the wiki text. All citations then used to show up in {{reflist}} in the order they were specified in original wiki text, with those supplied via <nocite> without back links. This worked fine with Cite as it was in late 2010/ early 2011, but is now impossible due to stricter error testing.

I'll go ahead & modify my copy of the extension so the syntax will work, and I'll try to do so via method overloading in derived classes so there's no intervention in Cite itself. On first inspection, though, this doesn't seem to be straightforward. My question is, then, if I end up changing Cite itself, would this functionality be useful in the larger world, whether through <ref nomark="true"> or similar syntax as you suggested, or through an API function that can be used in extensions, such as mine, that build upon Cite? I gather the answer to this is, probably not.

Peace, indeed.

Reply to "Allow defining references not used in page text?"