Michael Guravage <mailto:gurav...@gmail.com>
14. April 2016 um 09:46
Greetings,

I would like to use a variable for the value of the list argument in, e.g., the \startsection command. If you compile my little example you will see that the first 'literal' assignment works, while the second 'variable' assignment does not. What am I missing here?

ConTeXt saves by default the list entries without expanding them
which means you get "\getvariable{TOC}{list}" as entry in the table
of contents for your section section entry but at this moment you
haven’t set a value for this variable.

To get the content of the variable in the list entry you have to expand
the argument of the list key, one way is the use of the \expanded
command as shown by Marco but you also let ConTeXt do this for
you (no need for \expanded{…}) when you add

    \setuphead[section][expansion=yes]

at the begin of your document.

Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to