[NTG-context] Re: numbered itemize list item label alignment

2023-10-15 Thread Aditya Mahajan
On Sun, 15 Oct 2023, Wolfgang Schuster wrote:

> Csikos Bela schrieb am 15.10.2023 um 15:51:
> > Hello:
> >
> > I would like to make a long numbered itemize list, where the numbers
> > increase up to three digits.
> > I would like the numbered labels aligned to the right and the widest
> > label's left side located at the left margin.
> > I tried the below code but the 3 digit labels' left sides go into the left
> > margin. How can I fix it?
> >
> > Code:
> >
> > \showframe
> > \starttext
> > \startitemize[n,broad][itemalign=flushright]
> > \dorecurse{250}{\item }
> > \stopitemize
> > \stoptext
> 
> You can use the width-key to set a value for the number, below is a example
> for method
> to calculate the width based on the number of items but I would use fixed
> value
> (e.g. width=2em) to let all items (independent of the entries) start on the
> same position.

I normally use the `fit` key with an appropriate value of `distance`. For 
example:

\showframe[text][text]

\starttext

\startitemize[n,fit,broad][distance=0.25em,itemalign=flushright]
\dorecurse{1}{\startitem xxx\stopitem}
\stopitemize

\page

\startitemize[n,fit,broad][distance=0.25em,itemalign=flushright]
\dorecurse{11}{\startitem xxx\stopitem}
\stopitemize

\page

\startitemize[n,fit,broad][distance=0.25em,itemalign=flushright]
\dorecurse{111}{\startitem xxx\stopitem}
\stopitemize

\stoptext

___
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
___


[NTG-context] Re: numbered itemize list item label alignment

2023-10-15 Thread Wolfgang Schuster

Csikos Bela schrieb am 15.10.2023 um 15:51:

Hello:

I would like to make a long numbered itemize list, where the numbers 
increase up to three digits.
I would like the numbered labels aligned to the right and the widest 
label's left side located at the left margin.
I tried the below code but the 3 digit labels' left sides go into the 
left margin. How can I fix it?


Code:

\showframe
\starttext
\startitemize[n,broad][itemalign=flushright]
\dorecurse{250}{\item }
\stopitemize
\stoptext


You can use the width-key to set a value for the number, below is a 
example for method
to calculate the width based on the number of items but I would use 
fixed value
(e.g. width=2em) to let all items (independent of the entries) start on 
the same position.


\defineexpandable\ItemWidth
  {\ifnum\lastcountervalue[itemgroup:itemize]>99
 \widthofstring{000.}%
   \orelse\ifnum\lastcountervalue[itemgroup:itemize]>9
 \widthofstring{00.}%
   \else
 \widthofstring{0.}%
   \fi}

\showframe[text][text]

\starttext

\startitemize[n][width=\ItemWidth,itemalign=flushright]
\dorecurse{1}{\startitem xxx\stopitem}
\stopitemize

\page

\startitemize[n][width=\ItemWidth,itemalign=flushright]
\dorecurse{11}{\startitem xxx\stopitem}
\stopitemize

\page

\startitemize[n][width=\ItemWidth,itemalign=flushright]
\dorecurse{111}{\startitem xxx\stopitem}
\stopitemize

\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
___


[NTG-context] Re: regular online meetup

2023-10-15 Thread Henning Hraban Ramm
The team of senfcall.de (a small German charity, Computerwerk Darmstadt 
e.V.) today explained why we had problems with our meeting last 
Wednesday – they had to replace a server that was misbehaving, 
apparently the one we were using.


So it wasn’t due to the time of day as I was suspecting (also not the 
unusual “big” number of participants – the capacity is usually enough 
for ~150 people, they say).


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
___


[NTG-context] Re: numbered itemize list item label alignment

2023-10-15 Thread Pablo Rodriguez
On 10/15/23 15:51, Csikos Bela wrote:
> Hello:
>
> I would like to make a long numbered itemize list, where the numbers
> increase up to three digits.
> I would like the numbered labels aligned to the right and the widest
> label's left side located at the left margin.
> I tried the below code but the 3 digit labels' left sides go into the
> left margin. How can I fix it?

Hi Csikos,

width is the key, such as in:

  \showframe\showgrid\showstruts
  \starttext
  \startitemize[n,broad][width=.125tw, itemalign=flushright]
  \dorecurse{250}{\item }
  \stopitemize
  \stoptext

I assigned ⅛ text width to the number width to clearly display it.

Just in case it helps,

Pablo

___
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
___


[NTG-context] numbered itemize list item label alignment

2023-10-15 Thread Csikos Bela
Hello:I would like to make a long numbered itemize list, where the numbers 
increase up to three digits.I would like the numbered labels aligned to the 
right and the widest label's left side located at the left margin.I tried the 
below code but the 3 digit labels' left sides go into the left margin. How can 
I fix 
it?Code:\showframe\starttext\startitemize[n,broad][itemalign=flushright]\dorecurse{250}{\item
 }\stopitemize\stoptextThe resulted pdf is attached as 
context-itemize-label-alignment.pdf.Thank you in advance,bcsikos

context-itemize-label-alignment.pdf
Description: Adobe PDF document
___
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
___