Module talk:Citation/CS1/Feature requests

This is an old revision of this page, as edited by Gadget850 (talk | contribs) at 17:20, 30 March 2013 (Name suffixes: types of suffix). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Latest comment: 12 years ago by Gadget850 in topic Name suffixes

This page is used to make requests for new features for the Lua based CS1 templates.

Asian titles

Main work titles are formatted in italics. This is not appropriate for Asian scripts such as kanji, hangul and the like. Asian titles may also be underlined or placed in brackets 『』 or 《》.

See {{Asiantitle}} for current support. --— Gadget850 (Ed) talk 14:36, 29 March 2013 (UTC)Reply

Language

Titles should be wrapped with markup indicating the language. --— Gadget850 (Ed) talk 14:37, 29 March 2013 (UTC)Reply

Presentation and content

The CSS styling for <cite> has been defaulted, so it now formats the contents as italics, while adding the semantic meaning of a title. Thus the current use of italics to format the main work title can be replaced by <cite>...</cite>.

Markup Renders as
<cite>Title</cite>

Title

--— Gadget850 (Ed) talk 01:04, 28 March 2013 (UTC)Reply

  • What a contorted way to confuse everyone everywhere: Everyone knows that most titles are to be placed in quotation marks, as article titles which far outnumber others. Historically, book titles were underlined, because in handwritten documents, the cursive script is somewhat italicized, and the underlined text was obviously a book/film title. In the search for distinctive vocabulary, we have been calling each "{{cite_web|...}}" with the term "cite" as the markup used to display a citation. Then we introduce a cite-tag "<cite>" which forces the rare use of italic text, to all text, within <cite>...</cite>. Naturally, most normal humans will begin to associate the term "cite text" with the styling as italic text. What a contorted way to confuse everyone, everywhere. I have a strong hunch the cite-tag will not be very much help in the long run. -Wikid77 (talk) 04:12, 28 March 2013 (UTC)Reply
<cite> would be used internally in the template, so I am confused as to how anyone would be confused. It has an HTML semantic value indicating the title of a work.[1] If we want to add the semantics for an included work title which is marked in quotes, then we can easily style the tag. And with almost half a million uses of cite book alone, I would not call the italic title rare. --— Gadget850 (Ed) talk 09:30, 28 March 2013 (UTC)Reply
Isn't this the problem the IP was discussing earlier, where we're really using the "title" paremeter for multiple semantic functions? Choess (talk) 18:11, 29 March 2013 (UTC)Reply
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 <cite>...</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. --— Gadget850 (Ed) talk 18:53, 29 March 2013 (UTC)Reply
To expand on separation of presentation and content: currently the templates include both content and presentation, that is the markup used to style the content as italics, in quotes or bold. Hard coding the presentation means that readers cannot style citations as they desire and it limits template portability. Presentation should be done in CSS. Currently the <cite> tag has a default style of italics and has the semantic meaning of a title.
For an included work title that is presented in quotes, we can create a class with CSS styling. For example the class includedtitle:
.includedtitle:before {font-style: normal; content: '\22';}
.includedtitle {font-style: normal;}
.includedtitle:after {font-style: normal; content: '\22';}
Then you simply wrap the content in <cite class="includedtitle">...</cite> causing the font to show as normal and the content wrapped in quotes.
The HTML classes discussion does not include a class for the included work title, so I made up an illustrative class. --— Gadget850 (Ed) talk 14:58, 30 March 2013 (UTC)Reply

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,

Much ado about Nothing

we could emit:

<span class="title">Much ado about Nothing</span>

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. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 23:39, 11 March 2013 (UTC)Reply

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? --— Gadget850 (Ed) talk 15:55, 12 March 2013 (UTC)Reply
OK, I've started a brainstorming page at Wikipedia:WikiProject Microformats/citation, with a draft proposal for discussion and an example. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 17:12, 12 March 2013 (UTC)Reply
So, can we now apply these classes? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:37, 25 March 2013 (UTC)Reply
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. Dragons flight (talk) 17:23, 12 March 2013 (UTC)Reply
Why not? (In fact the draft is based on work done by the microformat community, which has moved on since my initial suggestion).Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 17:49, 12 March 2013 (UTC)Reply

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:

  • {{ 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 }}
  • Luhmann, J. G.; Russell, C. T. (1997). Shirley, J. H.; Fainbridge, R. W. (eds.). Venus: Magnetic Field and Magnetosphere. New York: Chapman and Hall. ISBN 978-1-4020-4520-2. Retrieved 2009-06-28. {{cite book}}: |work= ignored (help)

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.? Dragons flight (talk) 02:13, 29 March 2013 (UTC)Reply

I'm open to debate, but the HTML from your example is (whitespace added; irrelevant attributes omitted, for clarity):

<code>
<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>
</code>

(incidentally, I don't think the first full stop should be inside the "reference-accessdate" span). I would make that:

<code>
<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>
</code>

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? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 13:34, 29 March 2013 (UTC)Reply

Name suffixes

The COinS implementation guide specifies that, at least for the first author of a work, it should be possible to separate their name into first name(s), last name, and suffix. When the {{cite}} templates were created, they were regarded solely as presentational, and separate parameters for suffixes weren't thought to be worth implementing. Scanning the ends of first1, first2, editor1,...and so forth for "Sr", "Jr", "II", and "III" should probably pick up most of the citations where suffixes should be moved to their own parameters. Choess (talk) 15:26, 30 March 2013 (UTC)Reply

We should still add parameters for those oddball suffixes. --  Gadget850 (Ed) talk 16:58, 30 March 2013 (UTC)Reply
Sorry, I combined two thoughts. We'd need new "suffix*" parameters for names in general, which could be used for any suffix. The scanning I mentioned could be for a (temporary?) maintenance category to identify citations that would need to be edited to use the new parameters. Choess (talk) 17:15, 30 March 2013 (UTC)Reply
See Suffix (name). We have no guidelines for suffixes, but you are discussing generational suffixes. I need to check some style guides to see if we should include academic, professional, religious or honorary suffixes. --  Gadget850 (Ed) talk 17:20, 30 March 2013 (UTC)Reply