[NTG-context] reference to structureuservariable

2014-01-20 Thread Peter Münster
Hi,

How can I read a structureuservariable at the end of the section, when
there are subsections? Example:

--8---cut here---start-8---
\starttext
\startsection[title=sec][foo=bar]
%  \edef\myFoo{\structureuservariable{foo}} % workaround
  \startsubsection[title=sub 1]
sub 1
  \stopsubsection
  \startsubsection[title=sub 2]
sub 2
  \stopsubsection
  \par
  foo is \structureuservariable{foo}.
%  foo is \myFoo.  % workaround
\stopsection
\startsection[title=sec][foo=bar]
  no subsections...\par
  foo is \structureuservariable{foo}.
\stopsection
\stoptext
--8---cut here---end---8---

Is there a clean way or do I need to use something like the above
workaround?

TIA for any hints,
-- 
   Peter
___
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] reference to structureuservariable

2014-01-20 Thread Wolfgang Schuster
Hi Peter,  

you can use \namedstructureuservariable{section}{foo} to access the foo 
variable of the section.

Wolfgang  


On 20.01.2014 10:39:01, Peter Münster pmli...@free.fr wrote: Hi,

How can I read a structureuservariable at the end of the section, when
there are subsections? Example:

--8---cut here---start-8---
\starttext
\startsection[title=sec][foo=bar]
% \edef\myFoo{\structureuservariable{foo}} % workaround
\startsubsection[title=sub 1]
sub 1
\stopsubsection
\startsubsection[title=sub 2]
sub 2
\stopsubsection
\par
foo is \structureuservariable{foo}.
% foo is \myFoo. % workaround
\stopsection
\startsection[title=sec][foo=bar]
no subsections...\par
foo is \structureuservariable{foo}.
\stopsection
\stoptext
--8---cut here---end---8---

Is there a clean way or do I need to use something like the above
workaround?

TIA for any hints,
--
Peter
___
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
___
___
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
___