ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Looking for itemize help
@ 2024-01-15  0:42 Jim
  2024-01-15  7:17 ` [NTG-context] " Henning Hraban Ramm
  2024-01-15 16:39 ` [NTG-context] " Wolfgang Schuster
  0 siblings, 2 replies; 14+ messages in thread
From: Jim @ 2024-01-15  0:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I have

\setupwhitespace [big]

so that I get "a blank line" between paragraphs.

I would like to *not* have "blank lines" before and after my items.  For
example, if there is more "paragraph text" after the last item I would like
to see this structure:

------------------------------------------------------------------

Some text preceding the list of items:
a. Item one.
b. Second item.
This sentence is part of the same paragraph.

The next paragraph starts here...

------------------------------------------------------------------

and if there is no "paragraph text" after the last item, I'd like to see
this structure:

------------------------------------------------------------------

Some text preceding the list of items:
a. Item one.
b. Second item.

The next paragraph starts here...

------------------------------------------------------------------

Try as I might, I can't find the right options to give to \startitemize.

The closest I have found is to start with
\startitemize[a,nowhite]
but that prevents the "blank line" even in the second case above, which is
not what I want.  Further, 'packed' and 'joinedup' seem to behave
identically here, both leaving "a blank line" before the first item and
after the last item.  

Clearly, I can force a blank line before the following paragraph with a
\vskip<the right amount>, but that seems like a crude way to do it.

Can someone either enlighten me on either
(a) the Right ConTeXt Way to do this, or
(b) a document that would tell me this, if I knew to read it?

I've looked in the wiki, the not-so-short intro to ConTeXt, and "ConTeXt:
an excursion" with no luck.

Thanks.

                                Jim
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [NTG-context] Re: Looking for itemize help
  2024-01-15  0:42 [NTG-context] Looking for itemize help Jim
@ 2024-01-15  7:17 ` Henning Hraban Ramm
  2024-01-15 14:36   ` Jim
  2024-01-15 16:39 ` [NTG-context] " Wolfgang Schuster
  1 sibling, 1 reply; 14+ messages in thread
From: Henning Hraban Ramm @ 2024-01-15  7:17 UTC (permalink / raw)
  To: ntg-context

Am 15.01.24 um 01:42 schrieb Jim:

> Some text preceding the list of items:
> a. Item one.
> b. Second item.
> This sentence is part of the same paragraph.
> 
> The next paragraph starts here...

\startitemize[packed,joinedup] should be the right combination.

Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [NTG-context] Re: Looking for itemize help
  2024-01-15  7:17 ` [NTG-context] " Henning Hraban Ramm
@ 2024-01-15 14:36   ` Jim
  2024-01-15 14:47     ` Aditya Mahajan
                       ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Jim @ 2024-01-15 14:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Hraban,

thanks for your response.  But...

On Mon, Jan 15, 2024 at 08:17 (+0100), Henning Hraban Ramm wrote:

> Am 15.01.24 um 01:42 schrieb Jim:

>> Some text preceding the list of items:
>> a. Item one.
>> b. Second item.
>> This sentence is part of the same paragraph.

>> The next paragraph starts here...

> \startitemize[packed,joinedup] should be the right combination.

I won't argue about "should", but I will point out it isn't, at least on my
computer with a recently updated context.

Here is a non-minimal but short non-working example.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setupwhitespace [big]

\setuppapersize [letter]

\starttext
This is a short paragraph.

This is a line before a {\bf packed, joinedup} itemization.
\startitemize[packed,joinedup]
\item First item.
\item Second item.
\stopitemize
This is a line immediately following the above itemization.

This is a short paragraph.

This is a line before a {\bf packed, joinedup} itemization.
\startitemize[packed,joinedup]
\item First item.
\item Second item.
\stopitemize
         
This is another short paragraph.

\stoptext

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Thoughts?

                                Jim
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [NTG-context] Re: Looking for itemize help
  2024-01-15 14:36   ` Jim
@ 2024-01-15 14:47     ` Aditya Mahajan
  2024-01-15 16:15       ` Jim
  2024-01-15 15:08     ` Henning Hraban Ramm
  2024-01-15 15:51     ` [NTG-context] Re: [External] " Rogers, Michael K
  2 siblings, 1 reply; 14+ messages in thread
From: Aditya Mahajan @ 2024-01-15 14:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 15 Jan 2024, Jim wrote:

> Thoughts?


\startitemize[nowhite, after]
  . . .
\stopitemize

See: https://adityam.github.io/context-blog/post/spacing-in-itemize/

Aditya

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [NTG-context] Re: Looking for itemize help
  2024-01-15 14:36   ` Jim
  2024-01-15 14:47     ` Aditya Mahajan
@ 2024-01-15 15:08     ` Henning Hraban Ramm
  2024-01-15 15:51     ` [NTG-context] Re: [External] " Rogers, Michael K
  2 siblings, 0 replies; 14+ messages in thread
From: Henning Hraban Ramm @ 2024-01-15 15:08 UTC (permalink / raw)
  To: ntg-context

Am 15.01.24 um 15:36 schrieb Jim:
>> \startitemize[packed,joinedup] should be the right combination.
> 
> I won't argue about "should", but I will point out it isn't, at least on my
> computer with a recently updated context.
> 
> Here is a non-minimal but short non-working example.

Sorry, then you need "nowhite". Usually that’s synonymous to 
"packed,joineup", but apparently not if whitespace is active.

I added a few comments to 
https://wiki.contextgarden.net/Command/setupitemgroup
Unfortunately, this is one of the areas where we have a plethora of 
options and no documentation about them.

Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [NTG-context] Re: [External] Re: Looking for itemize help
  2024-01-15 14:36   ` Jim
  2024-01-15 14:47     ` Aditya Mahajan
  2024-01-15 15:08     ` Henning Hraban Ramm
@ 2024-01-15 15:51     ` Rogers, Michael K
  2024-01-15 16:28       ` Jim
  2 siblings, 1 reply; 14+ messages in thread
From: Rogers, Michael K @ 2024-01-15 15:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Jim,

I think you want alternative “a”, if the dot instead of a letter is the problem and not the whitespace:

%%%%%%%%%%

\starttext

This is a short paragraph.

This is a line before a {\bf packed, joinedup} itemization.
\startitemize[a,packed,joinedup]
\item First item.
\item Second item.
\stopitemize
This is a line immediately following the above itemization.

This is a short paragraph.

\stoptext

%%%%%%%%%%

Cheers,

Michael

> On Jan 15, 2024, at 6:36 AM, Jim <zlists+context@jdvb.ca> wrote:
>
> Hi Hraban,
>
> thanks for your response.  But...
>
> On Mon, Jan 15, 2024 at 08:17 (+0100), Henning Hraban Ramm wrote:
>
>> Am 15.01.24 um 01:42 schrieb Jim:
>
>>> Some text preceding the list of items:
>>> a. Item one.
>>> b. Second item.
>>> This sentence is part of the same paragraph.
>
>>> The next paragraph starts here...
>
>> \startitemize[packed,joinedup] should be the right combination.
>
> I won't argue about "should", but I will point out it isn't, at least on my
> computer with a recently updated context.
>
> Here is a non-minimal but short non-working example.
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> \setupwhitespace [big]
>
> \setuppapersize [letter]
>
> \starttext
> This is a short paragraph.
>
> This is a line before a {\bf packed, joinedup} itemization.
> \startitemize[packed,joinedup]
> \item First item.
> \item Second item.
> \stopitemize
> This is a line immediately following the above itemization.
>
> This is a short paragraph.
>
> This is a line before a {\bf packed, joinedup} itemization.
> \startitemize[packed,joinedup]
> \item First item.
> \item Second item.
> \stopitemize
>
> This is another short paragraph.
>
> \stoptext
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> Thoughts?
>
>                                Jim
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl/ / https://context.aanhet.net/ (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net/
> ___________________________________________________________________________________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [NTG-context] Re: Looking for itemize help
  2024-01-15 14:47     ` Aditya Mahajan
@ 2024-01-15 16:15       ` Jim
  2024-01-15 19:33         ` Henning Hraban Ramm
  2024-01-16  1:15         ` Bruce Horrocks
  0 siblings, 2 replies; 14+ messages in thread
From: Jim @ 2024-01-15 16:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Two replies in one...

On Mon, Jan 15, 2024 at 15:47 (+0100), Aditya Mahajan wrote:

> On Mon, 15 Jan 2024, Jim wrote:

>> Thoughts?


> \startitemize[nowhite, after]
>   . . .
> \stopitemize

> See: https://adityam.github.io/context-blog/post/spacing-in-itemize/

Aditya,

thanks for the suggestion, and thanks for the link.

"after" does the trick, but not in an automatic way.  I would like
something which automagically "does the right thing".

Perhaps it just doesn't exist in ConTeXt.  The plain TeX macros I wrote for
itemization do what I want, so I know it isn't (at least in plain TeX) a
difficult thing.



On Mon, Jan 15, 2024 at 16:08 (+0100), Henning Hraban Ramm wrote:

> Am 15.01.24 um 15:36 schrieb Jim:
>>> \startitemize[packed,joinedup] should be the right combination.

>> I won't argue about "should", but I will point out it isn't, at least on my
>> computer with a recently updated context.

>> Here is a non-minimal but short non-working example.

> Sorry, then you need "nowhite". Usually that’s synonymous to
> "packed,joineup", but apparently not if whitespace is active.

"Usually" is in the eye of the beholder.  ;-)

I would have thought that having non-zero whitespace between paragraphs is
common.  For example, Aditya's blog linked to above has whitespace between
paragraphs.  Are you suggesting that is uncommon, or (showing my
Context-noobness) is \setupwhitespace not the usual ConTeXt way to do this?

> I added a few comments to
> https://wiki.contextgarden.net/Command/setupitemgroup
> Unfortunately, this is one of the areas where we have a plethora of options
> and no documentation about them.

Thanks for adding them.  I see you did not document the all-important (to
me) "after" (or "before") in the wiki.  Would you like to add that?  If
you don't have time right now, I'd be happy to do so.

Cheers.

                                Jim
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [NTG-context] Re: [External] Re: Looking for itemize help
  2024-01-15 15:51     ` [NTG-context] Re: [External] " Rogers, Michael K
@ 2024-01-15 16:28       ` Jim
  0 siblings, 0 replies; 14+ messages in thread
From: Jim @ 2024-01-15 16:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Michael,

thanks for getting back.  But the problem is not the text in front of the
items, but rather vertical whitespace that I don't want.  (Or, with
'nowhite', vertical space that I might want not being there.)

Cheers.
                                Jim

On Mon, Jan 15, 2024 at 15:51 (+0000), Rogers, Michael K wrote:

> Hi Jim,

> I think you want alternative “a”, if the dot instead of a letter is the problem and not the whitespace:

> %%%%%%%%%%

> \starttext

> This is a short paragraph.

> This is a line before a {\bf packed, joinedup} itemization.
> \startitemize[a,packed,joinedup]
> \item First item.
> \item Second item.
> \stopitemize
> This is a line immediately following the above itemization.

> This is a short paragraph.

> \stoptext

> %%%%%%%%%%

> Cheers,

> Michael

>> On Jan 15, 2024, at 6:36 AM, Jim <zlists+context@jdvb.ca> wrote:

>> Hi Hraban,

>> thanks for your response.  But...

>> On Mon, Jan 15, 2024 at 08:17 (+0100), Henning Hraban Ramm wrote:

>>> Am 15.01.24 um 01:42 schrieb Jim:

>>>> Some text preceding the list of items:
>>>> a. Item one.
>>>> b. Second item.
>>>> This sentence is part of the same paragraph.

>>>> The next paragraph starts here...

>>> \startitemize[packed,joinedup] should be the right combination.

>> I won't argue about "should", but I will point out it isn't, at least on my
>> computer with a recently updated context.

>> Here is a non-minimal but short non-working example.

>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

>> \setupwhitespace [big]

>> \setuppapersize [letter]

>> \starttext
>> This is a short paragraph.

>> This is a line before a {\bf packed, joinedup} itemization.
>> \startitemize[packed,joinedup]
>> \item First item.
>> \item Second item.
>> \stopitemize
>> This is a line immediately following the above itemization.

>> This is a short paragraph.

>> This is a line before a {\bf packed, joinedup} itemization.
>> \startitemize[packed,joinedup]
>> \item First item.
>> \item Second item.
>> \stopitemize

>> This is another short paragraph.

>> \stoptext

>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

>> Thoughts?

>> Jim
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to the Wiki!

>> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>> webpage  : https://www.pragma-ade.nl/ / https://context.aanhet.net/ (mirror)
>> archive  : https://github.com/contextgarden/context
>> wiki     : https://wiki.contextgarden.net/
>> ___________________________________________________________________________________

> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!

> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [NTG-context] Re: Looking for itemize help
  2024-01-15  0:42 [NTG-context] Looking for itemize help Jim
  2024-01-15  7:17 ` [NTG-context] " Henning Hraban Ramm
@ 2024-01-15 16:39 ` Wolfgang Schuster
  1 sibling, 0 replies; 14+ messages in thread
From: Wolfgang Schuster @ 2024-01-15 16:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Jim

Jim schrieb am 15.01.2024 um 01:42:
> I have
>
> \setupwhitespace [big]
>
> so that I get "a blank line" between paragraphs.
>
> I would like to *not* have "blank lines" before and after my items.  For
> example, if there is more "paragraph text" after the last item I would like
> to see this structure:
>
> ------------------------------------------------------------------
>
> Some text preceding the list of items:
> a. Item one.
> b. Second item.
> This sentence is part of the same paragraph.
>
> The next paragraph starts here...
>
> ------------------------------------------------------------------
>
> and if there is no "paragraph text" after the last item, I'd like to see
> this structure:
>
> ------------------------------------------------------------------
>
> Some text preceding the list of items:
> a. Item one.
> b. Second item.
>
> The next paragraph starts here...
>
> ------------------------------------------------------------------
>
> Try as I might, I can't find the right options to give to \startitemize.
>
> The closest I have found is to start with
> \startitemize[a,nowhite]
> but that prevents the "blank line" even in the second case above, which is
> not what I want.  Further, 'packed' and 'joinedup' seem to behave
> identically here, both leaving "a blank line" before the first item and
> after the last item.
>
> Clearly, I can force a blank line before the following paragraph with a
> \vskip<the right amount>, but that seems like a crude way to do it.
>
> Can someone either enlighten me on either
> (a) the Right ConTeXt Way to do this, or
> (b) a document that would tell me this, if I knew to read it?
>
> I've looked in the wiki, the not-so-short intro to ConTeXt, and "ConTeXt:
> an excursion" with no luck.

Hi Jim,

such a feature exists only to suppress paragraph indentation but not to 
ignore whitespace
between paragraphs.

\setupitemize[indentnext=auto]

\setupindenting[yes,medium]

\starttext

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa 
turpis,
semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi 
\unknown

\startitemize
\startitem Lorem ipsum \unknown \stopitem
\stopitemize

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa 
turpis,
semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi 
\unknown

\startitemize
\startitem Lorem ipsum \unknown \stopitem
\stopitemize
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa 
turpis,
semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi 
\unknown

\stoptext

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [NTG-context] Re: Looking for itemize help
  2024-01-15 16:15       ` Jim
@ 2024-01-15 19:33         ` Henning Hraban Ramm
  2024-01-15 20:11           ` Jim
  2024-01-16  1:15         ` Bruce Horrocks
  1 sibling, 1 reply; 14+ messages in thread
From: Henning Hraban Ramm @ 2024-01-15 19:33 UTC (permalink / raw)
  To: ntg-context

Am 15.01.24 um 17:15 schrieb Jim:
> "after" does the trick, but not in an automatic way.  I would like
> something which automagically "does the right thing".

With “automagically”, do you mean for all instances?

\setupitemgroup[itemize][nowhite,after]

>> Sorry, then you need "nowhite". Usually that’s synonymous to
>> "packed,joineup", but apparently not if whitespace is active.
> 
> "Usually" is in the eye of the beholder.  ;-)
> 
> I would have thought that having non-zero whitespace between paragraphs is
> common.  For example, Aditya's blog linked to above has whitespace between
> paragraphs.  Are you suggesting that is uncommon, or (showing my
> Context-noobness) is \setupwhitespace not the usual ConTeXt way to do this?

Yes, it’s common, and \setupwhitespace is right.

I just don’t remember all the setups in my many environments all the time.

>> I added a few comments to
>> https://wiki.contextgarden.net/Command/setupitemgroup
>> Unfortunately, this is one of the areas where we have a plethora of options
>> and no documentation about them.
> 
> Thanks for adding them.  I see you did not document the all-important (to
> me) "after" (or "before") in the wiki.  Would you like to add that?  If
> you don't have time right now, I'd be happy to do so.

It’s there now.
I’m not sure about the options regarding width

Hraban

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [NTG-context] Re: Looking for itemize help
  2024-01-15 19:33         ` Henning Hraban Ramm
@ 2024-01-15 20:11           ` Jim
  0 siblings, 0 replies; 14+ messages in thread
From: Jim @ 2024-01-15 20:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Jan 15, 2024 at 20:33 (+0100), Henning Hraban Ramm wrote:

> Am 15.01.24 um 17:15 schrieb Jim:
>> "after" does the trick, but not in an automatic way.  I would like
>> something which automagically "does the right thing".

> With “automagically”, do you mean for all instances?

I hate to go out on a limb and say "all", but I mean that if there is text
"immediately" following the \stopitemize (i.e., no \par token or vertical
mode material before more text), then there is no white space following the
last \item.  But if there is a blank line following the last \item, there
will be vertical white space corresponding to the current \setupwhitespace
setting following the last item.

> \setupitemgroup[itemize][nowhite,after]

>>> Sorry, then you need "nowhite". Usually that’s synonymous to
>>> "packed,joineup", but apparently not if whitespace is active.

>> "Usually" is in the eye of the beholder.  ;-)

>> I would have thought that having non-zero whitespace between paragraphs is
>> common.  For example, Aditya's blog linked to above has whitespace between
>> paragraphs.  Are you suggesting that is uncommon, or (showing my
>> Context-noobness) is \setupwhitespace not the usual ConTeXt way to do this?

> Yes, it’s common, and \setupwhitespace is right.

OK, thanks for the confirmation.

> I just don’t remember all the setups in my many environments all the time.

>>> I added a few comments to
>>> https://wiki.contextgarden.net/Command/setupitemgroup
>>> Unfortunately, this is one of the areas where we have a plethora of options
>>> and no documentation about them.

>> Thanks for adding them.  I see you did not document the all-important (to
>> me) "after" (or "before") in the wiki.  Would you like to add that?  If
>> you don't have time right now, I'd be happy to do so.

> It’s there now.

Thanks, I have already seen them!

> I’m not sure about the options regarding width

I've done some more exploration about items in the last hour or so.  I'm
not sure I am yet ready to update the wiki (I am concerned that incomplete
information may be worse than no information), but if/when I feel
confident, I will add some information about some options.  (I guess the
implementation code is the current definitive documentation!)

Cheers.
                                Jim
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [NTG-context] Re: Looking for itemize help
  2024-01-15 16:15       ` Jim
  2024-01-15 19:33         ` Henning Hraban Ramm
@ 2024-01-16  1:15         ` Bruce Horrocks
  2024-01-16 14:39           ` Jim
  1 sibling, 1 reply; 14+ messages in thread
From: Bruce Horrocks @ 2024-01-16  1:15 UTC (permalink / raw)
  To: ntg-context mailing list

On 15 Jan 2024, at 16:15, Jim <zlists+context@jdvb.ca> wrote:
> 
> I would like
> something which automagically "does the right thing".

Not pretty, but... :-)

\setupwhitespace [big]
\setuppapersize [letter]

\define[1]\mystopitemize{\stopitemize\doifsamestringelse{#1}{\par}{\blank}{#1}}

\starttext
This is a short paragraph.

This is a line before an itemization.
\startitemize[nowhite]
\item First item.
\item Second item.
\mystopitemize
This is a short paragraph immediately following.

This is a line before a {\bf nowhite, after} itemization.
\startitemize[nowhite]
\item First item.
\item Second item.
\mystopitemize

This is the next short paragraph, not part of the above.

\stoptext

—
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [NTG-context] Re: Looking for itemize help
  2024-01-16  1:15         ` Bruce Horrocks
@ 2024-01-16 14:39           ` Jim
  0 siblings, 0 replies; 14+ messages in thread
From: Jim @ 2024-01-16 14:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Jan 16, 2024 at 01:15 (+0000), Bruce Horrocks wrote:

> On 15 Jan 2024, at 16:15, Jim <zlists+context@jdvb.ca> wrote:

>> I would like
>> something which automagically "does the right thing".

> Not pretty, but... :-)

> \setupwhitespace [big]
> \setuppapersize [letter]

> \define[1]\mystopitemize{\stopitemize\doifsamestringelse{#1}{\par}{\blank}{#1}}

> \starttext
> This is a short paragraph.

> This is a line before an itemization.
> \startitemize[nowhite]
> \item First item.
> \item Second item.
> \mystopitemize
> This is a short paragraph immediately following.

> This is a line before a {\bf nowhite, after} itemization.
> \startitemize[nowhite]
> \item First item.
> \item Second item.
> \mystopitemize

> This is the next short paragraph, not part of the above.

> \stoptext

Bruce,

thanks very much for that code.  Given that (apparently?) there is no
option to itemize to do what I want, what you have is a good choice.

I just tried this:


\let\originalstopitemize=\stopitemize
\define[1]\stopitemize{\originalstopitemize\doifsamestringelse{#1}{\par}{\blank}{#1}}

and it works with the above test, after replacing \mystopitemize with the
usual \stopitemize.

I'm not sure what this might break going forward, but I guess time will tell.
(Or perhaps someone with more ConTeXt knowledge than me will tell me first.)

Cheers.
                                Jim
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [NTG-context] Re: Looking for itemize help
@ 2024-01-15 18:26 Jim
  0 siblings, 0 replies; 14+ messages in thread
From: Jim @ 2024-01-15 18:26 UTC (permalink / raw)
  To: ntg-context

On Mon, Jan 15, 2024 at 17:39 (+0100), Wolfgang Schuster wrote:

> Jim schrieb am 15.01.2024 um 01:42:
>> I have

>> \setupwhitespace [big]

>> so that I get "a blank line" between paragraphs.

>> I would like to *not* have "blank lines" before and after my items.  For
>> example, if there is more "paragraph text" after the last item I would like
>> to see this structure:

>> ------------------------------------------------------------------

>> Some text preceding the list of items:
>> a. Item one.
>> b. Second item.
>> This sentence is part of the same paragraph.

>> The next paragraph starts here...

>> ------------------------------------------------------------------

>> and if there is no "paragraph text" after the last item, I'd like to see
>> this structure:

>> ------------------------------------------------------------------

>> Some text preceding the list of items:
>> a. Item one.
>> b. Second item.

>> The next paragraph starts here...

>> ------------------------------------------------------------------

>> Try as I might, I can't find the right options to give to \startitemize.

>> The closest I have found is to start with
>> \startitemize[a,nowhite]
>> but that prevents the "blank line" even in the second case above, which is
>> not what I want.  Further, 'packed' and 'joinedup' seem to behave
>> identically here, both leaving "a blank line" before the first item and
>> after the last item.

>> Clearly, I can force a blank line before the following paragraph with a
>> \vskip<the right amount>, but that seems like a crude way to do it.

>> Can someone either enlighten me on either
>> (a) the Right ConTeXt Way to do this, or
>> (b) a document that would tell me this, if I knew to read it?

>> I've looked in the wiki, the not-so-short intro to ConTeXt, and "ConTeXt:
>> an excursion" with no luck.

> Hi Jim,

> such a feature exists only to suppress paragraph indentation but not to
> ignore whitespace
> between paragraphs.

> \setupitemize[indentnext=auto]

> \setupindenting[yes,medium]

> \starttext

> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa
> turpis,
> semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi
> \unknown

> \startitemize
> \startitem Lorem ipsum \unknown \stopitem
> \stopitemize

> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa
> turpis,
> semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi
> \unknown

> \startitemize
> \startitem Lorem ipsum \unknown \stopitem
> \stopitemize
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa
> turpis,
> semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi
> \unknown

> \stoptext

Hi Wolfgang,

thanks for that information.

I would have thought that what I want to do is not so unusual that ConTeXt
does not have the ability to handle it, especially in light of the
indentnext=auto feature which shows that (presumably) some people want to
handle the text following \stopitemize differently, depending on whether or
not the following text is part of the same paragraph.

Perhaps I need to go and contemplate the sins of my formatting
choices... :-)

                                Jim
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-01-16 14:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-15  0:42 [NTG-context] Looking for itemize help Jim
2024-01-15  7:17 ` [NTG-context] " Henning Hraban Ramm
2024-01-15 14:36   ` Jim
2024-01-15 14:47     ` Aditya Mahajan
2024-01-15 16:15       ` Jim
2024-01-15 19:33         ` Henning Hraban Ramm
2024-01-15 20:11           ` Jim
2024-01-16  1:15         ` Bruce Horrocks
2024-01-16 14:39           ` Jim
2024-01-15 15:08     ` Henning Hraban Ramm
2024-01-15 15:51     ` [NTG-context] Re: [External] " Rogers, Michael K
2024-01-15 16:28       ` Jim
2024-01-15 16:39 ` [NTG-context] " Wolfgang Schuster
2024-01-15 18:26 Jim

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).