MathJax doesn't work in LivePreview
Closed, ResolvedPublic

Description

Raw TeX commands are displayed.


Version: unspecified
Severity: normal

bzimport added a project: Math.Via ConduitNov 22 2014, 12:21 AM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz36060.
liangent created this task.Via LegacyApr 18 2012, 8:37 AM
Schnark added a comment.Via ConduitApr 18 2012, 9:52 AM

More or less the same as in bug 33399. If JavaScript features in LivePreview don't work for core features one can't expect it to work for extensions.
A hook system as suggested in bug 23580 would be the best way to fix this bug.
See also bug 35478.

MarkAHershberger added a comment.Via ConduitApr 19 2012, 2:31 AM
  • This bug has been marked as a duplicate of bug 33399 ***
Krinkle added a comment.Via ConduitAug 12 2012, 6:20 AM
  • This bug has been marked as a duplicate of bug 24134 ***
Krinkle added a comment.Via ConduitAug 12 2012, 6:24 AM

Re-opening as this needs two things:

  • Be able to get modules loaded that extensions add to the page (bug 24134)
  • Be able to run code for "article loaded" when the article html is loaded. Usually this is document-ready which is how we do it now, but in case of preview we have multiple "article loaded" points within the lifecycle of a single page. This will be made possible by 30713.
TheDJ added a comment.Via ConduitApr 28 2013, 10:05 AM

MathJax module now has a $().renderTex command that can be run to render domelements that contain tex commands. A preview hook can use this to postprocess the preview output.

matmarex added a comment.Via ConduitApr 29 2013, 4:46 PM

(For the record, there is now a fix in progress for bug 30713 which is a dependency here.)

TheDJ added a comment.Via ConduitJun 2 2013, 9:58 PM

Both Ajaxpreview and wikEd now use the renderTex() command to render MathJax in their ajax based preview modes:

Example: https://en.wikipedia.org/w/index.php?title=User%3AJs%2Fpreview2.js&diff=558032369&oldid=520879456

Soon to be improved by making use of https://gerrit.wikimedia.org/r/56762

SalixAlba added a comment.Via ConduitJan 30 2014, 8:13 AM

A specific problem is that after a session in VisualEditor a full refresh is not done and MathJax is not rerun, so the raw latex code is displayed. Apparently according to bug 51565 gadgets should listen to "wikipage.content". I have heard rumours that the fix to bug 48560 will fix this problem.

This ha come up at https://en.wikipedia.org/w/index.php?title=Wikipedia:VisualEditor/Feedback&oldid=593049936

gerritbot added a comment.Via ConduitApr 5 2014, 5:18 PM

Change 124064 had a related patch set uploaded by TheDJ:
MathJax: Listen for wikipage.content hook

https://gerrit.wikimedia.org/r/124064

gerritbot added a comment.Via ConduitApr 7 2014, 4:07 PM

Change 124064 merged by jenkins-bot:
MathJax: Listen for wikipage.content hook

https://gerrit.wikimedia.org/r/124064

Aklapper added a comment.Via ConduitJul 9 2014, 9:00 AM

Patch was merged a while ago - is there more work left to do here (if yes: please reset the bug report status to NEW or ASSIGNED), or can you close this ticket as RESOLVED FIXED?

matmarex added a comment.Via ConduitJul 9 2014, 10:52 AM

I just tested and it still doesn't seem to work (PNG images are shown).

TheDJ added a comment.Via ConduitJul 9 2014, 11:24 AM

For LivePreview, it depends on bug 24134 which isn't fixed yet, because I still need to finish https://gerrit.wikimedia.org/r/#/c/131346/. The patch that was merged was just one of the prerequisites.

VE is a separate issue.

Kulla added a subscriber: Kulla.Via WebNov 24 2014, 6:10 PM
Mattflaschen removed a subscriber: Mattflaschen.Via WebDec 9 2014, 9:56 PM
Ricordisamoa added a subscriber: Ricordisamoa.Via WebDec 10 2014, 11:54 AM
TheDJ closed this task as "Resolved".Via WebFeb 26 2015, 8:37 AM
TheDJ claimed this task.

I see i forgot to close this one. This is basically working now, though there apparently is a bug, reported in T90808.

Ricordisamoa awarded a token.Via WebFeb 26 2015, 8:53 AM

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.