update macro for HTML mode