Help talk:Style/Formatting and punctuation
Dealing with long lines within code block text
I'd like to get some input and, hopefully, a resolution to the issue of long lines within code block text boxes; even on this Help page the long lines of code or comments within code block text boxes are not constrained within the text box. Perhaps a horizontal scroll bar can be used to expose the long lines of text within the text box instead of simply allowing the text to span past the width of the text box. This will prove especially useful with the exponential growth in usage of mobile browsers and devices.
- Desktop version of Firefox shows the horizontal scrollbar when needed. Mobile webkit-based browsers don't show the scrollbar, but "swiping" the code box actually scrolls the box.
- Optimization for mobile devices is another issue; but yes - browsing wiki pages on mobile webkit browsers sucks, mostly because of .
- -- Lahwaacz (talk) 18:28, 31 March 2014 (UTC)
- Horizontal scroll bars are already enabled for code blocks , this is indeed a problem with mobile webkit browsers, not limited to MediaWiki, for example I can't properly see long lines of code on github.com either (no horizontal scroll bar either).
- Anyway, if somebody's aware of a CSS fix for that, it should be submitted to MediaWiki's bug tracker.
- -- Kynikos (talk) 00:49, 2 April 2014 (UTC)
I was about to revert , but I have not found any rule about it in our guidelines, so I'm proposing to add one.
Basically, reference links are not part of the sentence, so they should be put after punctuation marks like period or comma. There should be no space between the punctuation mark and the reference link. This style is widely used on Wikipedia and apparently also Chicago Manual Of Style.
- Fine with me, although I just recall using reference links in a sentence the other day, which I (obviously) found appropriate usage as well. Further, if we are going to introduce "reference link" as a term, it should be noted as a case in Help:Style#Hypertext_metaphor as well (close to the indirect links bullet). --Indigo (talk) 19:35, 30 December 2014 (UTC)
- Well quoting the linked manual of style:
- The superior numerals used for note reference numbers in the text should follow any punctuation marks except the dash, which they precede. The numbers should also be placed outside closing parentheses.
- So as I understand it, it can be "part of the sentence", just after the respective punctuation (though you wouldn't put a
,between the references.) -- Alad (talk) 19:56, 30 December 2014 (UTC)
- Well quoting the linked manual of style:
- Good point, sometimes links are part of the sentence, for example in "...as can be found in ." or "...for example ,  and ." it does not make sense to place the link after the period. On Wikipedia though, where the reference links are formatted as superscript, you would not find it being part of a sentence anywhere. If we keep formatting reference links as normal-size text, I believe the editors should be free to choose if the reference link will be part of a sentence or not.
- I would define a reference link as a link without an anchor text (which implies that reference link must be of the syntax
[full_url]) and the rule would apply only to reference links that are not part of the sentence. -- Lahwaacz (talk) 20:08, 30 December 2014 (UTC)
- In 's case, I'd prefer the link to be after the period too, and I agree with the observations that have been brought here.
- Just a quickly-thought idea, we could specify that the rule "would apply only to reference links that are not" grammatically "part of the sentence".
- -- Kynikos (talk) 10:10, 31 December 2014 (UTC)
- I like that idea a lot. In my view it would, however, rule out the frequently used "...for example ,  and ." cases, because the link count substitution (,...) does not make any of them a grammatic part of the sentence. My personal rule of thumb is that the reader should not be required to hover over the link in order to see where it leads out to. Arguably the "for example" does hint enough in this example what the links will lead to. For the wiki here that should be enough; we're using external links in a different manner than wikipedia and the cases they are used in an academic (aka "Chicago") style is very seldom.
- I now think we should skip this and leave it up to the editors how they want to present the references. Just make sure we don't end up with bogus sentences like "If  is started with default configuration , the journal will show ." --Indigo (talk) 11:10, 16 January 2015 (UTC)