Re: [NTG-context] typesetting content of attribute
On 30 Apr 2016, at 19:08, Hans Hagen> wrote: On 4/30/2016 3:28 PM, Meer, Hans van der wrote: The aim is to typeset a TeX-command given in an attribute on an xml node. Example ... \xmlatt{#1}{style} ... where the node has The problem is that this produces the macrotext\bf and does not execute the \bf. I guess that the catcoderegime is not that of TeX here. With what (magical) incantation to do this? Nb. I know that here I could have coded 'bf" and called with \csname..\endcsname, but this is but a simple example and would not work for '\it\bf', etc. \starttexcode \stoptexcode Either I am doing something the wrong way, or it isn't that simple. See the example and its output. Hans van der Meer % failure to typeset attribute. \startxmlsetups demo:texatt \xmlsetsetup{#1}{root|node}{demo:texatt:*} \stopxmlsetups \xmlregisterdocumentsetup{demo}{demo:texatt} \startxmlsetups demo:texatt:root \xmlflush{#1} \stopxmlsetups \startxmlsetups demo:texatt:node node: attribute textstyle = \xmlchainatt{#1}{textstyle}\crlf now use \tex{it}: {\starttexcode \xmlchainatt{#1}{textstyle}"should be italic" \stoptexcode }\crlf \stopxmlsetups \startbuffer[texatt] \stopbuffer \starttext \xmlprocessbuffer{demo}{texatt}{} \stoptext xml-tex-attribute.pdf Description: xml-tex-attribute.pdf ___ 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 ___
Re: [NTG-context] typesetting content of attribute
On 4/30/2016 3:28 PM, Meer, Hans van der wrote: The aim is to typeset a TeX-command given in an attribute on an xml node. Example ... \xmlatt{#1}{style} ... where the node has The problem is that this produces the macrotext\bf and does not execute the \bf. I guess that the catcoderegime is not that of TeX here. With what (magical) incantation to do this? Nb. I know that here I could have coded 'bf" and called with \csname..\endcsname, but this is but a simple example and would not work for '\it\bf', etc. \starttexcode \stoptexcode - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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 ___
[NTG-context] typesetting content of attribute
The aim is to typeset a TeX-command given in an attribute on an xml node. Example ... \xmlatt{#1}{style} ... where the node has The problem is that this produces the macrotext \bf and does not execute the \bf. I guess that the catcoderegime is not that of TeX here. With what (magical) incantation to do this? Nb. I know that here I could have coded 'bf" and called with \csname..\endcsname, but this is but a simple example and would not work for '\it\bf', etc. Hans van der Meer ___ 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 ___