Content deleted Content added
→Presentation and content: new section |
→HTML classes: new section |
||
Line 25:
:::I refactored the original proposal to indicate that by ''title'' I meant the main work title. Currently, we have no [[separation of presentation and content]]. That is, the format of the main work title is always italics, and the included work is always in quotes. This presentation should be moved to CSS. Wrapping the main work title in {{tag|cite}} will present the title in italics by default. We can add a class to present the included title in quotes.
:::Since this would be a new feature, I will be moving this to [[Module talk:Citation/CS1/Feature requests]]. --'''''— [[User:Gadget850|<span style="color:gray">Gadget850 (Ed)</span>]]'''''<sup>[[User talk:Gadget850| ''talk'']]</sup> 18:53, 29 March 2013 (UTC)
== HTML classes ==
Now that Lua has deployed, we should add (as well as, or instead of, COinS) HTML classes to our citation templates, to describe the various parameters. For example, instead of emitting, say,
:<code><nowiki>Much ado about Nothing</nowiki></code>
we could emit:
:<code><nowiki><span class="title">Much ado about Nothing</span></nowiki></code>
The visual rendering would not change.
By agreeing (and sharing with the wider web community) a standard set of such class names, others can write tools to parse our citations, and allow them to be inserted into other documents or web services (or, indeed, into other Wikipedia articles). The makers of [[Zotero]], for example, have already expressed an interest in parsing citations that use such classes.
As some of you may have realised, what I am talking about, a standard, shared, set of class names, is a [[microformat]]. I have written more about how we could use a citation microformat, at [[Wikipedia talk:WikiProject Microformats#Proposal: citation microformat]]. <span class="vcard"><span class="fn">[[User:Pigsonthewing|Andy Mabbett]]</span> (<span class="nickname">Pigsonthewing</span>); [[User talk:Pigsonthewing|Talk to Andy]]; [[Special:Contributions/Pigsonthewing|Andy's edits]]</span> 23:39, 11 March 2013 (UTC)
:Get a specification together. Once this module is debugged and implemented, then we can look at adding this feature. Do we want to include HTML5 elements as well? --'''''— [[User:Gadget850|<span style="color:gray">Gadget850 (Ed)</span>]]'''''<sup>[[User talk:Gadget850| ''talk'']]</sup> 15:55, 12 March 2013 (UTC)
::OK, I've started a brainstorming page at [[Wikipedia:WikiProject Microformats/citation]], with a draft proposal for discussion and an example. <span class="vcard"><span class="fn">[[User:Pigsonthewing|Andy Mabbett]]</span> (<span class="nickname">Pigsonthewing</span>); [[User talk:Pigsonthewing|Talk to Andy]]; [[Special:Contributions/Pigsonthewing|Andy's edits]]</span> 17:12, 12 March 2013 (UTC)
:::So, can we now apply these classes? <span class="vcard"><span class="fn">[[User:Pigsonthewing|Andy Mabbett]]</span> (<span class="nickname">Pigsonthewing</span>); [[User talk:Pigsonthewing|Talk to Andy]]; [[Special:Contributions/Pigsonthewing|Andy's edits]]</span> 14:37, 25 March 2013 (UTC)
:I could see supporting the use of an existing third party specification (COinS is already an example of this), but I don't really like the idea of inventing such a specification ourselves. [[User:Dragons flight|Dragons flight]] ([[User talk:Dragons flight|talk]]) 17:23, 12 March 2013 (UTC)
::Why not? (In fact the draft is based on work done by the microformat community, which has moved on since my initial suggestion).<span class="vcard"><span class="fn">[[User:Pigsonthewing|Andy Mabbett]]</span> (<span class="nickname">Pigsonthewing</span>); [[User talk:Pigsonthewing|Talk to Andy]]; [[Special:Contributions/Pigsonthewing|Andy's edits]]</span> 17:49, 12 March 2013 (UTC)
=== Example ===
It would be helpful if you could map out an example or two of what you propose to add.
For example, given a citation like:
*<nowiki>{{ cite book | isbn=978-1-4020-4520-2 | last1=Luhmann|first1= J. G.|last2=Russell|first2=C. T. | editor1-fisrt=J. H.|editor1-last=Shirley|editor2-first=R. W.|editor2-last=Fainbridge | publisher=Chapman and Hall | ___location=New York | year=1997 | url=http://www-spc.igpp.ucla.edu/personnel/russell/papers/venus_mag/ | work=Encyclopedia of Planetary Sciences | title=Venus: Magnetic Field and Magnetosphere | accessdate=2009-06-28 }}</nowiki>
*{{ cite book | isbn=978-1-4020-4520-2 | last1=Luhmann|first1= J. G.|last2=Russell|first2=C. T. | editor1-first=J. H.|editor1-last=Shirley|editor2-first=R. W.|editor2-last=Fainbridge | publisher=Chapman and Hall | ___location=New York | year=1997 | url=http://www-spc.igpp.ucla.edu/personnel/russell/papers/venus_mag/ | work=Encyclopedia of Planetary Sciences | title=Venus: Magnetic Field and Magnetosphere | accessdate=2009-06-28 }}
Which parameters do you want to add classes to, how do you propose to deal with multiple authors/editors, how do you want to distinguish article titles from main work titles, etc.? [[User:Dragons flight|Dragons flight]] ([[User talk:Dragons flight|talk]]) 02:13, 29 March 2013 (UTC)
{{od}}
I'm open to debate, but the HTML from your example is (whitespace added; irrelevant attributes omitted, for clarity):
<pre><code><nowiki>
<span class="citation book">
Luhmann, J. G.; Russell, C. T. (1997).
<a class="external text vt-p" href="http:.../">"Venus: Magnetic Field and Magnetosphere"</a>.
In Shirley, J. H.; Fainbridge, R. W.
<i>Encyclopedia of Planetary Sciences</i>
(New York: Chapman and Hall).
<a href="..." title="..." class="vt-p">ISBN</a>
<a href="..." title="..." class="vt-p">978-1-4020-4520-2</a>
<span class="reference-accessdate">. Retrieved 2009-06-28</span>.</span>
</nowiki></code></pre>
(incidentally, I don't think the first full stop should be inside the "reference-accessdate" span). I would make that:
<pre><code><nowiki>
<span class="citation book h-cite">
<span class="p-author">Luhmann, J. G.</span>; <span class="p-author">Russell, C. T.</span> (<span class="dt-published">1997</span>).
<a class="external text vt-p u-url p-name" href="http:.../">"Venus: Magnetic Field and Magnetosphere"</a>.
In <span class="p-editor">Shirley, J. H.</span>; <span class="p-editor">Fainbridge, R. W.</span>
<i class="p-publication">Encyclopedia of Planetary Sciences</i>
(New York: <span class="p-publisher">Chapman and Hall</span>).
<a href="..." title="..." class="vt-p">ISBN</a>
<a href="..." title="..." class="vt-p u-uid">978-1-4020-4520-2</a>
<span class="reference-accessdate">. Retrieved <span class="dt-accessed">2009-06-28</span></span>.</span>
</nowiki></code></pre>
by adding classes "h-cite", "u-url", "u-uid", "p-author" (twice), "p-editor" (twice), "dt-published", "p-publication", "p-name", "p-publisher" and "dt-accessed". What do others think? <span class="vcard"><span class="fn">[[User:Pigsonthewing|Andy Mabbett]]</span> (<span class="nickname">Pigsonthewing</span>); [[User talk:Pigsonthewing|Talk to Andy]]; [[Special:Contributions/Pigsonthewing|Andy's edits]]</span> 13:34, 29 March 2013 (UTC)
|