The following request for comments is closed. based on final comment below, this seems to have been resolved. SJ81 (talk) 05:25, 3 December 2017 (UTC)
With Eran's help, we are very close to a solution that would allow the <ref> tags to accept a
dir parameter using which we can specify the directionatily of each individual citation. I requested this feature in 2008 because at Persian Wikipedia (which uses a right-to-left or RTL language), we use a lot of citations that are in languages like English, German, French, etc. all of which are left-to-right languages (LTR). This feature is also highly demanded on Hebrew and Arabic wikis (also RTL languages like Persian) and similarly, all LTR-language wikis (such as English Wikpedia) can benefit from it too, whenever they want to make citations to references that are in RTL languages like Arabic or Persian.
To finalize this solution, we like to seek feedback from the Wikimedia communities (especially, the RTL-language wikis, but also the community at large) about which way to program the solution. Please take a look at this screenshot below:
The screenshot is from a test wiki which is in an RTL language (in this case, Persian). I intentionally kept most of the text in English to make it easier to understand to most users.
The first and third citations are in LTR (opposite direction to the wiki); the second one is in RTL and is shown just for comparison.
The first citation shows option one which is to flip the entire list to show left-to-right. This way, the list item numbering is also flipped, which some may dislike, but the number is "followed by" the citation, just like in any LTR language.
The third citation shows option two which is to only flip the inside of the list item. As you can see, the period at the end of "Some LTR text." correctly shows on the right side at the end of the sentence. However, the anchor link (blue arrow) and the list item number appear "after" the citation, which some find undesirable.
The purpose of this RFC is to ask for the community to opine on which of the two options to choose. Ideally, we would like to chose an option that is not just favored by popular vote, but also backed by the styles used in published material in RTL langauges (Persian books, Arabic journal articles, Hebrew newspapers, etc.) so we ask the community to provide examples to support their viewpoint. Huji (talk) 21:02, 19 January 2017 (UTC)
Out of the options suggested by Huji, I prefer number two: just setting the direction on the footnote's content, but not on the whole block element. This way, the alignment of the margin and of the footnote number is a little bit wrong, but it's not a big deal, and it does keep the consistency of numbering. Something very similar is practiced in some academic books in Hebrew, e.g. here, so we wouldn't be inventing something new. In a long list of footnotes having some numbers on the right and some on the left would be much worse.
If I'm allowed to fantasize, then my dream solution would be something like number one, but with automatic grouping of LTR and RTL footnotes. This way, in a long list of LTR and RTL footnotes the numbers will jump from one margin to the other only once, which is acceptable. I think that I saw something like this in some books, but I cannot find an example right now. This would already be possible now by creating separate <references /> groups, but that's a bit cumbersome, because it must be done manually, and the numbering would be separate and every number would have a group name added.
I would nevertheless love to have the ability to add a dir property to <references />. This would be useful for articles where all the references are in the same direction, which is different from the page's primary direction, for example an English Wikipedia article where all the footnotes are in Persian. --Amir E. Aharoni (talk) 13:49, 25 January 2017 (UTC)
- @Amire80: Great comments. Note that the thing you wished for is currently achievable (almost), using the group attrib. See fa:ریزپرده as an example. But the citation numbers in text look funny (they all have the prefix for the group name).
- And as for your latter request, even though <references /> doesn't take a
dir param, you can simple wrap it in
- Hope that help Huji (talk) 05:03, 26 January 2017 (UTC)
- Yeah, I know both things. I'd just love them to be nore automatic and robust. --Amir E. Aharoni (talk) 06:07, 26 January 2017 (UTC)
- Hi. I strongly oppose option 2 because of the alignment problem. If the ltr references were ltr only, it could be painful but readable. But about 95% of ltr refs I saw in rtl wikis have some rtl inclusion, for example accessdate, and the result with rtl alignment, especially in multiline refs, is completely unreadable. It would be much better if there was an option 3 - ref numbers on the same right side as option 2, changeable alignment as option 1. But if isn't - option 1 is the answer. And of course, I thought a lot of time about automatic grouping, and it could be the ideal for me too. IKhitron (talk) 11:25, 26 January 2017 (UTC)
- I prefer number one of course. --Super ninja2 (talk) 21:09, 26 January 2017 (UTC)
- I prefer option no. 2. I think all the footnotes should be on the same side of the screen. It's difficult to compare it to a regular book page, since there they don't have room enough to span it to the other side of the page. Nevertheless, I think Amir's example is clear enough. Providing, of course, that all the technical problems, like automatic numbering, periods, adding text etc. are being solved. Tmima5 (talk) 09:45, 27 January 2017 (UTC)
- I prefer option no. 1. Kotz (talk) 23:34, 28 January 2017 (UTC)
- I saw in some old Hebrew books [1970s] examples for flipping the lists as option 1, but more modern books from recent years don't flip the numbers but only the content (option 2). Huji provided an example from Persian where the list numbers are flipped according to directionality (option 1)
- As it seems that there is no clear consensus/convention here, I updated the patch to set a CSS class with directionality (mw-cite-dir-ltr/mw-cite-dir-ltr) which would allow users/sites to easily customize the view according to their preferences. By default the internal span is set with correct directionality (option 2) which is the minimum requirement for correct behavior in either case. For fa the list numbers may be flipped. eranroz (talk) 08:16, 18 February 2017 (UTC)