Wikipedia talk:Manual of Style/Mathematics

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Manual of Style
WikiProject icon This page falls within the scope of WikiProject Manual of Style, a drive to identify and address contradictions and redundancies, improve language, and coordinate the pages that form the MoS guidelines.
 
Shortcut:

Wikilinking formulae[edit]

I just came across the following [[Green's relations#The H and D relations|''H''<sub>1</sub>]], rendering as H1 which somehow struck me as unsatisfactory. Would it be a good idea to suggest that as a matter of style one should not wikilink to formulae unless they happen to be the actual article title, such as E8 (mathematics) or Ζ(3)? Deltahedron (talk) 21:35, 31 August 2014 (UTC)

I agree. To me this sort of thing is similar to what WP:SUBMARINE warns against. If the H and D relations need to be glossed for readers who might not know what they are, better to do it in text rather than in easily-missed links within the notation. —David Eppstein (talk) 22:39, 31 August 2014 (UTC)

"d" in integration and differentiation[edit]

There seems to some dispute whether the "d" should be upright in integrals and derivatives:

  1. \int_1^\infty x^{-2}\, dx
  2. \int_1^\infty x^{-2}\,\mathrm{d}x

Any comments. I have no personal preference, except it should be consistent within articles. — Arthur Rubin (talk) 19:12, 19 September 2014 (UTC)

There is a standard ISO 31 described in this Tugboat article that claimed it should be a roman d. But this standard is widely ignored. The TeXBook has an italic d. It might be a math vs engineering culture issue. Integral#Terminology and notation seems to recommend an italic d, but mentions the roman d is used, too. I generally follow the TeX conventions established by Knuth. --Mark viking (talk) 19:50, 19 September 2014 (UTC)
This has been discussed many times at this project (see the archives back to perhaps 2011, maybe earlier...). (Admittedly I used to be one of those that would "straighten" out the "d"s, part of the problem and not the solution). We should just keep them consistent within articles and close to what most sources use, as WP:MOSMATH#Choice of type style says. M∧Ŝc2ħεИτlk 22:49, 19 September 2014 (UTC)
I knew I should have read MOSMATH more closely. As far as I'm concerned, this is resolved. — Arthur Rubin (talk) 01:26, 20 September 2014 (UTC)
When this topic comes up I frequently point people to WP:RETAIN, which, despite being stated in a different context, captures the right spirit. Also, usually this topic comes up because someone changes an article, and then I (gently, with a talk page note) revert them. Ozob (talk) 04:06, 20 September 2014 (UTC)

Revising the page[edit]

I am not a member of this group, and came here looking for specific advice that could be given at a Edit-a-thon so I am loathe to make any changes without starting a discussion first and listening to the opinions of the subject experts- but I do get the feeling that this page is very dated, inaccurate and wishy-washy. The formating is not consistent etc- it is heavily dated. If I can't stimulate anyone else to do the work- I give notice that I want to bring this advice upto date to reflect current good practice.-- Clem Rutter (talk) 11:41, 24 February 2015 (UTC)

As far as I'm aware, it's not dated, inaccurate, or wishy-washy; it represents the current consensus of WP:WPMATH. Can you provide examples? Ozob (talk) 01:49, 25 February 2015 (UTC)
Thanks for responding. Examples coming shortly.-- Clem Rutter (talk) 08:57, 25 February 2015 (UTC)

Specific Points[edit]

My first warning bell was the line

Lastly, a well-written and complete article should have a references section. This topic will be discussed in detail below. Which refered to

Including literature and references

It is quite important for an article to have a well-chosen list of references and pointers to the literature. Some reasons for this are the following:

Compare that with WP:REF. WP:CITEHOW- Where is the strong statement that

WP uses secondary sources and is not OR, so all statements should be supported by an inline reference.

This is a MOS not an essay on the history of maths publications- so where is the statement that various methods of citation are supported but WP:WPMATH advises to use Harvard or Vancouver- or sfns. See the comment in the FARs eg Wikipedia:Featured article review/Infinite monkey theorem/archive2.


Should we just add a sandbox page here and knock together a tougher version. I have gone from looking at MOS pages for advice- to using them to teach post-graduate newbies the ropes. I see from the history that this is basically a 2002 page that that has been cp'd in 2005- and then tweaked. It still feels like the musings of 2002 (Magna Carta- rather than Criminal Justice Act!).

Even changing this line to:

All Wikipedia articles must have references supporting each edit. This topic is discussed below.

Would be make the page factually accurate. Looking to include material from Wikipedia:Scientific citation guidelines might be be more beneficial.

The Wikipedia:cite sources article has more information on this and also several examples for how the cited literature should look.

It has examples- but choices and no firm advice about current practice. This is a major confusing area for academics- and the editors I am training want firm advice here- newbies are not encouraged by doing wild wikilink chases. They have a message, which they want to put on wiki- correctly reference it and format it (and they have two hours).

Sections and lead

What section headings are required, in what order and what sections always occur? So I look at Wikipedia:Manual_of_Style/Mathematics#Suggested_structure while bearing in mind Wikipedia:Manual_of_Style/Chemistry#Article_types and Wikipedia:WikiProject_Computer_science/Manual_of_style#Structuring_different_kinds_of_articles.

Briefly looking at Wikipedia:WikiProject_Mathematics#Good_articles we have four types of article.

  1. Mathematicians
  2. Mathematics
  3. Mathematical problems
  4. Mathematical physics

What are the sections that we would hope to see in a GA/FA for each of these, and how does the MOS help us to write one?

So what do we have at the moment

Suggested structure
Probably the hardest part of writing a mathematical article (actually, any article) is the difficulty of addressing the level of mathematical knowledge on the part of the reader. For example, when writing about a field, do we assume that the reader already knows group theory? A general approach is to start simple, then move toward more abstract and technical statements as the article proceeds.

That is not about structure but a POV on writing pitfalls- though of course very true. (This sentence was copied across to the CompSci MOS and tweaked suggesting how they wrote theirs).

A general approach is to start simple, then move toward more abstract and technical statements as the article proceeds.

This is advice on the writing process- not on the contents or structure or style of a WP:WPMATH approved article. A possible easy alternative is to take the table from Wikipedia:WikiProject_Mathematics/A-class_rating#Criteria To achieve a well structured article that fulfills the objects of Wikipedia and WP:WPMATH articles should attempt to follow a common structure. There are four principal types of article that have achieved FA status, and their advised structure is considered separately.

We then follow the method used at CompSci giving proformas for each of these article types. In my POV- study links to FAs and GAs for each type of article work.

Laying out the page.

Not Typesetting- please- there is no hot lead or Linotypes involved. For a maths article this is critical. My first question was- Do I centre a formula, right justify, left justify or put in inline in a sentence? That is what a newbie will ask me- that is what a MOS says. We don't. The essay on LATEX is complete and fun to read- but is addressing the wrong audience. To put it bluntly it reads as if a group of editors have finally understood the intricacies of the markup and demonstrating their mastery. It does not say:

The body text of a mathematics article will be written using standard wikitext markup,<sup> and <sub> will be used push the text up and down. Wikitext can use latin and greek letters. More complex text can be included inline and in separate paragraph using maths markup as explained in a separate section. All standalone maths markup and formulae should align usually using one indent ( :) from the left margin.
Summarise

To summarise- there is nothing wrong with the mathematical consensus on this page- but it is not an adequate MOS page as it is not written for the potential user- particularly the brilliant time-poor mathematician who wants to get an article up and running.

I propose we open a sandbox page here and knock together a tougher version. And we focus that version from the point of view of a wiki-newbie who comes with a strong Mathematical background and the tutor who is mentoring her/him -- Clem Rutter (talk) 11:49, 25 February 2015 (UTC)

In part, you seem to be asking for us to establish consensus about topics that have no consensus. There is no consensus on citation style. There is no consensus on how to format inline mathematics. There is no consensus on what article headings are required and in what order. Moreover, there are people with strong opinions on each of these. I'm not averse to improving the current MOS page, but my past experience has led me to believe that consensus is unachievable and issuing diktats accomplishes nothing.
That said, I would welcome an attempt to improve this page. I don't think it makes all its points in a compact fashion. Drafting a new version may be helpful. Ozob (talk) 13:12, 25 February 2015 (UTC)
This is a time consuming process- and I am plugging away in one of my sandboxes. I hope to have a report and a suggested alternative ready by Friday. The lack of consensus hasn't really caused any difficulties- it is handled by being open about it. It is really about focusing on what the page is about, and must include and what are interesting footnotes. I have just penned this note to let you know I am alive- and working on it, all be it slowly. -- Clem Rutter (talk) 21:51, 10 March 2015 (UTC)
I have just posted the page Wikipedia:Manual of Style/Mathematics/sandbox where I have presented my ideas- discovered a sheaf of inconsistencies. I send respect and greetings to past contributors having experienced some of the difficulties they must have encountered. Please do feel free to start a debate on the talk page. — Preceding unsigned comment added by ClemRutter (talkcontribs) 17:09, 14 March 2015 (UTC)

The use of \text in <math> in certain circumstances[edit]

Recently I've seen a use of \text in <math> tags update< incorrectly >, like Planck units#Base units:

 \frac{F}{F_\text{P}} = \frac{\left(\dfrac{m_1}{m_\text{P}}\right) \left(\dfrac{m_2}{m_\text{P}}\right)}{\left(\dfrac{r}{l_\text{P}}\right)^2}.

If you are using MathJax renderer, it doesn't look harmonious at all, as MathJax renders \text as sans-serif like the surrounding text. I've been in the process of changing some articles to use \mathrm, so it looks like this (please switch to MathJax in order to see the difference):

 \frac{F}{F_\mathrm{P}} = \frac{\left(\dfrac{m_1}{m_\mathrm{P}}\right) \left(\dfrac{m_2}{m_\mathrm{P}}\right)}{\left(\dfrac{r}{l_\mathrm{P}}\right)^2}.

For me at least it looks a lot better, so I went ahead and changed some of them. However I just want to ask here the community's opinion before proceeding further. What do you think about the tag used?

Some other options that don't work in MathJax:

\textrm

 \frac{F}{F_\textrm{P}} = \frac{\left(\dfrac{m_1}{m_\textrm{P}}\right) \left(\dfrac{m_2}{m_\textrm{P}}\right)}{\left(\dfrac{r}{l_\textrm{P}}\right)^2}.

\mathsf (shows sans serif in PNG too)

 \frac{F}{F_\mathsf{P}} = \frac{\left(\dfrac{m_1}{m_\mathsf{P}}\right) \left(\dfrac{m_2}{m_\mathsf{P}}\right)}{\left(\dfrac{r}{l_\mathsf{P}}\right)^2}.

Timothy G. from CA (talk) 02:17, 3 March 2015 (UTC)

Also not working in MathJax but working in PNG:

\mbox

 \frac{F}{F_\mbox{P}} = \frac{\left(\dfrac{m_1}{m_\mbox{P}}\right) \left(\dfrac{m_2}{m_\mbox{P}}\right)}{\left(\dfrac{r}{l_\mbox{P}}\right)^2}.

So it seems that only \mathrm works in all setups, others just look plain weird.

Timothy G. from CA (talk) 02:21, 3 March 2015 (UTC)

Also works for all layout engines: \rm

 \frac{F}{F_{\rm P}} = \frac{\left(\dfrac{m_1}{m_{\rm P}}\right) \left(\dfrac{m_2}{m_{\rm P}}\right)}{\left(\dfrac{r}{l_{\rm P}}\right)^2}.

Timothy G. from CA (talk) 23:32, 4 March 2015 (UTC)

Note that I do not want to change every single \text to \mathrm, only ones appropriate should be changed. Some of the circumstances I can think of where \text is appropriate is prose labels or anything that does not strictly need mathematical notations, like some equations on Navier–Stokes equations#Incompressible flow. Timothy G. from CA (talk) 01:10, 5 March 2015 (UTC)

Descriptive subscripts ought to be \mathrm in LaTeX. If it looks better, and it's more correct in principle, then that sounds like a double win to me. Quietbritishjim (talk) 16:58, 4 March 2015 (UTC)
@Quietbritishjim: that's what I thought. Do you think this should be added to the MoS? Timothy G. from CA (talk) 17:48, 4 March 2015 (UTC)
@Quietbritishjim: "ought to be"? I'm not saying anything either way at this point, but your rationale would be appreciated.
@Timothy Gu: \mbox is deprecated/discouraged, as I understand it. I get a "[Math processing error]" with MathJax on the machine I'm on at the moment, so difficult to comment. If \text is producing a problematic (non-harmonious) display on some browsers, it may make more sense to get to the bottom of the problem with the rendering, rather than to fix it via avoidance in the MoS. \text has been a standard part of TeX on WP for a long time. —Quondum 19:34, 4 March 2015 (UTC)
@Timothy Gu: Well, that is just my opinion and understanding of convention. But I believe such labels should be should be in the math font if it differs from the text font (as it does on Wikipedia, and a Times text / CM math document) because although the label is descriptive it's still part of some math. I also believe they should be upright regardless of whether the surrounding text is italic, either because the whole document is ( D-: ) or because this math is in emphasised text (e.g. in a theorem). \text gets both of them wrong, while \mathrm gets them right and agrees with \operatorname. Looking into it more, I notice that there is a problem though: if the math font is sans-serif then \mathrm still produces serif characters, which is not what you want. Unfortunately it seems there is no built-in math equivalent of \textup. Quietbritishjim (talk) 22:02, 4 March 2015 (UTC)
My opinion: \text and \mathrm are for two different things, both useful. \text is for when you want to include English-language prose within an equation, for instance the word "otherwise" in a \cases. \mathrm is for when you want to have short sequences of Roman alphabet letters that are themselves mathematical notation (not free-form prose); the example of a roman letter subscript is one where \mathrm is the better choice. Another alternative coding to consider is \operatorname, for mathematics notation written out as short sequences of Roman letters used as a function or operator (e.g. sin or cos) but not already built into LaTeX. The letters themselves should be formatted the same as \mathrm but the spacing around the operator should be better with \operatorname. So we should not be telling editors to prefer \text over \mathrm or vice versa, we should be using both where appropriate. —David Eppstein (talk) 22:43, 4 March 2015 (UTC)
@Quietbritishjim: I'd agree with David Eppstein here. But as LaTeX uses serif and it is unlikely to change in the future I'd stick with \mathrm. Timothy G. from CA (talk) 23:32, 4 March 2015 (UTC)
@Quondum: seems like I didn't make myself clear enough. I do not intend to do a wholesale removal of \text in all articles. I most certainly have seen cases where it is appropriate (can't find the article right now). Timothy G. from CA (talk) 23:09, 4 March 2015 (UTC)

Also I found out about a similar discussion on TeX StackExchange. It suggests to use \textnormal which is not available in MathJax at least; \mathup, but it is with a custom definition; and then \mathrm. So, I guess mathrm it is. Timothy G. from CA (talk) 23:32, 4 March 2015 (UTC)

If we do put something into the MoS, something like what David Eppstein proposes seems to make sense. The distinction between a subscripted text label and a Roman symbol is potentially semantically significant, so it would seem to me to be that \text is still semantically appropriate for labels. For example, the electron magnetic moment might be denoted \text \mu_\text{e}, where the subscript is literally a text label ("e" for "of the electron"), not a mathematical symbol such as a specific element of a set, for which I would prefer \mathrm.
@Timothy Gu: You are proposing a workaround for a rendering bug, not an issue of style. Subscripted text can be text and not symbols, so this does not contradict what David Eppstein is saying. Perhaps you should raise this at the Village pump (for fixing it), and at a place like WikiProject Mathematics (with respect to a settling on an interim workaround)? —Quondum 00:10, 5 March 2015 (UTC)
@Quondum: I agree with David's point as well. However, as I already said in my last reply, I was only referring to some specific use, not general-purpose labels. Plus, I do not consider \text being rendered as the way it is a bug, therefore I don't want to go to village pump for this. It is by definition rendered to the styles of surrounding text, which it is. It is just that many usage of \text is inappropriate on a semantic level as well. An appropriate use of \text IMO can be found on Navier-Stokes equations#Incompressible flow, reproduced below:
\overbrace {\underbrace {{\frac {\partial {\mathbf {u}}}{\partial t}}}_{{{\begin{smallmatrix}{\text{Variation}}\end{smallmatrix}}}}+\underbrace {{\mathbf {u}}\cdot \nabla {\mathbf {u}}}_{{{\begin{smallmatrix}{\text{Convection}}\end{smallmatrix}}}}}^{{{\text{Inertia (per volume)}}}}\overbrace {-\underbrace {\nu \nabla ^{2}{\mathbf {u}}}_{{{\text{Diffusion}}}}=\underbrace {-\nabla w}_{{{\begin{smallmatrix}{\text{Internal}}\\{\text{source}}\end{smallmatrix}}}}}^{{{\text{Divergence of stress}}}}+\underbrace {{\mathbf {g}}.}_{{{\begin{smallmatrix}{\text{External}}\\{\text{source}}\end{smallmatrix}}}}
The sans-serif font of the labels fits perfectly with the surrounding text.
To reiterate my point, certain if not most usage of \text is not appropriate and should be changed to \mathrm, but \text is still useful in many cases where non-mathematical/prose text is required, and I am happy with the way it is rendered as-is. Timothy G. from CA (talk) 01:10, 5 March 2015 (UTC)
@Timothy Gu: I hear you that you do not intend to change everything. But if it renders differently in a respect that is significant in different rendering environments (and it is obviously significant, because you're making a thing of it to the point of suggesting a MoS change), it is a bug, period. \text renders as a serif font in every context that I can test at the moment (MathML and PNG), and I'll check tonight (when I have a different computer) whether it is the same on MathJax for me; this is already makes your "I am happy with the way it is rendered as-is" inapplicable. It is sounding as though your entire argument is based around rendering on a single browser+configuration+installation+MathJax. —Quondum 01:50, 5 March 2015 (UTC)
@Quondum: TBH I am surprised that you did not check the output from MathJax until this moment, which makes your argument sounds moot. This "bug" applies to all browsers using MathJax, so you can easily reproduce this. It is not depended upon your "browser+configuration+installation". Timothy G. from CA (talk) 02:28, 5 March 2015 (UTC)
Surprised? I indicated earlier that 'I get a "[Math processing error]"' on the machine I was working on when selecting MathJax (in place of every expression that MathJax was supposed to be rendering), and thus could not check. I see now that I have had the opportunity that I get the same rendering error on my other machine, though this had worked in the past. I'll accept that it might be uniform for all MathJax (when it works at all), but it still depends on whether MathJax is being used. But I have no interest in this argument; I do not support a change to the MoS along these lines, but I'll leave it to others to contribute to any consensus on this. —Quondum 03:06, 5 March 2015 (UTC)

I have just posted the page Wikipedia:Manual of Style/Mathematics/sandbox[edit]

I have just posted the page Wikipedia:Manual of Style/Mathematics/sandbox. I made several pointed remarks above- so I felt it was appropriate to rejig the whole page, trying to address some of my criticisms. Yes it was a major job. I feel that this was important as we wont get articles to FAC- unless they are MOS/Mathematics compliant- so having a tightly constructed page is a service and a duty to all FA hopefuls.

I tried not to add a single word- and certainly not change any existing decisions- through out the document I have left notes on the task and problems. Discovering an advised structure for the articles is an incomplete task. I have added a few suggestions. Unfortunately, no FAs or GA seem to follow the previous pattern. Exceptions- yes- but 25 out of 25!

Which brings me to the question of the structure of this MOS. Following other subjects- I detected a vague order, and have re-ordered the sections here to come into line. If this new order is accepted I feel it opens up the article to further improvement. At the moment we have hit a brick wall.

The second brickwall is there were three ways of presenting good/bad text. Obviously a C&P of three peoples work. When combined it was irritating to see first an example of bad text, a criticism then good text. Then the next paragraph- the convention was reversed! There are templates to help so I used them cf {{xt|----}} and ((markup|---|xxx}}.

What make this page unique is that we try and talk about good/bad text at the same time as trying to demonstrate <text> and html markup. I see no need to demonstrate bad text or bad markup here. (But it is essential to do it elsewhere in a tutorial page- or as a {{efn| ---}}

Let the discussion commence--- Clem Rutter (talk) 17:36, 14 March 2015 (UTC)

Three weeks- no comment. Okay I will be bold. I will build up the new page in Wikipedia:Manual of Style/Mathematics/temp-I will strip out my comments, and alternatives for discussion from this page I will then do a single copy and paste over Wikipedia:Manual of Style/Mathematics I then intend to format up the HTML sections to match the LaTeX sections. Wish me luck.-- Clem Rutter (talk) 17:20, 5 April 2015 (UTC)