ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* directlua in xml-environment
@ 2016-11-13 13:56 Meer, Hans van der
  2016-11-13 17:23 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Meer, Hans van der @ 2016-11-13 13:56 UTC (permalink / raw)
  To: NTG ConTeXt

Here is something I do not understand. Possibly I am doing something wrong.

The following code is fine, within <<>> the current contextversion is printed.
  \def\mymacro{\directlua{tex.print("\\contextversion")}}
  \starttext
   calling mymacro <<\mymacro>>\par
  \stoptext

However calling \mymacro from inside \startxmlsetup .. \stopxmlsetup does not work and results in <<\contextversion>>. I guess that the catcode regime in that environment is to blame.
But how do I change that in order to get things working? I looked into the LuaTeX-manual where catcodes in relation to tex.print are treated, but in vain and could not find how to.

What do I have to change?

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-17  8:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-13 13:56 directlua in xml-environment Meer, Hans van der
2016-11-13 17:23 ` Hans Hagen
2016-11-14  8:50   ` Meer, Hans van der
2016-11-17  8:57     ` Hans Hagen

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).