Online Editor Equation Editor Plugin

Equation EditorPlugin for Online Editor

Table of Contents

The Equation Editor Plugin allows you to create neatly formated equations in any activity in LAMS. This is achieved by using the extension to the Online HTML Editor which is available in all LAMS activities.

Pre-requisites

The Equation Editor uses LaTeX syntax to render the appropriate formula on HTML. If you aren't familiar with the syntax, don't worry because the plugin also has a very nice and easy to use interface. In case you want to learn more about LaTeX syntax, have a look at this documentation.

There's no software required to be installed in your computer.

Installation

This is the stuff you need to do in your LAMS server.

Download the Editor Equation Editor Plugin from the LAMS Downloads (See LAMS Addons).

As this is a plugin for the Editor, you will need unzip the Editor Equation Editor plugin in the following folder:

In Windows:

X:\whereever-you-installed-lams-directory\jboss-4.0.2\server\default\deploy\lams.ear\lams-central.war\fckeditor\editor\plugins

Note that X: is the drive directory and of course "whereever-you-installed-lams-directory" is the whereever you installed LAMS directory Please change them accordingly.

In Unix/Linux:

/whereever-you-installed-lams-directory/jboss-4.0.2/server/default/deploy/lams.ear/lams-central.war/fckeditor/editor/plugins

After you unzipped the file, there's one file you would need to modify

If you are in Windows, look for this file and open it with Notepad:

X:\...\jboss-4.0.2\server\default\deploy\lams.ear\lams-central.war\includes\javascript\fckconfig_custom.js 

This file should look like similar to this:

FCKConfig.ToolbarSets["Default"] = [
        ['Source','-','FitWindow', 'Preview','PasteWord','Undo','Redo','Bold','Italic','Underline', '-','Subscript','Superscript','OrderedList','Un
orderedList','-','Outdent','Indent','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','TextColor','BGColor'], 
        ['Image','Link','Table','Rule','Smiley','SpecialChar','Templates','FontFormat','FontName','FontSize','About']
] ;

FCKConfig.ToolbarSets["Default-Learner"] = [
        ['Preview','PasteWord'],
        ['Undo','Redo'],
        ['Bold','Italic','Underline', '-','Subscript','Superscript'],
        ['OrderedList','UnorderedList','-','Outdent','Indent'],
        ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
        ['About'],
        ['TextColor','BGColor'],
        ['Table','Rule','Smiley','SpecialChar'],
        ['FontFormat','FontName','FontSize']
] ;

FCKConfig.ToolbarSets["Custom-Wiki"] = [
        ['Preview','PasteWord'],
        ['Undo','Redo'],
        ['Bold','Italic','Underline', '-','Subscript','Superscript'],
        ['OrderedList','UnorderedList','-','Outdent','Indent'],
        ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
        ['WikiLink','Link','Image'],
        ['About'],
        ['TextColor','BGColor'],
        ['Table','Rule','Smiley','SpecialChar'],
        ['FontFormat','FontName','FontSize']
] ;

FCKConfig.EditorAreaCSS = FCKConfig.BasePath + '../../css/defaultHTML_learner.css' ;
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/office2003/' ;
FCKConfig.FirefoxSpellChecker = true;
FCKConfig.BrowserContextMenuOnCtrl = true;
FCKConfig.DefaultLinkTarget = "_blank";
FCKConfig.TemplatesXmlPath = FCKConfig.BasePath + '../../www/htmltemplates.xml';
FCKConfig.FontFormats   = 'div;h1;h2;h3;h4;h5;h6;pre;address;p' ;
FCKConfig.EnterMode = 'div' ;
FCKConfig.Plugins.Add('wikilink', 'en', FCKConfig.BasePath + '../../tool/lawiki10/');

I know, it looks like Chinese to me too But don't panic, Let's look at it one by one.

First part:

FCKConfig.ToolbarSets["Default"] = [
        ['Source','-','FitWindow', 'Preview','PasteWord','Undo','Redo','Bold','Italic','Underline', '-','Subscript','Superscript','OrderedList','Un
orderedList','-','Outdent','Indent','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','TextColor','BGColor'], 
        ['Image','Link','Table','Rule','Smiley','SpecialChar','Templates','FontFormat','FontName','FontSize','About']
] ;
...

This part is the list and order of Tool sets that are displayed when the FCKEditor is presented, so this results in this in the FCKEditor

Unable to render embedded object: File (fckeditor_toolset.jpg) not found.

As you can probably figure out by now, the "Source" button in the picture, corresponds to the first 'Source' button in the code... and so on and so on. Therefore what we need to do to add the Skype button is to include it in the list code. As follows:

FCKConfig.ToolbarSets["Default"] = [
        ['Source','-','FitWindow', 'Preview','PasteWord','Undo','Redo','Bold','Italic','Underline', '-','Subscript','Superscript','OrderedList','Un
orderedList','-','Outdent','Indent','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','TextColor','BGColor'], 
        ['Image','Link','Table','Rule','Smiley','SpecialChar','Templates','FontFormat','FontName','FontSize','Equation','About']
] ;
...

As you can see, I have put it in between the 'FontSize' and the 'About' buttons in the menu. You can put it anywhere you like.

Second part:

Now that we have included in the menu, we need to add just one more line at the bottom of the document:

...
FCKConfig.TemplatesXmlPath = FCKConfig.BasePath + '../../www/htmltemplates.xml';
FCKConfig.FontFormats   = 'div;h1;h2;h3;h4;h5;h6;pre;address;p' ;
FCKConfig.EnterMode = 'div' ;
FCKConfig.Plugins.Add('wikilink', 'en', FCKConfig.BasePath + '../../tool/lawiki10/');
FCKConfig.Plugins.Add( 'equation' , 'en');

See, I have added this last line:

FCKConfig.Plugins.Add( 'equation' , 'en');

And that's it

How to use it

Login into LAMS and in any Editor you should see a Equation button

Once you press it, you get:

You can then paste your LaTeX text into the box and as you type the Equation Editor will show you the correct rendering below the editing box.

Note that you can use the different options at the top of the editing box for other characters and options.

Once you are ready, press the Copy to Document button and the new formula will be paste directly into your instructions activity box

Easy

Help and Troubleshooting

Any more questions, ask in the technical forums in the LAMS Community

Credits

This plugin was written by Will Bateman and Steve Mayer. and slightly modified and improved by Ernie Ghiglione


Labels

latex latex Delete
fckeditor fckeditor Delete
plugin plugin Delete
math math Delete
formulae formulae Delete
equations equations Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.