Template talk:ME-ref
From Wikipedia, the free encyclopedia
Archives |
1 |
Contents |
[edit] Tweaks requested
Hurray! With the change from {{cite book}} to {{citation}} all those awful dots in the output are gone at last! However, this introduced a minor presentational bug: pp. now appears in the citation field, regardless of the exact reference. See for instance Túrin Turambar, where this pp. precedes not page numbers, but chapter headings. As far as I understand, the reason is that {{cite book}} does not include pp. into the default coding of the pages=
parameter, but {{citation}} does. I was unable to get though the coding of the latter, but I suppose some other field can be used instead, chapter
or something. In addition, maybe it would be better to remove authorlink
parameter? Every relevant article provides a link to J. R. R. Tolkien in the main text, and those pages that are unrelated to his legendarium but happen to reference his works, should in any case use the common cite book
template instead of this.
And a weak proposal. Can a separate subtemplate referencing The Etymologies be created? This would benefit such articles as List of Middle-earth plants or List of Middle-earth weapons. Súrendil (talk) 19:35, 7 December 2007 (UTC)
- Support an Etymologies subtemplate. Not sure about the rest - the coding and parameters make my eyes glaze as well. I've dropped a note off for CBD to have a look. Carcharoth (talk) 12:19, 14 December 2007 (UTC)
-
- The 'pp.' bit was added to the citation template recently. Changing the parameter we use from 'pages' to 'at', 'place', or 'location' should take us back to the prior display formatting without the 'pp.'. I'm leaning towards 'location' because I think the placement of that is better than 'at' and clearer in intent than 'place'.
- The 'authorlink' obviously makes sense for books by people other than Tolkien (e.g. Shippey, Hammond, Anderson, Carpenter, et cetera). I can see where it is 'redundant' for Tolkien's books, but it would seem inconsistent with general citation use to not include it. Don't feel strongly about it one way or the other though. Thoughts from others?
- What should a template for 'The Etymologies' do other than the equivalent of {{ME-ref|LROW|The Etymologies}} or {{subst:ME-cite|LROW|The Etymologies, SMAL-}}? It looks like the list pages cited above are currently doing the Etymologies citations 'manually', but I'd think they could use the 'LROW' templates. Creating separate templates would save on having to type out 'The Etymologies', but if that's the only goal I'd probably implement it as just a conditional statement to pre-pend 'The Etymologies' to the 'pages' parameter if the citation used were 'Etym' or somesuch. Would that cover it? --CBD 19:52, 14 December 2007 (UTC)
-
-
- Thanks for pointing out the relevant piece of coding. 'at' seems quite acceptable for me; aren't 'place' and 'location' parameters intended for the place of publication, that is, for London/Boston?
- No strong objection of course, just a list of references at the foot of a page that duplicate one another not only in wording but also in links always looked distracting to me.
- Expanded ME-ref/LROW and ME-cite/LROW accordingly, tweaked others. See doc page for examples.
- In addition, I was bold and added another parameter to ME-cite:
name
, which enables to select another name for a note instead of "<book_name>_<year>_<text_of_2nd_parameter>". It's quite helpful if you need to enter something other than just page numbers, e.g. "Unfinished Tales, note 15 to Narn i Hîn Húrin" or "War of the Jewels, "The Wanderings of Húrin", plot-synopsis for Narn i Chîn Húrin, p. 256" (I have a "non-canon" pagination of UT and can't enter normal page numbers; and we should aim to provide chapter-references in any case), so that all this text is not duplicated in HTML coding. And you can link to the resulting note several times. PSsubst=subst
. CBD, you're genius! Súrendil (talk) 20:55, 16 December 2007 (UTC)
-
-
-
-
- I put in the 'at' parameter for everything. I had the 'location' thing mixed up between the 'Harv' and 'Citation' templates (it's section of the book in Harv, but geographic in 'Citation'). I tweaked the 'ETYM' stuff to use #switch rather than the double #ifeq. The name parameter is a very good addition. For some reason I had thought it couldn't be done without breaking the linking between the harvard citations and the full references... forgot that I hard-coded the reference name for those into each template of the pair rather than using the parameter. --CBD 13:29, 17 December 2007 (UTC)
-
-
[edit] Subpages link
See here for a list of all subpages. Carcharoth (talk) 12:30, 14 December 2007 (UTC)
[edit] Brackets
Since this template is intended to be used only in References section and not in-line, maybe it would be better to use {{harvnb}} instead of {{harv}} to get rid of brackets? (If anybody carries the revision, please also categorise the subtemplates to Category:Middle-earth source templates to keep track of them.) Súrendil (talk) 19:51, 7 December 2007 (UTC)
- Agree with categorisation of subtemplates (will do this now), but no opinion on the harvard reference things (cos I haven't looked in detail at it). Droppped a note off for CBD to have a look. Carcharoth (talk) 12:21, 14 December 2007 (UTC)
-
- Looking over the templates it seems like 'harv' is meant to be used to place templates inline in the text itself... though it is almost always used to put them in the references section instead. I agree that 'harvnb' looks better for those purposes and will update the templates to do so. The fact that this template is substituted will mean that this won't update existing usages, but those can be changed by adding 'nb' to the template calls on the pages themselves. --CBD 18:15, 14 December 2007 (UTC)
[edit] Merge
I merged the ME-cite talk page and redirected the ME-source talk page here. This should help to consolidate discussion as the three templates are very closely inter-related. I'll add sub-pages links for both ME-ref and ME-cite to the documentation, which is also shared by all three templates. --CBD 12:51, 15 December 2007 (UTC)
[edit] Minor bug
On the pretext of removing buggy linebreaks from ME-cite subtemplates, I've also tweaked them so that the reference link isn't assigned a name unless entered as a parameter. However, this revealed another bug that was seemingly present from the start, remaining unnoticed. Have a look at the wiki-coding of the doc page (as it now stands): {{{name}}} appears in the resulting text of {{subst:ME-cite|Letters|smth}}, which doesn't specify the ref name, and of {{subst:ME-cite|LROW|Etym|smth}}, both within the ref name and, most surprisingly, after the text "entries..." However, it does not appear in {{subst:ME-cite|LROW|name=smth|smth}}. The same bug was also present in Eagle (Middle-earth) before I removed it. This is not a result of recent edits - see Lothlórien page, where {{{2}}} appears in the ref name for "A Gateway to Sindarin", which didn't specify the pages using the second parameter. This bug has no serious outcome on the resulting article, but is misleading in the wiki markup. It this a problem of piping ParserFunctions? and/or of quotation marks? and/or of coalescence of name=
bits? Súrendil (talk) 19:07, 26 December 2007 (UTC)
- It's just a natural aspect of substitution. If a substituted template includes a parameter which isn't set you get the text of the parameter call (e.g. {{{2}}}) itself. With the original design it shouldn't have come up often because brief citations should almost always have a location in the text associated with them (otherwise it's more of a once off 'ME-ref' than a 'ME-cite'). However, even if it wasn't set the fact that the name of the book was pre-pended meant that it would still produce a reference name unique to that book for each page. With that pre-pended text removed every reference, regardless of what text it is from, is now named ""{{{name|{{{3|}}}}}}"" unless one of those two parameters is set. I'm not sure how the two sets of double quotation marks would work out. I'll look at some options for tweaking this. --CBD 11:34, 27 December 2007 (UTC)
- Ok, now that I've looked into it we are actually dealing with three different issues here. First is the subst of the parameter as text as I described above. This can most clearly be seen when no second parameter is set and we get '|loc={{{2|}}}' in the output. Again, that was always present, but I expected the location to almost always be set and it doesn't produce anything 'incorrect'. The second issue is that the substituted #if:{{{name|}}} evaluation you added to each of the book sub-templates will not process as expected. It is always evaluating to true because it is treating the '{{{name|}}}' as text (and thus not blank) rather than a parameter to be evaluated. This is actually the same issue as above... substitution processes unset parameters as text in all cases. Though that also means that the values passed into the sub-templates will be things like the text '{{{name|{{{3|}}}' rather than blank if neither is set (which would again then evaluate the #if to 'true'). The third issue is a wacky bug with parserfunctions where sometimes it interprets conditional text as defining a previously unset parameter within that text - specifically, the '|name="{{{name}}}" is setting the 'name' parameter to the text "{{{name}}}", which then sets the reference name to ""{{{name}}}"". Changing the parameter from 'name' to 'ref-name' or somesuch would avoid this.
- All that said - the root problem here is that we cannot have a reference name only when a parameter is set with a substituted template. It either always has to set a reference name or never do so. We could make it conditional with a non-substituted template, but then these citations would take up alot more 'transclusion space' and people wouldn't know what ref names to re-use on subsequent citations unless they deciphered the template. Something could probably be set up to call one of two templates (with and without reference name) depending on whether a parameter was set, but then we'd always have to make any changes to both. I'm trying to think of a way to set up another 'utility' template like ME-source to handle this condition. Something might be possible, but I'll need more time to look at it. --CBD 12:48, 27 December 2007 (UTC)
-
- I faked the system out by comparing {{uc:{{{name|}}}}} to {{{NAME|}}}. When substituted those evaluate to the same thing unless one of them is set. So long as nobody ever sets the 'NAME' (all caps) parameter the template will now set the ref name to either the 'name' parameter, if set, or the '1' parameter (name of the book) if 'name' is not set. The permutations if the 'NAME' parameter is set aren't too bad either... ref name ends up being either the text {{{name}}} or the value of parameter 1. So, {{subst:ME-cite|LetTers}} sets 'ref name=LetTers' and {{subst:ME-cite|Letters|name=Fred}} sets 'ref name=Fred'. That seem like a reasonable solution? --CBD 13:46, 27 December 2007 (UTC)
-
-
- Well, I must first apologise for all the mess I've caused, and for the ages of wasted time. Please forgive my overbold edits; hopefully all this will teach me something. I've tweaked the templates once again to escape any of the issues described above. Per aspera ad astra... Súrendil (talk) 21:10, 9 January 2008 (UTC)
-