From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82007 Path: news.gmane.org!not-for-mail From: Jan Heinen Newsgroups: gmane.comp.tex.context Subject: calculating with dimension unit Date: Mon, 22 Apr 2013 01:13:15 +0200 Message-ID: <5174728B.70102@gmx.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1366586001 6946 80.91.229.3 (21 Apr 2013 23:13:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Apr 2013 23:13:21 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 22 01:13:25 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UU3Rl-0004ZR-AA for gctc-ntg-context-518@m.gmane.org; Mon, 22 Apr 2013 01:13:25 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1AAC6101F3; Mon, 22 Apr 2013 01:13:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id uNvCRjZzbS7n; Mon, 22 Apr 2013 01:13:21 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id A8BFF101EF; Mon, 22 Apr 2013 01:13:21 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BAEB0101EF for ; Mon, 22 Apr 2013 01:13:19 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vmpIfAx2RhcR for ; Mon, 22 Apr 2013 01:13:18 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 9BBDA101E9 for ; Mon, 22 Apr 2013 01:13:18 +0200 (CEST) Original-Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r3LNDHtk022064 for ; Mon, 22 Apr 2013 01:13:18 +0200 Original-Received: from [192.168.178.101] (p57BA38E1.dip0.t-ipconnect.de [87.186.56.225]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0MM4U4-1UQkan15XI-007lQq; Mon, 22 Apr 2013 01:13:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.6esrpre) Gecko/20120817 Icedove/10.0.6 X-Provags-ID: V02:K0:SJiXMWISkjX8sVT2eaJq0iOkks0HGUve8mJNiA/8O3d CN4o/KPPUTUZXkpO+nElurO3wXu2GLCWBkm0e5aduH134YT41b YlysHHlL8lzMJcHhDaUFNo+aUJvBRckD4CTNe2lc/fsn6NkmWL 7bnZw4QrzAZemi2VBWbtVXt2qWZNcu7PZLD5k8kNh88tfZEFLY MWAO6CHnQIErCJfnwIKNCc/v9IDq9pCAM4wFm/fYTi1229HKcT no65l5ESxq2nmzDU71fISunJv1asR4CJfihjw/3XdLWloiLLhV vrprm4fqaz4oMjirjbCWR/R7wGWGDDxDbTRhx9FRwVNGMSq8w= = X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=212.227.17.8; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QJqLdhAP - 84a783067e7b - 20130422 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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 Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:82007 Archived-At: In a book I produced with ConTeXt last year, I did a lot of calculation to be able to change the layout dynamicaly. With the actual version of ConTeXt I can't compile the book. I have tried a lot of things today ... without success. I hope my minimal-example helps you to understand, what I want to do - and what I am doing wrong: \starttext \setupexternalfigures[location={local,global,default}] \defineexpandable\ColumnA {30mm} \defineexpandable\ColumnB {40mm} \defineexpandable\ColumnABi {\dimexpr(\ColumnA + \ColumnB)} \defineexpandable\ColumnABii {\ctxlua{context(\ColumnA + \ColumnB)}} \newdimen\ColumnABiii \ColumnABiii = \dimexpr(\ColumnA + \ColumnB) A \ColumnA% ok B \ColumnB% ok % I sadly get only errors when I delete the comments: %ColumnABi: \ColumnABi %ColumnABii: \ColumnABii %ColumnABiii: \ColumnABiii %\externalfigure[cow][width=\ColumnABiii] ~ \page \stoptext ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________