ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Align TOC section numbers flushright
@ 2018-06-25 13:51 Idris Samawi Hamid ادريس سماوي حامد
  2018-06-25 19:17 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2018-06-25 13:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]

Dear gang,

Trying to get the sectioning numerals in the left margin of the TOC to be
fushright; by default they are flushleft; see attached and below:

=======
\setuphead[chapter]   [conversion=R]

\setuplist[chapter][width=2.8em]

\definecombinedlist
[content]
[chapter]
[level=chapter,
alternative=c,
numberalign=flushright]

\starttext
\placecontent[conversion=R]
\startchapter[title={First},reference={}]   \input ward \stopchapter
\startchapter[title={Second},reference={}]  \input ward \stopchapter
\startchapter[title={Third},reference={}]   \input ward \stopchapter
\startchapter[title={Fourth},reference={}]  \input ward \stopchapter
\startchapter[title={Fifth},reference={}]   \input ward \stopchapter
\startchapter[title={Sixth},reference={}]   \input ward \stopchapter
\startchapter[title={Seventh},reference={}] \input ward \stopchapter
\startchapter[title={Eighth},reference={}]  \input ward \stopchapter
\stoptext
=======

numberalign=flushright would seem to be the governing keyword+value, but
that has no effect here.

For the form of the desired result, see toc-margin_numerals-MURE.pdf:

https://www.dropbox.com/s/j0etnkt54zji6h5/toc-margin_numerals-MURE.pdf?dl=0

(note the stopper after each margin numeral!). Thank you in
advance.

Best wishes
Idris
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

[-- Attachment #2: scratch.pdf --]
[-- Type: application/pdf, Size: 19275 bytes --]

[-- Attachment #3: scratch.tex --]
[-- Type: application/x-tex, Size: 782 bytes --]

[-- Attachment #4: Type: text/plain, Size: 492 bytes --]

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

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

* Re: Align TOC section numbers flushright
  2018-06-25 13:51 Align TOC section numbers flushright Idris Samawi Hamid ادريس سماوي حامد
@ 2018-06-25 19:17 ` Wolfgang Schuster
  2018-06-25 19:42   ` Idris Samawi Hamid ادريس سماوي حامد
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2018-06-25 19:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 518 bytes --]



Idris Samawi Hamid ادريس سماوي حامد schrieb:
> \setuphead[chapter]   [conversion=R]
>
> \setuplist[chapter][width=2.8em]
>
> \definecombinedlist
> [content]
> [chapter]
> [level=chapter,
> alternative=c,
> numberalign=flushright]

Use \setuplist to change the numeralign setting, you need also a 
distance value.

\setuplist
   [chapter]
   [alternative=c,
    width=2.8em,
    distance=1em,
    numberalign=flushright]

The attached file shows which values are valid for \setupcombinedlist.

Wolfgang

[-- Attachment #2: i-list.pdf --]
[-- Type: application/pdf, Size: 41289 bytes --]

[-- Attachment #3: Type: text/plain, Size: 492 bytes --]

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

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

* Re: Align TOC section numbers flushright
  2018-06-25 19:17 ` Wolfgang Schuster
@ 2018-06-25 19:42   ` Idris Samawi Hamid ادريس سماوي حامد
  2018-06-25 20:20     ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2018-06-25 19:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 2056 bytes --]

On Mon, 25 Jun 2018 13:17:40 -0600, Wolfgang Schuster  
<schuster.wolfgang@gmail.com> wrote:

>
>
> Idris Samawi Hamid ادريس سماوي حامد schrieb:
>> \setuphead[chapter]   [conversion=R]
>>
>> \setuplist[chapter][width=2.8em]
>>
>> \definecombinedlist
>> [content]
>> [chapter]
>> [level=chapter,
>> alternative=c,
>> numberalign=flushright]
>
> Use \setuplist to change the numeralign setting, you need also a
> distance value.
>
> \setuplist
>    [chapter]
>    [alternative=c,
>     width=2.8em,
>     distance=1em,
>     numberalign=flushright]

Many thanks. Had come up with this awkward workaround:

\define[1]\FLUSHRIGHT{\hfill#1\hbox to0.7em{}}

\setuplist[chapter][width=2.8em]
\setuplist[chapter][stopper=.,numbercommand=\FLUSHRIGHT]

Does the attached tex file look correct?

\setuplist
   [chapter]
   [alternative=c,
    width=1.85em,
    distance=0.5em,
    numberalign=flushright,
    level=chapter]

\definecombinedlist
[content]
[chapter]

If one turns on \showframe, one sees that the width value does not prevent  
crossing the left side of the textblock (a good thing). OTOH, getting the  
TOC numerals to lineup with the left side is a matter of trial and error.  
[width=1.85em comes close]

And if the document is changed so that the wider roman numerals are not  
needed, then one has to reset the width value, again by trial and error.

So is there a way to make the left side of the textblock flush with the  
widest roman? It's by no means urgent, but sine we are supposed to be able  
to automate nearly everything.. -)

> The attached file shows which values are valid for \setupcombinedlist.

Ah, our npp-4-context config files for calltips need updating, I have

\definecombinedlist [NAME]
[LIST]
[INHERIT: \setuplist]

but that should be

\definecombinedlist [NAME]
[LIST]
[INHERIT: \setupcombinedlist]

Many thanks.

Idris
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

[-- Attachment #2: scratch.pdf --]
[-- Type: application/pdf, Size: 30893 bytes --]

[-- Attachment #3: scratch.tex --]
[-- Type: application/x-tex, Size: 1490 bytes --]

[-- Attachment #4: Type: text/plain, Size: 492 bytes --]

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

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

* Re: Align TOC section numbers flushright
  2018-06-25 19:42   ` Idris Samawi Hamid ادريس سماوي حامد
@ 2018-06-25 20:20     ` Wolfgang Schuster
  2018-06-26 12:26       ` Idris Samawi Hamid ادريس سماوي حامد
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2018-06-25 20:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2308 bytes --]


> Idris Samawi Hamid ادريس سماوي حامد <mailto:Idris.Hamid@colostate.edu>
> 25. Juni 2018 um 21:42
> On Mon, 25 Jun 2018 13:17:40 -0600, Wolfgang Schuster 
> <schuster.wolfgang@gmail.com> wrote:
>
>>
>>
>> Idris Samawi Hamid ادريس سماوي حامد schrieb:
>>> \setuphead[chapter]   [conversion=R]
>>>
>>> \setuplist[chapter][width=2.8em]
>>>
>>> \definecombinedlist
>>> [content]
>>> [chapter]
>>> [level=chapter,
>>> alternative=c,
>>> numberalign=flushright]
>>
>> Use \setuplist to change the numeralign setting, you need also a
>> distance value.
>>
>> \setuplist
>>    [chapter]
>>    [alternative=c,
>>     width=2.8em,
>>     distance=1em,
>>     numberalign=flushright]
>
> Many thanks. Had come up with this awkward workaround:
>
> \define[1]\FLUSHRIGHT{\hfill#1\hbox to0.7em{}}
>
> \setuplist[chapter][width=2.8em]
> \setuplist[chapter][stopper=.,numbercommand=\FLUSHRIGHT]
>
> Does the attached tex file look correct?
>
> \setuplist
>   [chapter]
>   [alternative=c,
>    width=1.85em,
>    distance=0.5em,
>    numberalign=flushright,
>    level=chapter]

You can remove the level setting.

> \definecombinedlist
> [content]
> [chapter]
>
> If one turns on \showframe, one sees that the width value does not 
> prevent crossing the left side of the textblock (a good thing). OTOH, 
> getting the TOC numerals to lineup with the left side is a matter of 
> trial and error. [width=1.85em comes close]
>
> And if the document is changed so that the wider roman numerals are 
> not needed, then one has to reset the width value, again by trial and 
> error.
>
> So is there a way to make the left side of the textblock flush with 
> the widest roman? It's by no means urgent, but sine we are supposed to 
> be able to automate nearly everything.. -)

This isn’t supported but adding a sample key (which is supported by 
enumerations) where you can set a text which is used to calculate the 
width should be easy.

>> The attached file shows which values are valid for \setupcombinedlist.
>
> Ah, our npp-4-context config files for calltips need updating, I have
>
> \definecombinedlist [NAME]
> [LIST]
> [INHERIT: \setuplist]
>
> but that should be
>
> \definecombinedlist [NAME]
> [LIST]
> [INHERIT: \setupcombinedlist]

I have the changes only in my local files.

Wolfang

[-- Attachment #1.2: Type: text/html, Size: 4104 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

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

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

* Re: Align TOC section numbers flushright
  2018-06-25 20:20     ` Wolfgang Schuster
@ 2018-06-26 12:26       ` Idris Samawi Hamid ادريس سماوي حامد
  0 siblings, 0 replies; 5+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2018-06-26 12:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

On Mon, 25 Jun 2018 14:20:03 -0600, Wolfgang Schuster  
<schuster.wolfgang@gmail.com> wrote:

>> If one turns on \showframe, one sees that the width value does not
>> prevent crossing the left side of the textblock (a good thing). OTOH,
>> getting the TOC numerals to lineup with the left side is a matter of
>> trial and error. [width=1.85em comes close]
>>
>> And if the document is changed so that the wider roman numerals are
>> not needed, then one has to reset the width value, again by trial and
>> error.
>>
>> So is there a way to make the left side of the textblock flush with
>> the widest roman? It's by no means urgent, but sine we are supposed to
>> be able to automate nearly everything.. -)
>
> This isn’t supported but adding a sample key (which is supported by
> enumerations) where you can set a text which is used to calculate the
> width should be easy.

Ok, hereby making this a feature request -)

>>> The attached file shows which values are valid for \setupcombinedlist.
>>
>> Ah, our npp-4-context config files for calltips need updating, I have
>>
>> \definecombinedlist [NAME]
>> [LIST]
>> [INHERIT: \setuplist]
>>
>> but that should be
>>
>> \definecombinedlist [NAME]
>> [LIST]
>> [INHERIT: \setupcombinedlist]
>
> I have the changes only in my local files.

Ah, ok. Many thanks.

Idris
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___________________________________________________________________________________
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
___________________________________________________________________________________

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

end of thread, other threads:[~2018-06-26 12:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-25 13:51 Align TOC section numbers flushright Idris Samawi Hamid ادريس سماوي حامد
2018-06-25 19:17 ` Wolfgang Schuster
2018-06-25 19:42   ` Idris Samawi Hamid ادريس سماوي حامد
2018-06-25 20:20     ` Wolfgang Schuster
2018-06-26 12:26       ` Idris Samawi Hamid ادريس سماوي حامد

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