Math-o-mir 1.9 build 2

I made a very light update (1.9 build 2) to Math-o-mir – you can download it from the homepage.

This update is mostly concerned with some bugs I noticed lately. Here is the full list:

  • While typing plain text, double upercase strokes CC, RR, KK, ZZ and NN (normally used to produce bold, serif letters) will now revert back to double-letter combination if you continue to type further. Due to a bug, this was not happening in the earlier version of the software.
  • In a similar way, some double-stroke combinations will not turn into alternative symbols when typed inside a variable index or while you are typing a plain text.
  • If you exit the typing mode (either with the Esc key or by right-mouse-click) while your cursor at the beginning of a newly created text line, the empty text line will be deleted. In the former software version, the empty line at the end of a text box was not deleted and this caused some awkward rendering.
  • It is still possible to select some objects with your mouse while the typing mode is still active. However, all selected objects will be deselected when you continue to type. The good thing is that you can use Del and Ctrl+X to delete/cut selected objects without exiting the typing mode (just select objects and hit the Del or Ctrl+X).
  • It cannot happen any more to carry something while the drawing mode is active – this possible due to a bug and was confusing.
  • The Math-o-mir crashed if you tried to compute expressions like: “1/(2/3)”. This now works.
  • There was a bug when you tried to compute expressions like “(a+b)*c” instead of “(a+b)c” (that is, when real multiplying dot symbol was used). This also works now.
  • The software will now generate parentheses around function arguments for function names that end with a number. For example \r3 command will generate the r3() function. In fact, am thinking that maybe it should generate parentheses for all function names except most common ones (sin, cos…). Not sure what to  do.
  • I enlarged spacing between a word and symbols like dot, comma, question mark, exclamation mark… when the presentation mode is enabled.

I noticed that I am not using paper-and-pencil any more. However I might be biased, so I cannot declare a victory yet.


Math-o-mir v1.9 release

The official Math-o-mir v1.9 can now be downloaded from the homepage. I decided to increase the version from 1.84 to 1.9 because this version includes several major changes since the last non-beta version. In any case, the list of news is here…

News regarding keyboard handling:

  • If you press a letter key and hold it down for about 0.3 seconds, the letter will turn into uppercase. This works for most keys – the long key hold generates a shifted character. This way, for example, instead of using Alt+Shift+R to place an uppercase ‘R’ letter into an exponent, you can use Alt+R (for 0.3 seconds).
  • You can adjust Math-o-mir to use the CapsLock key to toggle between math typing and text typing modes. If you want to use this option check: ‘Options->Keyboard->Use CapsLock to toggle typing mode’. Note that if you decide to use the CapsLock to toggle the typing mode, you can still use Shift+CapsLock to activate/deactivate the CapsLock function.
  • Keystrokes ‘i.’ and ‘j.’ will now typecast ‘i’ and ‘j’ letters into italic-serif font, intended to depict imaginary units. If you need to generate ‘i( )’ and ‘j( )’ functions instead, you should use ‘\i’ and ‘\j’ commands. I believe that imaginary units are typed more often that ‘i( )’ and ‘j( )’ functions and this is why I decided to use the handy ‘i.’ and ‘j.’ keystrokes to generate imaginary units.
  • Greek symbols are still generated by timed double-strokes, but now the timeout time is much longer. You can double-stroke fairly slowly and still obtain Greek symbols.
  • If an exponent box is empty and you hit the Enter key to exit the exponent box, the box will be deleted.
  • The symbolic calculator cannot be activated by the “= =” sequence any more. Instead, you must now use the “??” sequence. This is because the double-equal sequence is now used for another purpose.
  • The ‘= =’ sequence now behaves similar as the ‘++’ or ‘- -‘ sequence. It will exit a box (parentheses, fractions, functions…) and will place the equal sign outside it. If the double-equal sequence is used at the outmost equation level, then it will wrap the line. The line will be wrapped in a smart way: if the former line contains an equal sign, the new equal sign in the next line will be aligned with it (try typing: ‘m=1+2==3’ to see the effect).
  • The tab spacer character now has adjustable length. You can adjust its length using the mouse – click at its arrow tip and drag to the desired length.
  • When you hit the Alt+Enter key to wrap a math line, the lines are now left-aligned by default (until now lines were center-aligned).
  • When you type into index, or when the General Variable mode is selected, the third hit to the same letter will revert the character from Greek back to Latin. I agree, this is somewhat non-intuitive and some other way to revert Greek characters to Latin characters would be nice.

News regarding hand-drawing:

  • The colorbox is completely redesigned and is now permanently visible (except when the typing mode is active). Three additional options are added to the colorbox: node edit, crosshair cursor and select-last-drawn-object.
  • By a long right-mouse-click (hold down the right mouse button for about 0.5 seconds until a pale blue box appears, then release the button) you can display the handy hand-drawing toolbox – the same one that shows when you hit the F4 key.
  • It is possible to draw section lines and curly braces even if the typing mode is not active.
  • The way to edit drawing nodes is now different. You can turn on the ‘node edit’ icon in the colorbox and then you will be able to edit nodes for any drawing item you mouse-touch.
  • If you hold down the shift key while you are using the ‘section line’ tool, the tool will draw very thin horizontal and vertical lines – useful to draw helper/guide lines.
  • When a drawing tool is selected, the pencil-shaped mouse pointer will show a spot at its tip of the size and color that matches to the currently selected line thickness and line color.
  • It is now possible to move/stretch/rotate selections while the hand-drawing mode is active (until now you had to exit into the editing mode). You can, for example, draw something, click ALT+Spacebar to select it, and then while still in the drawing mode you can move/stretch/rotate the selected drawing.
  • The crosshair cursor is implemented. You can turn it on by enabling an icon in the colorbox, or by holding down the Ctrl key.
  • It is possible to use the spacing-feature even in the hand-drawing mode. Point your mouse pointer very close to the left border of the document window and wait until the vertical ruler appears. Then you can click-and-drag on the ruler.

Other news:

  • The ‘oneshot’ formatting mode is removed. However, the ‘oneshot’ feature can still be used because it is now possible to flag any of the ‘uniform’ formatting as ‘single-shot’ (if you do so, that uniform formatting will have an upside-down arrow displayed). In addition, uniform modes can now have various colors.
  • Two new math symbols are added: the ‘because’ symbol (three dots in a triangle formation) and the ‘per mille’ symbol. To type the ‘per mille’ symbol, hit the ‘%’ key twice.
  • Two new commands are implemented: ‘\because’ to generate the ‘because’ symbol, and ‘\angle’ to generate the angle symbol (the angle symbol is also changed a bit).
  • The ‘very large’ toolbox/toolbar size option is added to support high-resolution monitors.
  • The new section ‘Mouse’ is added into the ‘Options’ menu. Here you can define your preferences about mouse-wheel usage (zoom/scroll selection, right-button + wheel usage, scrolling speed…)
  • It is possible to hold down the right mouse button while you are turning the mouse wheel in order to toggle the mouse wheel functionality (from scroll to zoom or vice versa). The scroll function is now default function for the mouse wheel for all new users (it was zoom until now).
  • Font sizes (small, large, very large) are now a bit different. Sorry if this will cause problems to you when editing old documents.
  • You can now define the default zoom level by choosing from ‘Options->Font Size & Zoom’. The zoom level will be adjusted to the default zoom level any time you click at the ‘1:1’ icon from the toolbar.
  • It is now easier to type formulas directly into the function plotter window because you can now mouse-click anywhere on the formula to change the cursor position.
  • A left-mouse click anywhere outside the context menu box will close the context menu. Until now it was only closed when you right-clicked.
  • The “wide keyboard cursor” option is removed. Also, the “parentheses height” options are removed. The ‘/T/’ option is removed from the toolbox and does not exist any more.

I also upgraded the User manual.

Fastest release in history (beta8)!

Math-o-mir beta8 is here:

Very strange bug in the last beta7 – FileOpen and FileSave dialogs misbehaved on some systems causing application to semi-hang when one of these dialogs opened.

You can bet I am sorry for not seeing this problem 7 hours earlier!

This time the bug was not in my code, but in the MFC code. Still, the bug is very embarrassing… I wonder how many users downloaded the problematic beta 7 in last 7 hours. I can only hope that not all of them experienced problems (on 2 of 3 machines in my possession the problem is not visible).

Math-o-mir v1.84 build7 (and clickpad complaints)

Well, I decided to issue one additional beta. It is here:

What happened is that I finally obtained my new laptop with Windows 7 installed on it (until now I worked on WinXP). The Windows 7 insight showed me some bugs and awkward behaviors that I wanted to address. I solved some bugs and implemented several features:

  • I added an option to choose for ‘Very Large’ toolbox/toolbar/context menus. This is to support small-size-high-resolution displays. See under “View->Toolbox and context menu”.
  • It is now possible to select the default zoom level (80%, 100%, 120% or 150%). Until now the default zoom level was always fixed to 100%. See under “Options->Font sizes & Zoom”… This is also made to support various display resolutions.
  • You can still select from small, medium, large and very large default font sizes. However instead of 80%, 100%, 150% and 185% these options will now map to 85%, 100%, 120% and 150% relative font sizes, respectively. Obviously anyone who used the ‘large’ font size in previous version will now have to use the ‘very large’ font size to obtain the same effect… I decided to make this change to allow for finer gradation among possible font sizes.
  • I moved two options from the “View->Zoom” menu into the new  “Options->Mouse” menu.  These two options are “Mouse wheel zooms only if CTRL is held” and “Zooming with mouse wheel adjusts pointer”. I also added one new option “Reverse direction for mouse wheel scrolling”… I hope somehow that these options can help users that use a touchpad instead of a real mouse.
  • You can now close a popup context menu by simple left-click anywhere outside of it (until now left-clicking outside of an opened context menu produced an annoying beep sound).

However the main motivation to release this beta7 version is a bug I noticed on my new windows 7 machine: after installation, every time the program is started an error message box would appear saying “cannot open file!”. The remedy is to choose “Options->Save settings->Save as default”, but I suppose that most users did not even try it. I addressed this problem by changing the installation procedure to provide ‘modify’ permissions for the Math-o-mir application folder. I am not however sure this will work smoothly on every computer. Therefore I am issuing this beta 7.

To keep Math-o-mir as portable as possible, I am saving the default settings (the mathomir.set file) into the same folder where the mathomir.exe file resides. This way anyone can simply copy these two files on an USB stick and have the software ready. The problem with this solution is that two users on the same computer cannot adjust Math-o-mir default settings independently (because both will save their settings into the same mathomir.set file). Independent settings are only possible if each user makes its own copy of the software (it is 1.3MB per user)…. something to think about.


The clickpad

Now, mostly unrelated to Math-o-mir, I want to comment on the clickpad (a clickable touchpad) that came with my new laptop (a Lenovo ThinkPad). This is the first time I had a chance to work with a clickpad, and I cannot tell I am too happy. I think I would prefer separate buttons (if you don’t know yet, a clickpad has no separate buttons for left/right mouse clicks. Instead the whole surface of the touchpad is one gigantic button that can be clicked). In any case, because the Math-o-mir uses the right mouse button heavily, I am now slower than on my old laptop. I hope to improve my performance with some practice.

The clickpad is a multi-touch touchpad. This is good and I like some gestures like two-finger-scrolling and two-finger-right-clicking. There are many more gestures that the device can recognize, but the human user is a weak link here – we humans can only make a limited number of gestures in a recognizable manner. This is why I had to disable most of them.

This particular clickpad has some disadvantages:

  • It is not possible to separately set sensitivity for finger-glide and for finger-tap. I think I would prefer lighter touch when gliding, but heavier to tap.
  • It generates WM_HSCROLL messages when horizontal-scroll gesture is applied. Fine… But it generates WM_MOUSEWHEEL messages when the vertical-scroll is applied. Why? What is wrong with WM_VSCORLL messages? I suppose that this is because the WM_MOUSEWHEEL can provide smoother scrolling than the WM_VSCROLL. But the problem is that the zoom-in/zoom-out gesture also generates the WM_MOUSEWHEEL messages (now with the CTRL key pressed). This would confuse the Math-o-mir because by default  it uses the mouse wheel for zooming, not for scrolling. You can enable the “Mouse wheel zooms only if CTRL is held” option in Math-o-mir to resolve this, but the question is should I then enable this option by default?
  • When clicked, the clickpad travels a long way down (a shorter travel would be better) and a very loud and embarrassing clang sound is produced.
  • It takes some large force to produce the click. I suppose that this is inherent to all clickpads – otherwise too many accidental clicks would happen by placing a hand on it while one is typing.

In any case, I price multi-touch capability of the touchpad. I only wish to have separate buttons.

Math-o-mir v1.84 beta6

You can download the new beta6 version from:

In comparison to the last beta, there are several news:

  • A new symbol is added into the toolbox – the ‘because’ symbol (three dots in a triangle formation). Also the new command is enable (\because) that can generate this symbol.
  • The CapsLock key can now be used to toggle between Math Typing Mode and Text Typing Mode. This will only work if you enable the following options:  Keyboard->Options->Use CapsLock to toggle typing mode. Of course, once you enable this option, the CapsLock will not toggle the uppercase/lowercase letters any more. Instead, to toggle uppercase/lowercase letters then, you will have to use Shift+CapsLock or Ctrl+CapsLock.
  • Handling of Formatting modes is changed in order to simplify it. The ‘O’ (oneshot) mode is removed and now you will only find two Formatting mode icons in the toolbox (the ‘U’ and the ‘M’). However, you can still create oneshot-style fonts by checking the ‘use as singleshot’ option while defining a uniform font…..  If you already created many personalized oneshot formatting styles,  you will not have them any more. Sorry.
  • While defining fonts for uniform ‘U’ formatting styles, you can now also choose font color.
  • A nasty special handling is introduced when typing indices (indexes). If you now hit the same letter three times in a row, a Greek symbol (that is going to be created after the second key hit) will be reverted back into two Latin letters… This special handling was needed to enable easier typing for variables with double-Latin letters in indices (like ‘Vcc’ or ‘Vpp’).
  • The Handy Help is updated

Somehow I hope that this is the last beta before the v1.84 official release. Not many new features are planed, if any (perhaps: I am investigating a possibility to store all symbols that are deleted with the backspace key into some special clipboard. Then, using some special keystroke you could  paste this special clipboard… The problem is that I don’t know what special keystroke combination to use. .. Still the feature is appealing because it seems faster than the  standard cut-paste operation in many cases.)

Nuts and bolts of fast math typing

Typing mathematics is hard, much harder than typing a plain text. One reason is the math notation: because math equations have much more complex structure and use many more symbols than plain-text lines. Another reason is the keyboard: because keyboards are engineered for plain-text entry, not for math entry… Alternative computer-entry techniques, like handwriting recognition or even speech recognition, will also bump into major problems with mathematics. When one considers the future of math entry, the following facts should be kept in mind:

  • Keyboards will never change to accommodate for math typing needs. There are just too few people in this world that are in need to type lots of math.
  • Handwriting recognition is going to advance and likely, one day, it will be able to recognize all the symbols needed. The main problem with this future handwriting recognition technology is that it has limited potential to speed up math writing or to make it any easier compared to today’s pencil-and-paper technology.
  • Speech recognition is in deep trouble because we don’t even know how to pronounce more complex math equations. Speech recognition alone is also very useless when you want to make a quick illustrative sketch (a hand-drawing) of a math problem.

As a result, I am guessing that in the observable future most people will use handwriting recognition to enter few math lines now and then. Those that will need to enter tons of mathematics might choose to learn and use ten-fingers-and-a-keyboard method – supposing that keyboards are still going to be around. At this moment the keyboard seems irreplaceable in the working environment, but in future some technologies might replace it. Handwriting is too slow (unless we all learn stenography). Speech recognition might become a primary data-entry interface in future. We will invent new words that will help us with editing and stuff where today’s vocabulary seems cumbersome. Speech recognition might also be accompanied with the eye-tracking technology so that computer will know what part of our document we are referring to… If we allow ourselves even more speculations, we may come up with some direct-to-brain interfaces and so on (but then the question is how much time we will have in order to invent these new technologies before sentient computers take over the further progress of our world).

Here and now, the Math-o-mir uses keyboard. I wanted to clearly present core ideas of how math typing is implemented in the Math-o-mir software. The following table shows how variables and symbols are typed.


As you can see, the software uses double-strokes to create Greek symbols. This idea, I feel, is not always a perfect solution. I would prefer to have an alternative way to convert a Latin symbol into a Greek symbol – for example typing ‘x’ and then hitting some other key to make the conversion. The problem is that I have no free keys left.

As you can also see, there are two ways to generate uppercase symbols (that is, symbols that are generated with the shift key). The first method is, of course, to use the Shift key. The second method is to press-and-hold a key for about 0.5 seconds. The second method is pretty much useless in the above simple examples, but it becomes useful when entering exponents or indices (indexes).

To enter an exponent you generally use the hat character ‘^’ (alternatively you can use the double-quotation mark character that is easier to type on some keyboards). However, many times it is quicker to divert characters into exponents by using the Alt key. This is shown in the table below.


Holding down the Alt key while you are typing places characters into exponent. Now it makes much more sense to use the press-and-hold method to place uppercase symbols into exponents because this way you avoid the need to hold down three keys simultaneously (shift+alt+some_key).

The Alt key was chosen because on many keyboard you can hold it with your thumb finger. The problem is that the Alt key is used for menu access in Windows. Therefore using Alt+F, Alt+E and Alt+V combinations will not work unless you configure your Math-o-mir to ignore these menu access shortcuts. I can only hope that in future Microsoft will not reserve the Alt key for some additional tasks.

To enter an index, you generally use the underline ‘_’ key. Sure, there is also a quicker way to enter simple indices: hold down the Spacebar key while you are typing. This is completely analog to the exponent typing, as it can be seen in the table below.


The Spacebar is also chosen because it can be held down with the thumb finger so that you can type with your other 9 fingers. The only possible problem with the spacebar is that it is not common to use Spacebar+some_key combinations. I am even afraid that there might be some keyboards around that might not allow such combinations.

Keyboard usage innovations mentioned above are not nearly enough to type mathematics. In Math-o-mir there are many more. Few of them are not obvious, but I think are useful enough so that every serious user should learn them.


  • I already said that the ‘hat’ and the underline characters are used to generate exponents and indices, respectively. This is not an innovation. However, on most keyboards the Shift (or even the AltGr) must be used to generate these characters. Especially the hat key is problematic on some keyboards where it acts as a dead key – that is why in Math-o-mir you can also use the double-quotation mark key instead of the hat key.
  • To generate fraction lines in Math-o-mir you need to stroke the slash key twice. This is neither very quick nor it is an intuitive way to type simple fractions (like ½). To quickly type simple fractions I am therefore recommending the hash key ‘#’ (or the grave accent key). The difference is that in the first case you start the fraction by generating the fraction line (by double-stroking the slash key), while in the second case you start by typing the numerator and then you put the fraction line under it (by stroking the hash key). I urge users to learn both these methods. Remember that even when you are using pencil-and-paper, you will typically start a complex fraction by drawing a fraction line first, while you will start with the numerator if you are writing down a simple fraction.
  • Multi-letter variables are, in my opinion, the future of math notation on computers. In Math-o-mir there are two ways to enter the multi-letter variables. I recommend that you choose one of them and stick to it. The first method is displayed in the table above and involves the apostrophe key: start the multi-letter variable with the apostrophe key and end it with the spacebar key or any math operator key. But if you type multi letter variables very often then maybe the second method would be a better choice for you: select the ‘Options->Keyboard->General Variable Mode’ option and type the multi-letter variables without the apostrophe key.
  • Finally, there is the dot (period) key conversion method. The dot key will convert a variable (or variables) that you just typed into a function. I am very proud on this innovation, but several questions remain. First, how many users are interested in making distinction between functions and variables? In math, when you see an expression like ‘y(x+1)’ you cannot be sure if this is function ‘y’ that has ‘x+1’ into its argument, or if this is just en expression equal to ‘yx+y’. That is why in Math-o-mir there is a clear distinction between functions and variables. However, for users that are only interested in equation look, the distinction between functions and variables is just an annoyance. Second, would then it be better to use the handy dot conversion method to generate Greek symbols or measurement units instead? Functions can be generated using the backslash key anyway.

Here is an example how to type an equation (note that there are many ways to type the same equation – for example instead using the ‘Enter =’ one can stroke the ‘=’ key twice)


There is one more keystroking that needs to be discussed – the Alt+Spacebar keystroke. This keystroke toggles between math-typing and plain-text-typing mode. Some users use it very often… I would prefer to have some handier, single-key method to toggle between typing modes. The only obvious candidate key for such function is the CapsLock key. The CapsLock key is unfortunately still used by some people, especially in some countries. Sometimes it is used to differentiate between, say, Cyrillic and Latin character set… In fact, even the Alt+Spacebar combination is used under Linux for system menu access (I recommend Linux users to use Spacebar+Alt to toggle typing modes in Math-o-mir). I also implemented double-stroke-comma method to toggle the typing mode because the comma key is always easy to type on all keyboard layouts. But the double-stroke-comma method also has its drawbacks and I wonder if the double-stroke-comma could be put into a better use.

What about the Ctrl key? The Ctrl key is dedicated to user-defined accelerator shortcuts. The only exceptions are Ctrl+X (cut), Ctrl+C (copy), Ctrl+V (paste), Ctrl+Z (undo), Ctrl+S (save). Oddly, the Ctrl+X can also be used to generate the multiplying cross sign.

At the end, I want to discuss variable formatting and decorations. This includes font type, bold and italic settings for a variable as well as decorations above (arrow, dash, dot, double dot, hat…). There are two ways to control variable formatting in Math-o-mir:

  • You can choose font and decorations in advance (in Math-o-mir you can even select font and decorations for every letter key separately). You can prepare several different font -and-decoration configurations and quickly choose between them by using user-defined Ctrl accelerators… However choosing font and decoration in advance is not very handy if you need to type just one letter formatted in different style. Therefore it is also important that…
  • You can modify font and decorations after you already typed the variable… For example Alt+comma and Alt+period combinations can be used to add decorations (vector arrow, dash, dot, double dot) over variables that you just entered. More generally you can select the variable you just entered by using Shift+left_arrow key and then modify it by typing ‘b’ (bold), ‘i’ (italic), ‘u’ (underline), ‘s’ (strikeout), ‘r’ (red), ‘g’ (green). However, using Shift+left_arrow is not at all that handy and I desperately need one single easy-to-type key that will select the last entered variable. Also I could use some key combinations to quickly make a variable bold or italic.

Math-o-mir 1.84 beta5

Download the Math-o-mir v1.84 beta5 from:

The new beta has several new features:

  • The double-stroke timeout time for typing Greek symbols is extended considerably. It is now set to about 1s, while it was set to 250ms in earlier versions. I hope that this will make it easier to stroke Greek symbols… (To type the same Latin-script variable twice, one after the other, you should hit the spacebar in between to speed up your typing.)
  • If an exponent-box is empty and you hit the enter key to exit from it, the exponent-box will be deleted.
  • The handy popup-drawing-toolbox that gets displayed when you hold down the right mouse button for about 1sec now behaves less intrusive. The toolbox is not fully shown until you release the right-mouse button. This way the toolbox does not interfere that severely with the right-click-and-drag screen scrolling feature.
  • Typing the ‘==’ (double equal sign) sequence now has the revised behavior! Instead of activating the symbolic calculator, the ‘==’ sequence now behaves similarly as the ‘++’ and ‘—‘ sequences (wraps the line, or exits from a child box).
  • To activate the symbolic calculator, instead of the ‘==’ sequence use the ‘??’ sequence (double question mark)… I am aware that using ‘??’ is less convenient than using ‘==’.
  • You can now modify the length of the tab spacers using your mouse. Point at the tab spacer head and then click-and-drag as shown in the picture below.


In this beta I tried to make it easier to type multi-line equations. You can now use the ‘==’ sequence in three possible ways (the picture below shows these three methods side-by-side):

  • Type the ‘==’ sequence at the end of a line. The line will be wrapped, and the generated equal sign will be aligned with the first occurrence of an equal sign in the previous line.
  • Type the ‘==’ sequence at the beginning of a line. First wrap a line using Alt+Enter and then use the ‘==’ sequence to align the equal sign with the first occurrence of an equal sign in the previous line. The difference compared to the first point is that in this case there will be no equal sign at the end of the previous line.
  • Type the ‘==’ sequence at the beginning of a new object. This is similar as in the previous point, but instead of Alt+Enter you would simply use the Enter key at the end of a line. The result is that each line is a separate object.


Beta5 bonus: I finally managed to remove those annoying beep sounds produced by Windows when the ALT key is used to type exponents.


Get every new post delivered to your Inbox.