The symbols φ and ϕ (both lowercase phi) are swapped in many fonts and this is problematic on Stack Exchange. See here.

Therefore, users should see a warning when they use both symbols in the same post (outside of the context of MathJax \phi and \varphi).

  • How can they be swapped in a single font if they are the same thing? Isn't it that different fonts represent lowercase phi in different ways? Jun 13, 2020 at 15:27
  • 4
    Do you have any idea how often this actually occurs? The easiest solution would be to just add a blacklist entry that triggers a warning, but those entries automatically expire if they aren't hit in so long. So if this doesn't happen all that often, then the solution would be undone.
    – animuson StaffMod
    Jun 13, 2020 at 15:31
  • 6
    @P.Mort.-forgotClayShirky_q: "How can they be swapped in a single font if they are the same thing?" Because GREEK SMALL LETTER PHI and GREEK PHI SYMBOL are different Unicode codepoints and therefore can have different visual representations. Jun 13, 2020 at 16:27
  • 2
    In what context are they both used and have a different meaning?
    – OrangeDog
    Jun 14, 2020 at 18:31
  • 1
    Is this only about unicode or is it about MathJax? I use \varphi in MathJax, avoiding \phi because it looks too much like \emptset or \varnothing. Similarly I use \varepsilon and not \epsilon, the latter yielding a character similar to \in (but without the spacing conventions of a binary operation symbol). Jun 14, 2020 at 21:00
  • 2
    @OrangeDog For example people might discuss the difference between φ and ϕ on a SE site about linguistics, typography, graphic design, or math. I wouldn't encourage introducing both φ and ϕ to denote different things in science, but the fact that φ and ϕ are swapped in many fonts has unexpected effects, see the links in the question.
    – root
    Jun 14, 2020 at 21:49
  • @root the links are all constructed examples to illustrate the "problem". Has there been any case where this problem actually occurs on any of these sites?
    – OrangeDog
    Jun 14, 2020 at 21:51
  • @MichaelHardy I guess depending on the MathJax version and the fonts available on a given computer, some font to render MathJax is chosen. That font dictates whether the symbols look swapped.
    – root
    Jun 14, 2020 at 21:55
  • @OrangeDog space.stackexchange.com/questions/29909/…
    – root
    Jun 14, 2020 at 21:55
  • 1
    @root : Your guess seems implausible, in that MathJax is a stripped-down version of a some abilities of LaTeX, which is far more sophisticated software than many seem to realize. Jun 14, 2020 at 22:04
  • 2
    @root: MathJax uses web fonts, for modern browsers, at any rate, & even falls back to SVG images if nothing else works: docs.mathjax.org/en/v2.7-latest/output.html. Jun 14, 2020 at 22:36
  • 1
    @root I've suggested an edit to fix it, by using MathJax throughout. It should have been anyway, so the subscripts work properly.
    – OrangeDog
    Jun 14, 2020 at 22:45
  • 1
    @OrangeDog φ and ϕ don't always appear with subscripts. φ and ϕ can even be discussed in the context of linguistics, typography, graphic design, etc. So your argument "it should have been MathJax anyway" is not universally valid. That's the point! If users know that φ and ϕ are swapped in some fonts, then they can take countermeasures like the ones you suggested. But in order to know that, they need a warning.
    – root
    Jun 15, 2020 at 9:22
  • @Scortchi-ReinstateMonica There seems to be no guarantee that none of the (web) fonts that the past and future versions of MathJax use don't have φ and ϕ swapped.
    – root
    Jun 15, 2020 at 9:27
  • 3
    I doubt the MathJax people do/will neglect to ensure that \phi & \varphi are mapped as LaTeX users expect in any font they supply; in any case there's no problem with the font SE currently uses. Jun 15, 2020 at 11:52

1 Answer 1


There are, I think, three different use-cases for φ and ϕ:

  1. They're used as letters in Greek words. No-one's going to want to use both variants of the same letter, so it doesn't matter much which one readers see.

  2. They're used as place-holders for numbers, functions, &c. in mathematical expressions. For serious confusion to arise, the writer must first decide to use the two variants to refer to two different things—already rather unfriendly to readers—and second to specify them with MathJax in one place and with Unicode in another—which is hardly good typographical practice. So for sites with MathJax enabled (which are the ones with more call for mathematical expressions), the solution is to use it consistently, and to encourage others to use it. For sites without MathJax enabled, the worst that can happen is that the variants are transposed for some readers, which again doesn't matter much.

  3. The glyphs themselves are the topic of discussion. Here, without recourse to MathJax, the writer has to resort to images to ensure that all readers see the right glyphs. That's certainly a nuisance; but in mitigation, there can't be all that many actual or potential posts on this subject.

The warning you suggest is a good idea, without a doubt (+1); but I hope it's quick & easy to implement, as the problem doesn't seem to merit many hours of developer time.

† For reference, \varphi gives the loopy variant and \phi the stroked variant, both italicized:

MathJax \varphi MathJax \phi

This is the default font, MathJax TeX. If it's not installed on a user's machine, MathJaX supplies it (or for older browsers that don't support web fonts, even creates an SVG image file for display).

‡ Perhaps using an on-line utility such as Unicode Image Maker from Browserling:

03C6 - loopy glyph 03D5 - stroked glyph

And, thinking about it a little more, if your post's about the appearance of a character, it's not really a disproportionate burden to have to upload an image of it, and probably considered good practice in general.

  • 2
    That last paragraph is a very good point. The moment you want to make sure other people see what you're seeing, you don't want to leave it to a renderer to do this. You make a picture.
    – Mast
    Jun 16, 2020 at 11:29
  • Re typographical practice: Writers aren't aware how dangerous mixing MathJax and Unicode is if they don't know that φ and ϕ can look swapped. Also, several writers contribute to the same thread. Some writers might prefer Unicode, or not know MathJax. Comments can't be edited by others, nor after 5min, so getting stuck with a mix of MathJax and Unicode in one thread is not unlikely.
    – root
    Jun 19, 2020 at 9:32
  • Re unfriendly to readers: Maybe several books are being discussed where one book uses φ to denote X and another book uses ϕ to denote Y. Seeing swapped glyphs would be confusing.
    – root
    Jun 19, 2020 at 9:34
  • Re "resort to images to ensure that all readers see the right glyphs": Indeed, but this requires knowing that φ and ϕ can look swapped. That's why displaying a warning would be good. I suspect that in some fields (linguistics or so), Unicode is used a lot more than images. It has advantages over images for copying&pasting, searching, etc. (I mean advantages in general, not for φ and ϕ).
    – root
    Jun 19, 2020 at 9:39
  • @root: (1) Writers shouldn't be mixing Unicode & MathJax in any case. You don't let the font of a mathematical symbol within text vary - italics for emphasis, Comic Sans MS for a note of levity - you keep its appearance exactly the same as long as its meaning is exactly the same. In fact writers should be using MathJax full stop, for consistency of what's displayed, for decent typesetting, & to enable those who can't see well or at all to make use of its accessibility features. On the sites I'm familiar with, people are quick to curate posts that don't use MathJax & to guide users ... Jun 19, 2020 at 14:00
  • ... that don't know how to use it. (Comments can be deleted & re-posted, or edited by a moderator - if it's really necessary.) (2) I don't see that as different from the books' using the same variant of phi to denote different things, or from one's using a g with a curly tail & the other's using a g with an open tail. The reader-friendly thing to do would be to adopt a common notation for quoting mathematical expressions from the books rather than to quote them verbatim. (3) Yes, they'd have to know, or lack faith that Unicode rendered in who-knows-what fonts will faithfully ... Jun 19, 2020 at 14:03
  • ... reproduce the particular features of allographs they want to draw attention to - which as I suggest in a footnote, & @Mast in a comment, may be a prudent outlook. I'm not sure what you're getting at about linguists. Jun 19, 2020 at 14:08
  • What I mean is that a linguist would presumably use Unicode to reproduce texts written with Linear B for most purposes, but use drawings or photographs of tablets to illustrate variation in how 𐀁, say, was written. Jun 19, 2020 at 14:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .