[NTG-context] problem with interaction and TOC

Pablo Rodriguez oinos at gmx.es
Sun Mar 22 13:25:48 CET 2015


On 03/22/2015 12:46 PM, Wolfgang Schuster wrote:
>> Am 22.03.2015 um 11:53 schrieb Pablo Rodriguez:
>> [...]
>>    \startbuffer[demo]
>>    <doc>
>>        <h1><span label="context">ConTeXt</a></h1>
>>        <span label="context">ConTeXt</a>
>>        <span label="tex">TeX</a>
>>        <span label="latex">LaTeX</a>
>>    </doc>
>>    \stopbuffer
> 
> You’re mixing tags, each <span> ends with </a>.

Many thanks for your reply, Wolfgang.

You’re totally right. I wonder how ConTeXt compiled that.


>>    \startxmlsetups xml:logo
>>        \uppercasestring\xmlatt{#1}{label}\xmlatt{#1}{name}\to\ascii
>>        \ifx\ascii\empty\else\getvalue{\ascii}\fi
>>    \stopxmlsetups
>>
>>    \startxmlsetups xml:context
>>        \ConTeXt
>>    \stopxmlsetups
>> [...]
>> Is there a fix for xml:logo or is xml:context the proper fix?
> 
> You need a expandable version for your logo tags.
> 
>    \startxmlsetups xml:logo
>        \getvalue{\utfupper{\xmlatt{#1}{label}}}
>    \stopxmlsetups
> 
> You can also modify this and provide a text which appears when you try
> to show a logo which isn’t defined.
> 
>    \startxmlsetups xml:logo
>        \executeifdefined{\utfupper{\xmlatt{#1}{label}}}{{\tttf ???}}
>    \stopxmlsetups

This is exactly what I needed.

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk


More information about the ntg-context mailing list