Extension:MathEasy/ar

This extension was developed after a frustrating experience in trying to get the main Math Extension to work, as it appears to have been drastically changed recently and isn't fully documented. This version is extremely simple, and probably shouldn't be used on large wikis nor on wikis which have untrusted editors. However, it uses the same LaTex transformation code which apparently will be used in the Math Extension, i.e., so it should be compatible in the future.

الاستخدام
The intent was to implement a tag as close as possible in operation to the Math Extension's tag. This version has some minor enhancements to help with the formatting, but aren't necessary to use:
 * To set the graphics type to SVG:
 * To set the image width in pixels:

Basically what this does is use the MD5 hash of the formula being rendered as a key for naming the files to be used. The files are kept in a directory under your main wiki directory ($IP/matheasy), and have the following files:
 * {md5}.txt - LaTeX formula to be converted
 * {md5}.sh - Command used to convert the formula from LaTeX to graphics
 * {md5}.png or .svg - Graphics file

Once the file is converted, it is saved until the next time it might be needed. A link to the graphics file is returned in the form of a tag. Due to possible slow processing speeds, it is possible that the first time you try to view the image, it will show as a broken link because the process isn't completed. This is solved by refreshing the page. This issue is possible to fix if necessary, but for this simple extension it didn't seem worth the effort.

التثبيت
Insert the code near the end of the LocalSettings.php file, or copy the code to another file and include it, as you wish.

It is necessary to have access to a Mathoid server, which is easy to setup, see:
 * https://github.com/wikimedia/mathoid
 * Manual:Mathoid

You can also use someone else's existing Mathoid server, but there is no guarantee that it will be available when you need it. Here are two examples which may be used for limited testing:
 * raptor575.startdedicated.com:10044
 * http://mathoid.testme.wmflabs.org

It is advisable to read Manual:Mathoid first. To set Mathoid up on Ubuntu 16.04 (and probably many others):