From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/35485 Path: news.gmane.org!not-for-mail From: Giuseppe Bilotta Newsgroups: gmane.comp.tex.context Subject: factor=fit images don't fit Date: Fri, 20 Jul 2007 01:23:14 +0200 Message-ID: <10310609774.20070720012314@iol.it> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1184887417 23946 80.91.229.12 (19 Jul 2007 23:23:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Jul 2007 23:23:37 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Fri Jul 20 01:23:35 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1IBfLL-00087e-8U for gctc-ntg-context-518@m.gmane.org; Fri, 20 Jul 2007 01:23:35 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6491C1FE6A; Fri, 20 Jul 2007 01:23:34 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04041-06-2; Fri, 20 Jul 2007 01:23:25 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1EC111FE4B; Fri, 20 Jul 2007 01:23:25 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9A1801FE3E for ; Fri, 20 Jul 2007 01:23:22 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04041-06 for ; Fri, 20 Jul 2007 01:23:19 +0200 (CEST) Original-Received: from averell.tiscali.it (averell.tiscali.it [213.205.33.55]) by ronja.ntg.nl (Postfix) with ESMTP id EA7B11FE4B for ; Fri, 20 Jul 2007 01:23:18 +0200 (CEST) Original-Received: from [192.168.0.3] (62.10.76.119) by averell.tiscali.it (7.3.122) id 468D1A800021A65D for ntg-context@ntg.nl; Fri, 20 Jul 2007 01:23:18 +0200 X-Mailer: The Bat! (v3.5.25) Professional X-Priority: 3 (Normal) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:35485 Archived-At: Hello all, I have to place a number of images into some given-size frames in a layer. The images should be scaled proportionally to fit into the frame. The code I'm working with is: \defineframed[framedimg][ frame=on,framecolor=elux, background=color, backgroundcolor=white, width=\wdfig, height=\htfigone, offset=overlay, ] \setlayer[figs][voffset=\nextfigvoff]{% \framedimg{% \externalfigure[#1][ factor=fit, % maxwidth=\wdfig, % maxheight=\htfigone, % frame=on, ]% }% }% where \wdfig, \htfigone are the frame size and \nextfigvoff is the vertical offset which must be placed. I've tried factor=fit, factor=max, but in both cases I get images which cross the boundaries of the frame, mostly in the horizontal direction. If I add the maxwidth/maxheight specification, images don't get scaled at all. I would expect factor=fit to scale the image in such a way that the biggest direction fits into the enclosing box, while factor=max would scale the image in such a way that the smallest direction fits into the enclosing box. Instead, in both cases the vertical direction is being fitted, with no apparent consideration for the horizontal direction. What am I doing wrong and what should I do to fix it? -- Giuseppe "Oblomov" Bilotta ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________