The font size is set dynamically by MathJax to try to match the
surrounding text properly, so you should not be setting the font-size
for MathJax explicitly. If that isn't happening properly, I would
like to see the situation where it fails so that the font-size-
matching can be improved. It may be that other CSS on the page is
interfering with that, so I would need to see a complete page where
the problem exists. Can you provide a URL for one?
> 1. What would be the right way to manage the font-size, so that it
> appears properly on all browsers?
You should set the "scale" parameter in the HTML-CSS section of your
configuration rather than using CSS directly if you want to change the
size of the mathematics relative to the surrounding text. You should
not set font-size directly, as this will almost surely cause MathJax
to fail.
In Firefox, are you using native MathML output, or the HTML-CSS
output? In my experience, Firefox's MathML output tends to be smaller
than I would like it to be, and you may be experiencing that as well.
If that is the case, you can set the "scale" parameter in the
NativeMML section of your configuration to adjust the size of the
mathematics that is rendered as native MathML.
> 2. What would be the preferred mechanism to add custom changes to
> MathJax (such as the one given below), so that we don't break much on
> a future upgrade.
>
> //
> // This allows you to change the CSS that controls the menu
> // appearance. See the extensions/MathMenu.js file for details
> // of the default settings.
> //
> styles : {
> ".MathJax" : {
> "font-family" : "Arial",
> "font-size": "50%"
> }
> }
It is correct to make changes using the styles settings, but from the
comment that is part of your code block, it looks like you have set
this in the MathMenu section of your configuration. That will make
this change take effect only when the MathMenu is loaded (which may
not be all the time). You should put global changes in the global
"styles" block that is in the main configuration section.
But you should not set font parameters on the .MathJax class, as these
are managed internally by MathJax. Setting the font-size, for
example, will cause MathJax to fail to measure the sizes of the
typeset mathematics properly, and it will leave the wrong amount of
space for the typeset mathematics. You should use the scale
configuration parameters as described above.
Davide
To configure the scale differently for Chrome, use
MathJax.Hub.Config({
"HTML-CSS": {
scale: (MathJax.Hub.Browser.isChrome ? 50 : 100)
}
});
but I don't recommend doing that. There is probably something else
that is wrong that is causing the problem, and we should identify that
and fix it rather than hack the scaling factor without knowing what is
causing it. For example, have you checked that this happens in ALL
copies of Chrome on all operating systems? Does it also happen for
Safari (since they use essentially the same rendering engine)?
What version of Chrome are you using, and what OS?
Davide
Davide
On May 14, 2011, at 2:10 AM, Sanjay Vel wrote:
> Thanks Davide its working now
>
>