Hi Mekeor,

Here is a simple solution that does not need extensions or redefinitions, but 
unfortunately it does need a bit of extra code through the body text processing.

AFAIK, there are no “beforelist” and “afterlist” keys, nor a “rightmargin". 

\startbodymatter
  \chapter{Lorem ipsum dolor sit}
  \chapter{Lorem ipsum dolor sit}
  \section{Lorem ipsum dolor sit}
  \writebetweenlist[section][location=here]{\startnarrower[right]} % <= tweak 
as needed
  \subsection{Loren ipsum}
  \subsection{Lorem ipsum dolor}
  \subsection{Lorem ipsum dolor sit}
  \writebetweenlist[section][location=here]{\stopnarrower}
  \section{Lorem ipsum dolor sit}

Best wishes,
Taco




> On 4 Aug 2026, at 14:56, Mekeor Melire <[email protected]> wrote:
> 
> Hello everyone.
> 
> I'm new here and enjoying ConTeXt very much. I'm currently
> typesetting my master thesis.
> 
> I'm using \setuplist[subsection][alternative=d,...] so that
> subsections are listed horizontally / continuously in the table of
> contents. I like this except for one nuance:
> 
> These continuous lines go too far to the right. In my opinion,
> they should not be wider than the dotted style “alternative=c”. I
> tried out “style” and many other options but did not
> succeed. Could anyone help me out with this?
> 
> Here's a visualization of what I get. As you can see, “Badword” is
> below the page number of the major headings.
> 
> 
> 1 Foo ......................................................    1
> 2 Bar ......................................................    2
>      Lorem    Ipsum    Dolor    Sit    Amet    Lorem    Badword
>      Ipsum    Dolor    Sit    Amet
> 3 Baz ......................................................   10
> 
> 
> Here's what I want: As you can see, “Badword” is rendered on the
> next line so that it does not overflow the dots-width.
> 
> 
> 1 Foo ......................................................    1
> 2 Bar ......................................................    2
>      Lorem    Ipsum    Dolor    Sit    Amet    Lorem
>      Badword    Ipsum    Dolor    Sit    Amet
> 3 Baz ......................................................   10
> 
> 
> 
> I was considering something like rightmargin=4em or so but I
> couldn't find any option effective in such way.
> 
> Attached is an example. Thanks in advance.
> 
> Best regards
> Mekeor
> 
> <thesis.tex>___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : [email protected] / 
> 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
> ___________________________________________________________________________________

— 
Taco Hoekwater              E: [email protected]
genderfluid (all pronouns)


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
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
___________________________________________________________________________________

Reply via email to