ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Figure reuse
@ 2003-10-24 17:39 Nigel King
  2003-10-24 21:11 ` Patrick Gundlach
  0 siblings, 1 reply; 5+ messages in thread
From: Nigel King @ 2003-10-24 17:39 UTC (permalink / raw)


Dear Contexnicians,
I believe that pdfs can make multiple use of pictures (and other objects). I
have a fairly large picture which I want to include a number of times, once
as the full picture and several other times concentrating on a portion of
it. Are there any commands for cropping other than going through metapost?

TIA

-- 
Nigel

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

* Re: Figure reuse
  2003-10-24 17:39 Figure reuse Nigel King
@ 2003-10-24 21:11 ` Patrick Gundlach
  2003-10-25 23:03   ` Nigel King
  0 siblings, 1 reply; 5+ messages in thread
From: Patrick Gundlach @ 2003-10-24 21:11 UTC (permalink / raw)


Hi, 

> I believe that pdfs can make multiple use of pictures (and other objects). 

right.

> I have a fairly large picture which I want to include a number of
> times, once as the full picture and several other times
> concentrating on a portion of it. Are there any commands for
> cropping other than going through metapost?

Yes. Try this example. You can see from the resulting pdf file that
the cow.pdf gets included only once.


\useexternalfigure[cow]
\starttext
\setupclipping[nx=3,ny=3]
% 1/3 of a sliced cow
\hbox{%
\clip [x=1,y=2]{\externalfigure[cow]}
\clip [x=2,y=2]{\externalfigure[cow]}
\clip [x=3,y=2]{\externalfigure[cow]}
}

\blank[4*big]
% its in the details:
\scale[sx=2,sy=2]{\clip [x=2,y=2]{\externalfigure[cow]}}
\stoptext


Patrick
-- 
You are your own rainbow!

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

* Re: Re: Figure reuse
  2003-10-24 21:11 ` Patrick Gundlach
@ 2003-10-25 23:03   ` Nigel King
  2003-10-25 23:24     ` Patrick Gundlach
  0 siblings, 1 reply; 5+ messages in thread
From: Nigel King @ 2003-10-25 23:03 UTC (permalink / raw)


Patrick,
Thank you very much for this. It works very nicely creating a small file and
yet enabling a nice consistency in the document. It took me ages to find the
options for \clip your hint seemed to suggest that it was in details.pdf. It
turned out to be in the Metafun manual. I finally used
\clip[width=xxx,height=yyy,hoffset=xx,voffset=yy]{\externalfigure[pic]}

\scale I could find no documentation for but I discovered that the
\scale[width=xxxx] provides the appropriate magic when needed. It is a pity
that setup-en.pdf is not up to date with these commands the various texshow
and other web tools that people have developed are missing them as well. I
imagine a single source of all the commands would help these developers
enormously.

Thanks again
-- 
Nigel

> From: Patrick Gundlach <pg@levana.de>
> Hi, 
> 
>> I believe that pdfs can make multiple use of pictures (and other objects).
> 
> right.
> 
>> I have a fairly large picture which I want to include a number of
>> times, once as the full picture and several other times
>> concentrating on a portion of it. Are there any commands for
>> cropping other than going through metapost?
> 
> Yes. Try this example. You can see from the resulting pdf file that
> the cow.pdf gets included only once.
> 
> 
> \useexternalfigure[cow]
> \starttext
> \setupclipping[nx=3,ny=3]
> % 1/3 of a sliced cow
> \hbox{%
> \clip [x=1,y=2]{\externalfigure[cow]}
> \clip [x=2,y=2]{\externalfigure[cow]}
> \clip [x=3,y=2]{\externalfigure[cow]}
> }
> 
> \blank[4*big]
> % its in the details:
> \scale[sx=2,sy=2]{\clip [x=2,y=2]{\externalfigure[cow]}}
> \stoptext
> 
> 
> Patrick
> -- 
> You are your own rainbow!
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: Figure reuse
  2003-10-25 23:03   ` Nigel King
@ 2003-10-25 23:24     ` Patrick Gundlach
  2003-10-27  9:33       ` Nigel King
  0 siblings, 1 reply; 5+ messages in thread
From: Patrick Gundlach @ 2003-10-25 23:24 UTC (permalink / raw)



[...]

>  your hint seemed to suggest that it was in details.pdf. It
> turned out to be in the Metafun manual. I finally used

sorry, I just wanted to show the use of scaled and comment like "see
the details" (because of the enlargement), but I thought it would be
fun to misuse a well known document title. Well, it was fun, but misleading.


[...]

> that setup-en.pdf is not up to date with these commands the various texshow
> and other web tools that people have developed are missing them as well. I
> imagine a single source of all the commands would help these developers
> enormously.

setup-en.pdf, texshow, etexshow and texshow-web are using the same
source of information. Don't know about Martin's visual creators. 

We are all(?) thankful for examples and comments in texshow-web. I am
currently implementing a fulltext search.


Patrick
-- 
You are your own rainbow!

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

* Re: Re: Figure reuse
  2003-10-25 23:24     ` Patrick Gundlach
@ 2003-10-27  9:33       ` Nigel King
  0 siblings, 0 replies; 5+ messages in thread
From: Nigel King @ 2003-10-27  9:33 UTC (permalink / raw)


> We are all(?) thankful for examples and comments in texshow-web. I am
> currently implementing a fulltext search.

I wasn't meaning to complain. Your fulltext search sounds interesting.
-- 
Nigel

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

end of thread, other threads:[~2003-10-27  9:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-24 17:39 Figure reuse Nigel King
2003-10-24 21:11 ` Patrick Gundlach
2003-10-25 23:03   ` Nigel King
2003-10-25 23:24     ` Patrick Gundlach
2003-10-27  9:33       ` Nigel King

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).