From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/30996 Path: news.gmane.org!not-for-mail From: Henning Hraban Ramm Newsgroups: gmane.comp.tex.context Subject: Re: calculations Date: Mon, 25 Sep 2006 23:11:32 +0200 Message-ID: <5563EF4F-4088-42F3-A0C9-B33540FFA3A5@fiee.net> References: <93F3046C-F059-4C5D-AC7F-73DFD5A4AAD6@fiee.net> <0DE942E8-4FE2-41E2-8C04-6D2DD127172D@fiee.net> <4512E411.2070504@gmx.net> <181E3AED-683E-4B2C-9D7B-5AE966E621E5@fiee.net> <4517A56C.5020704@gmx.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1159218765 4336 80.91.229.2 (25 Sep 2006 21:12:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 25 Sep 2006 21:12:45 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Sep 25 23:12:37 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 1GRxkI-0005ia-P7 for gctc-ntg-context-518@m.gmane.org; Mon, 25 Sep 2006 23:12:10 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3255B1FE2F; Mon, 25 Sep 2006 23:12:09 +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 11590-05; Mon, 25 Sep 2006 23:11:59 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CFCBD1FE18; Mon, 25 Sep 2006 23:11:58 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 677271FE07 for ; Mon, 25 Sep 2006 23:11:50 +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 11468-05 for ; Mon, 25 Sep 2006 23:11:39 +0200 (CEST) Original-Received: from moutng.kundenserver.de (unknown [212.227.126.188]) by ronja.ntg.nl (Postfix) with SMTP id 0DB011FE01 for ; Mon, 25 Sep 2006 23:11:36 +0200 (CEST) Original-Received: from [83.79.24.78] (helo=[10.128.9.3]) by mrelayeu.kundenserver.de (node=mrelayeu0) with ESMTP (Nemesis), id 0MKwh2-1GRxjk0RqE-00081s; Mon, 25 Sep 2006 23:11:36 +0200 In-Reply-To: <4517A56C.5020704@gmx.net> Original-To: mailing list for ConTeXt users X-Mailer: Apple Mail (2.752.2) X-Provags-ID: kundenserver.de abuse@kundenserver.de login:71ece21a21b2fa6ef1812787a4eaee0e 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:30996 Archived-At: Am 2006-09-25 um 11:46 schrieb Peter Rolf: >>>>> \externalfigure[\lily!img][scale=\dimexpr(1000\LPscale)]% >>> \numexpr should work here >>> ..[scale=\numexpr1000\LPscale\relax]% >> >> thank you, that seemed what I looked for, but: >> ! You can't use `\numexpr' in horizontal mode. >> > One of my favourite errors. Everytime it occurs I'm a bit puzzled, as > I've no general solution for this. I can only tell you what I do in > such > a case. > - check every parameter of the expression > If the expression itself is ok > - check the correct grouping of prior commands (boxes, > conditionals,..) > - try to calculate the expression before you pass it > \newcount\Myscale > \Myscale\numexpr1000\LPscale\relax > ..[scale=\the\Myscale] > But in the end it is more try and error than a systematic action. > If there is a more general approach to solve this, I would be happy to > hear it. > I think I tried everything but didn't get it to work. For the moment I use: \def\LPscale{0.6315789} % downscale the image \def\LPkscale{632} % doesn't work: \def\LPkscale{\numexpr1000\LPscale\relax} But anyway - my problem is caused by LilyPond not obeying its size commands in EPS mode, so the simple scaling doesn't help... Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer)