Alan Stone wrote: {\externalfigure[XY\currentheadnumber][width=0.5\textwidth]} \the\dimexpr.5\texidth\relax
{\externalfigure[XY\currentheadnumber][width=0.5\textwidth]}