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

2008-09-12 Thread Wolfgang Schuster
On Thu, Sep 11, 2008 at 11:50 PM, Thomas A. Schmitz [EMAIL PROTECTED] wrote: On Sep 11, 2008, at 7:59 PM, Thomas A. Schmitz wrote: On Sep 11, 2008, at 6:20 PM, Thomas A. Schmitz wrote: \starttext \start \setbox\scratchbox\vbox{\externalfigure[mill]} \dimen0=\wd\scratchbox

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

2008-09-12 Thread Wolfgang Schuster
On Thu, Sep 11, 2008 at 6:31 PM, Mojca Miklavec [EMAIL PROTECTED] 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

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

2008-09-12 Thread Thomas A. Schmitz
On Sep 12, 2008, at 9:14 AM, Wolfgang Schuster wrote: You should close the box before you want to get it's dimensions. :-) That seems like a reasonable suggestion... I had been copy-pasting and adapting my code. \unprotect \def\bf{bf} \presetlocalframed[\bf]

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

2008-09-12 Thread Mojca Miklavec
On Fri, Sep 12, 2008 at 12:02 PM, Wolfgang Schuster wrote: On Thu, Sep 11, 2008 at 6:31 PM, Mojca Miklavec [EMAIL PROTECTED] 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

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

2008-09-12 Thread Hans Hagen
Mojca Miklavec wrote: 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. this is actually what factor=max uses (grep for pagegoal in context/base) hpwever,

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

2008-09-11 Thread Hans Hagen
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. I need to consider three parameters: 1. If the user supplies a value for width= or height= , use this value (captured in a macro); 2.

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

2008-09-11 Thread Thomas A. Schmitz
On Sep 11, 2008, at 9:28 AM, Hans Hagen wrote: \starttext \framed[width=5cm,height4cm]{\externalfigure[mill.png] [maxwidth=3cm,maxheight=4cm,width=10cm]} \stoptext seems to work Ah of course! I could set the width to an absurdly high number and so make sure that it will always reach

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

2008-09-11 Thread Thomas A. Schmitz
On Sep 11, 2008, at 10:04 AM, Thomas A. Schmitz wrote: On Sep 11, 2008, at 9:28 AM, Hans Hagen wrote: \starttext \framed[width=5cm,height4cm]{\externalfigure[mill.png] [maxwidth=3cm,maxheight=4cm,width=10cm]} \stoptext seems to work Ah of course! I could set the width to an absurdly

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

2008-09-11 Thread Peter Rolf
Thomas A. Schmitz schrieb: On Sep 11, 2008, at 10:04 AM, Thomas A. Schmitz wrote: On Sep 11, 2008, at 9:28 AM, Hans Hagen wrote: \starttext \framed[width=5cm,height4cm]{\externalfigure[mill.png] [maxwidth=3cm,maxheight=4cm,width=10cm]} \stoptext seems to work Ah of course! I could

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

2008-09-11 Thread Wolfgang Schuster
On Thu, Sep 11, 2008 at 3:28 PM, Thomas A. Schmitz [EMAIL PROTECTED] wrote: On Sep 11, 2008, at 10:04 AM, Thomas A. Schmitz wrote: On Sep 11, 2008, at 9:28 AM, Hans Hagen wrote: \starttext \framed[width=5cm,height4cm]{\externalfigure[mill.png] [maxwidth=3cm,maxheight=4cm,width=10cm]}

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

2008-09-11 Thread Thomas A. Schmitz
On Sep 11, 2008, at 4:01 PM, Peter Rolf wrote: Hi Thomas, I tried the above solution for the creation of figure libraries a few hours ago... with the same result. Using 'height=10cm' instead of 'width=10cm' should work in this case. At least this workaround gives the right results for my

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

2008-09-11 Thread Hans Hagen
Thomas A. Schmitz wrote: On Sep 11, 2008, at 4:01 PM, Peter Rolf wrote: Hi Thomas, I tried the above solution for the creation of figure libraries a few hours ago... with the same result. Using 'height=10cm' instead of 'width=10cm' should work in this case. At least this workaround gives

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

2008-09-11 Thread Thomas A. Schmitz
On Sep 11, 2008, at 4:13 PM, Wolfgang Schuster wrote: On Thu, Sep 11, 2008 at 3:28 PM, Thomas A. Schmitz [EMAIL PROTECTED] wrote: On Sep 11, 2008, at 10:04 AM, Thomas A. Schmitz wrote: On Sep 11, 2008, at 9:28 AM, Hans Hagen wrote: \starttext

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

2008-09-11 Thread Mojca Miklavec
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

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

2008-09-11 Thread Hans Hagen
Thomas A. Schmitz wrote: On Sep 11, 2008, at 4:13 PM, Wolfgang Schuster wrote: On Thu, Sep 11, 2008 at 3:28 PM, Thomas A. Schmitz [EMAIL PROTECTED] wrote: On Sep 11, 2008, at 10:04 AM, Thomas A. Schmitz wrote: On Sep 11, 2008, at 9:28 AM, Hans Hagen wrote: \starttext

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

2008-09-11 Thread Thomas A. Schmitz
On Sep 11, 2008, at 6:20 PM, Thomas A. Schmitz wrote: \starttext \start \setbox\scratchbox\vbox{\externalfigure[mill]} \dimen0=\wd\scratchbox \dimen2=\ht\scratchbox \framed[frame=on,strut=no,width=8cm,height=2cm] {\dimen1=\hsize \divide\dimen1 by \dimen0 \dimen3=\vsize

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

2008-09-11 Thread Thomas A. Schmitz
On Sep 11, 2008, at 7:59 PM, Thomas A. Schmitz wrote: On Sep 11, 2008, at 6:20 PM, Thomas A. Schmitz wrote: \starttext \start \setbox\scratchbox\vbox{\externalfigure[mill]} \dimen0=\wd\scratchbox \dimen2=\ht\scratchbox \framed[frame=on,strut=no,width=8cm,height=2cm] {\dimen1=\hsize

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

2008-09-10 Thread Thomas A. Schmitz
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. I need to consider three parameters: 1. If the user supplies a value for width= or height= , use this value (captured in a macro); 2. respect the maxwidth and maxheight