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.

A bug corrected in Math-o-mir 1.84 beta4

You can download the new beta4 version of the Math-o-mir, fast-math-typing notepad software, from:

The last beta3 had an evident bug that prevented entering Greek symbols into exponents when the faster Alt+key method was used. The bug was caused by interference with the newly-added code that generates uppercase letters if a letter key is pressed and held for some time (cca 0.5 seconds). This is now corrected in the new beta4. In addition, there are several new features that are also implemented in the new beta4 (and of course, new bugs might be introduced as well):

  • The single-finger-shift-key feature is expanded to work with  symbol keys and number keys as well (until now, it was only used on letter keys). As I sad already in my last post, when you press and hold a key for about 0.5 seconds, it will generate a character that is normally produced by using shift+that_key combination. This feature is intended as a way to avoid three-key combinations when typing some characters into exponents (Alt+Shift+Key) or into indexes (Spacebar+Shift+Key)… This feature uses some programing tricks and I am not sure it will work perfectly on all computers – let me know if you experience problems. I already know that it will not work good when user switches keyboard layout during his/her work – something that is routinely done in non-Latin script languages.
  • I added several new options into the colorbox: “Node-Edit mode”, “Crosshair cursor” and “Select last element”. Consequently, I removed the “Node-Edit mode” option from the toolbar and from the context menu . The “Select last element” option does the same as the Alt+Spacebar key-press combination:  it selects document elements beginning from the most freshly-created one. The reason I added the “Select last element” option as a button into the colorbox is educational – I wanted that users learn that this useful option exists (users never read user manuals).
  • Crosshair cursor is implemented. I am not sure this option is that useful as  hoped it will be.  I will wait and see. If the crosshair cursor option does not prove its usefulness, I will remove it.
  • The ‘\e’, ‘\i’ and ‘\j’ commands are not going to generate italicized ‘e‘, ‘i‘ and ‘j‘ letters any more. Instead, these command are going to generate ‘e( )’, ‘i( )’ and ‘j( )’ functions. To generate italicized letters (often used to represent the natural number and imaginary units) you can use ‘e.’, ‘i.’ and ‘j.’ keystrokes  (that is, the mighty-dot conversion method)… By the way, any single-letter function generated by the ‘\’ command casting method is now going to generated functions that already have visible parentheses around its argument.

I was thinking about three additional problems: a) how to simplify formatting modes – the ‘O’, ‘U’ and ‘M’ toolbox options; b) how to simplify entering units of measurement; and c) how to simplify entering degrees of arc and degrees of Celsius.  At the moment I did not reach any conclusion… Also, how to quickly modify the formatting for the last entered variable (bold/italic/underline)… Also, how to type chemistry formulas…

Math-o-mir 1.84 beta3 (and file-hosting changes)

You can download the new beta (1.84 beta3) from

Several bugs are corrected and two new features added:

  • You can generate uppercase letters by holding down a key for about 0.5 seconds. This actually only works if your keyboard has auto-repeating option enabled (and maybe I should change the implementation not to depend on this setting). The reason why I implemented this is because it is difficult to produce 3-key combinations when typing uppercase letters into exponents or indexes – for example, to type uppercase letter ‘R’ into a variable index, you had to use Spacebar+Shift+R combination; now you can just use  Spacebar+R and hold it for about 0.5 seconds… I am actually very happy with this feature, but let me know if you have any objection.
  • When typing formulas directly into the function plotter, it is now possible to aim-and-click with mouse to change the keyboard cursor position.

I decided not to use the free file sharing service for software distribution, at least for the moment. The reason is because they allow advertisements that confuse users (like a large ‘download here’ advertising buttons).  At the same time, it happened that the excellent file sharing service is discontinued. The UbuntuOne allowed free file hot-linking, and this is a great loss for the free part of the internet… Anyway, the only option left to me to share files is the Dropbox. I hope that it will work fine – let me know if you find any problem with their file-sharing service… By the way, the free internet seems to be shrinking and I don’t think that the Dropbox will allow free file hot-linking for very long.

Last several days I used Math-o-mir to prepare a document that examines stepper motor vibrations (by the way, you can see it here).  This helped me to detect some bugs that I corrected in this beta. I want to remind you that I would love to publish any document that you prepared with Math-o-mir’s help if you would like to show it to the public.


Get every new post delivered to your Inbox.