Re: [NTG-context] calculating with dimension unit

2013-04-23 Thread Jan Heinen
Ok, I now put the \ctxlua into an other chapter: http://wiki.contextgarden.net/Calculating_with_dimension_units Can you say something to the missing points there? Wich meethod?, \the and Expanding If you don't know how to edit the context-wiki, please write your information here in the

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Wolfgang Schuster
Am 22.04.2013 um 01:13 schrieb Jan Heinen jahei...@gmx.de: 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

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Hans Hagen
On 4/22/2013 8:48 AM, Wolfgang Schuster wrote: Am 22.04.2013 um 01:13 schrieb Jan Heinen jahei...@gmx.de: 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

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Hans Hagen
On 4/22/2013 1:13 AM, Jan Heinen wrote: %\externalfigure[cow][width=\ColumnABiii] Already for quite a while some commands that take a dimension as well as a keyword need a verbose dimension (so \the\ColumnABiii in your case) because it's handled at the lua end (where at this moment we

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Wolfgang Schuster
Am 22.04.2013 um 10:14 schrieb Hans Hagen pra...@wxs.nl: On 4/22/2013 8:48 AM, Wolfgang Schuster wrote: Am 22.04.2013 um 01:13 schrieb Jan Heinen jahei...@gmx.de: In a book I produced with ConTeXt last year, I did a lot of calculation to be able to change the layout dynamicaly. With

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Jan Heinen
Hello, thanks for the helpfull tipps. Only one wasn't working: \defineexpandable\ColumnABii {\ctxlua{context([==[\ColumnA + \ColumnB]==])}} ColumnABii: \ColumnABii The result is: ColumnABii: 30mm+ 40mm And it should be ColumnABii: 70mm And in the other cases I get back:

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Aditya Mahajan
I think this calculating with dimension is not very well documented in the context-wiki. Thus I would like to write a small article about Calculating with dimension units in the wiki.contextgarden.net to help others a bit. Or is there already an article somewhere? Such an article will be

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Aditya Mahajan
On 2013-04-22, at 6:43 AM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: (I've been wondering if we should make measured \the\dimexpr..\relax internally which can save dimexpr at the user end.) +1 +1 from me as well. Having to use \dimexpr...\relax in definemeasure ISS bit

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread luigi scarso
On Mon, Apr 22, 2013 at 1:31 PM, Jan Heinen jahei...@gmx.de wrote: Hello, thanks for the helpfull tipps. Only one wasn't working: \defineexpandable\ColumnABii {\ctxlua{context([==[\ColumnA + \ColumnB]==])}} ColumnABii: \ColumnABii The result is: ColumnABii: 30mm+ 40mm And it

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Jan Heinen
Thank you all!! My book from last year (15.000 lines text + context-code and 1.500 lines macro-code now was compiled without no further problems! I only had to change all \define\variable ... to \defineexpandable\variable ... I think, now I understand a little bit more about ConTeXt

Re: [NTG-context] calculating with dimension unit

2013-04-22 Thread Wolfgang Schuster
Am 22.04.2013 um 23:28 schrieb Jan Heinen jahei...@gmx.de: Thank you all!! My book from last year (15.000 lines text + context-code and 1.500 lines macro-code now was compiled without no further problems! I only had to change all \define\variable ... to

Re: [NTG-context] calculating with dimension unit

2013-04-21 Thread luigi scarso
\starttext \setupexternalfigures[location={local,global,default}] \defineexpandable\ColumnA{30mm} \defineexpandable\ColumnB{40mm} \defineexpandable\ColumnABi{\the\dimexpr(\ColumnA + \ColumnB)} \defineexpandable\ColumnABii {\ctxlua{context([==[\ColumnA + \ColumnB]==])}}