code for scaling calls Reprocess() not Rerender() [was: Scale problem] #944

Closed
opened this issue Oct 24, 2014 · 10 comments

Projects
None yet
3 participants

quazar18 commented Oct 24, 2014

 Hi I have a problem: the function "Scale all math" works properly only for inline equations, when I use it in the other case it only show me the latex code. Thank you for the support
Member

pkra commented Oct 24, 2014

 Hi. Can you provide more information? Check our guidelines at https://github.com/mathjax/MathJax/blob/master/CONTRIBUTING.md#bug-reports -- they include a template for bug reports and a list of the information we need to track down bugs. Thanks.

Author

quazar18 commented Oct 26, 2014

 I'm sorry, i'm new. I've downloaded the latest version less then a week ago. This an example of the code that is not working: 

$$\label{eq:gs} g^{\mu\nu}=\begin{pmatrix} -1 & 0 & 0 & 0 \\ 0 & \frac{1}{a^{2}(t)} & 0 & 0 \\ 0 & 0 & \frac{1}{a^{2}(t)} & 0 \\ 0 & 0 & 0 & \frac{1}{a^{2}(t)} \end{pmatrix}$$

 When use scale all math it shows me only the latex: Thank you for the help
Member

pkra commented Oct 26, 2014

 Whoa! I see it now -- weird! We'll look into it. It seems to be a problem with \label. Does it render ok for you if you drop it? The corresponding MathML does not pose any problems so this probably down to the internals of \label. Thanks for reporting!

Author

quazar18 commented Oct 26, 2014

 Yes, after I dropped it out everything worked properly. But I noted also another thing: when I scale the math the equation number change. Before scaling: After scaling: Is this ok?
Member

pkra commented Oct 26, 2014

 Ah, excellent. No that's absolutely not ok and confirms that the problem most probably lies with the code for \label -- it looks like it erroneously thinks the (1) labels is taken and thus takes (2) -- and this probably explains the error because with a fixed \label there might be a clash of id's. Thanks for the additional information!
Member

dpvc commented Oct 26, 2014

 I suspect the code that handles the scaling calls MathJax.Hub.Reprocess(), but that it should probably call MathJax.Hub.Rerender() (which wasn't available when the menu code was originally written). That would avoid re-running the TeX processor, and that would prevent the id clash and renumbering problem.
Member

pkra commented Oct 27, 2014

 I suspect the code that handles the scaling calls MathJax.Hub.Reprocess(),

dpvc pushed a commit to dpvc/MathJax that referenced this issue Dec 4, 2014

 Use Hub.Rerender() rather than Hubl.Reprocess() for scaling changes. … 
…Resolves issue mathjax#944.
 ac5206f 
Member

dpvc commented Dec 4, 2014

 This is fixed in the issue944 branch of my fork of MathJax.

dpvc pushed a commit to dpvc/MathJax that referenced this issue Dec 7, 2014

 Merge branch 'issue944' into develop. Issue mathjax#944. 
 a6ef2a5 
Member

dpvc commented Dec 7, 2014

 => Merged.

dpvc pushed a commit to mathjax/MathJax-test that referenced this issue Jan 15, 2015

 Add test for problem with scaling all math when labels are in use (ma… 
…thjax/MathJax#944).
 3c80463 

Member