Bug in \externalfigure[...][factor=max]
\externalfigure[...][factor=max] behaves incorrectly (or at lease does not behave as expected) when the width of the figure is less than the height. Minimal example: \startbuffer \startTABLE[frame=off,align={middle,lohi}] \NC none \NC \externalfigure[cow][ratio] \NC \NR \NC max \NC \externalfigure[cow][ratio][factor=max] \NC \NR \NC fit \NC \externalfigure[cow][ratio][factor=fit] \NC \NR \stopTABLE \stopbuffer \starttext \subject {Width > Height} \defineexternalfigure[ratio][height=1cm,width=5cm] \getbuffer \subject {Height > Width} \defineexternalfigure[ratio][width=1cm,height=5cm] \getbuffer \stoptext See attached output. I thought that factor=max scales the figure (while maintaining the aspect ratio) until the used_width > asked_width and used_height > asked_height. Looking at the grph-inc.mkiv (in particular \grph_scale_apply_size), I no longer understand what factor=max is supposed to do! facor=fit seems to behave as expected, although I don't understand the purpose of factor=broad (why subtract 4*bodyfont? To fit the caption?) Aditya
participants (1)
-
Aditya Mahajan