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
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!
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
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
[...]
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!
participants (2)
-
Nigel King
-
Patrick Gundlach