On 13-12-2010 11:20, Steffen Wolfrum wrote:
Am 08.11.2010 um 23:03 schrieb Marco:
Hello there.
Currently \writebetweenlist doesn't work as advised. It inserts the argument before the last entry of the list. The minimal example is provided by the reference itself.
http://wiki.contextgarden.net/Reference/en/writebetweenlist
The rule is correctly inserted at http://live.contextgarden.net/ and in the ConTeXt shipped with TeXlive 2010 (2010.05.24), but not with the current beta and the 2010.07.30 version. mkii works fine.
It prints
--rule-- List entry A List entry B
Unfortunately, I can confirm this with current version:
ver: 2010.12.12 17:06 MKIV
Help please!
There is a good reason for this. Inbetween has multiple usage and these are conflicting: - in order to get the right page info associated it needs to be anchored in the text stream - in that case a node can interfere with spacing and can come unexpected - sometimes direct flushing is needed, sometimes delayed btw, all these issues have been observed by users every now and then Now, if unexpected interference is the hardest to track down, inbetween is an immediate action. In principle one can influence that but it's not that intuitive. So, I've now added an option to (1) the flushers and (2) the list placers. The following example shows this: \definelist[testlist][criterium=all] \starttext Regular list entries are bound to a specific location in order to get the right pagenumber etc.\ associated. When pushing something inbetween (in mkiv) it ends up directtly in the list. This is the default because otherwise users will wonder why spacing might get messed up (due to an unseen but present node). It is possible to force a location by explicitly setting \type {location} to \type {here}. Another way to force a certain order is to set the \type {order} variable when placing a list. The \type {command} option only pushes commands into the right order, and \type {all} orders all entries (which might be too much). In this case no specific location is needed with the inbetween method. Maybe additional mechanisms show up some day. \subject{normal} \placelist[testlist] \subject{command} \placelist[testlist][order=command] \subject{all} \placelist[testlist][order=all] \page \input tufte \writetolist [testlist] {1} {One} \writebetweenlist[testlist] {\blackrule[color=red,width=\hsize]} \writebetweenlist[testlist][location=here]{\blackrule[color=blue,width=\hsize]} \writetolist [testlist] {2} {Second} \writetolist [testlist][location=none]{W} {Whatever} \writebetweenlist[testlist] {\blackrule[color=green,width=\hsize]} \stoptext I admit that it's not an easy mechanism but any default would at some point trigger complaints. So it probably needs to be wikified. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------