From: Jim <zlists+context@jdvb.ca>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: Looking for itemize help
Date: Tue, 16 Jan 2024 10:39:41 -0400 [thread overview]
Message-ID: <ZaaVLUuzotXsey/Z@x360.localdomain> (raw)
In-Reply-To: <F943A571-D5DD-41AC-8FDC-6C201E0730C6@scorecrow.com>
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
___________________________________________________________________________________
next prev parent reply other threads:[~2024-01-16 14:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-15 0:42 [NTG-context] " 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 [this message]
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
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=ZaaVLUuzotXsey/Z@x360.localdomain \
--to=zlists+context@jdvb.ca \
--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).