Vertical line in MathJax formulas

Vertical line in MathJax formulas

από Krzysztof Winnicki -
Αριθμός απαντήσεων: 12

Hi,

I've got question: MathJax displays vertical line on the right, in every formula. Do you know how to remove this line?

Συνημμένο poligon MathJax - Google Chrome_015.png
Μέσος όρος βαθμολογίας:Useful (1)
Σε απάντηση σε Krzysztof Winnicki

Re: Vertical line in MathJax formulas

από Jeems Terry -

Hi Krzysztof Winnicki,

It seems there is a bug with mathjax (if im not mistaken) in google chrome. So there is a vertical line in the end of rendered tex. 

However, the bug is fixed in mathjax version 2.6.

We also have  that problem in our moodle installation and we fix it by changing the mathjax version to 2.6.

Let me know if this step fix the problem . χαμόγελο

Σε απάντηση σε Jeems Terry

Re: Vertical line in MathJax formulas

από Tim Hunt -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Particularly helpful Moodlers Φωτογραφία Peer reviewers Φωτογραφία Plugin developers

MDL-52752 is the Moodle Tracker issue about upgrading MathJax in Moodle core.

Σε απάντηση σε Tim Hunt

Re: Vertical line in MathJax formulas

από Edward Bethel -

Thanks Tim!

This worked well - the problem was driving me crazy. I've got a question though. Before changing the httpurl and the httpsurl through the moodle administration interface, I tried to point to the upgrade using by editing the settings.php file in the mathjaxloader directory. This did not work however, no matter how many times I restarted Chrome and cleared the cache. I would rate my programming skills as rudimentary at best - I don't pretend to understand the underlying architecture very well at all. I use challenges like this to learn more about the Moodle backend in specific, and php and js in general (don't worry - these are demo environments, wouldn't dream of fiddling with our production site).

I am curious though, as I would have expected the admin settings in the Moodle interface to link directly to the settings.php file? What have I missed here?

Thanks for whatever clarification you can give.


Σε απάντηση σε Edward Bethel

Re: Vertical line in MathJax formulas

από Daniel Thies -
Φωτογραφία Core developers Φωτογραφία Particularly helpful Moodlers Φωτογραφία Plugin developers Φωτογραφία Testers

The value in settings.php is just the default setting to be used during installation. After that the setting is stored in the database. You should change it in Site settings -> Plugins -> Filters -> MathJax, not in the code.

Σε απάντηση σε Krzysztof Winnicki

Odp: Vertical line in MathJax formulas

από Krzysztof Winnicki -

Hi Jeems Terry,

thanks for your reply and tip χαμόγελο You're right. I use Google Chrome and today I checked this under Firefox. Formulas are displayed correctly χαμόγελο

So, now I have to know how to upgrade MathJax on my server.

Thanks! χαμόγελο

Σε απάντηση σε Krzysztof Winnicki

Re: Odp: Vertical line in MathJax formulas

από Hiroki Inoue -

Hi Krzysztof,

I changed the configuration like below and it solved the vertical line issue.

MathJax directory from 2.3-latest to 2.6-latest in MathJax URL.

Hope it helps.

Hiroki

mathJax

Σε απάντηση σε Hiroki Inoue

Odp: Re: Odp: Vertical line in MathJax formulas

από Krzysztof Winnicki -

Yes, thank you χαμόγελο It helped.

Σε απάντηση σε Krzysztof Winnicki

Re: Odp: Re: Odp: Vertical line in MathJax formulas

από Douglas Broad -

If you don't have access to upgrading MathJax, you can also change the rendering settings from HTML/CSS to SVG and it also solves the problem.  Hover over an equation, right click, choose renderer, and then SVG.

Σε απάντηση σε Krzysztof Winnicki

Re: Vertical line in MathJax formulas

από Edward Bethel -

Additionally, if you don't have access to upgrade Mathjax, you have two rough and ready solutions (they're not really ideal but if it's driving you crazy they work).

On the Mathjax.org site go to Documentation>Simple Integration. Click on the link "copy this snippet" and you should see the following mini-script: 

<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>;

Copy the script and do one of the following:

  1. many of the newer themes allow you to install your own custom js in addition to custom css. paste the script into the custom js window and save. this will ensure that mathjax loads for that theme
  2. in whatever document you are using mathjax, switch to html view and paste this script at the top of the page (this will ensure that mathjax loads for that page).

Neither of these solutions are elegant or ideal, but they will work if you can't upgrade mathjax and can't wait for the next moodle upgrade in which the mathjax upgrade will be bundled.

Hope this helps