Vertical line in MathJax formulas

Vertical line in MathJax formulas

de Krzysztof Winnicki -
Número de respuestas: 12

Hi,

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

Adjunto poligon MathJax - Google Chrome_015.png
Promedio de valoraciones:Useful (1)
En respuesta a Krzysztof Winnicki

Re: Vertical line in MathJax formulas

de 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 . sonrisa

En respuesta a Jeems Terry

Re: Vertical line in MathJax formulas

de Tim Hunt -
Foto de Core developers Foto de Documentation writers Foto de Particularly helpful Moodlers Foto de Peer reviewers Foto de Plugin developers

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

En respuesta a Tim Hunt

Re: Vertical line in MathJax formulas

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


En respuesta a Edward Bethel

Re: Vertical line in MathJax formulas

de Daniel Thies -
Foto de Core developers Foto de Particularly helpful Moodlers Foto de Plugin developers Foto de 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.

En respuesta a Krzysztof Winnicki

Odp: Vertical line in MathJax formulas

de Krzysztof Winnicki -

Hi Jeems Terry,

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

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

Thanks! sonrisa

En respuesta a Krzysztof Winnicki

Re: Odp: Vertical line in MathJax formulas

de 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

En respuesta a Hiroki Inoue

Odp: Re: Odp: Vertical line in MathJax formulas

de Krzysztof Winnicki -

Yes, thank you sonrisa It helped.

En respuesta a Krzysztof Winnicki

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

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

En respuesta a Krzysztof Winnicki

Re: Vertical line in MathJax formulas

de 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