
6 May
2015
6 May
'15
8:49 p.m.
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