Pen-based user interfaces offer tantalizing potential for mathematical software systems. In contrast to normal text, entering and editing mathematical formulae with a digital pen can be much more natural than using a keyboard. Machine recognition of mathematical handwriting, however, is more complex than recognizing natural language text. In this context it is necessary to deal with a vast array of similar symbols and the analysis of the two-dimensional syntactic structure of formulae.