Subject: | |
From: | |
Reply To: | |
Date: | Mon, 26 Jan 2015 13:57:13 +0100 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On Mon, Jan 26, 2015 at 11:54:02AM +0000, Joseph Wright wrote:
>On 26/01/2015 09:55, Alexander Grahn wrote:
>> Good morning,
>>
>> I have just noticed that \box_resize_to_ht:Nn forces the given box
>> into a square instead of scaling the width appropriately. The other,
>> \box_resize_to_wd:Nn works as expected as it preserves the original
>> aspect ratio:
>>
>> \documentclass{article}
>> \usepackage{expl3}
>> \usepackage{graphicx}
>> \usepackage{mwe}
>>
>> \begin{document}
>> \newsavebox\picbox
>> \savebox\picbox{\includegraphics{example-image-a}}
>>
>> \typeout{orig. size: \the\wd\picbox\space X \the\ht\picbox}
>>
>> \ExplSyntaxOn
>> \box_resize_to_ht:Nn\picbox{60pt}
>> \ExplSyntaxOff
>> \typeout{\string\box_resize_to_ht:Nn \the\wd\picbox\space X \the\ht\picbox}
>>
>> \savebox\picbox{\includegraphics{example-image-a}}
>> \ExplSyntaxOn
>> \box_resize_to_wd:Nn\picbox{60pt}
>> \ExplSyntaxOff
>> \typeout{\string\box_resize_to_wd:Nn \the\wd\picbox\space X \the\ht\picbox}
>>
>> \end{document}
>>
>> Kind regards,
>> Alexander
>>
>
>Logged as #202 (https://github.com/latex3/svn-mirror/issues/202). I see
>where the issue is: fix coming up. Is an 'urgent' release of expl3
>required to deal with this?
Thanks! I think there is no rush with updating expl3. Just keep with the
planned schedule.
>BTW, I assume that the resize functions are useful. Do the current
>interfaces make sense: they are down as 'experimental' but I do wonder
>if they should get moved to 'stable'.
In my opinion the set of \box_resize_* functions is complete, as it allows
for independently resizing width and [total]height (while, if necessary,
making use of \box_[wd|ht]:N for the dimension to keep unchanged), as well
as for resizing one of width or [total]height with preserved aspect ratio.
Thanks a lot for providing the functions! Moving them to stable is up to
your decision.
Kind regards,
Alexander
|
|
|