Am 08.08.2012 um 17:04 schrieb Sietse Brouwer <sbbrou...@gmail.com>:

> I'm trying to work out how to describe the new feature, so I can add
> that to the documentation. I think I see two features, but I'm not
> sure. Can you tell me if the below is correct?
> 
> New feature 1: previously we could only do
> \startplacefigure[reference=fig:mill, title={A Mill}]
> or
> \startsection[reference=sec:sheep, title={The Sheep}]
> 
> but now we can do
> \startplacefigure[reference=fig:mill, title={A Mill}][resource=mill]
> or
> \startsection[reference=sec:sheep, title={The Sheep}][mykey=myvalue]
> 
> Nothing is done with the parameters in the second key=value list, but
> they are stored as part of the object when the object is written to
> its figures/sections/whatever list; and there they can be used in
> constructing the Table of figures/contents/whatever.

Yes, the user variables are only stored in the utility file and can be used 
when you print the list entries.

> New feature 2: the command
> \rawstructurelistuservariable{#1}
> . This command can be used by custom list entry macros like
> \mylistentrymacro below:
> \setuplist[somelist][alternative=command, command=\mylistentrymacro]
> 
> The command gets a property from the current list entry object, like so:
> \rawstructurelistuservariable{resource} %--> mill
> 
> Question: does this work, too, or can we only access values in the
> *second* key=value list?
> \rawstructurelistuservariable{reference} %--> fig:mill

The arguments you give with the first argument are processed by context before 
they
are written to the utility file and only three values can be used when you 
create your
own list layout, the user variables on the other side are written to the 
utility file without
any modification and whatever you write here can be used in the list.

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