From: "śrīrāma via ntg-context" <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
A A <amine.aboufirass@gmail.com>
Cc: śrīrāma <citturs@gmail.com>
Subject: Re: Proper formatting of itemized bullets in ConTeXt
Date: Wed, 13 Apr 2022 07:37:58 +0530 [thread overview]
Message-ID: <11959935.O9o76ZdvQC@sreeramtplt> (raw)
In-Reply-To: <CAMwawgMyvNpRbk_Q83qN65f+19BFB7uo=QmST-+-WPkM=FfXOQ@mail.gmail.com>
On 4/12/22 1:57 PM A A via ntg-context wrote:
> Is there a straightforward way of setting up the itemize command such that
> every first letter is capitalized, regardless of whether I do so in the
> source file?
>
> Also, is there a way to insert a comma at the end of each item except for
> the last, and then a full stop at the end of the last item like follows?
>
> - First item,
> - Second item,
> - Third item,
> - Last item.
I revisited this today after the (frankly) subpar solution I presented yesterday. With the below example, we
• neither lose the nice features of \setupitemgroup
• nor do we need grouping of the items.
The only 'price to pay' is to use \citem (comma item) and \pitem (period item) as required.
%% start example
\def\citem{\item\AfterPar{\hspace[-normal],}\GetPar}
\def\pitem{\item\AfterPar{\hspace[-normal].}\GetPar}
\defineitemgroup
[pitemize]
[command=\Word,numberconversion=words]
\starttext
\startpitemize[n]
\citem first item
\citem second item
\citem third item
\pitem fourth item
\stoppitemize
\stoptext
%% stop example
Best,
Sreeram
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2022-04-13 2:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-12 8:27 A A via ntg-context
2022-04-12 14:43 ` śrīrāma via ntg-context
2022-04-13 2:07 ` śrīrāma via ntg-context [this message]
2022-04-13 2:09 ` śrīrāma 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=11959935.O9o76ZdvQC@sreeramtplt \
--to=ntg-context@ntg.nl \
--cc=amine.aboufirass@gmail.com \
--cc=citturs@gmail.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).