Added handling of figure and figcaption.