# [NTG-context] fitting a picture to the available space

Mojca Miklavec mojca.miklavec.lists at gmail.com
Fri Sep 12 17:20:40 CEST 2008

On Fri, Sep 12, 2008 at 12:02 PM, Wolfgang Schuster wrote:
> On Thu, Sep 11, 2008 at 6:31 PM, Mojca Miklavec
> <mojca.miklavec.lists at gmail.com> wrote:
>> On Thu, Sep 11, 2008 at 12:06 AM, Thomas A. Schmitz wrote:
>>> Hi guys,
>>>
>>> I'm pulling my hair out. I'm trying to set up an automatism to fit
>>> pictures to the available space on a slide.
>>
>> Hello,
>>
>> I'm probably talking about something else, though highly related.
>> There's one thing that I often miss on slides:
>>
>> *Here's a title*
>>
>> - here are
>> - some items
>>
>> [and I want the picture to fill up all the remaining space on slide]
>>
>> Or even if there' only title + image. I tried option=max (or something
>> similar), but always ended up setting image size manually. Most often
>> I got title on one page and image on another (It would be less painful
>> to have image on the same page, even if it hangs much over the lower
>> border - is there something similar to \placefigure[thispage] option
>> (puts the figure on the same page, even if there's no space left)?)
>>
>> Mojca
>>
>> [I need to stop asking questions now.]
>
> Quick and dirty:
>
> \showframe
>
> \starttext
>
> \input knuth
>
> \start
>
> \scratchdimen=\pagegoal
>
> \blank
>
> \hrule height \scratchdimen\relax
>
> \stop
>
> \stoptext

Thanks a lot! Two new words for my TeX dictionary (\pagegoal,
\pagetotal). Something like this (if packed inside the \placesomething
macro) would be great to have in the core as well.

I'll clone this code from now on :)

Mojca