ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] \setuplist[chapter][alternative=d] inside margins
@ 2025-02-26 17:54 Pablo Rodriguez via ntg-context
  2025-02-27 12:21 ` [NTG-context] " Bruce Horrocks
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2025-02-26 17:54 UTC (permalink / raw)
  To: ConTeXt users; +Cc: Pablo Rodriguez

Dear list,

I have the following sample:

  \starttext
  \showframe
  %\setuppapersize[A5]
  \setupinteraction
    [state=start,
     color=,]

  \enabledirectives[references.border=darkgreen]

  \definestructureconversionset[rom][n,R]

  \protected\def\doPageNumber#1%
    {#1\narrownobreakspace·\narrownobreakspace%
      \the\numexpr 1 + #1\relax}

  \setuphead[title]
    [page=yes]

  \setuphead[chapter]
    [page=even,
     sectionconversionset=rom]

  \setuplist[chapter]
    [alternative={d},
     pagecommand=\doPageNumber,
     left={\letterleftbracket},
     right={\letterrightbracket},
     distance=.125tw,
    ]

  \completecontent
  \dorecurse{100}
    {\startchapter
       \samplefile{zapf}
     \stopchapter}
  \stoptext

Having this sample (which in my real-world document is contained inside
an A5 page), which is the way to have all contents fully justified and
single entries not broken between lines?

BTW, in both this sample and the final document, chapters contain only
their Roman number and no title.

Many thanks for your help,

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
___________________________________________________________________________________

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

* [NTG-context] Re: \setuplist[chapter][alternative=d] inside margins
  2025-02-26 17:54 [NTG-context] \setuplist[chapter][alternative=d] inside margins Pablo Rodriguez via ntg-context
@ 2025-02-27 12:21 ` Bruce Horrocks
  2025-02-27 16:37   ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Horrocks @ 2025-02-27 12:21 UTC (permalink / raw)
  To: ntg-context mailing list; +Cc: Pablo Rodriguez



> On 26 Feb 2025, at 17:54, Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Dear list,
> 
> I have the following sample:

[snip]

> Having this sample (which in my real-world document is contained inside
> an A5 page), which is the way to have all contents fully justified and
> single entries not broken between lines?

Hi Pablo,

I'm not really sure what you mean by fully justified? Do you mean not having the entries protrude outside the margin or do you want them in columns so that the chapter numbers are aligned down the page?

Either way, I think the command you need to experiment with is \setuplistalternative which should give you much more control over the layout. The example on the Wiki page <https://wiki.contextgarden.net/Command/setuplistalternative> shows how to construct a tabulate table containing the TOC entries which could be adapted to provide columns if that is what you want.

Regards,
—
Bruce Horrocks
Hampshire, UK

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

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

* [NTG-context] Re: \setuplist[chapter][alternative=d] inside margins
  2025-02-27 12:21 ` [NTG-context] " Bruce Horrocks
@ 2025-02-27 16:37   ` Pablo Rodriguez via ntg-context
  2025-02-27 17:42     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2025-02-27 16:37 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 2/27/25 13:21, Bruce Horrocks wrote:
> [...]
> I'm not really sure what you mean by fully justified? Do you mean
> not having the entries protrude outside the margin or do you want
> them in columns so that the chapter numbers are aligned down the
> page?

Hi Bruce,

many thanks for your reply.

With fully justified, I meant like any other text paragraph by default
in TeX.

Do I want columns? Well, I would like to have them, but I thought that
would be extremely complex to achieve.

> Either way, I think the command you need to experiment with is
> \setuplistalternative which should give you much more control over
> the layout. The example on the Wiki page <https://
> wiki.contextgarden.net/Command/setuplistalternative> shows how to
> construct a tabulate table containing the TOC entries which could be
> adapted to provide columns if that is what you want.

Many thanks for this command, since this is the first time I see it.

I always search my local copy of https://www.pragma-ade.com/general/
qrcs/setup-en.pdf, but with "\setupcommand [" (to avoid all the
ocurrences of "inherits: \setupcommand".

Now I see this was wrong. But I wonder if I would have ever noticed it
when searching only for "\setuplist".

Many thanks for your help,

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
___________________________________________________________________________________

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

* [NTG-context] Re: \setuplist[chapter][alternative=d] inside margins
  2025-02-27 16:37   ` Pablo Rodriguez via ntg-context
@ 2025-02-27 17:42     ` Hans Hagen
  2025-02-27 19:40       ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2025-02-27 17:42 UTC (permalink / raw)
  To: ntg-context

On 2/27/2025 5:37 PM, Pablo Rodriguez via ntg-context wrote:
> On 2/27/25 13:21, Bruce Horrocks wrote:
>> [...]
>> I'm not really sure what you mean by fully justified? Do you mean
>> not having the entries protrude outside the margin or do you want
>> them in columns so that the chapter numbers are aligned down the
>> page?
> 
> Hi Bruce,
> 
> many thanks for your reply.
> 
> With fully justified, I meant like any other text paragraph by default
> in TeX.
> 
> Do I want columns? Well, I would like to have them, but I thought that
> would be extremely complex to achieve.
> 
>> Either way, I think the command you need to experiment with is
>> \setuplistalternative which should give you much more control over
>> the layout. The example on the Wiki page <https://
>> wiki.contextgarden.net/Command/setuplistalternative> shows how to
>> construct a tabulate table containing the TOC entries which could be
>> adapted to provide columns if that is what you want.
> 
> Many thanks for this command, since this is the first time I see it.
> 
> I always search my local copy of https://www.pragma-ade.com/general/
> qrcs/setup-en.pdf, but with "\setupcommand [" (to avoid all the
> ocurrences of "inherits: \setupcommand".
> 
> Now I see this was wrong. But I wonder if I would have ever noticed it
> when searching only for "\setuplist".

Here is a rather old feature (early luatex time):

mtxrun --autogenerate --script server --auto

then you can give e.g.

mtxrun --gethelp 
--url="http://localhost:8088/mtx-server-ctx-help.lua?command=%command%" 
--command="\startchapter"

which your editor might be able to do (in scite i configured F1 that 
uses the command it is on top of)

or you can just go to

http://localhost:8088/mtx-server-ctx-help.lua

which might work (depends on system of course)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

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

* [NTG-context] Re: \setuplist[chapter][alternative=d] inside margins
  2025-02-27 17:42     ` Hans Hagen
@ 2025-02-27 19:40       ` Pablo Rodriguez via ntg-context
  0 siblings, 0 replies; 5+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2025-02-27 19:40 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 2/27/25 18:42, Hans Hagen wrote:
> On 2/27/2025 5:37 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Many thanks for this command, since this is the first time I see it.
>> [...]
> Here is a rather old feature (early luatex time):
> [...]
> which might work (depends on system of course)

Many thanks for the tip, Hans.

All three options seem to work perfectly fine in Linux.

Tomorrow I will test them in Windows.

Many thanks for your help,

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
___________________________________________________________________________________

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

end of thread, other threads:[~2025-02-27 19:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-26 17:54 [NTG-context] \setuplist[chapter][alternative=d] inside margins Pablo Rodriguez via ntg-context
2025-02-27 12:21 ` [NTG-context] " Bruce Horrocks
2025-02-27 16:37   ` Pablo Rodriguez via ntg-context
2025-02-27 17:42     ` Hans Hagen
2025-02-27 19:40       ` Pablo Rodriguez via ntg-context

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