A survey on recognition of on-line handwritten mathematical notation