ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alan BRASLAU <alan.braslau@cea.fr>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: wolfgang.schuster@gmail.com
Subject: Re: buffers (append)
Date: Mon, 14 Jan 2013 14:48:24 +0100	[thread overview]
Message-ID: <20130114144824.3826f2d5@iram-hb-003386.extra.cea.fr> (raw)
In-Reply-To: <1049A773-8637-4DB2-86D6-1148CB652C92@gmail.com>

On Mon, 14 Jan 2013 09:34:08 +0100
Wolfgang Schuster <wolfgang.schuster@gmail.com> wrote:

> 
> Am 14.01.2013 um 09:00 schrieb Alan BRASLAU <alan.braslau@cea.fr>:
> 
> > Hello,
> > 
> > In addition to \startbuffer \stopbuffer
> > it would be nice to have \startappendbuffer \stopappendbuffer.
> > 
> > I see that the lua function buffer.append() exists but I have not
> > worked-out how to add this functionality cleanly as conTeXt macros.
> > I imagine that this might be quite trivial for our TeX programming
> > experts... (for once, a [useful?] suggestion that in the end will
> > not entail many hours of work? :)
> 
> 
> \startbuffer[a]
> Line 1
> \stopbuffer
> 
> \startbuffer[b]
> Line 2
> \stopbuffer
> 
> \starttext
> 
> \startlines
> \getbuffer[a,b]
> \stoplines
> 
> \stoptext
> 
> Wolfgang

Thank you Wolfgang, this is useful.

However, it would still be helpful to be able to generically add to a
buffer without having to rename a new one. Shouldn't be very difficult
but I did not find that anything like this already exists. I often
think this way when I teach, adding steps to an example while repeating
the previous steps.

\startbuffer[a]
Line 1
\stopbuffer

\getbuffer[a]

\startaddtobuffer[a]
Line 2
\stopaddtobuffer

\getbuffer[a]

Alan
___________________________________________________________________________________
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
___________________________________________________________________________________


  reply	other threads:[~2013-01-14 13:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14  8:00 Alan BRASLAU
2013-01-14  8:34 ` Wolfgang Schuster
2013-01-14 13:48   ` Alan BRASLAU [this message]
2013-01-15 13:41     ` Sietse Brouwer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130114144824.3826f2d5@iram-hb-003386.extra.cea.fr \
    --to=alan.braslau@cea.fr \
    --cc=ntg-context@ntg.nl \
    --cc=wolfgang.schuster@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).