Understanding Mathematics: A System for the Recognition of On-Line Handwritten Mathematical Expressions