Re: [NTG-context] add to \setbuffer

2018-01-10 Thread Hans Hagen

On 1/10/2018 6:30 PM, Wolfgang Schuster wrote:



dr. Hans van der Meer 
10. Januar 2018 um 13:45
With \setbuffer[ABUFFER] .. \endbuffer I can program a macro to put 
something in this buffer.
But is it possible to add something at the end of this buffer at a 
later moment?


You can use the “buffers.append” and “buffers.prepend” functions to add 
text to a buffer.


\starttext

\startbuffer[a]
First
\stopbuffer

\startbuffer[b]
Second
\stopbuffer

\startbuffer[c]
Third
\stopbuffer

\startluacode

buffers.append("b",buffers.getcontent("c"))

buffers.prepend("b",buffers.getcontent("a"))

\stopluacode

\getbuffer[b]

\stoptext

or just getbuffer[a,b,c]


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

Re: [NTG-context] Bug in math arrows

2018-01-10 Thread Aditya Mahajan

On Wed, 10 Jan 2018, Wolfgang Schuster wrote:




 Aditya Mahajan 
 10. Januar 2018 um 17:27
 Hi,

 There is a bug in extensible arrows. The syntax of extensible arrows is:

 \xleftarrow{below}{top}

 but when the optional argument is used

 \xleftarrow[small]{A}{B}

 then A ends up on the top and B on the bottom.


The "x" commands change the position of both texts and when you change
the instance for the command the reversed order is overwritten (search for
the order key in math-stc.mkvi).

\starttext

$\xleftarrow{A}{B}$

$\mleftarrow{A}{B}$

\stoptext


I would still consider it a bug :-) Either order is fine but it should be 
used consistently.


Aditya
___
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] add to \setbuffer

2018-01-10 Thread Wolfgang Schuster



dr. Hans van der Meer 
10. Januar 2018 um 13:45
With \setbuffer[ABUFFER] .. \endbuffer I can program a macro to put 
something in this buffer.
But is it possible to add something at the end of this buffer at a 
later moment?


You can use the “buffers.append” and “buffers.prepend” functions to add 
text to a buffer.


\starttext

\startbuffer[a]
First
\stopbuffer

\startbuffer[b]
Second
\stopbuffer

\startbuffer[c]
Third
\stopbuffer

\startluacode

buffers.append("b",buffers.getcontent("c"))

buffers.prepend("b",buffers.getcontent("a"))

\stopluacode

\getbuffer[b]

\stoptext

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

Re: [NTG-context] Bug in math arrows

2018-01-10 Thread Wolfgang Schuster



Aditya Mahajan 
10. Januar 2018 um 17:27
Hi,

There is a bug in extensible arrows. The syntax of extensible arrows is:

\xleftarrow{below}{top}

but when the optional argument is used

\xleftarrow[small]{A}{B}

then A ends up on the top and B on the bottom.


The "x" commands change the position of both texts and when you change
the instance for the command the reversed order is overwritten (search for
the order key in math-stc.mkvi).

\starttext

$\xleftarrow{A}{B}$

$\mleftarrow{A}{B}$

\stoptext

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

[NTG-context] Bug in math arrows

2018-01-10 Thread Aditya Mahajan

Hi,

There is a bug in extensible arrows. The syntax of extensible arrows is:

\xleftarrow{below}{top}

but when the optional argument is used

\xleftarrow[small]{A}{B}

then A ends up on the top and B on the bottom.

Thanks,
Aditya
___
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
___

[NTG-context] add to \setbuffer

2018-01-10 Thread dr. Hans van der Meer
With \setbuffer[ABUFFER] .. \endbuffer I can program a macro to put something 
in this buffer.
But is it possible to add something at the end of this buffer at a later moment?

Hans van der Meer


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