Wikipedia talk:WikiProject Mathematics/Typography

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Please discuss math typographical issues below. Ta!

—Nils von Barth (nbarth) (talk) 08:46, 15 April 2010 (UTC)

texhtml is too big[edit]

texhtml (TeX code rendered as HTML) is too big for me – do others have this problem?

Texhtml nbarth 2010-04-15.png

Consider the following display (how it renders for me at left):

1 + 1

rendered by the following source:

1 + 1

For me, the 2nd and 4th rendering are acceptable (carefully and verbosely spaced HTML, and forced PNG rendering), while the 3rd rendering is far too big, but is how I would prefer to author (this is just for example – italics and subscripts are a better example of why I prefer to write in TeX if possible – compare <math>L^p</math> with ''L''<sup>''p''</sup>).

This behavior is due to the lines:

/* Adjust font-size for inline HTML generated TeX formulae */
.texhtml {
  font-size: 125%;
  line-height: 1.5em;

in monobook.css, and was implemented 25 May 2009 by Erwin Dokter, on a trial basis, following:

I understand that rendering is significantly different in different browsers/operating systems/font combinations, but for me (using Firefox/Iceweasel 2.0 or 3.0 on Debian GNU/Linux, with default fonts; I can check other combinations), the result is that it makes inline TeX unusable – the output is ugly and likely to be painstakingly corrected by other editors to better-rendering but hard-to-edit HTML, which is suboptimal for all.

Do others have the same problem?

I’ve heard it with some other editors, and is noted at the second discussion thread, and seems clear, because it makes the text 125% the normal size, which only works if the default serif font is 80% (=1125%) of the size of the sans serif font.

If so, I’d suggest that we:

  • talk to Erwin & other editors/admins about this and have them revert it, or
    • figure out a different solution.
  • Place at note at the relevant CSS to “please discuss math typography changes at WP:WPMATHTYPE before making changes” so we aren’t blind-sided in future.

How does this sound?

—Nils von Barth (nbarth) (talk) 08:44, 15 April 2010 (UTC)
With Firefox 3.6.3 on Windows 7, both recently installed with no extra scripts or stylesheets or whatever, I find the second and third renderings to be about the same size, significantly smaller than the fourth. So for me, texhtml is pretty much the right size, not what you're seeing. Jheald (talk) 09:29, 15 April 2010 (UTC)
Thanks for the feedback Jheald – that’s very useful, and accords with some other editors (i.e., current sizing works for you, PNGs are v. big). I’ll take a look in different browsers/OSes/wiki configs/browser configs to see if I can pin down what the issue is.
I suspect that it’s because I use large font sizes (that’s the only unusual thing about my setup), but it may be for some other reason.
—Nils von Barth (nbarth) (talk) 20:13, 15 April 2010 (UTC)

I don't see any problem with the lines: they all look OK to me, the first three the same size, the fourth a larger PNG identical to yours. I tend to use HTML for inline formulae, and don't particularly find them harder to edit than math tags: they are usually things like a1 which is quicker to type than than \mathbf{a}_1, but it's a small issue: once I've typed one I use copy and paste to make more like it.

Browser font behaviour is very counter-intuitive. For example suppose I find another font I prefer for pages without fonts/styles specified but it is too big at its current size. If I make it bigger or smaller so it looks right it also annoyingly effects the sizes of fonts on pages which specify the font and size: I tried this recently and had to not use the font. This is using Safari on the Mac but I noticed something similar with Firefox on Windows a couple of years ago.--JohnBlackburnewordsdeeds 20:56, 15 April 2010 (UTC)

My view (minority, I believe) is that LaTeX is best for everything mathematical. Yes, it comes out bigger. Even in in-line text and it comes out bigger it's better than rendering it as italic with html tags. The latter is difficult to write, difficult to read, more effort than it's worth to follow and utterly tedious to maintain. Subscripts and superscripts are terrible. LaTeX makes the maths render larger which is good, innit? If not, why not? --Matt Westwood 21:14, 15 April 2010 (UTC)
Please don't encourage the notion that all non-TeX math notation is italicized. Variables are italicized; digits, parentheses, and other punctuation are not. Obviously that is in accord with the style used by TeX. Everyone except newbies has this down; we shouldn't confuse the newbies. Some pretty good newbies seem to have been joining us lately. Michael Hardy (talk) 23:44, 15 April 2010 (UTC)
... I'd think comical mismatches in size are obviously bad. But you forgot to mention things like 2^3\, where the "2" should be at the same level as the surrounding text and the "3" should be a superscript. Remember when Wikipedia first acquired TeX at the beginning of 2003? Instead of centering, it made the bottom of 2^3\, line up with the bottoms of the letters, but then things like  \sum_{i=1}^2 i looked ridiculous. Michael Hardy (talk) 23:48, 15 April 2010 (UTC)
Thanks for your comments John – I’m coming to the conclusion that proper rendering, at least for now, may require some measure of calibration on the part of the user (as it currently does), though we’d like to minimize this.
Matt – I also prefer TeX, but many prefer HTML, and, further, the TeX should not render larger than running text. This can be done optionally (e.g., through user stylesheets or preferences), but standard convention and user expectations is that text and math should be the same size. A preliminary goal is to at least have consistent (and correct/acceptable) rendering across TeX and HTML, so that authors can use whichever they prefer – then we can worry about improving rendering.
"the TeX should not render larger than running text." Why?--Matt Westwood 20:59, 16 April 2010 (UTC)
Michael – good point about the baseline, thanks! – I’ve added a note about that.
—Nils von Barth (nbarth) (talk) 05:04, 16 April 2010 (UTC)
Hi Matt,
Typographical standards (in print) are that math is set at the same size as running text, so as a baseline we should use that on Wikipedia, following existing conventions and user expectations.
Some people (such as yourself) would rather the math be set bigger (say, for legibility), and there is certainly a case for this, but unless there is a consensus for it being bigger by default (which I do not believe there is), this should be user-configurable, and we should default to being the same size as running text.
—Nils von Barth (nbarth) (talk) 21:33, 17 April 2010 (UTC)
I'm afraid I can't agree with this consensus, so regretfully I won't be able to contribute much to mathematics pages because of lack of patience. As it is, I've found some pages impossible to read because of the author's slavish devotion to what is to me an arbitrary and unworkable convention. Never mind, I have other work to do - and I'll drop in the occasional comment / question here and there. Sorry and all that. --Matt Westwood 07:38, 18 April 2010 (UTC)
No worries Matt – hopefully we’ll someday have math typography sorted so that everyone’s preferences can be easily accommodated with but a simple tweak! Meanwhile, look forward to your (occasional) contributions, in whatever form they may be.
—Nils von Barth (nbarth) (talk) 18:40, 22 April 2010 (UTC)
mathJax, were it to be adopted universally, should render this entire discussion obsolete. --Matt Westwood 21:00, 21 August 2011 (UTC)
True, but that's not likely to happen soon. CRGreathouse (t | c) 20:34, 22 August 2011 (UTC)

relative sizes[edit]

the expression X+Y is too large, compared to X+Y\, and X + Y.

For me it's the other way around: the first expression fits (though bigger than plain text) and the second is clearly too big. —Tamfang (talk) 05:15, 21 April 2010 (UTC)

PS, shoulda mentioned, I'm using Firefox 3.6.3 on MacOS 10.5.8. —Tamfang (talk) 21:27, 22 April 2010 (UTC)
And it looks the same in Firefox 4.0.1 on MacOS 10.6.7. —Tamfang (talk) 20:33, 2 May 2011 (UTC)
Thanks Tamfang, that’s v. useful (particularly the level of detail)!
Jheald also reports PNG too big, and that accords with how some editors use \scriptstyle to shrink PNGs. So it looks like we’ve got 2 sizing issues; we’ll need to do some experiments to figure out how people should correctly calibrate (if anyone’s figured out how this works, please weigh in).
—Nils von Barth (nbarth) (talk) 18:45, 22 April 2010 (UTC)

To me the first two are equal in size and much bigger than the surrounding letters, whereas the third one fits. Michael Hardy (talk) 01:06, 3 June 2010 (UTC)

As you can see from above, the results are different on Firefox 4 on Win 7, which is what I assume the average user would use (default setting for everything). The 1st and 3rd are almost the same size, although the first uses serif fonts, which may be harder to read, while the 2nd one looks much bigger (about twice the size of text, and serif). The rendering is identical on IE 9, so I infer it's mostly an OS rather than browser font issue. Tijfo098 (talk) 17:06, 2 May 2011 (UTC)
Here's how the "ones test" from the beginning of this page looks like to me. Tijfo098 (talk) 17:25, 2 May 2011 (UTC)

Effect of \textstyle?[edit]

The page says that inline equations should be set in \textstyle. Setting aside the silliness of having to do this by hand, I just tested this at Cauchy product: version with \textstyle vs version with default sizing. On my antique Firefox the results are inconsistent: some formulae are smaller in textstyle, some are larger and some are unchanged. Can someone with a newer/different browser check this? Jowa fan (talk) 01:16, 3 May 2011 (UTC)

It seems to have no effect in Firefox 4 on Win 7. For instance "Let \textstyle (a_n)_{n\geq0} and \textstyle (b_n)_{n\geq0} be real sequences." displays the same way with and without \textstyle. Tijfo098 (talk) 14:13, 3 May 2011 (UTC)


I signed up as a participant in this subproject because I am interested in how Wikipedia handles typography in mathematical notation. But it begins to seem as if those topics might be better discussed at the math wikiproject's talk page, because some of the best contributors to discussions of typography in math notation follow that page and regularly post there but don't go out of their way to follow this page.

Recently some interesting discussions of mathJax have taken place on the following three pages:

I would like to see mathJax be automatically used whenever someone reads a Wikipedia page with math tags. That would solve some of the problems we've had ever since February 2003. Those interested in typography should look at this, and I'd like to see supporters of this proposal express their support at the requests-for-comment page that is linked to above.

The mathJax software developers are now following these discussions and are interested in this proposal. Michael Hardy (talk) 22:09, 24 July 2011 (UTC)

I think that it would be great to have this as an option, and it's probably better than anything we have now. (I do have some concerns about the speed of rendering, based on my experience at, but it's probably not as bad here since the time spent reading an article is presumably longer than the time spend reading a question and so a bit of loading is more acceptable here.)
CRGreathouse (t | c) 00:08, 25 July 2011 (UTC)

We already have it as an option; I've been using it for a few weeks now. Michael Hardy (talk) 04:27, 25 July 2011 (UTC)

Can you please explain how to set an "option"? Richard Gill (talk) 18:02, 21 August 2011 (UTC)
You can turn on MathJax by following the instructions at User:Nageh/mathJax. Cheers!
—Nils von Barth (nbarth) (talk)

In case anyone's interested in seeing how it looks on a heavy-duty project which is completely based around mathJax, feel free to check out ProofWiki (go google). It has considerable advantages over the MediaWiki LaTeX interpreter. --Matt Westwood 20:55, 21 August 2011 (UTC)

The scourge that is \mbox[edit]

I have written this: Wikipedia:Manual of Style (mathematics)/Why you should never use \mbox within Wikipedia.

Opinions? Michael Hardy (talk) 23:38, 25 July 2011 (UTC)

Spot on. --Matt Westwood 20:57, 21 August 2011 (UTC)


I've created a new article titled xdvi. It's still quite stubby. Have fun improving and extending it. Michael Hardy (talk) 16:54, 4 May 2012 (UTC)


This page needs updating. For one, TeX rendered as HTML has been disabled for over a year. Edokter (talk) — 13:03, 6 July 2013 (UTC)

A WikiProject for advanced wiki typesetting?[edit]

Ten days ago user:Edokter pointed out that the WikiProject Mathematics/Typography page is #Outdated. Why not to create something WP:WikiProject advanced wiki typesetting as a replacement? The goal should be not only to instruct how to do it, but also to contain various flamewars related to mathematical, physical, linguistic, and to lesser extent other scientific and technology articles. List of topic follows:

Incnis Mrsi (talk) 08:08, 16 July 2013 (UTC)

Sure, why not? M∧Ŝc2ħεИτlk 08:25, 16 July 2013 (UTC)
I would join. —Designate (talk) 20:32, 4 August 2013 (UTC)

Is all right with the proposed name? Particularly, is the word “advanced” optimal in this context? Incnis Mrsi (talk) 07:59, 9 August 2013 (UTC)

No, not really. Something perhaps to mean a style that may be adopted in an article, maybe "Wiki typesetting with care" or "Unified wiki typesetting". This is not an easy name to think up; if it sounds autocratic or all-encompassing, it may flounder on the adverse reaction. Also add:
  • {{sub}} mad {{sup}} vs <sub> and <sup>
Quondum 10:39, 9 August 2013 (UTC)
“Unified” is certainly not an option because our typesetting is objectively diverse and a drive to unification (that is implied by this name) would result in degradation. Typesetting with care is overly broad: it may refer, for example, to the use of “: ” and “ – ” but not “ - ”, and other similar trivial patterns. We do not need a WikiProject to teach the people that “blah - blah” is unprofessional and “blah- blah” is an egregious mistake. Incnis Mrsi (talk) 13:41, 9 August 2013 (UTC)