Skip to content

Where to place config defaults for scale factor and zoom trigger

Davide P. Cervone edited this page May 28, 2013 · 1 revision

From https://groups.google.com/d/msg/mathjax-users/kUyWpitF3_Q/VDu3bzbKXW8J


I know from the help files that it's possible to set defaults (scale factor, zoom trigger, etc). However, I've been having a bit of trouble figuring out exactly where to place the code with the options I'd like to set. I've found the corresponding values and blocks of codes I'd need to insert for each option, but I can't figure out exactly where to place the code.

...

Thanks in advance for any help.


The defaults are actually part of the core Hub configuration, using the menuSettings structure. See the hub options documentation and look for menuSettings. This lists the trigger, and does indicate the other possible values.

First off, the zoom settings you're looking for are not in the zoom-extension (MathZoom) -- except for the delay value if you want zoom on hover -- but in the menu-extension (MathMenu).

Note that delay has been moved to the MathEvents data, and so if you specify it in MathZoom, it has no effect, as documented in the link you gave above.

Caveat emptor: it could just be jsfiddle, but in FF the hover delay doesn't work,

As mentioned above, the delay should be set for MathEvents not MathZoom, and is now called hover so use

MathEvents: {
  hover: 1000
}

to set a 1 second hover delay instead.

in Chrome18 all values get interpreted as "Click".

I suspect you may have used the MathJax menu to set the trigger, which overrides the settings in the menuSettings object. You might want to see if there is a mjx.menu cookie for jsFiddle and remove that if there is. Then it should work for you. I don't have Chrome18 any longer, but it works fine for me in Chrome21.

Clone this wiki locally