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 »attempt to index a nil value« error without some manual error 
> checking.  Therefore I recommend assigning the temp value to 
> job.variables.tobesaved["document:temp:"..name].  Perhaps Hans joins this 
> discussion and schools me about why this could be a bad idea, but so far it 
> works.
>
> Also, I'd recommend making all your user level macros protected and check for 
> the optional argument in \startwhatever (otherwise you'll get errors like 
> »Macro doesn't match its definition«).  Because I'm really cautious I also 
> use \luaescapestring{#1} (Try for example »foo"bar« as a value without).




Indeed, this worked! I'll try to understand the internals myself to
know what is going on exactly. Thanks for the solution.

Kumar
___
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
___

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!


The TeXbook by Donald E. Knuth https://amzn.com/0201134489
Programming in Lua by Roberto Ierusalimschy https://amzn.com/859037985X

Other good books for TeX are

  - TeX by Topic (https://www.ctan.org/pkg/texbytopic) and
  - TeX for the Impatient (https://www.ctan.org/pkg/impatient)

Wolfgang
___
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
___

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
Programming in Lua by Roberto Ierusalimschy https://amzn.com/859037985X

Kind regards,
Henri

On 08/25/2016 03:12 PM, Jan Willem Flamma wrote:
> 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 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 is an explanation}}   \NC\NC 
>> E=\sqrt{p^2c^2+m^2c^4} \NR
>>\NC \rlap{\text{This is a longer explanation}} \NC\NC \left(\beta 
>> mc^2+c\left(\sum _{n=1}^3 \alpha_n p_n \right)\right) \psi(x,t) = i \hbar 
>> \frac{\partial \psi(x,t)}{\partial t} \NR
>>  \stopalign
>> \stopformula
>>
>> \stoptext
>>
>> The inner workings of this solution are quite messy.  You *have* to have the 
>> \NC\NC between text and formula and the formula must not contain any further 
>> alignment points; text has to be enclosed in \rlap.  As you can see it 
>> centers the formula unconditionally and just flows into the text if it 
>> doesn't fit.  Just don't do it like this.
>>
>> Cheers, Henri
>>
>> On 08/24/2016 05:38 PM, Jan Willem Flamma wrote:
>>> Hi Otared,
>>>
>>> I apologize for not explaining it better.
>>>
>>> Maybe the below example will illustrate better what I’m trying to achieve. 
>>> - The first formula is perfectly aligned.
>>> - The bottom three formulas do not line up with the top formula
>>>
>>> I’m trying to align all formulas regardless of the amount of text added to 
>>> the left of the formula. 
>>> Of course I could add \qquad or \quad to try and manually align but 
>>> basically I’m interested to know if a fool proof method exist that aligns 
>>> all without using \\qquad or \quad
>>>
>>> \starttext
>>>
>>> % Mid-aligned formula
>>> \startformula
>>> E = mc^2
>>> \stopformula
>>>
>>> \setupformulas[align=flushleft]
>>> \startformula
>>>\startalign[n=3,align={left,middle}]
>>> \NC \text{Text1}
>>> \NC \qquad  \NC E = mc^2\NR
>>> \NC \text{This is an explanation}   \NC \qquad  
>>> \NC  E = mc^2   \NR
>>> \NC \text{This is a longer explanation} \NC \qquad  \NC E = 
>>> mc^2\NR
>>>\stopalign
>>> \stopformula
>>>
>>> \stoptext
>>>
>>> Thanks
>>> JW
>>>
 On 24 aug. 2016, at 10:21, Jan Willem Flamma  
 wrote:

 Hi Otared,

 Thanks for the (very quick) reply.

 I’ve experiemented with that solution as well. However, the text can vary 
 in length and this would required a lot of tweaking to try and get the 
 formulas mid-aligned.
 I’m trying to find a fool proof solution that will get the formula 
 mid-aligned in all cases (and hope it exists).

 In any case, thanks for your suggestion!

 Jan Willem

> On 24 aug. 2016, at 10:10, Otared Kavian  wrote:
>
> Hi Jan,
>
> You can specify a certain horizontal distance in the second column, as in 
> the following:
>
> %%% begin example.tex
> \starttext
>
> \setupformulas[align=flushleft]
> \startformula
>   \startalign[n=2,align={left,middle}]
>   \NC \text{Text1}\NC\qquad E = mc^2\NR
>   \NC \text{Text2}\NC\qquad E = mc^2\NR
>   \NC \text{Text2}\NC\hskip 3cm E = mc^2\NR
>   \stopalign
> \stopformula
>
> \stoptext
> %%% end example.tex
>
>> On 24 Aug 2016, at 10:02, Jan Willem Flamma  
>> wrote:
>>
>> Dear list,
>>
>> I would like to include text on the same line as a formula.
>> The text needs to be left-aligned and the formula needs to be 
>> mid-aligned (as per normal).
>>
>> I’ve tried various solutions from the mathalign MyWay but have not 
>> succeeded to get the desired result sofar.
>> Below a M-Not-WE. Clearly, the formula is not positioned correctly yet.
>>
>> Who can help me out?
>>
>> Regards,
>> Jan Willem
>>
>>
>> \starttext
>>
>> \setupformulas[align=flushleft]
>> \startformula
>>  \startalign[n=2,align={left,middle}]
>>  \NC \text{Text1}\NC E = mc^2\NR
>>  \NC 

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 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 is an explanation}}   \NC\NC 
> E=\sqrt{p^2c^2+m^2c^4} \NR
>\NC \rlap{\text{This is a longer explanation}} \NC\NC \left(\beta 
> mc^2+c\left(\sum _{n=1}^3 \alpha_n p_n \right)\right) \psi(x,t) = i \hbar 
> \frac{\partial \psi(x,t)}{\partial t} \NR
>  \stopalign
> \stopformula
> 
> \stoptext
> 
> The inner workings of this solution are quite messy.  You *have* to have the 
> \NC\NC between text and formula and the formula must not contain any further 
> alignment points; text has to be enclosed in \rlap.  As you can see it 
> centers the formula unconditionally and just flows into the text if it 
> doesn't fit.  Just don't do it like this.
> 
> Cheers, Henri
> 
> On 08/24/2016 05:38 PM, Jan Willem Flamma wrote:
>> Hi Otared,
>> 
>> I apologize for not explaining it better.
>> 
>> Maybe the below example will illustrate better what I’m trying to achieve. 
>> - The first formula is perfectly aligned.
>> - The bottom three formulas do not line up with the top formula
>> 
>> I’m trying to align all formulas regardless of the amount of text added to 
>> the left of the formula. 
>> Of course I could add \qquad or \quad to try and manually align but 
>> basically I’m interested to know if a fool proof method exist that aligns 
>> all without using \\qquad or \quad
>> 
>> \starttext
>> 
>> % Mid-aligned formula
>> \startformula
>> E = mc^2
>> \stopformula
>> 
>> \setupformulas[align=flushleft]
>> \startformula
>>\startalign[n=3,align={left,middle}]
>>  \NC \text{Text1}
>> \NC \qquad  \NC E = mc^2\NR
>>  \NC \text{This is an explanation}   \NC \qquad  
>> \NC  E = mc^2   \NR
>>  \NC \text{This is a longer explanation} \NC \qquad  \NC E = 
>> mc^2\NR
>>\stopalign
>> \stopformula
>> 
>> \stoptext
>> 
>> Thanks
>> JW
>> 
>>> On 24 aug. 2016, at 10:21, Jan Willem Flamma  wrote:
>>> 
>>> Hi Otared,
>>> 
>>> Thanks for the (very quick) reply.
>>> 
>>> I’ve experiemented with that solution as well. However, the text can vary 
>>> in length and this would required a lot of tweaking to try and get the 
>>> formulas mid-aligned.
>>> I’m trying to find a fool proof solution that will get the formula 
>>> mid-aligned in all cases (and hope it exists).
>>> 
>>> In any case, thanks for your suggestion!
>>> 
>>> Jan Willem
>>> 
 On 24 aug. 2016, at 10:10, Otared Kavian  wrote:
 
 Hi Jan,
 
 You can specify a certain horizontal distance in the second column, as in 
 the following:
 
 %%% begin example.tex
 \starttext
 
 \setupformulas[align=flushleft]
 \startformula
\startalign[n=2,align={left,middle}]
\NC \text{Text1}\NC\qquad E = mc^2\NR
\NC \text{Text2}\NC\qquad E = mc^2\NR
\NC \text{Text2}\NC\hskip 3cm E = mc^2\NR
\stopalign
 \stopformula
 
 \stoptext
 %%% end example.tex
 
> On 24 Aug 2016, at 10:02, Jan Willem Flamma  
> wrote:
> 
> Dear list,
> 
> I would like to include text on the same line as a formula.
> The text needs to be left-aligned and the formula needs to be mid-aligned 
> (as per normal).
> 
> I’ve tried various solutions from the mathalign MyWay but have not 
> succeeded to get the desired result sofar.
> Below a M-Not-WE. Clearly, the formula is not positioned correctly yet.
> 
> Who can help me out?
> 
> Regards,
> Jan Willem
> 
> 
> \starttext
> 
> \setupformulas[align=flushleft]
> \startformula
>   \startalign[n=2,align={left,middle}]
>   \NC \text{Text1}\NC E = mc^2\NR
>   \NC \text{Text2}\NC E = mc^2\NR
>   \stopalign
> \stopformula
> 
> \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 : 

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 checking.  
Therefore I recommend assigning the temp value to 
job.variables.tobesaved["document:temp:"..name].  Perhaps Hans joins this 
discussion and schools me about why this could be a bad idea, but so far it 
works.

Also, I'd recommend making all your user level macros protected and check for 
the optional argument in \startwhatever (otherwise you'll get errors like 
»Macro doesn't match its definition«).  Because I'm really cautious I also use 
\luaescapestring{#1} (Try for example »foo"bar« as a value without).

\starttext

\startluacode
local name = nil
local temp = 0

function document.startwhatever(s)
   name = s
   temp = 0
end

function document.addwhatever(n)
   temp = temp + n
   context(n)
end

function document.stopwhatever()
   job.variables.tobesaved["document:temp:"..name] = temp
end

function document.getwhatever(s)
   context(job.variables.collected["document:temp:"..s])
end
\stopluacode

\define\startwhatever{\dosingleempty\dostartwhatever}
\def\dostartwhatever[#1]{\ctxlua{document.startwhatever("\luaescapestring{#1}")}}
\define   \stopwhatever {\ctxlua{document.stopwhatever()}}
\define[1]\addwhatever  {\ctxlua{document.addwhatever(\luaescapestring{#1})}}
\define[1]\getwhatever  {\ctxlua{document.getwhatever("\luaescapestring{#1}")}}

total: \getwhatever{foo}

\startwhatever[foo]

test 1: \addwhatever{10}\par
test 2: \addwhatever{20}\par
test 3: \addwhatever{30}\par

\stopwhatever

\stoptext

On 08/25/2016 01:28 PM, Kumar Appaiah wrote:
> 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
>context(n)
> end
>  function
>   document.stopwhatever()
>job.variables.save("document:temp:"..name,temp)
> end
>  function document.getwhatever(s)
>   context(job.variables.collected["document:temp:"..s])
>end
>\stopluacode
> 
> \def\startwhatever[#1]{\ctxlua{document.startwhatever("#1")}}
> \def\stopwhatever {\ctxlua{document.stopwhatever()}}
> \def\addwhatever#1{\ctxlua{document.addwhatever(#1)}}
> \def\getwhatever#1{\ctxlua{document.getwhatever("#1")}}
> 
> total: \getwhatever{foo}
> 
> \startwhatever[foo]
> 
> test 1: \addwhatever{10}\par
> test 2: \addwhatever{20}\par
> test 3: \addwhatever{30}\par
> 
> \stopwhatever
> 
> \stoptext
> 
> However, on my current ConTeXt on Debian (2016.05.17.20160523-1), I am
> unable to get it working. It says:
> 
> lua error   > lua error on line 37 in file /tmp/test.tex:
> 
> /usr/share/texmf/tex/context/base/mkiv/core-uti.lua:165: attempt to
> index upvalue 'tobesavedmacros' (a nil value)
> stack traceback:
> /usr/share/texmf/tex/context/base/mkiv/core-uti.lua:165: in
>   function 'save'
>   [ctxlua]:14: in function 'stopwhatever'
>   [ctxlua]:1: in main chunk
> 
> 27 \def\getwhatever#1{\ctxlua{document.getwhatever("#1")}}
> 28
> 29 total: \getwhatever{foo}
> 30
> 31 \startwhatever[foo]
> 32
> 33 test 1: \addwhatever{10}\par
> 34 test 2: \addwhatever{20}\par
> 35 test 3: \addwhatever{30}\par
> 36
> 37 >>  \stopwhatever
> 38
> 39 \stoptext
> 40
> 41
> 
> Could you please suggest a workaround?
> 
> Thanks.
> 
> Kumar
> ___
> 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
> ___
> 

___
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
___

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 is an explanation}}   \NC\NC 
E=\sqrt{p^2c^2+m^2c^4} \NR
\NC \rlap{\text{This is a longer explanation}} \NC\NC \left(\beta 
mc^2+c\left(\sum _{n=1}^3 \alpha_n p_n \right)\right) \psi(x,t) = i \hbar 
\frac{\partial \psi(x,t)}{\partial t} \NR
  \stopalign
\stopformula

\stoptext

The inner workings of this solution are quite messy.  You *have* to have the 
\NC\NC between text and formula and the formula must not contain any further 
alignment points; text has to be enclosed in \rlap.  As you can see it centers 
the formula unconditionally and just flows into the text if it doesn't fit.  
Just don't do it like this.

Cheers, Henri

On 08/24/2016 05:38 PM, Jan Willem Flamma wrote:
> Hi Otared,
> 
> I apologize for not explaining it better.
> 
> Maybe the below example will illustrate better what I’m trying to achieve. 
> - The first formula is perfectly aligned.
> - The bottom three formulas do not line up with the top formula
> 
> I’m trying to align all formulas regardless of the amount of text added to 
> the left of the formula. 
> Of course I could add \qquad or \quad to try and manually align but basically 
> I’m interested to know if a fool proof method exist that aligns all without 
> using \\qquad or \quad
> 
> \starttext
> 
> % Mid-aligned formula
> \startformula
> E = mc^2
> \stopformula
> 
> \setupformulas[align=flushleft]
> \startformula
> \startalign[n=3,align={left,middle}]
>   \NC \text{Text1}
> \NC \qquad  \NC E = mc^2\NR
>   \NC \text{This is an explanation}   \NC \qquad  
> \NC  E = mc^2   \NR
>   \NC \text{This is a longer explanation} \NC \qquad  \NC E = 
> mc^2\NR
> \stopalign
> \stopformula
> 
> \stoptext
> 
> Thanks
> JW
> 
>> On 24 aug. 2016, at 10:21, Jan Willem Flamma  wrote:
>>
>> Hi Otared,
>>
>> Thanks for the (very quick) reply.
>>
>> I’ve experiemented with that solution as well. However, the text can vary in 
>> length and this would required a lot of tweaking to try and get the formulas 
>> mid-aligned.
>> I’m trying to find a fool proof solution that will get the formula 
>> mid-aligned in all cases (and hope it exists).
>>
>> In any case, thanks for your suggestion!
>>
>> Jan Willem
>>
>>> On 24 aug. 2016, at 10:10, Otared Kavian  wrote:
>>>
>>> Hi Jan,
>>>
>>> You can specify a certain horizontal distance in the second column, as in 
>>> the following:
>>>
>>> %%% begin example.tex
>>> \starttext
>>>
>>> \setupformulas[align=flushleft]
>>> \startformula
>>> \startalign[n=2,align={left,middle}]
>>> \NC \text{Text1}\NC\qquad E = mc^2\NR
>>> \NC \text{Text2}\NC\qquad E = mc^2\NR
>>> \NC \text{Text2}\NC\hskip 3cm E = mc^2\NR
>>> \stopalign
>>> \stopformula
>>>
>>> \stoptext
>>> %%% end example.tex
>>>
 On 24 Aug 2016, at 10:02, Jan Willem Flamma  wrote:

 Dear list,

 I would like to include text on the same line as a formula.
 The text needs to be left-aligned and the formula needs to be mid-aligned 
 (as per normal).

 I’ve tried various solutions from the mathalign MyWay but have not 
 succeeded to get the desired result sofar.
 Below a M-Not-WE. Clearly, the formula is not positioned correctly yet.

 Who can help me out?

 Regards,
 Jan Willem


 \starttext

 \setupformulas[align=flushleft]
 \startformula
\startalign[n=2,align={left,middle}]
\NC \text{Text1}\NC E = mc^2\NR
\NC \text{Text2}\NC E = mc^2\NR
\stopalign
 \stopformula

 \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
 ___
>>>
>>> ___
>>> 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  : 

[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
   context(n)
end
 function
  document.stopwhatever()
   job.variables.save("document:temp:"..name,temp)
end
 function document.getwhatever(s)
  context(job.variables.collected["document:temp:"..s])
   end
   \stopluacode

\def\startwhatever[#1]{\ctxlua{document.startwhatever("#1")}}
\def\stopwhatever {\ctxlua{document.stopwhatever()}}
\def\addwhatever#1{\ctxlua{document.addwhatever(#1)}}
\def\getwhatever#1{\ctxlua{document.getwhatever("#1")}}

total: \getwhatever{foo}

\startwhatever[foo]

test 1: \addwhatever{10}\par
test 2: \addwhatever{20}\par
test 3: \addwhatever{30}\par

\stopwhatever

\stoptext

However, on my current ConTeXt on Debian (2016.05.17.20160523-1), I am
unable to get it working. It says:

lua error   > lua error on line 37 in file /tmp/test.tex:

/usr/share/texmf/tex/context/base/mkiv/core-uti.lua:165: attempt to
index upvalue 'tobesavedmacros' (a nil value)
stack traceback:
/usr/share/texmf/tex/context/base/mkiv/core-uti.lua:165: in
function 'save'
[ctxlua]:14: in function 'stopwhatever'
[ctxlua]:1: in main chunk

27 \def\getwhatever#1{\ctxlua{document.getwhatever("#1")}}
28
29 total: \getwhatever{foo}
30
31 \startwhatever[foo]
32
33 test 1: \addwhatever{10}\par
34 test 2: \addwhatever{20}\par
35 test 3: \addwhatever{30}\par
36
37 >>  \stopwhatever
38
39 \stoptext
40
41

Could you please suggest a workaround?

Thanks.

Kumar
___
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
___

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: some of these highlighters for context (tex, mp, lua, bib. etc) are 
aware of mixes, so inside a tex highlighter mp and lua gets highlighted 
in its own way


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___