This plugin can be used to support the input of Mathematical formulae. It does this by opening an input dialog by command, then generating the formula and finally returning the edited formula back to the original note.
- Open a note with a formula area, select a piece of the formula to be processed.
- Invoke the Katex Input Helper dialog with a keyboard shortcut.
- Process the formula in the upper part of the dialog in Katex format.
- Get feedback in the lower part of the dialog where the generated formula is displayed.
- Finally leave the dialog either by pressing the Okay or the Cancel button.
- By pressing Okay the changed content is returned to the note and replaces the original selection.
- By pressing Cancel nothing is changed.
- Enter the Katex Input Helper with a certain selection of a formula. With no selection in the current note the editor will be opened empty.
- Insertion of formulae from the palette window(s)
- Open the palette with the desired template, f.i. an integral
- Click the template to insert it into the editor window
- Fill in the missing pieces of the formula
- This filling can be recursive, e.g. require another click on a different template
- The same can be done with the usage of other auxiliary windows, f.i. horizontal or vertical spacing, matrices or sample equations
- Many of them don't use placeholders as the "templates" often do
- Returning a processed formula
- Simply leave the dialog with Okay and the content of the editor area will be returned back to the Joplin note and replaces the original selection.
- Pressing Cancel leaves the original note as it was before invocation of the dialog
- Loading and saving the editor area This can be done by invoking the menu commands File - Open or File - Save respectively
- Working with the Custom Equations dialog.
One can invoke this dialog by clicking Insert - Custom Equations.
It is possible to perform the following tasks:
- Save the set of formulae into a json file
- Load a set of formulae from a json file
- Add a formula from the editor area
- Remove a formula from the datagrid
- Click a formula to insert it into the editor area
- Edit the Title field of a formula by double - clicking it
- Filter the set of formulae by a filter expression. Actually this checks if the filter expression is contained in the title field
- Sort the formulae after the title field
- Select pages of a huge formula set
- Retaining window positions and sizes. By default the window positions and sizes are retained leaving them intact through invocations of the window itself or the whole Katex Input Helper. This feature can be deactivated by deselecting the appropriate checkbox in the Settings dialog (Menu command Options - Editor Parameters...).
The plugin is based on the Visual Math Editor by David Grima, a freeware which can be changed and distributed freely. I made the following changes to this software:
- Reverse engineering
- Updated the included software libraries to current ones.
- Replaced the MathJax package by a Katex package.
- Removed some components of the software not needed for this purpose, like:
- AsciiMath support
- Translation of the Katex expression into MathML
- A HTML mode to support html input
- Some dialogs and menu items
- Some MathJax expressions are not supported in Katex and removed for this reason
- But most components are left as is and the external appearance is preserved
As You can see, this software is feature rich and alleviates the creation of formulae. My hope is one will get further support by the integration into Joplin as a plugin.
This software is available on the net here and You can view at it to get an impression.
- Editing in a text editor like the one in Joplin
- Feedback in the formula output area
- 16 palettes with formula templates like Sum and Product, Integral and much more
- Formula dialogs with samples with can be incorporated easily or studied for learning the Katex language
- A custom equations dialog which can be used to maintain one's own formula library and with the possibility to Add, Remove, Load, Save the formula set. This set is persisted through invocations of Joplin as hidden setting.
- Window positions and sizes are persisted
The main dialog window
The custom equations dialog
- Sometimes a start of the dialog crashes. Mainly I could observe this for first time starts of the production version. Perhaps this has to do with caching of the plugin. Restart helps.
- A minor problem is a missing update of the language of the data grid paging bar in the Custom Equations dialog. This only appears during language change during an actual activation of the dialog.
- Only 2 languages are fully localized: English and German. In the original software 7 languages are supported: French, Spanish, Russian, Vietnamese and Arabian in addition to the 2 above. The missing phrases fall back to the English version.
- Bug fix: Custom Equations dialog removal problem.
Fixed the following problems:
- The Custom Equations dialog did not persist the equations added to data grid nor did it persist removed equations.
Fixed the following problems:
- Custom Equations dialog inserted formula twice on click.
- Certain insertions did select the insertion afterwards. This is fixed now and enables easy successive insertions.
- The sort functionality of the Custom Equations dialog did not work properly. One can click on the Title head to sort formulae.
- Some dialog windows were modal ones instead of non-modal. This prevented the selection of text in the editor during display of the dialog.
- The restore of window size and position was not reliable.
In the last release a few bugs have sneaked in. Those have been fixed now:
- Info dialog did not show the content of 3 tabs
- The resources dialog did not show completely
- The Title field in the Custom Equations dialog was no longer editable
Bug fixes and improvements
- Some localizations in Custom Equations dialog have been improved
- Persistence concept was improved
- Added filtering to the Custom Equations dialog
- Architectural changes
Initial release