Re: [NTG-context] defs, variables and dimensions (was: passing variables/data between context and lua)

2019-09-29 Thread Martin Althoff
Hi Hraban,

I can't answer your question counter or \define. 

However in my specific situation I would not use the number as a counter but 
just as a value. Actually my situation is an exam in which the total points are 
44. From these I want to calculate percentages. And, as I find it easier to 
write calculations (electro physics and maths) in Lua, I then want to pass the 
results out to Context.

Greetings, Martin


> > > \define\question{44}
> > \defineexpandable\question{44}
> 
> Would it make sense to use a counter or some other TeX construct?
> 
> Is it better to use \setvariable(s) for simple values than any \def?
> 
> Should I use a \newdimen for every custom measure that I want to use with 
> \dimexpr, e.g.
> 
> \def\MyWidth{10mm}
> or better
> \newdimen\MyWidth
> \MyWidth=10mm
> ?
> 
> 

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] defs, variables and dimensions (was: passing variables/data between context and lua)

2019-09-28 Thread Henning Hraban Ramm

> Am 2019-09-27 um 14:58 schrieb Wolfgang Schuster 
> :
> 
>> \define\question{44}
> \defineexpandable\question{44}

Would it make sense to use a counter or some other TeX construct?

Is it better to use \setvariable(s) for simple values than any \def?

Should I use a \newdimen for every custom measure that I want to use with 
\dimexpr, e.g.

\def\MyWidth{10mm}
or better
\newdimen\MyWidth
\MyWidth=10mm
?



Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___