[NTG-context] Assigning a variable to the list argument in \setupsection

Wolfgang Schuster schuster.wolfgang at gmail.com
Thu Apr 14 19:15:14 CEST 2016


> Michael Guravage <mailto:guravage at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20160414/9ded6edb/attachment.html>


More information about the ntg-context mailing list