For the sake of this task, "in text" refers to the appearance of citations where they are used (i.e. the output of the <ref> tags), and "bibliography" refers to the listing of all references at the bottom of the page (i.e. the output of the <references> tags).
Cite currently allows for the references in text to have various numbering schemes. This is achieved through the use of group parameter along with defining an appropriate system message called MediaWiki:Cite link label group-* where * is replaced with that group's name. For instance, on English Wikipedia, MediaWiki:Cite link label group-lower-alpha contains the definition of a custom numbering scheme that allows for the references in text to be numbered as a, b, c, ... instead of the usual 1, 2, 3, .... Below, you can see some wikicode followed by its output in English Wikiedpia:
Some text<ref>Foo bar, 1998</ref> some other text.<ref>Lorem ipsum, 2018</ref> Text that needs explanation.<ref group="lower-alpha">Explanation</ref> ; Footnotes <references group="lower-alpha"/> ; References <references/>
Unlike the references in text, for which Cite generates the numbering as <a> tags and determines their numbering as specified above, the bibliography is produced as an ordered list (an <ol> tag) and the numbering of its list items (<li> tags) is determined by the browser and/or the CSS. As a result, there will be mismatches between how citations appear in text and in the bibliography. In the example above, the third citation in text is numbered as "a", but in the bibliography it is numbered as "1".
To solve this, an appropriate CSS style needs to be applied to the right <ol> element.
- The CSS style might already exists, or might need to be created. In the example above, setting list-style-type: lower-alpha may take cafe of the issue. In other cases, first a counter-style needs to be defined, and then applied to the <ol> element.
- It is worth emphasizing that the style needs to be applied to the *right* <ol> element. Since a page might contain multiple sets of references, and some might share the same numbering scheme, identifying which <ol> element needs to be targeted is crucial.
We can either decide to stick to the way Cite works currently, or we can completely overhaul it. If we decide to stick to how it works, then it is desirable to think that because the numbering of <ref> tags depends on their group name, the numbering of the matching <references> should also be governed in the same way. This means we should provide a way in the HTML output of the page to know which <ol> tag belongs to which group of references. See: T196828: The ordered list of refences should indicate the group name
Alternatively, we can decide that the idea of using the "group" parameter to determine the numbering scheme was wrong to begin with, and that we want to overhaul Cite in that regard. Clearly, we cannot do it for the <ref> tags (because that would need several thousands of wikis out there to edit millions of their pages to use a new parameter in the <ref> tags). We can, however, do it for the <references> tag, by defining an optional parameter that explicitly specifies the numbering style for the bibliography. See: T196942: Support for a counter-style parameter in the references tag
I have created patches for both of these proposal, but I have received push-back in both cases. In this task, I expect us to reach an agreement on how to resolve the mismatch in numbering schemes, so that we can move forward with the implementation of the agreed-upon approach. Ideas for a third approach are also very much appreciated.