ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Scaling figures
@ 2002-04-24  9:13 Jaroslav Snajdr
  2002-04-24 11:40 ` Hans Hagen
  2002-04-24 11:43 ` Nigel King
  0 siblings, 2 replies; 4+ messages in thread
From: Jaroslav Snajdr @ 2002-04-24  9:13 UTC (permalink / raw)


Hello,

I write a document that contains a lot of figures - screenshots. And I
have a problem with their scaling. They look the best if I write

\externalfigure[window.png][scale=3000]

However, some screenshots are so large that they are wider that the
paper. So, what I need is to tell context to use scale=3000 most of the
time, but if the figure would be wider than \textwidth, just scale the
figure to \textwidth.

\setupexternalfigures[xmax=\textwidth]

doesn't work for me. Any clue?

Thanks,
J. Snajdr


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Scaling figures
  2002-04-24  9:13 Scaling figures Jaroslav Snajdr
@ 2002-04-24 11:40 ` Hans Hagen
  2002-04-24 11:43 ` Nigel King
  1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2002-04-24 11:40 UTC (permalink / raw)
  Cc: Context list

At 11:13 AM 4/24/2002 +0200, Jaroslav Snajdr wrote:
>Hello,
>
>I write a document that contains a lot of figures - screenshots. And I
>have a problem with their scaling. They look the best if I write
>
>\externalfigure[window.png][scale=3000]
>
>However, some screenshots are so large that they are wider that the
>paper. So, what I need is to tell context to use scale=3000 most of the
>time, but if the figure would be wider than \textwidth, just scale the
>figure to \textwidth.
>
>\setupexternalfigures[xmax=\textwidth]

\externalfigure[window.png][scale=3000,maxwidth=\textwidth,maxheight=\textheight]

or (dirty untested trick):

\useexternalfigure[screenshot][screenshot][scale=3000,.....]

\externalfigure[window.png][screenshot]

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Scaling figures
  2002-04-24  9:13 Scaling figures Jaroslav Snajdr
  2002-04-24 11:40 ` Hans Hagen
@ 2002-04-24 11:43 ` Nigel King
  2002-04-24 13:30   ` Hans Hagen
  1 sibling, 1 reply; 4+ messages in thread
From: Nigel King @ 2002-04-24 11:43 UTC (permalink / raw)


> \setupexternalfigures[xmax=\textwidth]

\externalfigure[window.png][width=\textwidth]

isn't quite as automatic as you want but works for my figures.
-- 
Nigel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Scaling figures
  2002-04-24 11:43 ` Nigel King
@ 2002-04-24 13:30   ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2002-04-24 13:30 UTC (permalink / raw)
  Cc: Jaroslav Snajdr, ntg-context

At 12:43 PM 4/24/2002 +0100, Nigel King wrote:
> > \setupexternalfigures[xmax=\textwidth]
>
>\externalfigure[window.png][width=\textwidth]
>
>isn't quite as automatic as you want but works for my figures.

in your case:

\externalfigure[..][maxwidth=\textwidth,maxheight=.8\textheight,factor=max]

may work out well

factor or b/hfactor in that case will scale to the available size

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-04-24 13:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-24  9:13 Scaling figures Jaroslav Snajdr
2002-04-24 11:40 ` Hans Hagen
2002-04-24 11:43 ` Nigel King
2002-04-24 13:30   ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).