From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/30904 Path: news.gmane.org!not-for-mail From: Henning Hraban Ramm Newsgroups: gmane.comp.tex.context Subject: calculations Date: Tue, 19 Sep 2006 22:53:18 +0200 Message-ID: <93F3046C-F059-4C5D-AC7F-73DFD5A4AAD6@fiee.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 1158699305 16812 80.91.229.2 (19 Sep 2006 20:55:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 19 Sep 2006 20:55:05 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Sep 19 22:55:00 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 1GPmb8-0002e0-Cx for gctc-ntg-context-518@m.gmane.org; Tue, 19 Sep 2006 22:53:43 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 70D151FE99; Tue, 19 Sep 2006 22:53:41 +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 00651-08; Tue, 19 Sep 2006 22:53:31 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 50EB41FE03; Tue, 19 Sep 2006 22:53:31 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CE7E11FE03 for ; Tue, 19 Sep 2006 22:53:26 +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 02818-05-2 for ; Tue, 19 Sep 2006 22:53:21 +0200 (CEST) Original-Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by ronja.ntg.nl (Postfix) with SMTP id B855F1FDDF for ; Tue, 19 Sep 2006 22:53:20 +0200 (CEST) Original-Received: from [83.79.17.167] (helo=[10.128.9.3]) by mrelayeu.kundenserver.de (node=mrelayeu0) with ESMTP (Nemesis), id 0MKwh2-1GPmal47fV-0003qa; Tue, 19 Sep 2006 22:53:20 +0200 Original-To: ConTeXt ML 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:30904 Archived-At: Sorry, I skimmed the TeXbook for an hour but couldn't find how to do simple calculations in TeX... This is a snippet from t-lilypond.tex: \def\LPscale{0.6315789} % downscale the image \ifvmode \getfiguredimensions[\bufferprefix lilypond-\the\lily! figures.pdf][]% % \def\FigWidth{\LPscale\figurewidth} \leavevmode \ifdim\FigWidth>\localhsize \!!dimena=\localhsize \advance\!!dimena by-\FigWidth \noindent\hskip\!!dimena \fi \fi \externalfigure[\lily!img][scale=1000\LPscale]% \egroup% I need to downscale every score to 63%, and the shown width check should use the corrected width. How can I do that? (FigWidth should be LPscale * figurewidth) Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer)