MathJax in OJS 3.0.1

Hi

How to make MathJax work with OJS 3.0.1?

Regards.

Hi @Abd_El-Nasser_Gharee,

Can you describe how you’d like to use mathjax with OJS?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

In the articles titles and abstract, I need to write mathematical equations and symbols.

Regards

Hi @Abd_El-Nasser_Gharee,

Adding MathJax support to the front end should be relatively easy – you’d need to put the MathJax library somewhere on your server, then drop a link into the template to bring in the Javascript code. However, there will be a broader problem of metadata. MathJax in titles and abstracts will be served to third-party services, such as Google Scholar, OAI, CrossRef, etc. including MathJax formulae, and those services might not be expecting MathJax code.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher will i encounter any problems if i use MathJax Equations in the paper only and not in the metadata, ??

Hi @amirdire,

You’ll need to add the MathJax script to your installation so that these formulas are rendered, but aside from that, I’m not aware of any complications this would introduce.

Regards,
Alec Smecher
Public Knowledge Project Team

can u guide me on adding MathsJax script to my installation ?? hope this will be helpful for many others

You could do a child theme: https://pkp.gitbooks.io/pkp-theming-guide/content/en/child-themes.html

And then use addscript in the init function of your theme: https://github.com/pkp/ojs/blob/master/plugins/themes/default/DefaultThemePlugin.inc.php#L150

@ajnyga, i have already done that but the latex formulas still not rendering properly on the abstract ??

I wonder if the formulas are removed from the abstract when it is sanitized, @asmecher?

Hi all,

That can be checked by looking at the page source where the abstracts are displayed. Is the MathJax code for the formulae presented intact?

Regards,
Alec Smecher
Public Knowledge Project Team

Once upon a time, I wrote a simple mathjax plugin for ocs. Probably, it can be easily modified for ojs.
Drop me a line, and I send you the tarball
Vasyl

1 Like

Dear Vasyl, I added your plugin to the OJS but it does not work. Do you have any idea why and how to make it work?

1 Like

@msshd The latest (working, but not final yet) version is available at https://github.com/vasylOstrovskyi/mathJax, should work with OJS 3+.

1 Like

Hi I add you plugin but it does not work. May be because of the themes I used?

@Vasyl_Ostrovskyi, thanks for the plugin, it works, but in OJS 3.1-01 the page with plug-ins does not even open