ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: Jaroslav Hajtmar <hajtmar@gyza.cz>,
	mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Hans Hagen <pragma@wxs.nl>
Subject: Re: Problem with \writebetweenlist
Date: Sat, 25 Feb 2012 17:52:37 +0100	[thread overview]
Message-ID: <52B0A934-BE34-4465-99BB-67B3E25BC0CD@googlemail.com> (raw)
In-Reply-To: <4F48BFAF.3070909@gyza.cz>


Am 25.02.2012 um 12:02 schrieb Jaroslav Hajtmar:

> Thanx Wolfgang
> for reply, but it does not work still.

I was in a hurry and had no time to test it but the following is tested and works.

\def\strc_lists_write_between[#tag][#settings]#command% we can overload location
  {\begingroup
   \edef\currentlist{#tag}%
   \doifelse{\namedlistparameter{#tag}\c!state}\v!start
     {\strc_lists_inject_yes[#settings,\c!type=\s!command][command={#command}]}
     {\endgroup}}

\def\strc_lists_write_to_yes[#settings]#first#second%
  {\strc_lists_inject_yes[\c!location=\v!here,#settings,\c!type=\s!simple][first={#first},second={#second}]}

@Hans The “\s!” prefix for first, second and command can’t be used because otherwise the keys end up as “\\s!first ” in Lua table index.

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
___________________________________________________________________________________


  parent reply	other threads:[~2012-02-25 16:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-24 11:34 Jaroslav Hajtmar
2012-02-24 21:58 ` Hans Hagen
2012-02-24 22:19   ` Jaroslav Hajtmar
2012-02-25  7:24     ` Wolfgang Schuster
2012-02-25 11:02       ` Jaroslav Hajtmar
2012-02-25 11:23         ` Jaroslav Hajtmar
2012-02-25 16:52         ` Wolfgang Schuster [this message]
2012-02-25 17:55           ` Jaroslav Hajtmar
2012-02-25 18:43             ` Wolfgang Schuster
2012-02-25 19:03               ` Jaroslav Hajtmar
2012-02-26 16:28           ` Hans Hagen

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=52B0A934-BE34-4465-99BB-67B3E25BC0CD@googlemail.com \
    --to=schuster.wolfgang@googlemail.com \
    --cc=hajtmar@gyza.cz \
    --cc=ntg-context@ntg.nl \
    --cc=pragma@wxs.nl \
    /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).