Add code to parse figures with captions.