Wikipedia talk:Manual of Style/Superscripts and subscripts: Difference between revisions
Content deleted Content added
(27 intermediate revisions by 8 users not shown) | |||
Line 1:
{{WikiProject banner shell|
{{WikiProject Manual of Style}}
}}
==Proposed MoS guideline==
Note: the content on this page is not something I made up, it's merely a compilation of guidelines from various MoS pages aimed to let the reader get an overview. [[User:Jonkerz|jonkerz]][[User talk:Jonkerz|♠]] 11:26, 17 August 2010 (UTC)
Line 24 ⟶ 25:
:Unicode causes many complications, for example in my browser I cannot type those suffix Unicode characters and I only know to copy and paste them from elsewhere. Also searching for "2" does not find "²". The Wikipedia search treats "²" as if it didn't exist, though a regex search can spot it. [[User:Graeme Bartlett|Graeme Bartlett]] ([[User talk:Graeme Bartlett|talk]]) 11:26, 9 September 2019 (UTC)
:: Thanks for your reply. Of course we can't have all thousands of [[Unicode]] characters on our keyboards, but they are available by many other means, most ostensibly the insert section at the bottom of this edit window. And searching for "2" (two) should not find "²" (square), they do not have the same meaning. The Wikipedia search should be fixed, but it is a problem of its own.--[[User:Marc Lacoste|Marc Lacoste]] ([[User talk:Marc Lacoste|talk]]) 13:26, 9 September 2019 (UTC)
::If I search for <code>2</code> I don't ''want'' to match <code>²</code> or <code>₂</code>, or vice versa. The point of a human performing a textual search is usually an approximation to find a semantic match; we already know whether we want an ordinal, or a quantity, or an exponent, or a footnote, or an index. On the rare occasion that I don't know which (or want to find them all), I simply search for them all: <code>[2²₂]</code>.
::If other humans don't want that behaviour, then the search tool can be adjusted, to treat superscript, subscript, & plain numerals as equivalent when "case insensitive" is selected.
::[[User:Martin Kealey|Martin Kealey]] ([[User talk:Martin Kealey|talk]]) 02:55, 6 August 2025 (UTC)
More in [[Unicode subscripts and superscripts]]. So, the font designers are dumb, but we continue to use <nowiki><sup>/<sub></nowiki> hacks instead of switching to a more sane font?--[[User:Marc Lacoste|Marc Lacoste]] ([[User talk:Marc Lacoste|talk]]) 13:34, 9 September 2019 (UTC)
Line 29 ⟶ 34:
More than one year after, we're still not in the future yet.--[[User:Marc Lacoste|Marc Lacoste]] ([[User talk:Marc Lacoste|talk]]) 09:16, 29 December 2020 (UTC)
:Unicode superscripts and subscripts are long gone from modern typesetting. This isn't the 90s anymore.  <span style="font-variant:small-caps; whitespace:nowrap;">[[User:Headbomb|Headbomb]] {[[User talk:Headbomb|t]] · [[Special:Contributions/Headbomb|c]] · [[WP:PHYS|p]] · [[WP:WBOOKS|b]]}</span> 21:35, 9 May 2021 (UTC)
:: I'd love to be proven wrong and enlightened, but as I see it currently, I beg to differ. I doubt "modern typesetting" involves using the HTML <nowiki><sub>/<sup></nowiki> tags. Browsers just take the ordinal digits and make them smaller, which is already wrong. The Unicode subscript and superscript numerals are styled differently from the ordinal digits. Fonts that employ old-style numerals by default with descenders and ascenders (and miniature 0,1,2) use the even-sized tabulating numerals for its sub/sups. The forms are then adjusted for clarity and consistency, the strokes are proportionately thicker, serifs are reduced or even absent, and they have their own kerning and layout rules. Dumping all that logic out to the browser's HTML renderer is just silly in 2022. Sensible semantic search results are solvable problems using appropriate [[Unicode equivalence]] and [[text normalisation]] rules in the search engine. I agree with {{user|Marc Lacoste}} that this part of the MOS should be reconsidered. It is inconsistent with how most modern fonts work, produces ugly typography, and conflicts with use of Unicode elsewhere in Wikipedia (e.g. ♭, ♮ and ♯ symbols in music articles). Anyone needing to routinely type all these sorts of characters can use a compose key; it has eleventeen bazillion shortcuts by default in Linux, and there's WinCompose (open source) which gives you the same thing in Windows, instead of horsing around trying to remember loads of obscure 4 digit numbers, and there's bound to be something on a Mac (I have no idea, sorry, good luck with that). For instance, I can type ₂ using the following key strokes: <code><nowiki>[RAlt] [_] [2]</nowiki></code> and similarly, <code><nowiki>[RAlt] [~] [n]</nowiki></code> produces ñ. Anyway, I think in the last several years, there has been a lot of progress and change in the uptake of Unicode both within Wikipedia and everywhere else. — [[User:Jonathanischoice|Jon]] ([[User talk:Jonathanischoice|talk]]) 23:34, 16 March 2022 (UTC)
:::Pick any modern professional word-processing software, HTML-editor, or other professional typesetting editors (such as [[LaTeX]]-based editors), when you select the superscript function, what you get is the regular characters raised and shrinked, not converted to corresponding unicode entities. Unicode entities have long been deprecated on Wikipedia and elsewhere, let's not re-introduce them. As for {{xt|searching for "2" (two) should not find "²" (square), they do not have the same meaning}}, it should, because both mean 2. 2 does not differ in meaning depending on its position. 2 means 2 in 22, 1/2, 3<sup>2</sup>, {{radic|134|2}} or {{nowrap|a<sub>2</sub> {{=}} 1.375}}.  <span style="font-variant:small-caps; whitespace:nowrap;">[[User:Headbomb|Headbomb]] {[[User talk:Headbomb|t]] · [[Special:Contributions/Headbomb|c]] · [[WP:PHYS|p]] · [[WP:WBOOKS|b]]}</span> 00:00, 17 March 2022 (UTC)
::::Word processing isn't the only consideration, and rich text isn't always relevant.
::::There are still plenty of use cases where "plain text" rules, and HTML tags are (rightly) ignored.
::::We're ''still'' encountering ''new'' page summaries and audio page readers that claim such nonsense as that the mass of the sun about 2 tonnes, specifically 1.9889×1030 kg, and it's our fault, not those devices. For further discussion see [[#Different guidance for non-HTML rendering]] below.
::::[[User:Martin Kealey|Martin Kealey]] ([[User talk:Martin Kealey|talk]]) 08:05, 5 August 2025 (UTC)
::::''“2 does not differ in meaning depending on its position”'' is ... absurd. Of ''course'' a digit's meaning depends on context; 20 is ten times bigger than 2; ¹⁄₂ is twenty-four times smaller than 12; and 5² is about half of 52; O₂ is a molecule, O²⁺ is an ion, ²He is an element, and ₂H is a nuclide. I am always frustrated when searching for, say, a "squared" exponent, that I have to wade through masses of false matches for other kinds of <code>2</code>. For me, using distinct superscript digits would ''improve'' the specificity of searches.
::::I assume you're a sane human who knows all this, so if "meaning the same" isn't the real point, what were you actually trying to say? Does the lack of specificity when searching simply not bother you? [[User:Martin Kealey|Martin Kealey]] ([[User talk:Martin Kealey|talk]]) 03:30, 6 August 2025 (UTC)
== Add exception to allow Unicode super/subscripts in COinS fields in {{tl|cite xxx}} templates? ==
Line 50 ⟶ 63:
::::::"What is the point of telling Wikipedia editors who haven't heard of it that they can use it on music pages?" What's the point of telling anyone anything? It's a valid input option, one that is extremely easy to do, and thus should be mentioned.  <span style="font-variant:small-caps; whitespace:nowrap;">[[User:Headbomb|Headbomb]] {[[User talk:Headbomb|t]] · [[Special:Contributions/Headbomb|c]] · [[WP:PHYS|p]] · [[WP:WBOOKS|b]]}</span> 14:50, 5 February 2022 (UTC)
:::::::{{reply|Headbomb}} But {{tl|music}} is also valid and easy. Why not just tell editors who haven't heard of either method about that one, which is undisputed and semantically related to the markup, instead of only telling them about the easy but disputed method which is semantically unrelated? -- [[User:Beland|Beland]] ([[User talk:Beland|talk]]) 23:50, 13 February 2022 (UTC)
::::::::Only you are disputing it. Both methods are equally valid and equally correct.  <span style="font-variant:small-caps; whitespace:nowrap;">[[User:Headbomb|Headbomb]] {[[User talk:Headbomb|t]] · [[Special:Contributions/Headbomb|c]] · [[WP:PHYS|p]] · [[WP:WBOOKS|b]]}</span> 23:54, 13 February 2022 (UTC)
== Different guidance for non-HTML rendering ==
Whilst Wikipedia only provides HTML rendering, in some cases that will be subject to further reduction to plain ASCII. Examples include: screen readers, web crawlers, some mailing lists, public catalogues (like COinS), and copy-and-paste into plain-text only programs, such as a command shell or a 'notepad' editor.
Where a client can be identified as preferring "plain text", we should ''avoid'' sending “10<sup>30</sup>” because that produces the ''deeply'' unsatisfactory end result “1030”.
''Please'' can we recommend, in this specific case, sending either Unicode superscript and subscript digits with fraction-slash,<ref>(superscripts U+2070, U+00b9, U+00b2, U+00b3, U+2074 thru U+2079; subscripts U+2080 thru U+2089; fraction-slash U+2044)</ref> or insert circumflex/caret “^” symbols for exponents and solidus “/” for fractions.
Just to be pellucidly clear, I'm talking about what templates generate, not what editors write in wiki markup, ''except'' when they're editing the templates themselves.
[[User:Martin Kealey|Martin Kealey]] ([[User talk:Martin Kealey|talk]]) 07:46, 5 August 2025 (UTC)
:Perhaps a sufficient change would be to ''strongly'' recommend <code><nowiki>{{sup|</nowiki><i>exponent</i><nowiki>}}</nowiki></code> over <code><sup><i>exponent</i></sup></code> and <code><nowiki>{{sub|</nowiki><i>index</i><nowiki>}}</nowiki></code> over <code><sub><i>index</i></sub></code>, so that those templates can take care of rendering as non-HTML Unicode when indicated by the HTTP client. <!-- Template:Unsigned --><small class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Martin Kealey|Martin Kealey]] ([[User talk:Martin Kealey#top|talk]] • [[Special:Contributions/Martin Kealey|contribs]]) 04:15, 6 August 2025 (UTC)</small>
::Although {{t|sup}} doesn't do that. Are you proposing to change that template and similar ones to render non-HTML queries differently to HTML? [[User:Lithopsian|Lithopsian]] ([[User talk:Lithopsian|talk]]) 15:22, 6 August 2025 (UTC)
:::In essence, yes, but that's not a MOS issue.
:::[[User:Martin Kealey|Martin Kealey]] ([[User talk:Martin Kealey|talk]]) 22:23, 6 August 2025 (UTC)
{{talk-reflist}}
|