Maths Equation

This is a forum to suggest new features for mojoPortal. 

This thread is closed to new posts. You must sign in to post in the forums.
5/16/2013 1:16:48 PM
Gravatar
Total Posts 5

Maths Equation

I want to start a blog on Maths . How can I write maths equation and formulas in mojoportal blog?

Amit

5/16/2013 1:49:06 PM
Gravatar
Total Posts 18439

Re: Maths Equation

Sorry but that is a challenging problem for a niche audience not something I plan to work on myself at the moment. I would suggest do some googling on MathML, CKeditor, and TinyMCE. Possibly you can find something that will plug into one of those editors and figure out your own way to integrate it for your use. Or you might also look at tools such as moodle which is a learning management system and therefore more likely to already have a way to do this kind of thing.

5/16/2013 2:15:49 PM
Gravatar
Total Posts 216
Community Expert

mojoPortal Hosting & Design @ i7MEDIA!

Re: Maths Equation

One option would be to find a web font that includes the mathematical symbols/glyphs you need, then set up a series of Content Style Templates within mojoPortal that could be chosen from the WYSIWYG, using this font.

To do this you would need to decide previously on what HTML elements to use, then write some CSS into your skin that adds the font family to those elements/classes, then add the corresponding HTML as a template from site administration.

5/16/2013 2:49:44 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Maths Equation

It would be a bit labor-intensive, but you  can use the math Unicode entities to draw your symbols, and that should work in modern browsers. For example, an integral (in hexadecimal encoding) is:

∫

I'm not sure how that will appear here since it'll probably get re-encoded by the editor, but if it's garbled it should be like this, without spaces:

& # x222B ;

If you insert this into HTML mode in the editor it should work (I tested it with one of our development sites).

There are nice printable lists at the Unicode.org charts site, and this web page has a good list of them as well.

Jamie

5/17/2013 5:41:40 AM
Gravatar
Total Posts 5

Re: Maths Equation

Thanks for suggestions and giving links.  I will try.

Amit

5/17/2013 11:07:45 AM
Gravatar
Total Posts 18439

Re: Maths Equation

Hi,

FYI, I found this plugin for CKEditor that seems to work. Download and extract the zip on that page and copy the folder named equation into the CKEditor plugins folder, in the current release of mojoPortal copy it to /ClientScript/ckeditor403/plugins

Then edit the file /ClientScript/ckeditor-mojoconfig.js

add it to extra plugins like this:

config.extraPlugins = 'oembed,templates,onchange,equation';

then in the toolbar like this:

config.toolbar_FullWithTemplates =
    [
        ['Source','Maximize'],
        ['SelectAll', 'RemoveFormat', 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Print', 'SpellChecker', 'Scayt'],
        ['Undo','Redo'],['Find','Replace'],['Bold','Italic','Underline','Strike','Superscript'],
        '/',
        ['Blockquote','Styles'],['NumberedList','BulletedList','Outdent', 'Indent'],['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
        ['Link','Unlink','Anchor'],
        ['Templates','Image','Flash','oembed','Table','HorizontalRule','Smiley','SpecialChar','ShowBlocks','Equation']
    
    ];

or ideally copy the file ckeditor-mojoconfig.js and rename it then configure this setting in user.config so it points to your custom file:

<add key="CKEditor:ConfigPath" value="~/ClientScript/ckeditor-mojoconfig.js" />

that way you won't lose this customization if you upgrade to a new version of mojoPortal. The ckeditor-mojoconfig.js file would be replaced during an upgrade of mojoPortal.

​The plugin seems to use a remote service that generates images for the formulas.

Hope that helps,

Joe

5/18/2013 6:23:43 PM
Gravatar
Total Posts 26

Re: Maths Equation

can you encapisual it in a code box like you see on some forums? code" 2+2=4 /code"? im not sure how ckeditor handles math altho a simple soultion is use pictures for the math problems with a transparent background

5/19/2013 6:18:41 AM
Gravatar
Total Posts 5

Re: Maths Equation

Thanks Joe, for letting me know the CKEditor plugin.I will try to implement this plugin .

Amit

You must sign in to post in the forums. This thread is closed to new posts.