Hi, It appears that Context cannot deal with an \index command in the term of a definition list: \startvariable{sarge\index{sarge}} De groene soldaat \stopvariable In XML documents this may occur: <varlistentry> <term>sarge <indexterm significance="normal"> <primary>sarge</primary> </indexterm> </term> <listitem> <para>De groene soldaat</para> </listitem> </varlistentry> Is it a fundamental problem to enable this in Context? If so I must find other solutions. Does Context have something for stacks? Regards, Simon -- Simon Pepping email: spepping@scaprea.hobby.nl
At 08:27 PM 3/17/2003 +0100, you wrote:
Does Context have something for stacks?
In what way? There is \pushmacro \popmacro cum suis; also, when you're taling about xml, you can save xml constructs either or not encapsulated in elements with additional attributes but i suppose that you already located that code -) Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
At 08:27 PM 3/17/2003 +0100, you wrote:
Hi,
It appears that Context cannot deal with an \index command in the term of a definition list:
\startvariable{sarge\index{sarge}} De groene soldaat \stopvariable
In XML documents this may occur:
<varlistentry> <term>sarge <indexterm significance="normal"> <primary>sarge</primary> </indexterm> </term> <listitem> <para>De groene soldaat</para> </listitem> </varlistentry>
Is it a fundamental problem to enable this in Context? If so I must find other solutions.
\defineXMLenvironmentsave[indexterm][significance=] {\bgroup \defineXMLsave[primary]} {\expanded{\index{\XMLflush{primary}}}% \egroup} Hans (who will look into indexes some day soon; maybe provide an xml mode for them) ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
On Tue, Mar 18, 2003 at 09:08:33AM +0100, Hans Hagen wrote:
At 08:27 PM 3/17/2003 +0100, you wrote:
In XML documents this may occur:
<varlistentry> <term>sarge <indexterm significance="normal"> <primary>sarge</primary> </indexterm> </term> <listitem> <para>De groene soldaat</para> </listitem> </varlistentry>
Is it a fundamental problem to enable this in Context? If so I must find other solutions.
\defineXMLenvironmentsave[indexterm][significance=] {\bgroup \defineXMLsave[primary]} {\expanded{\index{\XMLflush{primary}}}% \egroup}
The term element is saved in \XMLDBterm, complete with embedded indexterm, and then used as: \startvariable{\XMLDBterm}, so the above \index command would still be in the term of the definitionlist. I now save the indexterm element when \XMLDBterm is expanded, and process it after \startvariable. However, \XMLDBterm may contain more than one indexterm element (not likely, but it can), so I would need to save a stack of them to cater for that possibility. Of course I could also expand the term element and save the expanded value in \XMLDBterm, but that has its own risks. Regards, Simon -- Simon Pepping email: spepping@scaprea.hobby.nl
participants (2)
-
Hans Hagen
-
Simon Pepping