Want to take part in these discussions? Sign in if you have an account, or apply for one below
Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
Instiki does some weird stuff sometimes with fonts inside mathematics. As we all know from LaTeX, text fonts shouldn’t affect math fonts. But on the Lab they can.
Example: *$\sin$*
produces ‘’, exactly the same as $\sin$
, which produces ‘’. This is as it should be. But now put it in a theorem environment, and they’re all italics! Since we don’t have those on the Forum, see the Sandbox.
I don’t know if the problem is Instiki, MathML, or even Firefox.
Sorry, I should have named this thread something more specific.
Even more curiously, when I read comment #1 in Google Reader, the first ’’ was italicized!
So things are definitely browser dependent! Hopefully that’s a bug in Google Reader.
Google Reader isn’t a browser, it’s a webapp that runs in a browser. I was running Google Reader in Firefox, the same browser I use to read the Forum.
I see. Well, still hopefully it has a bug, possibly in its CSS or something.
There’s a similar problem in ordinary LaTeX: if you write $\text{abc}$
, then it gets rendered in italics whenever the surrounding text is in italics. This, I suspect, is by design. The right way is to use \mathrm{abc}
or \textrm{\upshape abc}
.
But what’s happening here seems to be a bug in the MathML output. First of all – it happens even under MathJax. Perhaps the problem is that the mathvariant="normal"
attribute is not attached to the elements which are supposed to be upright. That doesn’t explain Firefox though, because elements are assumed to have -moz-math-font-style="normal"
… I can only guess that there’s a CSS bug.
I can’t check the source right now, but I think this is down to the lines:
.num_theorem * {
font-style: italic;
}
in the CSS. That * forces strong inheritance.
Yes, that certainly would explain things. We could just replace that block of CSS with this:
.un_theorem, .num_theorem,
.un_lemma, .num_lemma,
.un_prop, .num_prop,
.un_cor, .num_cor {font-style: italic}
There doesn’t seem to be any unintended side-effects from doing this. (The Edit CSS tool of the Web Developer extension is useful for this kind of testing.)
I came across this some time ago and mentioned it to Jacques. He said that there had been a reason for it but he couldn’t remember what it was. I disabled it on my own Instiki installation intending on seeing if there were any unintended consequences. I haven’t noticed any, but then I haven’t particularly looked. I can edit the Instiki CSS easy enough.
Okay, I’ve made the change. Please examine your theorems carefully to ensure that this hasn’t made anything go horribly wrong! It also might not be immediately visible, depending on how persistent your browser is at caching CSS files (Sandbox looks right to me now).
Nice!
1 to 12 of 12