[NTG-context] removing # in XML identifiers

Pablo Rodriguez oinos at gmx.es
Thu May 7 20:16:01 CEST 2015

On 05/06/2015 10:49 PM, Thomas A. Schmitz wrote:
> 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.

Many thanks for your reply, Thomas.

I have tried the following:

    \startxmlsetups xml:a
        function xml.functions.removehash(str)

But for some reason unknown to me, it doesn’t work. It works on a
standard file, but now there.

What am I missing?

Many thanks for your help,


More information about the ntg-context mailing list