From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/16444 Path: main.gmane.org!not-for-mail From: Vit Zyka Newsgroups: gmane.comp.tex.context Subject: Re: Re: externalfigure Date: Tue, 14 Sep 2004 13:02:02 +0200 Sender: ntg-context-bounces@ntg.nl Message-ID: <4146CFAA.2010005@seznam.cz> References: <4146020B.5020001@seznam.cz> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1095159779 9376 80.91.229.6 (14 Sep 2004 11:02:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 14 Sep 2004 11:02:59 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Sep 14 13:02:22 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C7B4o-0000OV-00 for ; Tue, 14 Sep 2004 13:02:22 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D9D9D12792; Tue, 14 Sep 2004 13:02:21 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31215-02-5; Tue, 14 Sep 2004 13:02:20 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CF7EB1277A; Tue, 14 Sep 2004 13:02:20 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 784791277A for ; Tue, 14 Sep 2004 13:02:19 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31215-02-4 for ; Tue, 14 Sep 2004 13:02:18 +0200 (CEST) Original-Received: from smtp.seznam.cz (unknown [212.80.76.43]) by ronja.ntg.nl (Postfix) with SMTP id C27F912778 for ; Tue, 14 Sep 2004 13:02:18 +0200 (CEST) Original-Received: (qmail 23025 invoked from network); 14 Sep 2004 11:02:18 -0000 Original-Received: from unknown (HELO ?192.168.1.45?) (vit.zyka@82.142.74.35) by smtp.seznam.cz with SMTP; 14 Sep 2004 11:02:18 -0000 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: cs, en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:16444 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:16444 >>So I thing the case should work as expected. Could you send >>complete-and-minimal example? >=20 >=20 > \starttext > \startMPcode > externalfigure "hacker.jpg" scaled 300; > \stopMPcode > \stoptext It seems to me the behaviour is perhaps not intuitive but correct. I try=20 to explain: Imagine externalfigure without scaling: externalfigure "hacker.jpg"; What we will obtain? One can imagine the image in its natural size. That=20 is not the case. We obtain the image of the size 1pt x 1pt. I thing=20 there are two reasons for that: 1) Analogy. Imagine this example: draw origin--(1,0)--(1,1)--(0,1)--cycle; it is exactly the same as draw origin--(1pt,0)--(1pt,1pt)--(0,1pt)--cycle; and it is abbreviated to draw unitsquare; and im most cases it is used with scaling draw unitsquare xscaled 2cm yscaled 1cm; since scaled X =3D xscaled X yscaled X then unitsquare scaled 2cm is still square. If you do not specify the unit, the pt is deduced. So there is an analogy: "unitfigure" 1pt x 1pt =3D externalfigure "file" 2) Technician. The scaling dimensions are calculated by TeX engine. It is done by tricks in pt units, so image 1pt x 1pt simplifies the calculations. If you want to use a bitmap in ConTeXt MP environment in its natural=20 size, I suggest to precalculate (according to Hans macro \MPfigure) its=20 dimmensions: % ------------------------------------ \def\getMPfiguresize#1{% \getfiguredimensionsonly[#1]% \freezedimenmacro\naturalfigurewidth \freezedimenmacro\naturalfigureheight } \def\naturalMPfigure#1{% externalfigure "#1" xscaled \naturalfigurewidth\space yscaled \naturalfigureheight\space } \starttext \getMPfiguresize{hacker.jpg} \startMPcode \naturalMPfigure{hacker.jpg} ; % space in front of ; is important!! \stopMPcode \startMPcode \naturalMPfigure{hacker.jpg} scaled 2 slanted .3; \stopMPcode \stoptext %------------------------- Vit Zyka --=20 V=EDt Z=FDka --- http://typokvitek.com Automatic document typesetting Automaticka sazba dokumentu -- --