[NTG-context] Proper formatting of itemized bullets in ConTeXt

śrīrāma citturs at gmail.com
Wed Apr 13 04:07:58 CEST 2022


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




More information about the ntg-context mailing list