ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: Steffen Wolfrum <context@st.estfiles.de>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: writebetweenlist regression (mkiv)
Date: Mon, 13 Dec 2010 23:12:08 +0100	[thread overview]
Message-ID: <4D069A38.3030900@wxs.nl> (raw)
In-Reply-To: <98F77031-B60B-46C2-9A28-E9EEAB3507DC@st.estfiles.de>

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
-----------------------------------------------------------------
___________________________________________________________________________________
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	other threads:[~2010-12-13 22:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-08 22:03 Marco
2010-12-13 10:20 ` Steffen Wolfrum
2010-12-13 22:12   ` Hans Hagen [this message]
2010-12-14  9:26     ` Marco Pessotto
2010-12-14 10:37       ` Steffen Wolfrum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D069A38.3030900@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=context@st.estfiles.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).