[dev-context] 2 patches for grph-inc
Aditya Mahajan
adityam at umich.edu
Fri Sep 14 00:07:21 CEST 2012
On Thu, 13 Sep 2012, Peter Münster wrote:
> On Fri, Sep 07 2012, Aditya Mahajan wrote:
>
>>> + \edef\current_width{\externalfigureparameter\c!width}%
>>> + \edef\current_height{\externalfigureparameter\c!height}%
>>> + \def\nocrap##1{\doifnotemptyvalue{##1}{%
>>> + \the\dimexpr\csname##1\endcsname\relax}}%
>>
>> It is better to use a more meaningful name. This can be a general macro that
>> will be useful outside of the figure inclusion code as well.
>
> Ok. What about \scratch_current_width, \scratch_current_height,
> \scratch_nocrap ? Or something similar...
Hans already added a generic function \setemeasure to syst-aux, that can
be used here.
Note that a simple \doifnotemptyvalue is not enough. I can pass values
like 'fit', 'max', etc to height and width keys, so you must check if what
is being passed is a dimension before calling \dimexpr.
Aditya
More information about the dev-context
mailing list