Re: [NTG-context] Evaluating a Lua expression at the end (repeat)

2016-08-25 Thread Kumar Appaiah
On Thu, Aug 25, 2016 at 5:49 PM, Henri Menke wrote: > Hi Kumar, > > the function job.variables.save seems to save the key in > job.variables.collected.macros instead of job.variables.collected. The > problem is that macros is not created unconditionally, which is why you might > run into a »at

Re: [NTG-context] align text and formula

2016-08-25 Thread Wolfgang Schuster
Henri Menke 25. August 2016 um 15:31 Hi Jan, unfortunately, these commands are in no book. I just looked them up in the ConTeXt source. However, these two books helped me a lot in improving my understanding of TeX and ConTeXt. They are definitely worth their money

Re: [NTG-context] align text and formula

2016-08-25 Thread Henri Menke
Hi Jan, unfortunately, these commands are in no book. I just looked them up in the ConTeXt source. However, these two books helped me a lot in improving my understanding of TeX and ConTeXt. They are definitely worth their money! The TeXbook by Donald E. Knuth https://amzn.com/0201134489 Prog

Re: [NTG-context] align text and formula

2016-08-25 Thread Jan Willem Flamma
Hi Henri, Thanks for your solution. This is indeed providing the functionality I was after. I need to pick up a good Tex book one of these days to try and master those commands :-) Regards, Jan Willem Flamma > On 25 aug. 2016, at 13:52, Henri Menke wrote: > > Hi Jan, > > if I understood y

Re: [NTG-context] Evaluating a Lua expression at the end (repeat)

2016-08-25 Thread Henri Menke
Hi Kumar, the function job.variables.save seems to save the key in job.variables.collected.macros instead of job.variables.collected. The problem is that macros is not created unconditionally, which is why you might run into a »attempt to index a nil value« error without some manual error chec

Re: [NTG-context] align text and formula

2016-08-25 Thread Henri Menke
Hi Jan, if I understood you correctly, this should produce what you are after. \starttext \startformula E = mc^2 \stopformula \startformula \startalign[m=3,align={middle},distance=0pt plus 1 fil] \NC \rlap{\text{Text1}}\NC\NC E=mc^2 \NR \NC \rlap{\text{This i

[NTG-context] Evaluating a Lua expression at the end (repeat)

2016-08-25 Thread Kumar Appaiah
Dear List, Last year, Hans helped me with this example: \starttext \startluacode local name = nil local temp = 0 function document.startwhatever(s) name = s temp = 0 end function document.addwhatever(n) temp = temp + n

Re: [NTG-context] Pretty print Ctx code into HTML

2016-08-25 Thread Hans Hagen
On 8/24/2016 11:24 AM, Procházka Lukáš Ing. wrote: Hello Mojca, I'm sure Hans knows the invocation by heart, but I can look it up as well. This is how the output looks like: http://source2.contextgarden.net/tex/context/sample/sample-tex.html yes, that's the look I'd like to achieve. fyi