Changes one math environment to another math environment.