On 05/06/2015 09:38 PM, Pablo Rodriguez wrote:
How could I get the following command working?

     \ctxlua{tex.print(string.sub(context("\\xmlatt{#1}{href}"),2))}

I'm not sure that this will ever work - you're mixing and nesting lua and tex code in a messy way. My suggestion would be: if you need to process your xml code with lua, then process things in lua and separate the lua part from your tex code. Write a function xml.functions.a which does the substring split and the printing to context. I have written a page on the wiki http://wiki.contextgarden.net/XML_Lua which may be useful.

Thomas
___________________________________________________________________________________
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 via email to