(I hope wikien-l is appropriate for this technical question?)
I have been experimenting with having references in templates. I was a bit optimistic and tried this variation in a template:
<td><ref name="{{{refname}}}"/>
Where "refname" would be defined on the page with the template embedded, e.g., as <ref name="Lesch">{{Cite journal | title=Something }}</ref>
This way didn't seem to work. I wonder if there is any other possibilities. One way would be to use nested templates, e.g.,
{{MyTemplate | field=value | reference = <ref name="Lesch">{{Cite journal | title=Something }}</ref> }}
However, I would like to avoid nested templates for clarity. Another way would be just to identify the reference with an external key - the PubMed identifier, e.g.,
{{MyTemplate | field=value | pmid = 8929413 }}
Any other ideas? Or comments?
/Finn (User:fnielsen)
___________________________________________________________________
Finn Aarup Nielsen, DTU Informatics, Denmark Lundbeck Foundation Center for Integrated Molecular Brain Imaging http://www.imm.dtu.dk/~fn/ http://nru.dk/staff/fnielsen/ ___________________________________________________________________
Try http://en.wikipedia.org/wiki/WP:Help_desk.
On Mon, Jul 7, 2008 at 11:58 AM, Finn Aarup Nielsen fn@imm.dtu.dk wrote:
(I hope wikien-l is appropriate for this technical question?)
I have been experimenting with having references in templates. I was a bit optimistic and tried this variation in a template:
<td><ref name="{{{refname}}}"/>
Where "refname" would be defined on the page with the template embedded, e.g., as <ref name="Lesch">{{Cite journal | title=Something }}</ref>
This way didn't seem to work. I wonder if there is any other possibilities. One way would be to use nested templates, e.g.,
{{MyTemplate | field=value | reference = <ref name="Lesch">{{Cite journal | title=Something }}</ref> }}
However, I would like to avoid nested templates for clarity. Another way would be just to identify the reference with an external key - the PubMed identifier, e.g.,
{{MyTemplate | field=value | pmid = 8929413 }}
Any other ideas? Or comments?
/Finn (User:fnielsen)
Finn Aarup Nielsen, DTU Informatics, Denmark
Lundbeck Foundation Center for Integrated Molecular Brain Imaging http://www.imm.dtu.dk/~fn/ http://nru.dk/staff/fnielsen/ ___________________________________________________________________
On 7/7/08, Finn Aarup Nielsen fn@imm.dtu.dk wrote:
I have been experimenting with having references in templates. I was a bit optimistic and tried this variation in a template:
<td><ref name="{{{refname}}}"/>
Where "refname" would be defined on the page with the template embedded, e.g., as <ref name="Lesch">{{Cite journal | title=Something }}</ref>
This way didn't seem to work.
This does not have the desired result because when <ref> tags are inside the template, they populate their own list of refs, separate from the list of refs in the article where the template is being used. Apparently the parsing of <ref> tags occurs before transclusions are even considered.
However it is still possible, for some reason, to use the <references/> tag via a template, see [[Template:Reflist]] which offers a myriad of formatting options.
The inconsistency here is arguably less than ideal.
—C.W.