Hi.
If I set MediaWiki:cite_reference_link to just $3 (so <ref>...</ref> will output the plain number), can I do
{{#expr: <ref/> + <ref/>}}
to get "3"?
(I don't want to change the global reference format just to check this, that's why I don't look it myself. If somebody knows...)
Why I ask this is because in es.wiktionary we are planning to use <ref/> for counters. We need counters, and we don't want to accumulate references at the bottom of the page, so it's a good use for this feature.
Wiktionary definitions will be internally labeled and the numbers will be generated automatically. So, we can rearrange them and the numbering will be automatically updated as well as the references in the translations box. Example (w/o the necessary templates for formatting, etc.):
{{lemma|avis}}
<ref name="bird"/> Bird. <ref name="company"/> Car rental company.
Translations: Spanish: <ref name="bird"/> Ave; ...
(I'm hoping one developer will jump saying "this is a kludge! here! have real counters! :)".)
Sometimes we have more than one lemma per page (because it has a different etymology, or because the word is used in more then one language). In that case, we need to reset the <ref> counter. I thought of doing that this way:
{{lemma|avis|1}} {{def|bird|1}} Bird.
{{lemma|avis|2}} {{def|company|2}} Car rental company.
Where {{lemma}} would output an invisible <ref name="last{{{2}}}"/> and the number outputted by {{def}} would be {{#expr: <ref name="{{{1}}}"/> - <ref name="last{{{2}}}"/>. That's the reason of the question in the subject.
Whew. Does all this make any sense? Is there any better way to do it?
Thanks.