On Tue, 16 Oct 2012, Hans Hagen wrote:
On 16-10-2012 23:08, Aditya Mahajan wrote:
Hi,
If scale option for a figure is set, \externalfigure does not honor the width and the height parameters. For example
\externalfigure[cow][width=1cm, height=3cm, scale=750]
gives a figure which has the usual aspect ratio.
I know that settings scale=... along with width and height does not make sense. But, in one of my project, I set
\setupexternalfigures[scale=750]
as that makes sense for most of the figures, and if I try to use
\externalfigure[cow][width=1cm, height=3cm]
then the aspect ratio of the figures does not change.
Not sure if this should be classified as a bug, but I am posting it here in case anyone else encounters the same issue and needs to know how to override this behavior:
\externalfigure[cow][width=1cm, height=3cm, scale=]
if needed you can use an abstraction:
\starttext
\defineexternalfigure[whatever][width=3cm,height=4cm] \defineexternalfigure[another] [scale=500]
\externalfigure[cow] \externalfigure[cow][whatever] \externalfigure[cow][another]
\stoptext
I actually use these abstractions, but with the default value also set. That's the whole point of having the defaults, right? So, my current solution is: \setupexternalfigures[scale=750, factor=max, maxwidth=\textwidth, maxheight=\textheight] \defineexternalfigure[grid] [width=0.55\paperwidth, height=0.33\paperwidth, scale=, factor=] Around five months ago, I did not need to reset scale and factor. Aditya