Jump to content

Wikipedia talk:Manual of Style/Mathematics: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
 
(458 intermediate revisions by 58 users not shown)
Line 1: Line 1:
{{User:MiszaBot/config
{{User:MiszaBot/config
|algo = old(30d)
|algo = old()
|archive = Wikipedia talk:Manual of Style/Mathematics/Archive 1
|archive = Wikipedia talk:Manual of Style/Mathematics/Archive
|maxarchivesize = 200K
}}
{{tmbox|text='''Historical note:''' The page [[Wikipedia:Manual of Style/Mathematics]] was originally obtained by moving content from [[Wikipedia:WikiProject Mathematics]] here, see the {{Diff|Wikipedia:WikiProject Mathematics|9551747|9522964|diff}}. As such, this page was not created from scratch on 18:39, 19 January 2005 as the page history may suggest, but is rather the product of collaborative discussion of Wikipedians since 2001 or 2002.}}
{{WikiProject banner shell|
{{WikiProject Manual of Style}}
}}
}}
{{WPMOS}}
{{tmbox|text='''Historical note.''' This page, [[Wikipedia:Manual of Style/Mathematics]], was obtained by moving here content from [[Wikipedia:WikiProject Mathematics]], see the [http://en.wikipedia.org/w/index.php?title=Wikipedia:WikiProject_Mathematics&diff=9551747&oldid=9522964 diff]. As such, this page was not created from scratch on 18:39, 19 January 2005 as one may think from the page history, but is rather the product of collaborative discussion of Wikipedians since 2001 or 2002.}}
{{archive box|auto=long}}
{{archive box|auto=long}}
{{shortcut|WT:MSM}}
{{shortcut|WT:MSM}}


== Not-greater-than rendering problems ==
== Markup for math variables ==

{{FYI|Pointer to relevant discussion elsewhere.}}
Please see [[Wikipedia talk:Manual of Style/Text formatting#Mathematics variables section is wrong and needs updating]]<br />

== Indenting ==

{{ping|SMcCandlish}} I object to [[Special:Diff/813150707|using]] {{tlx|in5}}, which uses multiple nonbreaking spaces to indent what follows, for indenting displayed math content. Unfortunately, the "obvious" <code><nowiki><math style="margin-left:2em"></nowiki></code> doesn't seem to be supported (perhaps a Phabricator task should be opened about this?). A simple TeX-based solution would be to start the math content with an initial "<code>\quad\ </code>" (a [[Quad (typography)|quad]] followed by a space):

<math>\quad\ \int_0^\pi\sin x\,dx</math>
: Colon-provided indent, for comparison.

There might be a better (if not more convenient) TeX-based solution if I thought about / researched it a bit. Opinions? Suggestions? - [[User:Dcljr|dcljr]] ([[User talk:Dcljr|talk]]) 06:19, 2 December 2017 (UTC)

:Then do that. Just don't given wrong HTML advice. PS: There's nothing wrong or objectionable about what I wrote; MoS doesn't care at all about non-rendered whitespace in wikicode, and there's nothing invalid about it. We do not have a rule to compress away whitespace in wikicode, and shouldn't have one, since we often use it to good effect. For every person who would object to the version I use there are probably 1+ who prefer it because it makes it easier to find the math markup in the source. I don't really care either way as long as we stop mis-advising abuse of list markup for non-lists, which is an [[MOS:ACCESS|accessibility]] problem. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] &gt;<sup>ʌ</sup>ⱷ҅<sub>ᴥ</sub>ⱷ<sup>ʌ</sup>&lt; </span> 06:24, 2 December 2017 (UTC)
:: ([[Apophasis|Ignoring]] your second sentence, which makes it sound like I'm the one who was giving editors the "wrong" advice…) There is actually something very wrong with the {{tlx|in5}} approach. Look at the HTML it actually outputs: "<code><nowiki><p>&amp;#160; &amp;#160; &amp;#160;</nowiki></code>" (alternating non-breaking and regular spaces). This means long math content can actually be bumped to the next line, resulting in no indenting at all. In any case, I'm glad you see my suggestion as a viable alternative. <u>What say other users?</u> (In the meantime, shall we revert your change, SMcCandlish, until a better approach is found?) - [[User:Dcljr|dcljr]] ([[User talk:Dcljr|talk]]) 06:46, 2 December 2017 (UTC)
:::Then fix the template or use a different one. No-wrapping the spaces that template uses is a trivial fix, and there's probably another one that more sensibly does this with CSS padding. The point is, do something other that abuse of list markup. No, we shouldn't revert it, because abuse of list markup like that is, well, abusive, while the consequence of a long math content wrapping to a new line without an indent is just a line without an indent which isn't invalid, just not perfect. I've asked the Lua handlers of {{tlx|in5}} to fix the wrapping issue. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] &gt;<sup>ʌ</sup>ⱷ҅<sub>ᴥ</sub>ⱷ<sup>ʌ</sup>&lt; </span> 08:35, 2 December 2017 (UTC)
::::Oh, duh. I actually wrote the ideal template for this, and forgot: {{tlx|blockindent}}. Just tried that, and it works fine. No blank line needed, either. (I created this originally as a {{tlx|blockquote}} replacement for material that isn't a quotation). <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] &gt;<sup>ʌ</sup>ⱷ҅<sub>ᴥ</sub>ⱷ<sup>ʌ</sup>&lt; </span> 08:38, 2 December 2017 (UTC)

The standard way to indent in mathematics articles is to use colons, and this page should reflect that. I am not sure I know of ''any'' math article that uses templates for indenting displayed math formulas. The HTML generated is irrelevant to this point - "colon" in wikitext means "indent", not "dd", and at any point Mediawiki could switch from "dd" to anything else that achieves an indentation. It is not in any way an abuse of wikitext to use colons to indent content. &mdash;&nbsp;Carl <small>([[User:CBM|CBM]]&nbsp;·&nbsp;[[User talk:CBM|talk]])</small> 15:08, 2 December 2017 (UTC)

:Using something other than a colon is probably semantically better, but it's hard to see justifying the change at this point. On a different but related topic, I was wondering about the practice of having blank lines before and after indented equations. Doing so seems to help readability while editing, but again, semantically it would seem to be wrong, because it indicates paragraph breaks where there shouldn't be any. I don't know of a good way around this, but maybe it's worth thinking about along with the above. &ndash;[[User:Deacon Vorbis|Deacon Vorbis]]&nbsp;([[User Talk:Deacon Vorbis|carbon]]&nbsp;&bull;&nbsp;[[Special:Contributions/Deacon Vorbis|videos]]) 15:27, 2 December 2017 (UTC)

::I would agree about the spacing issue if the blank lines had an effect on page spacing, but I don't think they do, looking at the source of this from my sandbox: [https://en.wikipedia.org/w/index.php?title=User:CBM/sandbox&oldid=813229323]. In general displayed math should not start a new textual paragraph, of course.

::Regarding the colons, I think the key issue is that semantically, colons ''mean'' "indent" in wikicode. So the concern is not with the semantics of the wikicode but with the current implementation of those semantics, which is not an issue I think we need to worry about as editors. But moreover the very well established standard is to use colons, not some other template, for indenting displayed math. &mdash;&nbsp;Carl <small>([[User:CBM|CBM]]&nbsp;·&nbsp;[[User talk:CBM|talk]])</small> 15:36, 2 December 2017 (UTC)
:::Er, well, actually colon means "here is the definition part of a definition list". It just happens to be the case that that meaning causes things to be indented. I think that "indent something" is far more frequent than "definition part of a definition list" as the intended meaning by the editors using it, and that it would be a good idea for the Wikimedia engine to use semantic coding that reflects that, but it doesn't. In the meantime, if you want semantic purity, there's always <nowiki><math display="block"></nowiki>, e.g.
<math display="block">E=mc^2</math>
:::(But there is no way that I know of to use that to get more than one indent, e.g. to match the indentation of this comment.) —[[User:David Eppstein|David Eppstein]] ([[User talk:David Eppstein|talk]]) 03:11, 3 December 2017 (UTC)
::::Yes. It definitely does {{em|not}} mean indent; we just abuse it for that on talk pages because we're lazy. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] &gt;<sup>ʌ</sup>ⱷ҅<sub>ᴥ</sub>ⱷ<sup>ʌ</sup>&lt; </span> 06:50, 3 December 2017 (UTC)

{{od}} Depends on what you're trying to do. For what we've been talking about:<br />
{{tlx|block indent|1{{=}}Your math here.}}<br />
{{tlx|block indent|{{tlp|block indent|1{{=}}Further-indented math here.}}}}<br />
emits:
{{block indent|1=Your math here.}}
{{block indent|{{block indent|1=Further-indented math here.}}}}

For simple stuff (but requires either a blank line or a {{tag|br|s}} preceding it, and indents less by default):<br />
<code><nowiki>{{in5}}Your math here.<br /></nowiki></code><br />
<code><nowiki>{{in5}}{{in5}}Further-indented math here.<br /></nowiki></code><br />
or<br />
<code><nowiki>{{in5|10}}Further-indented math again.<br /></nowiki></code><br />
yields:<br />
{{in5}}Your math here.<br />
{{in5}}{{in5}}Further-indented math here.<br />
or<br />
{{in5|10}}Further-indented math again.

Neither of these produce bogus list markup, but the {{tlx|in5}} stuff can wrap such that the math is non-indented, as someone noted above, if the math content is long (or the viewport is tiny). There are also other indentation templates, but they are also space-based like {{tlx|in5}}. The most robust is the {{tlx|block indent}} approach. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] &gt;<sup>ʌ</sup>ⱷ҅<sub>ᴥ</sub>ⱷ<sup>ʌ</sup>&lt; </span> 06:50, 3 December 2017 (UTC)

PS: You can also use {{tlx|block indent|left{{=}}{{var|X}}}} where {{var|X}} is an value in em units, to change the indent spacing (e.g. to make it match regular list indentation instead of blockquote indentation, or to indent further instead of using a block indent nested in a block indent. {{em|Another}} approach to the first example would be to open a block indent, put the first math, then do another block indent, do the extra-indented math, then close both block indents. That would be "cleaner", unless you need some non-indented text between the indented and extra-indented material, e.g. to introduce the second example.

I'm not sure why you'd want to have math examples indented to different levels in the first place, though.<br /><span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] &gt;<sup>ʌ</sup>ⱷ҅<sub>ᴥ</sub>ⱷ<sup>ʌ</sup>&lt; </span> 06:54, 3 December 2017 (UTC)

:: I think David E. [[wikt:bury the lead|buried the lead]] a bit: it appears that <code><nowiki><math display="block"></nowiki></code> is exactly what we've been looking for. Getting it to be generally accepted by editors is, of course, a totally different matter. I agree (with the implication of SMcCandlish's last comment) that indenting displayed math beyond one level is probably a relatively rare requirement in articles, but I imagine there are probably several legit examples lying around. In those cases, {{tlx|block indent}} looks like an acceptable approach:
{{block indent|<math>f(x)=|x|</math>}}
:: (assuming, of course, that it's not more appropriate to handle the formatting inside the TeX content itself).
:: BTW, the template-inside-template approach shown above to get further indenting is not necessary, since {{tlx|block indent}} has an <code>em</code> parameter to control how far to go (in ems, of course):
::: <code><nowiki>{{block indent|em=4|<math>f(x)=|x|</math>}}</nowiki></code>
{{block indent|em=5|<math>f(x)=|x|</math>}}
:: Yay. - [[User:Dcljr|dcljr]] ([[User talk:Dcljr|talk]]) 08:16, 3 December 2017 (UTC)
* '''Comment'''. Please note that changes such as [https://en.wikipedia.org/w/index.php?title=Wikipedia:Manual_of_Style/Mathematics&curid=1412568&diff=813379814&oldid=813262908 this], which mandate a different way than the norm for all mathematics articles out there, including all mathematics featured articles and good articles, requires very strong consensus. The last time this issue was raised at [[WT:WPM]], there was no consensus for a change. Similarly to this discussion, the change was imperialistically imposed on high by editors who do not routinely need to edit mathematics articles. Templates and display blocks are simply not as convenient for editors as colons, which have been used for indentation in Wikipedia since the very early days. (See [[WP:INDENTATION]], [[Help:Talk]], as well as the history of this guideline.) Even the alleged "violation" of [[WP:ACCESS]] is spurious: "This is not ideal for accessibility or semantics, but is currently in wide use." That guideline then gives guidance on how to use colons for indentation purposes! Consensus should be established with a formal RfC, as I said the last timme this issue was raised. [[User:Sławomir Biały|<span style="text-shadow:grey 0.3em 0.3em 0.1em; class=texhtml">Sławomir Biały</span>]] ([[User talk:Sławomir Biały|talk]]) 12:39, 3 December 2017 (UTC)

::A couple further quick observations: If you're manually setting the indentation size (like the 4em above), you're [[almost surely]] doing it wrong. If any change is made, it should probably produce something that's at least very close to what a colon produces. Otherwise, we'll have pages with mixed amount of indentation as new stuff is added. Alternatively, someone could come up with a very thoroughly tested solution for converting automatically. &ndash;[[User:Deacon Vorbis|Deacon Vorbis]]&nbsp;([[User Talk:Deacon Vorbis|carbon]]&nbsp;&bull;&nbsp;[[Special:Contributions/Deacon Vorbis|videos]]) 13:02, 3 December 2017 (UTC)

:::It it also very easy to find featured articles, such as [[Californium]], which use colons for indentation. That is the standard way of indenting displayed formulas, is the only way in [[Help:Wikitext]], and is explicitly allowed by [[WP:ACCESS]]. The real solution to access issues is '''get the developers to stop Mediawiki emitting dd/dl lists when colons are used for indentation''', rather than trying to avoid using indentation wikicode to indent things in wikicode. In general, though, if we are looking at the HTML being emitted, we are doing it wrong. Editors work with wikicode, and the the HTML is the problem of the developers. &mdash;&nbsp;Carl <small>([[User:CBM|CBM]]&nbsp;·&nbsp;[[User talk:CBM|talk]])</small> 13:33, 3 December 2017 (UTC)
::::[[WP:OTHERSTUFF]] and [[WP:NODEADLINE]]. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] &gt;<sup>ʌ</sup>ⱷ҅<sub>ᴥ</sub>ⱷ<sup>ʌ</sup>&lt; </span> 13:37, 3 December 2017 (UTC)
::::: {{ping|SMcCandlish}} I think Carl's remarks are entirely relevant and do not raise the spectre of WP:OTHERSTUFF. OTOH, your repeated reverting of the project page back to your preferred version suggests you think there is a DEADLINE in getting these guidelines changed. Please try to gain some kind of consensus before making such a major change to the guidelines. (Yes, I see the VP discussion linked below.) {{ping|Deacon Vorbis}} The specific "4em" example I used above was only to get the mathematics at the ''third'' level of indenting. I assume that "almost never" happens in articles. {{ping|CBM}} Considering the HTML that actually gets generated can help to decide which wikicode approach is better than another, or whether an approach can be improved (as [[Template talk:In5#no-wrap|just happened]] with the {{tlx|in5}} template/module). As for developer-involved solutions, I think a more realistic approach (rather than deprecating or reimplementing colon-indenting) may be to work towards a <code><nowiki><math></nowiki></code>-only solution for indenting mathematical content in particular. I've opened a new subsection for this below. - [[User:Dcljr|dcljr]] ([[User talk:Dcljr|talk]]) 11:36, 4 December 2017 (UTC)

=== Accessibility versus convenience in indentation (RfC at VPPOL) ===
{{FYI|Pointer to relevant discussion elsewhere.}}
Please see: [[Wikipedia:Village pump (policy)#RfC: Accessibility versus convenience in indentation]]<br /><span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] &gt;<sup>ʌ</sup>ⱷ҅<sub>ᴥ</sub>ⱷ<sup>ʌ</sup>&lt; </span> 13:37, 3 December 2017 (UTC)

=== Extending math element functionality ===
Like I said above (although not to this level of precision), just using <code>display="block"</code> seems to give exactly the same indenting as a single colon (does anyone see otherwise?):
:<math>|x|</math>
<math display="block">|x|</math>
These are, respectively, coded as:
* <code><nowiki>:<math>|x|</math></nowiki></code>
* <code><nowiki><math display="block">|x|</math></nowiki></code>
This tells me that it is not unreasonable to ''consider'' implementing the indenting of math content with the <code>display="block"</code> approach. (Again, as I suggested above, ''having the option'' and ''requiring'' it are two different things. Here I'm discussing ''having the option'' to indent in the math element itself. Also remember that MediaWiki features are used in wikis other than those hosted by the Wikimedia Foundation. Mathematically oriented wikis may actually like the idea of colon-less indenting of math content.)

Unfortunately, the way <code>display="block"</code> is currently implemented appears to result in bad HTML: paragraph opened before a <code><nowiki><div></nowiki></code> element then closed after it. Given this, I'm not sure I understand what the thinking was when the feature was originally proposed/implemented (since "displayed" math [in the TeX sense] almost always occurs inside a paragraph, yet a <code><nowiki><div></nowiki></code> element cannot). Perhaps someone knows where this was discussed? The only thing I've been able to find is [[mw:Extension:Math/Displaystyle]], which doesn't have any real discussion.

Another, more serious, problem is that the page I just linked to reveals that on the MediaWiki wiki, <code>display="block"</code> results in ''centered'' displayed math (just like in TeX), not displayed math indented to the level of one colon! (''Waaah…'')

Notwithstanding all of the above, indenting to the level of however-many colons could be implemented in the <code><nowiki><math></nowiki></code> element with new syntax. This very idea came up back in December 2008 ([[phab:T18829]]) and was quickly nixed (within 14 hours!) by a developer ([[User:Brion VIBBER|Brion]], the only other user to comment on the bug), but opinions can change in 9 years, so maybe the idea would not be dismissed out of hand if some kind of consensus were reached about what the syntax might look like.

The proposer in 2008 seemed to be suggesting:
* <code><nowiki><math indent=</nowiki>''number''></code>
where ''number'' is the number of "colons" of indenting to apply (0 would mean no indenting, which the proposer said would be the default and mean inline display — I would lean toward having 0 mean non-indented but still "displayed" math [i.e., after a line break]).

Another possibility is to put it inside the <code>display</code> attribute:
* <code><nowiki><math display="indent"></nowiki></code>
for displayed math with one-level indent;
* <code><nowiki><math display="indent:</nowiki>''number''"></code>
for displayed math with ''number''-level indent (0 or more, 0 meaning aligned to left margin).

I could probably come up with other possibilities, but I've been typing this up for an insane amount of time already. I need to go to sleep. - [[User:Dcljr|dcljr]] ([[User talk:Dcljr|talk]]) 11:36, 4 December 2017 (UTC)

: In principle I do not object to mentioning <nowiki><math display="block"></nowiki>, but share your concern that if this is supposed to be the solution that leads to completely valid html, that it might fail at that. [[User:Sławomir Biały|<span style="text-shadow:grey 0.3em 0.3em 0.1em; class=texhtml">Sławomir Biały</span>]] ([[User talk:Sławomir Biały|talk]]) 11:41, 4 December 2017 (UTC)
:Re "Perhaps someone knows where this was discussed?": https://phabricator.wikimedia.org/T111712, I think, and before that at [[Wikipedia:VisualEditor/Feedback/Archive 2015 3#Indentation for mathematical equations]]. —[[User:David Eppstein|David Eppstein]] ([[User talk:David Eppstein|talk]]) 11:44, 4 December 2017 (UTC)
:: Yep, there it is… lots of prior discussion. [grin] For the record, there is also [[phab:T6521]] for discussion about changing the way MW handles colon-indenting and semicolon-bolding outside the context of a deflist.
:: Interestingly, [[phab:T111712]] mentions the possibility of creating:
::* <code><nowiki><dmath></nowiki></code>
:: as an abbreviation for <code><nowiki><math display="block"></nowiki></code>, an approach I think is particularly promising. Someone else (in the task) objected to creating a new tag, but I think it's a pretty neat solution. The new tag could then be used along with sitewide style sheets to style displayed math as either indented or centered, as desired by the wiki (IOW, whichever alignment is chosen as the "''default'' default", a wiki could change it to the other default alignment in their site's CSS).
:: And then
::* <code><nowiki><imath></nowiki></code>
:: could be created for inline math (<code><nowiki>display="inline"</nowiki></code>), and no already existing uses of <code><nowiki><math></nowiki></code> would need to be changed to get the benefit of the kinds of "logical" changes people have wanted to make to the behavior of <code><nowiki><math></nowiki></code> (e.g., that inline math should use inline styling by default, and displayed math should use display styling — this change would bring wikicode math much closer to the way TeX/LaTeX does it, which many technical folks would likely welcome). All current math content would continue to work the same way it does now, and instances of <code><nowiki><math></nowiki></code> could be slowly changed to <code><nowiki><imath></nowiki></code> or <code><nowiki><dmath></nowiki></code>, as appropriate, in the normal course of editing. (The <code><nowiki><math></nowiki></code> tag would remain a viable option into the future.) Unfortunately, I have no idea whether having three different tags as "entry points" to the same underlying code would cause any kind of problem from the developers' side. I would ''hope'' not. (Note that the <code><nowiki>display="block"</nowiki></code> and <code><nowiki>display="inline"</nowiki></code> functionality ''already exists''. The change would be the use of the new tags and having different defaults for the two situations.) - [[User:Dcljr|dcljr]] ([[User talk:Dcljr|talk]]) 23:25, 4 December 2017 (UTC)
:Something like this sounds like a great idea. It would be better to do it with CSS <span style="margin-left:2em;">indentation</span> (demoed here with <code>margin:left</code>) rather than by changing the content type to a block element, since we can't guarantee the context; a block element wouldn't be valid inside an inline element like {{tag|span}}. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] &gt;<sup>ʌ</sup>ⱷ҅<sub>ᴥ</sub>ⱷ<sup>ʌ</sup>&lt; </span> 08:14, 11 December 2017 (UTC)
:Probably it would be easier just for Math to nix the opening paragraph HTML when it's in display form. I submitted [[:phab:T182041]] for that issue. As for display math, I think it makes more sense to do something like [[:phab:T182673]] which I submitted today. I dislike the <code>imath</code> solution because it a) adds tags for the same semantic information and b) because the solution should work with <code>chem</code> as well as <code>math</code> without an even larger number of tags. --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 12:47, 12 December 2017 (UTC)
:::Good point. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] &gt;<sup>ʌ</sup>ⱷ҅<sub>ᴥ</sub>ⱷ<sup>ʌ</sup>&lt; </span> 15:52, 12 December 2017 (UTC)
::This is an idea, but it requires things to be in math tags, while of course many formulas are formatted in plain wikitext, because of article-by-article decisions. For example, the display in [[californium]] ("History"). We also have to be careful, technically, with displayed equations that have math tags and additional text outside of math tags, as in [[ROT13]] ("Description"). I think that fixing the output for colons in Mediawiki seems like a more comprehensive solution, because that would fit many more use cases, compared to looking just at the math tag. &mdash;&nbsp;Carl <small>([[User:CBM|CBM]]&nbsp;·&nbsp;[[User talk:CBM|talk]])</small> 13:11, 12 December 2017 (UTC)
:::Surely true, but after a decade, it seems clear there's a great inertia with regard to the colon/dd markup, and it's probably easier to get {{tag|math|o}} and {{tag|chem|o}} adjusted. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] &gt;<sup>ʌ</sup>ⱷ҅<sub>ᴥ</sub>ⱷ<sup>ʌ</sup>&lt; </span> 15:52, 12 December 2017 (UTC)
:::: [[WP:NODEADLINE]]. There is no reason to rush an incomplete fix. But we can and should encourage the developers to fix the more general problem with the HTML that is being emitted. &mdash;&nbsp;Carl <small>([[User:CBM|CBM]]&nbsp;·&nbsp;[[User talk:CBM|talk]])</small> 16:09, 12 December 2017 (UTC)
::::: Oh, I agree, but it's unlikely to happen quickly if it all, and it's no excuse to use bad markup in the interim. I am happy to see {{em|some}} traction on the <code>:</code> Phabricator ticket for the first time in years but they keep saying, basically, "it's hard" which generally translates to "WONTFIX", either formally or through perpetual inaction. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] &gt;<sup>ʌ</sup>ⱷ҅<sub>ᴥ</sub>ⱷ<sup>ʌ</sup>&lt; </span> 19:47, 12 December 2017 (UTC)
:::::: It appears extremely unlikely that the Phab ticket is over going to be acted upon. "It's too hard", basically. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] &gt;<sup>ʌ</sup>ⱷ҅<sub>ᴥ</sub>ⱷ<sup>ʌ</sup>&lt; </span> 23:57, 20 December 2017 (UTC)
:I think <syntaxhighlight lang="html5" enclose="none"><math display="block"></syntaxhighlight> is the way to go. It gets centered by default, but this was [[Special:Diff/679809528/680359180|changed on common.css]] (see [[Wikipedia talk:WikiProject Mathematics/Archive/2015/Sep#Styling of block mode display of math formula]]). [[User:He7d3r|Helder]] 12:59, 26 December 2017 (UTC)

== Please add explicit guidance re markup vs. special characters ==

Hello.

I propose/request that the MOS be amended to include explicit guidance regarding the use of markup versus special characters when editing mathematical formulas.

The MOS currently gives guidance for specific cases of similar situations. For example, it prefers <code><nowiki><sup>2</sup></nowiki></code> instead of <code><nowiki>&amp;sup2;</nowiki></code>. It does not, however, address the possibility that an editor might directly enter the "special" character itself: <code>&sup2;</code>. This markup-versus-special issue is the subject I request be addressed.

By providing the "Special characters" toolbar, which directly inserts hard-to-type characters into the wikitext, Wikipedia seems to favor that approach over markup. I find this problematic.

The "toolbar" method requires the editor to search for and identify the desired character by eye alone. This effort is difficult.
* There is often no easily-recognizable '''[[Total order | strict total order]]''' on the set of symbol characters. It is not even clear within which category to search. (Is the "sigma" I want in category "Greek," "Greek extended," or "Symbols?")
* Even worse, can my sigma appear under ''multiple'' categories, suggesting that the correct choice of category depends on the character's semantic function? For example, if I wrote an article about a mathematician from '''[[Athens]]''', would I need to use sigma from one toolbar category when specifying his name, and sigma from a distinct toolbar category when typesetting the formula he produced? Likewise, the toolbar offers "↑". Is that supposed to mean '''[[Knuth's up-arrow notation]]''', or is it just a '''[[dingbat]]'''? Is there even a difference? Can this situation even happen?
* Even if the editor knows where to look, some characters are difficult to distinguish visually. Consider Ö and Ő and Ố.
* The above problems do not easily abate as the editor gains experience. Even if I know I want Knuth's notation, there is no way for me to quickly specify it.


On [[Talk:Inequality (mathematics)/Archive 1#Renderization of "not greater than" symbol]], {{u|Fgnievinski}} reports problems rendering {{unichar|226F|Not Greater-Than}}, with Chrome version 123.0.6312.106 on Windows 10 version 22H2:
The consequence of this difficulty is editor fatigue, and therefore editor carelessness. Editors who want '''[[beta]]''' will just use '''[[ß]]''' (Eszett) if they find it first. In the long term, I am concerned that "emojification" of Wikipedia's mathematics content will create ambiguity and decrease the value of articles. (See '''[[Emoji#Emoji_communications_problems]]'''.)
[[File:Rendering test.png|thumb|center]]


(The first three are all just the Unicode character not displaying properly.)
The alternative to the "toolbar" method is markup using one of the supported languages such as HTML or <code><nowiki><math></nowiki></code>. This eliminates the ambiguity problem (ala <code>&amp;beta;</code>), but has the disadvantage of a '''[[Learning_curve#"Steep_learning_curve" | steep learning curve]]'''. I suppose that my preference for the direction of guidance is clear, but my aim in writing today is to gain clarity for myself and other editors, not to promote my particular opinion.


I assume this be added to the list of characters that should only be expressed with {{tag|math}}? Are there any related characters for which anyone is also experiencing rendering problems? -- [[User:Beland|Beland]] ([[User talk:Beland|talk]]) 02:37, 18 April 2024 (UTC)
To summarize, I request that the MOS
# clarify whether or not (English) Wikipedia has a preference regarding markup versus special characters, and if so, specify what that preference is.
# clarify whether editors should or should not observe a semantic difference between symbols/characters used in formulas and used elsewhere.
# advise that this guidance concerns an advanced editing technicality, and that inexperienced editors should not allow it to dissuade their participation. (A '''[[Wikipedia:WikiGnome|WikiGnome]]''' will come along to fix any mistakes.)


:Imo, the most problematic issue is with the symbol for function composition (∘ or ○). On some devices such as Safari on my laptop, the first one is so small that it is easily confused with an [[interpunct]], and the second one has the same size as \circ (<math>\circ</math>). On other devices, such as Safari on my iPhone, the first has the same size as \circ, and the second one is much larger. I am thus in favor of using only latex for function composition, but this implies to edit a lot of articles. [[User:D.Lazard|D.Lazard]] ([[User talk:D.Lazard|talk]]) 16:36, 18 April 2024 (UTC)
Thank you,
:: The nice thing about a latex <math>\circ</math> is that it can stretch to fit whatever size you need. [[User:EEng#s|<b style="color:red;">E</b>]][[User talk:EEng#s|<b style="color:blue;">Eng</b>]] 16:44, 18 April 2024 (UTC)
::{{reply|D.Lazard}} I only see 231 articles with "∘". There are 597 articles with "○". It would be very easy for me to change all the instances of "∘" to "○". Would that solve the problem of visual confusion? -- [[User:Beland|Beland]] ([[User talk:Beland|talk]]) 21:41, 18 April 2024 (UTC)
:::This would deserve more discussion, since, on my smartphone, "○" is much too large. My opinion is that only latex should be used when the symbol for function composition is used. [[User:D.Lazard|D.Lazard]] ([[User talk:D.Lazard|talk]]) 09:16, 19 April 2024 (UTC)
::::{{reply|D.Lazard}} OK, I've added all three characters to the list, recommending LaTeX markup instead. -- [[User:Beland|Beland]] ([[User talk:Beland|talk]]) 23:18, 19 April 2024 (UTC)
:::No, the big circle is inappropriately large. –[[user:jacobolus|jacobolus]] [[User_talk:jacobolus|(t)]] 14:40, 19 April 2024 (UTC)


One thing that would help a lot in my opinion is (English) Wikipedia directly hosting a "math" font indicated first in the font stack in the CSS for {{template|math}} templates which explicitly included a wide range of supported glyphs. This could be e.g. something constructed from Computer Modern glyphs, or [[STIX]] 2.0 (or something else?). The appearance of STIX 2 is not an exact stylistic match for Computer Modern, but it's also not inordinately far away. I don't really know what would be technically required for MediaWiki/Wikipedia to host something like that though. –[[user:jacobolus|jacobolus]] [[User_talk:jacobolus|(t)]] 14:54, 19 April 2024 (UTC)
[[User:Christopher.ursich|Christopher Ursich]] ([[User talk:Christopher.ursich|talk]]) 00:31, 19 February 2018 (UTC)
:: <small>Um, Christopher, you don't have to use bold on every link. In fact, please don't make links bold unless there's some particular reason to emphasize them. - [[User:Dcljr|dcljr]] ([[User talk:Dcljr|talk]]) 04:11, 20 February 2018 (UTC)</small>
:The preference for explicit superscripts over the superscript-2 character has nothing to do with how it is marked up. It is because the character doesn't match other superscripts; e.g. <nowiki>''x''<sup>5</sup>''y''&sup2;</nowiki> comes out as ''x''<sup>5</sup>''y''&sup2; which (at least in my view) has the 2 tiny and squished into its variable compared to the 5. So you should not use this character regardless of whether you type it directly or use the html entity. For the same reason, for characters that are ok to use directly, it should not matter whether you type them or name them. I think we should not express a preference for one way or the other, and in fact more strongly I think we should discourage editors from changing one way to the other or vice versa, because it is a useless waste of time for them to do so and a useless waste of time for the rest of us to see those changes on our watchlist. Better to encourage those editors to do something else, like creating actual content. —[[User:David Eppstein|David Eppstein]] ([[User talk:David Eppstein|talk]]) 06:09, 20 February 2018 (UTC)


:{{reply|Jacobolus}} If you'd like to discuss that with the responsible parties, see [https://phabricator.wikimedia.org/T362205] (where one developer said the server side generally doesn't host fonts) or [https://meta.wikimedia.org/wiki/Tech#Renderization_of_symbol_%22not_greater_than%22] (where one person recommending asking Microsoft to fix their fonts). [[User:Beland|Beland]] ([[User talk:Beland|talk]]) 23:22, 19 April 2024 (UTC)
== Logarithms? ==
::Yes, please voice your concerns at the bug tracker, because the report was dismissed as not a technical issue. [[User:Fgnievinski|fgnievinski]] ([[User talk:Fgnievinski|talk]]) 18:19, 20 April 2024 (UTC)


== Fractional exponents and subscripts ==
A discussion on this topic from 2010 is in the archive, but no conclusion seems to have been reached, there's nothing in the article, and I'd think there ought to be a consistent guideline here. I would propose <math>\ln</math>, <math>\log_{10}</math>, and <math>\log_2</math> always be used for their respective meanings, with the bare <math>\log</math> being reserved for contexts such as asymptotic behavior. Mathematicians might object to the foremost, but this being Wikipedia, I'd imagine even quite advanced topics would be found by a fair share of readers likely to read "log" and infer "common log"; similarly, although I'd imagine most of those with the sort of background to assume the natural log would catch on from context in most circumstances, the lay usage of the bare symbol to mean the common log should probably also be avoided for the confusion it might cause, as should the niche <math>\lg</math>. Regardless, even if all of that is rebuked, I do strongly believe we need ''some'' community-wide standard. Thoughts? [[Special:Contributions/50.252.247.245|50.252.247.245]] ([[User talk:50.252.247.245|talk]]) 19:37, 30 May 2018 (UTC)
:That is not the standard usage in pure mathematics, where "log" without adornment is much more common as the notation for the natural log. —[[User:David Eppstein|David Eppstein]] ([[User talk:David Eppstein|talk]]) 20:09, 30 May 2018 (UTC)
::I'm aware of this. However, as I said, this seems likely to confuse anyone not a reader of pure math journals, likely to be the majority of readers even on extremely advanced topics. Even those familiar with mathematicians' convention might not expect it on Wikipedia. [[Special:Contributions/50.252.247.245|50.252.247.245]] ([[User talk:50.252.247.245|talk]]) 20:32, 30 May 2018 (UTC)


I have just discovered using {{tl|sfrac}} for fractional exponents and subscripts (which is what [[MOS:FRAC]] and [[Wikipedia:Manual of Style/Mathematics#Fractions]] require for science and math articles) doesn't really work visually, at least on my computer - the surrounding text is easily confused as part of the numerator or denominator and sometimes it's just unclear that the fraction is supposed to be a superscript or subscript at all. I'm wondering what other people see and what the preferred solution for this would be, if it is indeed really a problem? Here are some examples with {{tl|math}} style applied:
:On first glance it seems like a reasonable request. But it's a problem for Wikipedia, where we need to stick to the sources, and the sources all use "log". Hmm. [[User:Mgnbar|Mgnbar]] ([[User talk:Mgnbar|talk]]) 20:53, 30 May 2018 (UTC)
:: The convention in lower-level mathematics (in the U.S., anyway) seems to be that <math>\log</math> means <math>\log_{10}</math> (that's what I learned), while the convention in higher-level mathematics and engineering seems to be that <math>\log</math> means <math>\log_e=\ln</math>. I don't recall any specific case where <math>\log</math> meant <math>\log_2</math>, but I would not be at all surprised to have such cases pointed out to me. Given the inherent ambiguity, I agree that bare <math>\log</math> should be discouraged in articles, except (as pointed out by the OP) in cases where it doesn't matter which base is used. In all other cases, <math>\log</math> should never be used without clarification as to which base is intended. As for sticking to the sources, we need not use the exact notation used in sources as long as the notation we use has the equivalent meaning. - [[User:Dcljr|dcljr]] ([[User talk:Dcljr|talk]]) 21:05, 30 May 2018 (UTC)
:::There are definitely textbooks in computer science, information theory, and engineering that use the log = log<sub>2</sub> convention. See footnotes 17–19 of [[binary logarithm]]. I would be surprised to see this variation in pure mathematics, though, and I wouldn't recommend it even for computer science articles in Wikipedia (except within O-notation, where the base of the log is largely irrelevant). —[[User:David Eppstein|David Eppstein]] ([[User talk:David Eppstein|talk]]) 21:19, 30 May 2018 (UTC)
It's more important from our perspective to maintain consistency with sources rather than between articles. In some articles it will be more natural to write <math>\log</math> or <math>\log_{10}</math> or <math>\log_2</math> or <math>\ln</math>. To impose order on this would be for Wikipedia to decide that certain matters of notation are better than others. That is incompatible with our objectives. So we simply stick with what prevailing sources use in a given context, and if there are no dominant conventions, we follow [[MOS:RETAIN]]. [[User:Sławomir Biały|<span style="text-shadow:grey 0.3em 0.3em 0.1em; class=texhtml">Sławomir Biały</span>]] ([[User talk:Sławomir Biały|talk]]) 21:45, 30 May 2018 (UTC)
: "Sticking with sources" should not come at the expense of readers' understanding. This is an encyclopedia, not a professional journal. We should make it clear in each article which base logarithm is meant, and not rely on unspecified "conventions", whether they are shared by our sources or not. Surely we can all agree that (when it matters) simply using <math>\log</math> in an article without providing any additional context (as to what the base may be) should be discouraged. No? - [[User:Dcljr|dcljr]] ([[User talk:Dcljr|talk]]) 00:51, 31 May 2018 (UTC)
:: I would again say it depends on the article. In an article like [[calculus]] or [[exponent]], absolutely. In an article like [[Poisson kernel]], nor so much, as one would never see any other kind of logarithm in that context. Again, we can let the treatment of standard sources in the subject inform our stylistic preferences for a given article. [[User:Sławomir Biały|<span style="text-shadow:grey 0.3em 0.3em 0.1em; class=texhtml">Sławomir Biały</span>]] ([[User talk:Sławomir Biały|talk]]) 00:59, 31 May 2018 (UTC)
:::There are also contexts for which "log" is the only correct notation for a concept that generalizes the natural log to other domains; see e.g. [[closed subgroup theorem]] or [[logarithm of a matrix]]. It would be incorrect to substitute "ln" or to put a subscript on the log in those contexts. —[[User:David Eppstein|David Eppstein]] ([[User talk:David Eppstein|talk]]) 01:37, 31 May 2018 (UTC)
:::: What I believe we should do is to mention clearly which logarithm is used the first time an unclear <math>\log</math> is used in any article; we should not change the notation if that would be weird in the context. If an explicit <math>\ln</math>, <math>\log_{2}</math>, <math>\log_{10}</math> etc. is used, though, there is no need to explain. While some might find it strange to mention the log used as it would be obvious to them, we have to remember this is an encyclopedia and that we are writing to laymen (although in some cases we do expect some education). --[[User:Jhertel|Jhertel]] ([[User talk:Jhertel|talk]]) 10:33, 31 May 2018 (UTC)
::::: Obviously if something is unclear to readers, it should be pointed out, whether that is a logarithm, units, and other conventions. Conversely, if something is likely to be ''clear'' to readers, then it is not necessary to point it out. The MoS doesn't usually take a position on whether extremely specific conventions like those for logarithms must be pointed out in the text. [[User:Sławomir Biały|<span style="text-shadow:grey 0.3em 0.3em 0.1em; class=texhtml">Sławomir Biały</span>]] ([[User talk:Sławomir Biały|talk]]) 11:44, 31 May 2018 (UTC)
::I would agree it depends on the context. I would apply the rule that whatever we can assume six months before a person would be properly prepared to read an article need not be gone over again in the article. Anything which would be dealt with in a mathematics degree need not assume log is anything but a natural logarithm. Anyway the days when people remembered from their 7 figure tables that log<sub>10</sub>3 was 0.4771213 are long gone, one just uses a calculator to multiply. [[User:Dmcq|Dmcq]] ([[User talk:Dmcq|talk]]) 11:57, 31 May 2018 (UTC)


* {{tl|sfrac}} for subscript: {{math|''x''<sub>{{sfrac|1|2}}</sub>}}
:::Don't we already clarify a lot? Are there specific examples where the logarithm is not already clarified? [[User:Mgnbar|Mgnbar]] ([[User talk:Mgnbar|talk]]) 12:25, 31 May 2018 (UTC)
* {{tl|sfrac}} for superscript: {{math|''x''<sup>{{sfrac|1|2}}</sup>}}
* {{tl|frac}} for subscript: {{math|''x''<sub>{{frac|1|2}}</sub>}}
* {{tl|frac}} for superscript: {{math|''x''<sup>{{frac|1|2}}</sup>}}
* Unicode character for subscript: {{math|''x''<sub>½</sub>}}
* Unicode character for superscript: {{math|''x''<sup>½</sup>}}
* {{tag|math}} with subscript: <math>x^{\frac{1}{2}}</math>
* {{tag|math}} with superscript: <math>x_{\frac{1}{2}}</math>


Perhaps the MOS should be changed to use one of these in this sort of situation? Only a few fractions are available in precomposed Unicode characters, so that's probably not a complete solution, especially if we want visual consistency. That leaves the option of partially lifting the science-and-math ban on {{tl|frac}} which would be slightly visually inconsistent (and TBH not all that well-rendered, either), and the option of switching any problematic expressions to LaTeX-style markup. Or perhaps someone has another clever solution or more illuminating examples or other considerations? -- [[User:Beland|Beland]] ([[User talk:Beland|talk]]) 08:56, 28 May 2024 (UTC)
== Indenting, again ==


:In sub- or superscripts, it's usually best to use a horizontal fraction, as in {{math|''x''<sub>1/2</sub>}} or {{math|''x''<sup>1/2</sup>}}, but LaTeX works better still: {{tmath|x_{1/2} }}, {{tmath|x^{1/2} }}. –[[user:jacobolus|jacobolus]] [[User_talk:jacobolus|(t)]] 10:15, 28 May 2024 (UTC)
From {{section link||Indenting}} ([https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:Manual_of_Style/Mathematics&oldid=843780691#Indenting permalink]) as well as various other MOS pages, it seems like using colons solely for indentation within articles is Bad, and using LaTeX’s block display mode
::Oh, nice, that looks way better and is already contemplated by the MOS. I've added a note about that situation, since it seems to occur a lot. (I'm systematically getting rid of the precomposed characters where they are not allowed). Many thanks! -- [[User:Beland|Beland]] ([[User talk:Beland|talk]]) 16:15, 28 May 2024 (UTC)
<math display="block">x=3</math>
does exactly what we want. Is there a reason the article doesn’t advise that over misusing colons? —[[Special:Contributions/67.14.236.193|67.14.236.193]] ([[User talk:67.14.236.193|talk]]) 05:12, 28 June 2018 (UTC)
:I think the main reason is that the {{para|display|block}} syntax is still pretty new. But also, it doesn't work properly for text that is already indented (for instance in bulleted lists, and yes, I have seen bulleted lists with displayed equations in them). And if your goal is semantic cleanliness, it's just as broken as indenting with colons; for instance, your comment above nests a div (actually two nested divs) inside a p, something that is forbidden in proper html. Finally, the idea of avoiding colons for indentation is based on what is arguably a bug in Wikimedia rather than an actual semantic problem; colons are widely used with the intended meaning of indenting something, so the semantics of the wiki-markup is clean enough. The actual problem is that the Wikimedia engine renders the "indent something" semantics as a piece of a definition list even when there is no surrounding definition list to be found. So avoiding : is just working around a bug rather than making your intent clearer. —[[User:David Eppstein|David Eppstein]] ([[User talk:David Eppstein|talk]]) 05:25, 28 June 2018 (UTC)
::WP uses HTML5; the paragraph element ''automatically ends'' whenever another paragraph or div or similar is encountered. ('''Edit:''' it doesn’t start a new {{tag|p|o}} after the math, so the text underneath isn’t even in a paragraph, so there is that bug.) And colons (and semicolons) still function exactly as originally intended, and wikimarkup still lacks a simple indent. That’s not a bug in the colon; that’s ''us'' misusing definition/description/glossary lists purely for aesthetics. —[[Special:Contributions/67.14.236.193|67.14.236.193]] ([[User talk:67.14.236.193|talk]]) 06:11, 28 June 2018 (UTC)
:::Yes. The convenience-over-standards-compliance hissy fit that was thrown the last time we raised the issue of abuse of description-list markup (<code>:</code>) was, frankly, shameful and an embarrassment to the project. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] 😼 </span> 06:21, 28 June 2018 (UTC)
::::Calling indentation "abuse of description-list markup" borders on Stockholm syndrome. It is widely used here as indentation. Therefore it should be thought of as indentation and marked-up as indentation. The bug is that it is instead marked up as a description list, not our usage of it. —[[User:David Eppstein|David Eppstein]] ([[User talk:David Eppstein|talk]]) 06:36, 28 June 2018 (UTC)
:::::“My computer won’t turn on when I press the space bar!” “That only wakes it if it’s already on. Have you tried the power button?” “No, couldn’t you just remap it to the space bar?” {{pb}} We use colons for indenting because indentation is a '''side effect''' of what they actualy do. That’s not a technical problem. It’s an institutional problem of not knowing how to use it. —[[Special:Contributions/67.14.236.193|67.14.236.193]] ([[User talk:67.14.236.193|talk]]) 07:06, 28 June 2018 (UTC)
::::::Exactly. It's unprofessional and ignorant. In debates about it on this page it's {{lang|fr|faux}}-ignorant; the participants all actually know better. I call it shameful and embarrassing because none of the same people would tolerate abuse of mathematical markup for cutesy font and layout effects. It's simply not their personal technical specialty, so they're giving the finger to a different variety of geeky standards – discipline and specs snobbery, laced with excessive demand for "expediency" (i.e., laziness). <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] 😼 </span> 17:49, 28 June 2018 (UTC)
:::::::{{re|SMcCandlish}} Bit harsh and a bit ''ad hominem'', but I agree that, as a group building a complex project on top of a number of technical standards (including [[MOS:Accessibility|our own]]!), we should at least ''pretend'' to care about technical standards in any formal discussion. And yes, using wiki-colons solely for the visual effect of indentation is no different from using math markup for visual effects in standard text. —[[Special:Contributions/151.132.206.26|151.132.206.26]] ([[User talk:151.132.206.26|talk]]) 20:40, 28 June 2018 (UTC)
::If we use <code>&lt;math display="block"></code> in its own paragraph (with a blank line above and below), and if we just use list markup instead of block in lists, wouldn’t that avoid these issues? Is there any reason not to use <code>display="block"</code> on its own between two blank lines? —[[Special:Contributions/67.14.236.193|67.14.236.193]] ([[User talk:67.14.236.193|talk]]) 06:32, 28 June 2018 (UTC)
{{outdent|::}}
Let’s see.


== Markup for Common sets of numbers? ==
<math display="block">x=3</math>


The guidelines for {{alink|Common sets of numbers}} mention using '''\textbf'''in [[LaTeX]]. What about the {{stylized LaTeX}}) commands
Well, there’s an empty paragraph (<code>&lt;p>&lt;/p></code>) above and below the math, so that’s weird, but otherwise no reason not to use it in typical cases. —[[Special:Contributions/67.14.236.193|67.14.236.193]] ([[User talk:67.14.236.193|talk]]) 06:32, 28 June 2018 (UTC)
* '''\C''' (<math>\C</math>)
:I'm not entirely sure how you are seeing an empty p element above/below; the source I have access to is <syntaxhighlight lang=html inline><p><div>latex{x=3}</div></p></syntaxhighlight>. [[:mw:Remex]] (via use of the parser migration edit tool) will add apparently empty p elements at some point in the near-future rather than allowing that bad behavior, but that still doesn't explain how you are getting the source you are. Maybe because you are unregistered? The math source I get is because I have the option set for the MathML. Do you receive a PNG? --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 12:49, 28 June 2018 (UTC)
* '''\H''' (<math>\H</math>)
::{{small|Same IP user as above, not on home computer.}} {{re|Izno}} I was actually looking at the [[DOM tree]] (right-click, Inspect Element or equivalent), not the page source, so I didn't see the div inside the paragraph because that’s not a thing that’s possible under HTML5. And yeah, if there’s nothing in the paragraph before the div, that would give you an empty paragraph. —[[Special:Contributions/151.132.206.26|151.132.206.26]] ([[User talk:151.132.206.26|talk]]) 16:01, 28 June 2018 (UTC)
* '''\N''' (<math>\N</math>)
* '''\Q''' (<math>\Q</math>)
* '''\R''' (<math>\R</math>)
* '''\Z''' (<math>\Z</math>)
all of which render in blackboard? -- [[User:Chatul|Shmuel (Seymour J.) Metz Username:Chatul]] ([[User talk:Chatul|talk]]) 14:02, 25 July 2024 (UTC)


==fixing {{tlx|Percent}}==
There was a formal RFC in December, which concluded with an outcome keeping the current guideline [https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(policy)/Archive_138#RfC:_Accessibility_versus_convenience_in_indentation]. &mdash;&nbsp;Carl <small>([[User:CBM|CBM]]&nbsp;·&nbsp;[[User talk:CBM|talk]])</small> 12:56, 28 June 2018 (UTC)
Hoping someone with template editor rights and more knowledge of Lua can fix {{tlx|Percent}}, which is outputting hyphen-minus (---) and not minus-minus (&minus;), e.g.: {{tlx|percent|-1|_show_result=y}}
:Yes, we know. Consensus can change, and often does when a former conclusion was based on bloc voting and ignorant or territorial arguments. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] 😼 </span> 20:55, 28 June 2018 (UTC)
::: Hmm... Consensus is great, except for all the ignorant fuckwits who disagree with you. Not exactly a winning argument. [[User:Sławomir Biały|<span style="text-shadow:grey 0.3em 0.3em 0.1em; class=texhtml">Sławomir Biały</span>]] ([[User talk:Sławomir Biały|talk]]) 22:40, 28 June 2018 (UTC)
:: Yeah, consensus can change… if you try every six months forever.<nowiki></snark></nowiki> - [[User:Dcljr|dcljr]] ([[User talk:Dcljr|talk]]) 21:45, 28 June 2018 (UTC)
:::I didn't bring this up, an anon did. And I've opened no new RfC or other proposal about it. I'm simply expressing my displeasure with the hypocritical bullshittiness of it. I'm confident that it will change eventually, even if I drop dead an hour from now, because everything about this site and "WMF stuff" in general is moving increasingly toward standards compliance, metadata, and automation. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] 😼 </span> 23:04, 28 June 2018 (UTC)
:::: <small>For "you try" in my comment, read: "one tries". I wasn't necessarily talking about you, personally. - [[User:Dcljr|dcljr]] ([[User talk:Dcljr|talk]]) 23:22, 30 June 2018 (UTC)</small>
:: To add something ''slightly'' more relevant (ever so): In my experience, style guidelines can be problematic, because they tend to be developed by people who like to develop guidelines rather than people with direct experience in the area the guidelines purport to cover. - [[User:Dcljr|dcljr]] ([[User talk:Dcljr|talk]]) 21:51, 28 June 2018 (UTC)
:::Imaginary dichotomies. a) Mathematics has no professionally codified or ingrained standard for what wikimarkup to use for a visual indentation; maths editors are on the exact same footing as every other editor using the same markup language. B) MoS editors likewise have the same broad and continual article-editing experience as the set of editors who never edit the MoS; same footing again. You're also missing that one doesn't have to {{em|like to}} develop guidelines in order to work on them and try to see them consistently implemented; it is entirely sufficient to simply keep readers, re-use, tools, the editorship as a whole, accessibility, and futureproofing in mind, and to be more averse to unresolved style disputes (which are often quite disruptive) than to writing guidelines that resolve them and forestall recurrence. It takes very little time, comparatively. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] 😼 </span> 23:17, 28 June 2018 (UTC)
::::: So you (SMcCandlish) know enough about my personal experience with guidelines to dismiss my statement as being based on "imaginary dichotomies"? Are you ''trying'' to make people ignore your point of view, or is that unintentional? (You can treat that as a rhetorical question.) - [[User:Dcljr|dcljr]] ([[User talk:Dcljr|talk]]) 23:33, 30 June 2018 (UTC)
::::Re "Mathematics has no professionally codified or ingrained standard for what wikimarkup to use for a visual indentation": actually it is pretty ingrained (because of LaTeX) to use centering rather than indentation for displayed mathematics, to the point where I've seen complaints from authors who thought it was a bug when some specific LaTeX style chose to use indentation instead. One actual advantage of {{para|display|block}} would be to decouple that sort of stylistic decision from the semantic content. As for codification of the markup to use: LaTeX is codified and is the defacto standard. Based on it, most mathematicians would expect \[ ... \] or $$ ... $$ for displayed equations (and \( ... \) or $ ... $ for inline ones), so anything else (like our math tags) will take some getting used to. —[[User:David Eppstein|David Eppstein]] ([[User talk:David Eppstein|talk]]) 01:09, 29 June 2018 (UTC)
:::::I don't disagree that enabling block display (and doing other things, like using a template to apply a close, to permit people to re-style with CSS) might be nice. Has nothing to do with abuse of description list markup to get a visual indentation. Of course maths people use LaTeX, and it is codified and its use is ingrained. I said "codified and ingrained standard for what {{strong|wikimarkup}} to use" (emphasis added) because that is the actual topic. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] 😼 </span> 02:37, 29 June 2018 (UTC)
:::"MoS editors likewise have the same broad and continual article-editing experience as the set of editors who never edit the MoS; same footing again." If we're on the same footing, then the expectation is that you should accept the overwhelming consensus of the RfC, based on discussion with your ''equals'', and retract the dismissive personal attack that the outcome was based on "ignorant bloc voting". Everyone in that discussion is exactly as entitled as you are to determine what the manual of style should mandate. [[User:Sławomir Biały|<span style="text-shadow:grey 0.3em 0.3em 0.1em; class=texhtml">Sławomir Biały</span>]] ([[User talk:Sławomir Biały|talk]]) 13:49, 29 June 2018 (UTC)
::::So… are the various pages that explicitly advise against using <code>:</code> for simple indentation outdated? Because this contradicts them. —[[Special:Contributions/67.14.236.193|67.14.236.193]] ([[User talk:67.14.236.193|talk]]) 15:00, 29 June 2018 (UTC)
:::::Obviously not, and this is a [[WP:CONLEVEL]] and [[WP:POLICYFORK]] problem, where a wikiproject is trying to declare itself immune to site-wide guidelines. We've been through this many times and it never goes well (I mean, that's {{em|why}} we have CONLEVEL policy; it was written specifically to curtail this sort of thing, because it's disruptive to the encyclopedic output, and internally in the form of protracted dispute about a matter resolved a long time ago more broadly). Given the stonewalling this MoS sub-page, the proper course of action would be to open a new RfC at [[WT:MOS]], neutrally and accurately advertise it at [[WP:VPPOL]], and here, and at the maths project talk page (to prevent a repeat of the distorted canvassing that happened last time). I don't have the "drama" patience to do it now, but the outcome is pretty obvious. If the rest of the advice says not to abuse d-list markup, this page doesn't get a free pass to do so, especially since there is no maths-specific reason to (there is no [[WP:IAR]] rationale). See also MoS's lead: "{{tq|If any contradiction arises [between the main MoS and other MoS pages], {{em|this page always has precedence}}.}}" The MOS:MATH policy-fork is invalid on its face both by MoS's wording and by CONLEVEL policy. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] 😼 </span> 15:20, 29 June 2018 (UTC)
::::{{ec}} Sławomir, that's all off-kilter. It's not a "personal attack" to observe that the RfC was flooded by [[WP:WPMATH]] editors – after [[Wikipedia talk:WikiProject Mathematics/Archive2017#RFC on colons for indentation|shameless canvassing that grossly misstated the nature of the proposal]] in a way that was sure to alarm wikiproject members into a negative mass over-reaction. It's an observation of stacked turnout, well-poisoning, and poor breadth of discussion; see [[WP:FALSECONSENSUS]]. That many of the arguments presented were ignorant of the HTML specs and even of what our wikimarkup resolves to in HTML, and of why it matters, was well demonstrated at that discussion (and in other ones); many were also not responsive to the actual proposal but reacting to the canvassed [[straw man]] of it.<p>Moving on: MoS, like other guidelines, doesn't "mandate" anything. But that rules/winning/control approach to the matter sure explains a lot, as does the implication that because you "won" last year no one's allowed to question the matter ever again. You also more directly suggset that the result of the RfC hasn't been "accepted"; yet no one is editwarring to change the wording, going around editing in contravention of what it says, or even opening a new RfC on it (I generally wait at least a year before I seek a broader consensus re-discussion of something, and I may never get around to this one; someone else is likely to do it before I do). You're not in a position to try to forbid people from saying at a guideline talk page that one of the guideline's line-items is wrongheaded, why, and why the process at which was got to it was faulty. Such discussions are what a guideline's talk page exists for.</p><p>Speaking of straw men, I've nowhere suggested that your or anyone else's input into process (RfC, etc.) is less legitimate, only that some of the facts and assumptions are demonstrably wrong; that too many of the arguments are off-topic, subjective preference, dismissiveness of standards that aren't maths standards, and/or grounded only in editorial convenience; and dominated by a particular bloc of (canvassing-confused) editors from one wikiproject.<br /><span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] 😼 </span> 15:07, 29 June 2018 (UTC)</p>
:::::Frankly, I find your assertion that the people who actually edit mathematics articles should have been kept away so that the style-junkies could have this little playground to themselves to be bizarre and counterproductive. —[[User:David Eppstein|David Eppstein]] ([[User talk:David Eppstein|talk]]) 16:40, 29 June 2018 (UTC)
::::::Silly straw man. I said nothing remotely like any of that. Objecting to a blatantly misleading canvassing of a wikiproject bears no resemblance to suggesting that people in the wikiproject be kept away from a discussion. The matter under discussion {{em|has nothing to do with mathematics anyway}}. There is no magically special "mathindents". Misusing description list markup for indentation is a topic-unrelated issue. It's a few people from [[WP:WPMATH]] who are treating this page (a WP guideline, not a wikiproject's [[WP:PROJPAGE]] essay) as an owned playground. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] 😼 </span> 18:11, 29 June 2018 (UTC)
::::::: You of course had the option of notifying the affected WikiProject yourself. I'd be interested in knowing the reason for your failure to do so, from someone who so forcefully proclaims that ''he'' is entitled to a say in such matters. It's frankly weird for you to say that MoS editors are entitled to opine about style matters despite their lack of experience, yet your apparent attitude that others are too "ignorant" to have an opinion worth noting. But you're entitled to whatever delusions of grandieur you may suffer from. However: Don't you dare try to change mathematics markup recommendations again, without notifying the WikiProject, or I suspect you will soon see what "ignorant bloc voting" can achieve in an ANI report on your deplorable bullying behavior. [[User:Sławomir Biały|<span style="text-shadow:grey 0.3em 0.3em 0.1em; class=texhtml">Sławomir Biały</span>]] ([[User talk:Sławomir Biały|talk]]) 22:41, 29 June 2018 (UTC)
::::::::More ''[[ad hominem]]'' nonsense; I have never suggested I have more entitlement to a say in anything. You can falsifying my statements and views all day (well, [[WP:ARBATC#Discretionary sanctions|in theory]]), and I'll keep correcting you until you stop it and say something substantive.
{{od}} What this is going to continue boiling down to is what it boiled down to in the previous discussion. I'll just quote (with minor contextual revision) what I said then (and moving those discussions into [[/Archive 1]] isn't going to sweep the issue under the rug): What's happened here is [[WP:POLFORK|PoV policy-forking]] – {{em|of}} what a maths-topical MoS subpage says about an accessibility matter about which the maths page is not authoritative, {{em|from}} what the [[WP:MOS|main MoS page]] and the [[MOS:ACCESS|accessibility MoS page]] (among others) say about the exact same matter. Contrary to [[WP:GASLIGHTING|reality-denying claims]] in these discussions, there absolutely {{em|is}} general MoS material on indenting all kinds of content (regardless of topic) – lots of it, and all consistent {{em|except at MOS:MATH}}. All emphasis is as in the original; these are direct copy-pastes from the pages in question:
* From the main [[WP:MOS]] page, at [[MOS:INDENT]]: {{tq|1=Various templates are available for indentation, including {{tlx|block indent}}, and (for inline use) {{tlx|in5}}. For more information on the accessibility problems of using <code>:</code> ([[description list]] markup) for visual indentation, see [the next page quoted below].}}
* From [[MOS:ACCESS]], at [[MOS:INDENTGAPS]]: {{tq|1=An accessible approach to indentation is the template {{tlx|block indent}} for multi-line content; it uses [[Cascading style sheets|CSS]] to indent the material. For single lines, a variety of templates exist, including {{tlx|in5}} (a universal template, with the same name on all Wikimedia sites); these indent with various whitespace characters. ... A colon (<code>:</code>) at the start of a line marks that line in the MediaWiki parser as the {{tag|dd}} part of an HTML [[description list]] ({{tag|dl}}). The visual effect in most Web browsers is to indent the line. ... However, this markup alone is missing the required {{tag|dt|o}} (term) element of a description list ... this results in broken HTML ... which is confusing for any [screen-reader-using] visitor unused to Wikipedia's broken markup. This is not ideal for accessibility, [[Semantic HTML|semantics]], or [[Wikipedia:Reusing Wikipedia content|reuse]]....}}
* From [[MOS:LISTS]], at [[MOS:DLIST]]: {{tq|1=When wikimarkup colons are used just for visual [[MOS:INDENT|indentation]], they too are rendered in HTML as description lists, but without <kbd>;</kbd>-delimited terms to which the <kbd>:</kbd>-indented material applies, nor with the list start and end tags, which produces broken markup {{xt|(see {{section link|WP:Manual of Style/Accessibility#Indentation}} for details)}}. More accessible indentation templates can be used, e.g. {{tlx|in5}} or one of its variants for one line, and {{tlx|block indent}} for more than one line (even if misuse of description list markup on talk pages is too ingrained to change at this point).}}
* From {{section link|Help:List#Extra indentation of lists}}): {{tq|1=[Need for indentation] is fixed by increasing the default indentation ... and it can be done in multiple ways: ... use an explicit CSS margin spacing of [tech details elided]. Though not the simplest, this is {{em|the [[Web standards|cleanest]] and most versatile method}}, as it does not rely on any peculiarities of the parser, nor on abusing any [[Semantic HTML|semantic markup]] for purely visual purposes. ... A list of one or more lines starting with a colon creates an HTML5 ''[[description list]]'' (formerly ''definition list'' in HTML4 and ''association list'' in draft HTML5), without terms to be defined/described/associated, but with the items as descriptions/definitions/associations, hence indented. ... {{strongbad|Deprecated method}}: [this] technique ... produces poorly formed ... markup and abuses the [[semantic HTML]] purpose of description lists for a purely visual effect, and is thus a usability and accessibility problem. It will work in a hurry, but {{em|should be replaced with cleaner code}}....}}
This has never been about anything other than MOS:MATHS recommending a practice deprecated in favor of more accessible practice specified by the main MoS page and the accessibility page and the list-markup page and the list-coding instructions. That's four against one, so we know where [[WP:CONLEVEL]] policy goes on this, especially since the main MoS trumps MoS subpages, and it explicitly defers to [[MOS:ACCESS]] on this matter. The indentation-related material at [[MOS:MATHS]] has nothing at all to do with mathematics and {{tag|math}} markup, only with good versus awful ways to shift content – of any kind – to the right.<br /><span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] 😼 </span> 23:42, 30 June 2018 (UTC)


That should be producing: −1%
::[[MOS:INDENT]] does not say "don't use colons". It says, "This is not ideal for accessibility, semantics, or reuse, but is currently commonly used, despite the problems it causes for users of screen readers.". Which is to say, "colons are still commonly used even though we know they have issues.". There is no conflict between this page and that page. &mdash;&nbsp;Carl <small>([[User:CBM|CBM]]&nbsp;·&nbsp;[[User talk:CBM|talk]])</small> 13:18, 2 July 2018 (UTC)
—[[User:Joeyconnick|Joeyconnick]] ([[User talk:Joeyconnick|talk]]) 23:28, 29 July 2024 (UTC)


=== Back to the technical matters ===
== the ==
{{small|1=[https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:Manual_of_Style/Mathematics&diff=848278437&oldid=848225579] {{thumbs up}} —[[Special:Contributions/67.14.236.193|67.14.236.193]] ([[User talk:67.14.236.193|talk]]) 23:34, 30 June 2018 (UTC)}}


Does:
So what exactly is the problem with using <code>&lt;math display="block"></code> when on its own line? The only technical issue that’s been mentioned is the empty paragraph before the div, which really seems like a non-issue (though it seemed to cause some confusion: under HTML5, which we use, {{tag|p|o}} is '''self-closing'''; it’s functionally identical to {{tag|p|content=}}{{tag|div}}, so there is no nesting). —[[Special:Contributions/67.14.236.193|67.14.236.193]] ([[User talk:67.14.236.193|talk]]) 15:50, 29 June 2018 (UTC)
:Probably worth setting up a sandbox page with a test code in it with different approaches, both to see the visual effect in various browsers and to examine the post-parser source that is sent to the user agent. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] 😼 </span> 18:14, 29 June 2018 (UTC)
::Once we have [[:mw:RemexHtml]] online in the next month or so we can look into what happens with the HTML. --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 18:31, 29 June 2018 (UTC)
:::Why not just use "View source" in browsers in the interim? This can be useful; see, e.g.: [[Wikipedia:Manual of Style/Accessibility/anchor tests]], and sandbox we ended up saving for future tests with new browsers. <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] 😼 </span> 19:31, 29 June 2018 (UTC)
::::Mostly that it is a waste of time because RemexHtml changes the output in different ways than HTML Tidy does. You can access the Remex source by turning on the parser migration option in your (editing?) preferences and then by going to edit a page if you really want to, but in a couple month's that parser cleaner will be the default. --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 21:15, 29 June 2018 (UTC)
:::I don’t understand the problem—is RemexHtml expected to render {{tag|math|o}} significantly differently? Do we not know? —[[Special:Contributions/67.14.236.193|67.14.236.193]] ([[User talk:67.14.236.193|talk]]) 00:35, 30 June 2018 (UTC)
::::<p>It may, or may not, change where that deviant p element ends up, or whether the div ends up inside the p--and while I trust the parser migration gadget to find issues with future rendering, I don't really trust it to output the exact rendering. If it ends up outputting as empty and closed paragraphs (well-formed but meaningless), then the use of display=block shouldn't be blocked on that issue. (There may be other technical or non-technical issues which block moving to display=block--the solution which I think is clearly the superior one.)</p><!--
--><p>What one {{em|could}} do is go to a wiki where Remex is already enabled and test how display=block outputs. I'm a bit lazy on the point ;), so feel free to report back, IP67. --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 01:26, 30 June 2018 (UTC)</p>
:::::{{tq|or whether the div ends up inside the p}}—You can’t ''have'' a <code>div</code> inside a <code>p</code>. I don’t mean it’s invalid; you literally can’t, it just [https://www.w3.org/TR/2014/REC-html5-20141028/grouping-content.html#the-p-element doesn’t work that way]. If you try, the <code>p</code> ends right there, and all you get is the <code>div</code> ''interrupting'' the <code>p</code>. {{pb}} Otherwise, agreed. But I’m not at all familiar with Remex, and have no idea what wikis may or may not use it. —[[Special:Contributions/67.14.236.193|67.14.236.193]] ([[User talk:67.14.236.193|talk]]) 15:31, 30 June 2018 (UTC)
:::::: FYI: The sysadmins have been gradually switching Wikimedia wikis from Tidy to RemexHTML for a while now. The "final switch" to RemexHTML everywhere is scheduled to happen on July 5th. See [[phab:T175706]]. - [[User:Dcljr|dcljr]] ([[User talk:Dcljr|talk]]) 23:19, 30 June 2018 (UTC)
::::::IP67, I see nothing in that section to indicate that a div cannot be found inside a closed block p, which is invalid HTML (but that wouldn't stop authors from writing it that way). Does the closing &lt;/p> become stripped? Is it parsed instead as an opening &lt;p>? It's a somewhat backward inference you're making. But as I said, if you want to test the problem, you can see after Thursday how the MediaWiki outputs the markup in question. --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 14:21, 1 July 2018 (UTC)
::::: Testing on a site already using Remex would be a good idea. A test page of coded examples, as I suggested, would work well for this, since it would test various conditions of what's happening now versus what'll happen under Remex, and they'll be directly comparable (though porting some templates to do the test might also be needed, and there could possibly be user or site-wide CSS doing something at affected the output, but that should be easy enough to figure out as the cause should there be discrepancies in the rendering between the two parsers). <span style="white-space:nowrap;font-family:'Trebuchet MS'"> — [[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|☏]] [[Special:Contributions/SMcCandlish|¢]] 😼 </span> 23:48, 30 June 2018 (UTC)
:::::: I mean, Remex will be here on Thursday, so we can also wait. :) --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 14:21, 1 July 2018 (UTC)


:<math> \alpha(x,t) = e^{i\left(k_0 x - \omega_0 t\right)}\int_{-\infty}^\infty dk \, A(k) e^{i(k - k_0)\left(x - \omega'_0 t\right)}.</math>


warrant reformatting on the grounds of being confusing to those unfamiliar with the practice, or does [[MOS:STYLERET]] apply?
:"So what exactly is the problem with using <code>&lt;math display="block"></code> when on its own line? " - several issues have been mentioned, not all of which I can remember, but one is that this is not sensitive to existing indentation, such as:
<blockquote>
*List item 1
*:<math>\int_0^3 x\,dx</math>
*List item 2
</blockquote>


Thanks, [[User:Catslash|catslash]] ([[User talk:Catslash|talk]]) 23:51, 7 August 2024 (UTC)
<blockquote>
*List item 1: math display=block on its own lind
<math display="block">\int_0^3 x\,dx</math>
*List item 2
</blockquote>
:It is quite common to have displayed math inside a bulleted list. &mdash;&nbsp;Carl <small>([[User:CBM|CBM]]&nbsp;·&nbsp;[[User talk:CBM|talk]])</small> 13:21, 2 July 2018 (UTC)
::Because you placed it at a different level would seem to be the reason why there. The below is the correct analog:
<blockquote>
*List item 1: math display=block on its own lind
*<math display="block">\int_0^3 x\,dx</math>
*List item 2
</blockquote>
::Now, this one has its own (probable, according to you, issue), which is the bullet next to the display block. The correct way to probably provide either of these cases is to break on the first list item, because only rarely (or perhaps never) is the display block meant to be a distinct paragraph rather than part of the first list item semantically. Or would you dispute that? :)
<blockquote>
*List item 1: math display=block on its own lind<br/><math display="block">\int_0^3 x\,dx</math>
*List item 2
</blockquote>
:: --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 14:59, 2 July 2018 (UTC)
:::The spare bullet would indeed be a problem. It doesn't seem to me that explicit &lt;br> tags are superior to the current system of using *:. If we want to have more commentary after the displayed equation, it seems we would need to put even more &lt;br> tags.
:::* List item (with br tags)<br/><math display=block>\int_0^2x\,dx</math><br/> is an integral. For some reason there seems to be extra vertical space above this line.
:::* List item (currently recommended practice)
:::*: <math>\int_0^2x\,dx</math>
:::: is an integral
:::*List item
:::I still think that it would be better to fix the problem by fixing Mediawiki to parse Wikitext better. &mdash;&nbsp;Carl <small>([[User:CBM|CBM]]&nbsp;·&nbsp;[[User talk:CBM|talk]])</small> 15:14, 2 July 2018 (UTC)
::::I don't think you need the ending break for further eliding, which is why you are seeing hte issue (math display=block is a block, which outputs a div, which by default forces everything below it):
::::* List item (with br tags)<br/><math display=block>\int_0^2x\,dx</math> is an integral. The extra unnecessary break you added is the reason why there is extra space.
::::* 2nd list item.
:::: As has been elided in many, many places, ":" has a specific meaning, and there are a number of reasons why it should {{em|not}} be changed. It is not a question of "parsing wikitext better". --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 15:32, 2 July 2018 (UTC)
:::::A colon without a definition list does have a specific meaning, which is to indent. This has been standard usage for over a decade and is described in places such as this page, [[Help:Indent]], etc. The specific ''way'' that the indentation is handled is not optimal - there's no reason Mediawiki should still create a definition list when no semicolon is used. But there is no way to argue that a colon in wikitext is not intended to denote indentation (it's a little like arguing that "cool" only means "low temperature" and does not mean "interesting"). The issue is that Mediawiki needs to recognize that, when there is no semicolon, a colon should be rendered via increased indentation. &mdash;&nbsp;Carl <small>([[User:CBM|CBM]]&nbsp;·&nbsp;[[User talk:CBM|talk]])</small> 15:47, 2 July 2018 (UTC)
::::::Yeah, see, I didn't want to get into this--the fact you slipped right back to it in a section talking about the technical matter is a bit telling about your general motivation. Do you have anything further on talking about using display math (esp. issues you have observed)? --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 15:52, 2 July 2018 (UTC)


== Sign conventions and signatures ==
:::I am not sure why you are singling me out for "slipping back into this". Anyway, if display=block inserts a following line break, then the other usage doesn't work, which is to put extra text after the displayed equation so that the text will not be rendered in math mode. This is used for explanatory text, comments, etc.
:::* List item with text after a displayed equation
:::*: <math>\int_0^2x\,dx</math> is an integral
:::*List item (with display=block inserting a spurious line break)<br/><math display="block">\int_0^2x\,dx</math> is an integral
:::* List item
:::The same thing would happen without the list, of course:
:::<math display="block">\int_0^3x\,dx</math> these comments should be on the same line as the integral.
:::This is a worse issue, actually. &mdash;&nbsp;Carl <small>([[User:CBM|CBM]]&nbsp;·&nbsp;[[User talk:CBM|talk]])</small> 15:58, 2 July 2018 (UTC)


Are there any wiki guidelines on sign conventions and signatures, e.g., is a [[Lorentzian metric]] (+,-,-,-), (-,-,-,+), (-,+,+,+) or (+,+,+,-)? There are are multiple topics where the literature does not have a consistent choice of sign conventions. -- [[User:Chatul|Shmuel (Seymour J.) Metz Username:Chatul]] ([[User talk:Chatul|talk]]) 14:30, 25 September 2024 (UTC)
:::Testing display=block with inline references (based on the featured article [[Pi]]):
::::<math>\int_0^2x\,dx.</math><ref>ref 1: current system, outside math</ref>
:::<math display=block>\int_0^2x\,dx.</math><ref>ref 2: outside math display=block</ref>
:::{{reflist-talk}}
:::&mdash;&nbsp;Carl <small>([[User:CBM|CBM]]&nbsp;·&nbsp;[[User talk:CBM|talk]])</small> 16:35, 2 July 2018 (UTC)

Latest revision as of 14:30, 25 September 2024

Not-greater-than rendering problems

[edit]

On Talk:Inequality (mathematics)/Archive 1#Renderization of "not greater than" symbol, Fgnievinski reports problems rendering U+226F NOT GREATER-THAN, with Chrome version 123.0.6312.106 on Windows 10 version 22H2:

(The first three are all just the Unicode character not displaying properly.)

I assume this be added to the list of characters that should only be expressed with <math>...</math>? Are there any related characters for which anyone is also experiencing rendering problems? -- Beland (talk) 02:37, 18 April 2024 (UTC)[reply]

Imo, the most problematic issue is with the symbol for function composition (∘ or ○). On some devices such as Safari on my laptop, the first one is so small that it is easily confused with an interpunct, and the second one has the same size as \circ (). On other devices, such as Safari on my iPhone, the first has the same size as \circ, and the second one is much larger. I am thus in favor of using only latex for function composition, but this implies to edit a lot of articles. D.Lazard (talk) 16:36, 18 April 2024 (UTC)[reply]
The nice thing about a latex is that it can stretch to fit whatever size you need. EEng 16:44, 18 April 2024 (UTC)[reply]
@D.Lazard: I only see 231 articles with "∘". There are 597 articles with "○". It would be very easy for me to change all the instances of "∘" to "○". Would that solve the problem of visual confusion? -- Beland (talk) 21:41, 18 April 2024 (UTC)[reply]
This would deserve more discussion, since, on my smartphone, "○" is much too large. My opinion is that only latex should be used when the symbol for function composition is used. D.Lazard (talk) 09:16, 19 April 2024 (UTC)[reply]
@D.Lazard: OK, I've added all three characters to the list, recommending LaTeX markup instead. -- Beland (talk) 23:18, 19 April 2024 (UTC)[reply]
No, the big circle is inappropriately large. –jacobolus (t) 14:40, 19 April 2024 (UTC)[reply]

One thing that would help a lot in my opinion is (English) Wikipedia directly hosting a "math" font indicated first in the font stack in the CSS for {{math}} templates which explicitly included a wide range of supported glyphs. This could be e.g. something constructed from Computer Modern glyphs, or STIX 2.0 (or something else?). The appearance of STIX 2 is not an exact stylistic match for Computer Modern, but it's also not inordinately far away. I don't really know what would be technically required for MediaWiki/Wikipedia to host something like that though. –jacobolus (t) 14:54, 19 April 2024 (UTC)[reply]

@Jacobolus: If you'd like to discuss that with the responsible parties, see [1] (where one developer said the server side generally doesn't host fonts) or [2] (where one person recommending asking Microsoft to fix their fonts). Beland (talk) 23:22, 19 April 2024 (UTC)[reply]
Yes, please voice your concerns at the bug tracker, because the report was dismissed as not a technical issue. fgnievinski (talk) 18:19, 20 April 2024 (UTC)[reply]

Fractional exponents and subscripts

[edit]

I have just discovered using {{sfrac}} for fractional exponents and subscripts (which is what MOS:FRAC and Wikipedia:Manual of Style/Mathematics#Fractions require for science and math articles) doesn't really work visually, at least on my computer - the surrounding text is easily confused as part of the numerator or denominator and sometimes it's just unclear that the fraction is supposed to be a superscript or subscript at all. I'm wondering what other people see and what the preferred solution for this would be, if it is indeed really a problem? Here are some examples with {{math}} style applied:

  • {{sfrac}} for subscript: x1/2
  • {{sfrac}} for superscript: x1/2
  • {{frac}} for subscript: x12
  • {{frac}} for superscript: x12
  • Unicode character for subscript: x½
  • Unicode character for superscript: x½
  • <math>...</math> with subscript:
  • <math>...</math> with superscript:

Perhaps the MOS should be changed to use one of these in this sort of situation? Only a few fractions are available in precomposed Unicode characters, so that's probably not a complete solution, especially if we want visual consistency. That leaves the option of partially lifting the science-and-math ban on {{frac}} which would be slightly visually inconsistent (and TBH not all that well-rendered, either), and the option of switching any problematic expressions to LaTeX-style markup. Or perhaps someone has another clever solution or more illuminating examples or other considerations? -- Beland (talk) 08:56, 28 May 2024 (UTC)[reply]

In sub- or superscripts, it's usually best to use a horizontal fraction, as in x1/2 or x1/2, but LaTeX works better still: , . –jacobolus (t) 10:15, 28 May 2024 (UTC)[reply]
Oh, nice, that looks way better and is already contemplated by the MOS. I've added a note about that situation, since it seems to occur a lot. (I'm systematically getting rid of the precomposed characters where they are not allowed). Many thanks! -- Beland (talk) 16:15, 28 May 2024 (UTC)[reply]

Markup for Common sets of numbers?

[edit]

The guidelines for § Common sets of numbers mention using \textbfin LaTeX. What about the LaTeX) commands

  • \C ()
  • \H ()
  • \N ()
  • \Q ()
  • \R ()
  • \Z ()

all of which render in blackboard? -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 14:02, 25 July 2024 (UTC)[reply]

fixing {{Percent}}

[edit]

Hoping someone with template editor rights and more knowledge of Lua can fix {{Percent}}, which is outputting hyphen-minus (---) and not minus-minus (−), e.g.: {{percent|-1}}-1%

That should be producing: −1% —Joeyconnick (talk) 23:28, 29 July 2024 (UTC)[reply]

Integral not bracketing the integrand

[edit]

Does:

warrant reformatting on the grounds of being confusing to those unfamiliar with the practice, or does MOS:STYLERET apply?

Thanks, catslash (talk) 23:51, 7 August 2024 (UTC)[reply]

Sign conventions and signatures

[edit]

Are there any wiki guidelines on sign conventions and signatures, e.g., is a Lorentzian metric (+,-,-,-), (-,-,-,+), (-,+,+,+) or (+,+,+,-)? There are are multiple topics where the literature does not have a consistent choice of sign conventions. -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 14:30, 25 September 2024 (UTC)[reply]