Only escape maths brackets when in maths mode