GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing phabricator.wikimedia.org — T24265 Allow references to be listed with letters
Assigned To None Authored By
Project Tags Referenced Files
Description Author: aleonard1 Description: My suggestion: Allow an alphabetical rendering. So instead of having the large and ugly [N 1], instead automatically do it like [a], [b], [c], ... [y], [z], [aa], [ab], etc. So it could be like, <ref method=alpha>. This way, we wouldn't have two competing systems of numbers, one with an unsightly extra letter, and the page would be overall more sensical and pretty. Version: unspecified
Details
Related Objects
Event Timeline• bzimport raised the priority of this task from to Low.Nov 21 2014, 10:55 PM2014-11-21 22:55:39 (UTC+0) • bzimport set Reference to bz22265. Comment Actions I agree. This is one of the reasons that {{ref}} and other templates are hanging on. And hackish templates like http://en.wikipedia.org/wiki/Template:Cnote2_Begin Comment Actions Fixed in r66749. If you create MediaWiki:cite_link_label_group-footnote with "a b c d e f" any <ref group="footnote"> will display with the appropiate item overriding the default "group <offset>". And so on for any other group name. Comment Actions I recall reading about this someplace, but did not realize that it had been implemented. Thanks. Comment Actions (In reply to comment #2)
How would you do the override at MediaWiki:cite_link_label_group- ? Not planning to implement, but I want to understand how it works. Comment Actions I *just* implemented it (will take a while to be live on wikipedia). It simply looks like [[MediaWiki:cite_references_link_many_format_backlink_labels]] The messages are "MediaWiki:cite_link_label_group-" + group name. If there's no group name, it's for the default. It might be better to only not allow spaces as separators, though, forcing new lines instead. What do you think? Comment Actions I see your example for Klingon :) I have seen some uses of {{ref}} with Greek letters and Roman numerals, so this makes it easy to add those styles. I see you detect when you run out of backlinks and give an error— I was wondering about that; will have to add the error message to the list. Not sure what you mean by "only not allow spaces as separators". Comment Actions The letters are separated by spaces, new lines or tabs. Comment Actions I can't think of any scheme that would require spaces in the backlink label. Comment Actions aleonard1 wrote: (In reply to comment #5)
Pardon my ignorance; by that, you mean it's been implemented on Wikipedia's code but will take a while before it goes live, or it's been implemented in the Cite extension and it'll be a while before the new Cite goes live on Wikipedia? (In other words, how excited should I be that this exists :P) Comment Actions This is implemented in r66749. Cite.php en.Wikipedia is r66620. So the second answer. Comment Actions I have started documenting this at [[User:Gadget850/Footnotes – Cite link labels]]. Please edit or comment. Comment Actions This went live with 1.17mf.Two issues:
Comment Actions A new variable, {{CITECLASS}}, along with other changes should fix the ordered list problem. My very limited PHP skills are not up to creating a new variable but the code below should give you an idea what I am thinking of. 'cite_class_group-default' => 'decimal'; Some CSS style rules are also needed. div.references ol.decimal { list-style-type: decimal; } Hopefully this can be of some help to you. Comment Actions I don't think cite.php can inject a class name; that is done at [[MediaWiki:Cite references prefix]]. This means we cannot use <references /> with matching list styling (but we can using the reflist template). Comment Actions I think I have come up with the changes that are needed but [[MediaWiki:Common.css]] will still need to be edited. Cite_body.php function refKey( $key, $num = null ) { $prefix = wfMsgForContent( 'cite_reference_link_prefix' ); + } $suffix = wfMsgForContent( 'cite_reference_link_suffix' ); if ( isset( $num ) ) $key = wfMsgForContentNoTrans( 'cite_reference_link_key_with_num', $key, $num ); return $prefix . $key . $suffix; } Cite.i18n.php 'cite_references_prefix' => '<ol class="references">', Hopefully this will make it unnecessary to use Parser Functions to fix this. Comment Actions See [[Wikipedia:Manual of Style (footnotes)/Cite link labels]]. I documented the template and class changes needed to style the reference list. This works beautifully with {{reflist}} byt not <references>. Comment Actions Allen, you are using an undefined variable $group. That code does nothing. Comment Actions The first occurrence of $group in Cite_body.php is at line 169 in r83093. Comment Actions The disadvantage of Allen's code is that you are stuck with a few predefined group names within cite_body.php, making any wiki-side HTML customization in Mediawiki:cite_reference_link_prefix impossible. Is there a way to inject a groupname as a CSS value into cite_reference_link_prefix, ie. if it were to contain: <ol class="references" style="list-style-type: $1;"> That way, it would only have to check if a group name has an associated file present, and pass that to $1 (else default to "decimal"). Comment Actions
It is a link, so it doesn't accept links. The simple solution seems to be to not use a link there. How do you propose solving it? Comment Actions Version r66749 of the Cite.php extension implements the ability to create styles for the cite link labels. See: http://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style_%28footnotes%29#Cite_label_styles http://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style_%28footnotes%29/Cite_link_labels Note that label styles must be created and {{reflist}} must be updated. I think this can be closed. Comment Actions Closed per r66749. Comment Actions bluehairedlawyer wrote: This seems a bit of a hack to me as:
http://en.wikipedia.org/wiki/User:Blue-Haired_Lawyer/footnote_weirdness What would be wrong with hard-coding support for lower-alpha, upper-alpha, lower-roman, and upper-roman? Comment Actions I don't see the weirdness, as your example uses the standard labels.
Comment Actions The following protocol relative URL may be of more use than the one provided by bluehairedlawyer. //en.wikipedia.org/w/index.php?title=Special%3APrefixIndex&prefix=Cite+link+label+group&namespace=8 Comment Actions bluehairedlawyer wrote: The weirdness is that two entirely different footnotes are labelled as "[1]". There are six footnotes but only three numbers. Comment Actions This is because http://en.wikipedia.org/wiki/MediaWiki:Cite_link_label_group-decimal is defined, allowing two separate decimal groups— the default and the explicit decimal. See http://en.wikipedia.org/wiki/Help:Cite_link_labels. When we started creating the label groups, we thought this might be useful in tables and the like. Comment Actions bluehairedlawyer wrote: I see where you're coming from but I feel it's more likely to confuse than be of help. Another problem with not supporting a <ref group="decimal"> properly is on sites where the default footnote style is something other than decimal. I've filed a bug report: bug 35675 Comment Actions bluehairedlawyer wrote: Hard coded support for css list types A patch which would hard code support for lower-alpha, upper-alpha, lower-greek, lower-roman, upper-roman and decimal css list types. Attached: diff.txt6 KBDownload Comment Actions sumanah wrote: bluehairedlawyer, I suggest you submit that patch directly into Git, our source control system. You can do that with developer access: Thanks for the patch! Izno moved this task from Unsorted backlog to Enhancement backlog on the Cite board.Aug 22 2016, 5:09 PM2016-08-22 17:09:55 (UTC+0) Comment Actions Should probably be connected to T196942: Support for a counter-style parameter in the references tag and possibly T156350: Add language-specific CSS modules for Parsoid's Cite output? Or merged? Not sure. Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:01 AM2022-02-04 11:01:05 (UTC+0) · Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct. · Wikimedia Foundation · Privacy Policy · Code of Conduct · Terms of Use · Disclaimer · CC-BY-SA · GPL · Credits | ||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |