Mathematical Symbols on OJS issues #
Open Journal System (OJS), although very useful in journal and article management by publishers in many fields, actually lacks the support of the mathematical symbol and other AsciiMath notation. As in the physical or mathematical field that is many of the article attribute using some scientific symbols for example:
In the article many of the users of OJS will find incorrect notation that will be shown in the metadata of the article like this one :
This will become fatal because not just it will decrease the searchability of the article in the scientific indexing system or in the search engine such as google or bing. The author will become unsatisfied because the article title or metadata is shown as it is not intended to be.
This problem has emerged to us as one of our clients has the same problem as it is described above. Our team is curious to know the root problem of these symptoms. First of all, we check if the process on our upgrade is causing the conversion of the notation record. After digging into the database record we find out that the database and its tables use the right charset (utfmb4) to support many of the foreign characters such as Latin characters or some Asian characters. Although we try to input the right notation to the article metadata, when we check on the record this is what we found :
We found out that there is a javascript library called MathJax that can solve these issues.
What is MathJax? #
MathJax is a free and open-source javascript that supports LaTeX, MathML, and AsciiMath, this library compatible with all modern browsers. The library in the process of displaying the incorrect notation will convert it before displaying the result to the user by using the resource of the client browser since it is using the javascript language. The installation is very simple, one just simply adds this library to the OJS system and the conversion will be handled automatically by this library.
The best part about this library is that it will process the notation as text-based rather than convert it to an image-based image. This means that it will be available and discoverable for search engines such as Google, DuckDuckGo, or Bing.
How to install MathJax on OJS? #
We can use the Custom header plugin to install this library :
- Open Custom header plugin in the OJS backend as journal manager.
- Add the below code in the header plugin code Save the change and clear the browser cache
<script type="text/x-mathjax-config">// <![CDATA[ MathJax.Hub.Config({ messageStyle: "none" }); // ]]>
</script>
<script type="text/x-mathjax-config">// <![CDATA[ // // MathJax.Hub.Queue(function () { document.getElementById("hide_page").style.visibility = ""; }); // ]]>
</script>
<script type="text/javascript" id="MathJax-script" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.0/es5/tex-mml-chtml.min.js?config=TeX-AMS_HTML-full">
</script>
You can also clear your OJS cache before showing the result.
After you have done as explained, you can check the result in the article content list as this :
That’s it, this will step will help you to make your journal article appropriately display the correct character for your journal-title.
Share this article to help others for fixing some problems.
Thank