converting equations to pretty formatting