Re: [NTG-context] external figure sizing

2015-05-11 Thread Csikos Bela
Peter Münster írta:
On Sat, May 09 2015, Csikos Bela wrote:

 \placefigure, \externalfigure and combinations. The images should be scaled 
 to the
 same size, eg to .25\textwith and .3\textheight so that the  aspect ratios 
 of the images
 are kept and the appropriate value is used for width or height.

What is the appropriate value?

The calculated value which pairs with  or = to the other calculated value.
For example if  the height calculated for .25\textwidth is less than 
.3\textheight
then .25\textwidth else .3\textheight should be used for calculating the size of
the image.


 That is the smaller value from .25\textwith and .3\textheight is used
 for the image size.

The smaller value from .25\textwith and .3\textheight does only depend
on the layout, but not on the image.

Of course, but the layout determines how the images has to be scaled.

This is perhaps, what you need:  maxwidth=..., maxheight=...

Exactly, this is what I need. 

Thanks,

bcsikos
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] external figure sizing

2015-05-09 Thread Hans Hagen

On 5/9/2015 10:26 PM, Csikos Bela wrote:

Hello list members:

I would like to make a photo montage (4x3 images on one page) using
\placefigure, \externalfigure and combinations. The images should be scaled to 
the
same size, eg to .25\textwith and .3\textheight so that the  aspect ratios of 
the images
are kept and the appropriate value is used for width or height. That is the 
smaller value
from .25\textwith and .3\textheight is used for the image size.

Using only \useexternalfigure[Fig1][1.jpg][width=.25\textwidth] may not give 
the correct
result if the image requires size adjustment by height and vice versa. Defining 
both
width and height results in exact resizing and the aspect ratio is not 
maintained.

How can this be solved?


\useMPlibrary[dum]

\showframe

\starttext

\setuplayout[middle]

\defineexternalfigure[quarter][factor=max]

\vbox{\dorecurse{4}{\hbox{\hsize.25\textwidth\vsize.25\textheight\dorecurse{4}{\externalfigure[dummy][quarter]

\page

\setuppapersize[A4,landscape] \setuplayout[middle]

\vbox{\dorecurse{4}{\hbox{\hsize.25\textwidth\vsize.25\textheight\dorecurse{4}{\externalfigure[dummy][quarter]

\stoptext

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] external figure sizing

2015-05-09 Thread Csikos Bela
Hello list members:

I would like to make a photo montage (4x3 images on one page) using
\placefigure, \externalfigure and combinations. The images should be scaled to 
the
same size, eg to .25\textwith and .3\textheight so that the  aspect ratios of 
the images
are kept and the appropriate value is used for width or height. That is the 
smaller value
from .25\textwith and .3\textheight is used for the image size.

Using only \useexternalfigure[Fig1][1.jpg][width=.25\textwidth] may not give 
the correct
result if the image requires size adjustment by height and vice versa. Defining 
both
width and height results in exact resizing and the aspect ratio is not 
maintained.

How can this be solved?

Thanks,

bcsikos

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] external figure sizing

2015-05-09 Thread Peter Münster
On Sat, May 09 2015, Csikos Bela wrote:

 \placefigure, \externalfigure and combinations. The images should be scaled 
 to the
 same size, eg to .25\textwith and .3\textheight so that the  aspect ratios of 
 the images
 are kept and the appropriate value is used for width or height.

What is the appropriate value?


 That is the smaller value from .25\textwith and .3\textheight is used
 for the image size.

The smaller value from .25\textwith and .3\textheight does only depend
on the layout, but not on the image.


This is perhaps, what you need:  maxwidth=..., maxheight=...

-- 
   Peter
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___