On 25/09/2007, Maury Markowitz <maury.markowitz(a)gmail.com> wrote:
On 9/24/07, Liz Kim <lizkim270(a)gmail.com>
wrote:
Does anyone know a way to manipulate the
referencing style in wiki?
We were _just_ talking about this in another thread. How would you
like it to work? There are a couple of different styles available in
HTML and I would _guess_ that it would be fairly easy to modify the
<references/> tag (and {{reflist}}) to allow you to select one of
these. But that would still be an enumerated list.
Another possibility is one I think might be more interesting, and
that's that the ref tags themselves have a "link=" or "tag="
where you
could define a specific tag on a per-ref basis. For instance...
<ref name="Smith" link="Smi89"> a reference by Smith from 1989
</ref>
This would be very useful in matching technical documentation
referencing style. The only problem is it would require the editors to
be careful about putting in a "link=" for _every_ ref, because I'm not
sure a fallback would be easy, <references/> uses LI to generate the
list and that doesn't take kindly to inserting other things in the
middle of the list.
If the "link" attribute is required to be unique (which would make
sense), then why not use the already-unique, required, free-text field
on all of these elements - namely the "name" attribute. :-)
Its messy, but on a two-parse you could have an optional attribute on
the references element ('citestyle="numbers|name"'), or if you only
want to do one-parse a messier way would be to have a keyword
modifier, __CITEUSINGNAME__ and __CITEUSINGNUMBERS__ or whatever. Of
course, the sorting of links is the crucial issue, as you say; when
building the page model you could collapse the list into HTML.
Because, of course, we'd never just generate HTML directly. :-)
Of course, what I'm saying is no-doubt nonsense on stilts; please feel
free to ignore. :-)
Yours,
--
James D. Forrester
jdforrester(a)wikimedia.org | jdforrester(a)gmail.com
[[Wikipedia:User:Jdforrester|James F.]]