ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@xs4all.nl>,
	Wolfgang Schuster <schuster.wolfgang@googlemail.com>
Subject: Re: Spacing issue in itemize
Date: Fri, 14 Jan 2022 09:09:00 +0100	[thread overview]
Message-ID: <96579ed4-0dcb-9ea5-174e-30cd5249d625@xs4all.nl> (raw)
In-Reply-To: <nycvar.YAK.7.78.908.2201131155500.86722@nqv-guvaxcnq>

On 1/13/2022 6:15 PM, Aditya Mahajan via ntg-context wrote:
> On Thu, 13 Jan 2022, Gavin via ntg-context wrote:
> 
>> Hi list,
>>
>> When I define an items group, it seems to mess up the spacing for a nested item group. See example below. Any ideas?
>>
>> I’m typesetting with
>>
>> 	> ConTeXt  ver: 2022.01.06 19:51 LMTX  fmt: 2022.1.9  int: english/english
>>
>> on an M1 Mac.
>>
>> Thanks!
>> Gavin
>>
>>
>> \usemodule[visual]
>>
>> \defineitemgroup[questions]
>> \setupquestions [each] [n]
>>
>> \starttext
>> This numbered list uses my item group \quotation{questions.} The itemize inside is missing space above item (a).
>> \startquestions
>>    \item \fakewords{15}{20}
>>      \startitemize[a][left=(,stopper=,right=)]
>>        \item \fakewords{10}{15}
>>        \item \fakewords{10}{15}
>>      \stopitemize
>>    \item \fakewords{10}{15}
>> \stopquestions
>>
>> This numbered list uses itemize. The itemize inside has the expected space above item (a).
>> \startitemize[n]
>>    \item \fakewords{15}{20}
>>      \startitemize[a][left=(,stopper=,right=)]
>>        \item \fakewords{10}{15}
>>        \item \fakewords{10}{15}
>>      \stopitemize
>>    \item \fakewords{10}{15}
>> \stopitemize
>>
>> \stoptext
> 
> This is by design. This is what is happening:
> 
> \usemodule[visual]
> 
> \defineitemgroup[questions]
> 
> \starttext
> This numbered list uses my item group \quotation{questions.} The itemize inside is missing space above item (a).
> \startquestions[n][inbetween={AAA}]
>    \item \fakewords{15}{20}
>      \startitemize[a][left=(,stopper=,right=),before={BBB}]
>        \item \fakewords{10}{15}
>        \item \fakewords{10}{15}
>      \stopitemize
>    \item \fakewords{10}{15}
> \stopquestions
> 
> This numbered list uses itemize. The itemize inside has the expected space above item (a).
> \startitemize[n][inbetween={AAA}]
>    \item \fakewords{15}{20}
>      \startitemize[a][left=(,stopper=,right=),before={BBB}]
>        \item \fakewords{10}{15}
>        \item \fakewords{10}{15}
>      \stopitemize
>    \item \fakewords{10}{15}
> \stopitemize
> 
> \stoptext
> 
> Note that in the first case, the inbetween does not get inserted at the start of the nested itemization (because, ConTeXt doesn't think that they are nested as the names are different). But the before key of the nested itemization doesn't get inserted in both cases because ConTeXt thinks that the itemization is nested!
> 
> You can change this behavior by using:
> 
> \unprotect
> \c_strc_itemgroups_spacing_mode\plusone
> \protect
> 
> in which case both outputs are similar.
> 
> @Hans: Does it make sense to add a setups key to \setupitemize to keep such changes local?
% 0 = before/after
% 1 = between unless before
% 2 = between

\c_strc_itemgroups_spacing_mode\plustwo

The question then is: "what key" (we have c!inherit available) and "what 
values" (numbers ?) ...

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2022-01-14  8:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13 16:48 Gavin via ntg-context
2022-01-13 17:15 ` Aditya Mahajan via ntg-context
2022-01-13 21:32   ` Gavin via ntg-context
2022-01-14  8:09   ` Hans Hagen via ntg-context [this message]
2022-01-14 13:52     ` Gavin via ntg-context
2022-01-14 15:22     ` Aditya Mahajan via ntg-context

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=96579ed4-0dcb-9ea5-174e-30cd5249d625@xs4all.nl \
    --to=ntg-context@ntg.nl \
    --cc=j.hagen@xs4all.nl \
    --cc=schuster.wolfgang@googlemail.com \
    /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).