From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/30908 Path: news.gmane.org!not-for-mail From: nico Newsgroups: gmane.comp.tex.context Subject: Re: calculations Date: Wed, 20 Sep 2006 00:40:56 +0200 Message-ID: References: <93F3046C-F059-4C5D-AC7F-73DFD5A4AAD6@fiee.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1158705280 3477 80.91.229.2 (19 Sep 2006 22:34:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 19 Sep 2006 22:34:40 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Sep 20 00:34:36 2006 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 ciao.gmane.org with esmtp (Exim 4.43) id 1GPoAa-0007qP-VL for gctc-ntg-context-518@m.gmane.org; Wed, 20 Sep 2006 00:34:25 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4719F1FEC7; Wed, 20 Sep 2006 00:34:24 +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 12800-04; Wed, 20 Sep 2006 00:34:18 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5DF5C1FEC2; Wed, 20 Sep 2006 00:34:17 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 791651FEC2 for ; Wed, 20 Sep 2006 00:34:13 +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 13615-02-2 for ; Wed, 20 Sep 2006 00:34:07 +0200 (CEST) Original-Received: from swip.net (mailfe10.tele2.fr [212.247.155.44]) by ronja.ntg.nl (Postfix) with SMTP id C4D211FEBE for ; Wed, 20 Sep 2006 00:34:06 +0200 (CEST) X-T2-Posting-ID: 3brHPWvyEzVNt0QNlxQWsxGJRDYe7rueGgqwO1zxZAg= X-Cloudmark-Score: 0.000000 [] Original-Received: from [83.177.197.172] (HELO localhost) by mailfe10.swip.net (CommuniGate Pro SMTP 5.0.8) with ESMTP id 114164984 for ntg-context@ntg.nl; Wed, 20 Sep 2006 00:34:05 +0200 Original-To: "mailing list for ConTeXt users" In-Reply-To: User-Agent: Opera M2/7.54 (FreeBSD, build 955) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:30908 Archived-At: On Wed, 20 Sep 2006 00:04:33 +0200, Henning Hraban Ramm wrote: > Thank you, but now I always get: > > ! Illegal unit of measure (pt inserted). > > . > \figurewidth ->545. > 03625pt > \dodostartlilypond ...expr (\LPscale \figurewidth > ) \ifdim \FigWidth > >\localh... \figurewidth is not a dimension. I guess the following should work: \def\LPscale{.6315789} % downscale the image \ifvmode \getfiguredimensions[\bufferprefix lilypond-\the\lily!figures.pdf][]% \leavevmode% \newdimen\FigWidth \newdimen\FigWidthReal=\figurewidth \FigWidth=\dimexpr(\LPscale\FigWidthReal) \ifdim\FigWidth>\localhsize \!!dimena=\localhsize \advance\!!dimena by-\FigWidth \noindent\hskip\!!dimena \fi \fi \externalfigure[\lily!img][scale=\dimexpr(1000\LPscale)]% Regards, BG