Vertical line in MathJax formulas

Vertical line in MathJax formulas

by Krzysztof Winnicki -
Number of replies: 12

Hi,

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

Attachment poligon MathJax - Google Chrome_015.png
Average of ratings: Useful (1)
In reply to Krzysztof Winnicki

Re: Vertical line in MathJax formulas

by 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 . smile

Average of ratings: Useful (2)
In reply to Jeems Terry

Re: Vertical line in MathJax formulas

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

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

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Vertical line in MathJax formulas

by 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.


In reply to Edward Bethel

Re: Vertical line in MathJax formulas

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of 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.

In reply to Jeems Terry

Re: Vertical line in MathJax formulas

by William Lu -
Picture of Particularly helpful Moodlers

I had the same XXX| problem on Google Chrome, followed your instruction to change the version, all are fine now.

Thanks

In reply to Krzysztof Winnicki

Odp: Vertical line in MathJax formulas

by Krzysztof Winnicki -

Hi Jeems Terry,

thanks for your reply and tip smile You're right. I use Google Chrome and today I checked this under Firefox. Formulas are displayed correctly smile

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

Thanks! smile

In reply to Krzysztof Winnicki

Odp: Vertical line in MathJax formulas

by Krzysztof Winnicki -

Ok, I found it smile I upgraded MathJax from 2.5 to 2.6 and now everything is OK smile Thank you!

In reply to Krzysztof Winnicki

Re: Odp: Vertical line in MathJax formulas

by 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

Average of ratings: Useful (4)
In reply to Hiroki Inoue

Odp: Re: Odp: Vertical line in MathJax formulas

by Krzysztof Winnicki -

Yes, thank you smile It helped.

In reply to Krzysztof Winnicki

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

by 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.

In reply to Krzysztof Winnicki

Re: Vertical line in MathJax formulas

by 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