writeIn update to handle \sqrt[]{}