From: "Martin Kolařík" <martin.kolarik@email.cz>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Strange expansion behavior in XML/luatex
Date: Tue, 01 Jun 2010 09:03:10 +0200 [thread overview]
Message-ID: <4C04B0AE.6090500@email.cz> (raw)
In-Reply-To: <4C0433E7.5010402@wxs.nl>
I see,
and for the single case it works. Also saving is fine, I am using it.
Unfortunately, my example was too reduced :-). In fact, I have a problem
with more complex documents, for example, think about:
<section>
<caption>Some <inline what="something"> caption</caption>
<text><p>Text.</p></text>
</section>
Now, if I want not to only typeset a caption, but also to store it and
reuse it later (typeset it twice, e.g. in the marging or elsewhere in
the page, ...), it fails (on \processaction, \doif, ...).
So, if I understand, there is a way to modify my XML template to be safe
during expanding -- I would use self unexpandable macros). Another way
is problematic, as \edef inside \edef causes problems? Is it true or
there is some other way?
Thank you,
Martin
Dne 1.6.2010 0:10, Hans Hagen napsal(a):
> On 29-5-2010 12:01, Martin Kolařík wrote:
>
>> I do not know, if it is a bug or a feature :-); but notwithstanding the
>> fact, similar code I used in MkII worked very well.
>
> effectively you as for:
>
> \starttext
> \edef\content{\processaction[x][something=>A thing, nothing=>Hic
> sunt leones]}
> \stoptext
>
> and that will not work; ok, we could make processaction unexpandable
> but i'm sure that you want something different
>
> you can save the content this way:
>
> \edef\content{#1}
>
> and do this later on:
>
> \xmlflush{\content}
>
> Hans
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
> | 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
___________________________________________________________________________________
next prev parent reply other threads:[~2010-06-01 7:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-29 10:01 Martin Kolařík
2010-05-31 22:10 ` Hans Hagen
2010-06-01 7:03 ` Martin Kolařík [this message]
2010-06-01 7:51 ` Hans Hagen
2010-06-01 8:17 ` Martin Kolařík
2010-06-01 8:23 ` 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=4C04B0AE.6090500@email.cz \
--to=martin.kolarik@email.cz \
--cc=ntg-context@ntg.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).