MathJax icon indicating copy to clipboard operation
MathJax copied to clipboard

Prevents newlines in custom annotations from being removed

Open physikerwelt opened this issue 11 years ago • 7 comments

This is a draft only... see discussion on https://groups.google.com/forum/?hl=en#!searchin/mathjax-users/amber/mathjax-users/3j3AlkBA1CA/vKVfu7hixQwJ

physikerwelt avatar Aug 05 '14 19:08 physikerwelt

Hm. Doesn't https://github.com/dpvc/MathJax/commit/44ee2cf7621ac35716d442454d889edfb89ee9ed already cover this?

pkra avatar Aug 05 '14 21:08 pkra

no for the tex annotation mml.isToken evaluates to true See https://gist.github.com/physikerwelt/3f452ee993256868f01d for a minimal sample.

physikerwelt avatar Aug 05 '14 22:08 physikerwelt

for the tex annotation mml.isToken evaluates to true

Are you using v2.4? This changed recently, and I think it was v2.4 where the difference occurred. The annotation node should not have isToken true, and if it does, then that needs to be fixed, not hacked here.

dpvc avatar Aug 05 '14 22:08 dpvc

OK that might be the problem, we use the wmf clone. I would love to re-factor that, the only problem is that there is a lot of files in MathJax that won't go though the code review. https://github.com/wikimedia/mediawiki-extensions-Math/blob/master/.gitignore I need to check if I can remove those files without trouble.

physikerwelt avatar Aug 05 '14 22:08 physikerwelt

I checked and the fix for the incorrect isToken on annotation elements was Feb 20th this year (this commit), which makes it part of the changes for v2.4. It was in reference to issue #376.

dpvc avatar Aug 05 '14 22:08 dpvc

@dpvc thank you. But I think cherry-picking the changes is a dead end. e.g. unpacked/extensions/toMathML.js does not exist in the wmf clone. I think the way to go is to update to 2.4. Maybe @fred-wang would like to do that?

physikerwelt avatar Aug 05 '14 22:08 physikerwelt

Why not follow our original advice from the User Group and create a single JavaScript file for on-the-fly patches of MathJax? That way you can cherry pick without touching the copy of MathJax.

pkra avatar Aug 06 '14 08:08 pkra