[doc] move description and figure environment to more abstract macros