ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] TOC with sections titles and page numbers like a paragraph beneath chapter
@ 2023-09-04  6:34 jbf
  2023-09-04  6:48 ` [NTG-context] " Wolfgang Schuster
  2023-09-04 22:43 ` Max Chernoff
  0 siblings, 2 replies; 4+ messages in thread
From: jbf @ 2023-09-04  6:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

I am attempting to get a TOC that looks like the following (in other 
words with section titles and their relative page numbers in a block 
below the chapter):

Chapter 1 ...................................................5

Section 1   5, Section 2  6, Section 3  7,

Section 4   8, Section 5   9 etc

Chapter 2 ................................................10

Section 1   10, Section 2  11, Section 3  12,

Section 4   13, Section 5   14 etc

As I really had no idea how to do this, I found 
https://wiki.contextgarden.net/Horizontal_Table_of_Contents thinking it 
might help, but none of it compiles (for me) in LMTX. So I tried 
something different, e.g.

\definelist[chapter]

\setuplist[chapter][label=yes,distance=1.5cm,alternative=c,style=normal,before=\blank] 


\definelist[section]

\setuplist[section] [textcommand=\setups{SecToc}]

\setupcombinedlist

[content]o

[list={chapter,section}]


\startsetups [SecToc]

\startframedtext [width=\textwidth, align=middle, frame=off]

\placelist [section]

[

criterium=chapter,

]

\stopframedtext

\stopsetups

While that produces a result, it is nothing like what I want above. Has 
anyone put together a TOC of this kind and might be able to give me a 
hint to follow?

Julian

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

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

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: TOC with sections titles and page numbers like a paragraph beneath chapter
  2023-09-04  6:34 [NTG-context] TOC with sections titles and page numbers like a paragraph beneath chapter jbf
@ 2023-09-04  6:48 ` Wolfgang Schuster
  2023-09-04 22:43 ` Max Chernoff
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2023-09-04  6:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users, jbf


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

jbf schrieb am 04.09.2023 um 08:34:
>
> I am attempting to get a TOC that looks like the following (in other 
> words with section titles and their relative page numbers in a block 
> below the chapter):
>
> Chapter 1 ...................................................5
>
> Section 1   5, Section 2  6, Section 3  7,
>
> Section 4   8, Section 5   9 etc
>
> Chapter 2 ................................................10
>
> Section 1   10, Section 2  11, Section 3  12,
>
> Section 4   13, Section 5   14 etc
>
> As I really had no idea how to do this, I found 
> https://wiki.contextgarden.net/Horizontal_Table_of_Contents thinking 
> it might help, but none of it compiles (for me) in LMTX. So I tried 
> something different, e.g.
>
> [...]
>
> While that produces a result, it is nothing like what I want above. 
> Has anyone put together a TOC of this kind and might be able to give 
> me a hint to follow?
>

Please send *working* (which include some dummy content) examples.

The example below results in section entries which are listed as a 
paragraph, what output do you expect here.

\setuplist[chapter][alternative=c]
\setuplist[section][alternative=d]

\starttext

\completecontent

\dorecurse{2}
   {\chapter{Chapter #1}
    \dorecurse{10}{\section{Section ##1}}}

\stoptext

Wolfgang


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

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

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: TOC with sections titles and page numbers like a paragraph beneath chapter
  2023-09-04  6:34 [NTG-context] TOC with sections titles and page numbers like a paragraph beneath chapter jbf
  2023-09-04  6:48 ` [NTG-context] " Wolfgang Schuster
@ 2023-09-04 22:43 ` Max Chernoff
  2023-09-04 22:50   ` jbf
  1 sibling, 1 reply; 4+ messages in thread
From: Max Chernoff @ 2023-09-04 22:43 UTC (permalink / raw)
  To: ntg-context


Hi Julian,

> I am attempting to get a TOC that looks like the following (in other 
> words with section titles and their relative page numbers in a block 
> below the chapter):

> Has 
> anyone put together a TOC of this kind and might be able to give me a 
> hint to follow?

This is fairly close to what you're looking for I think (the manual, not
the package itself):

   http://mirrors.ctan.org/macros/luatex/generic/lua-widow-control/lua-widow-control.pdf

The source is a little messy, but I've used it in a bunch of other
documents and it seems fairly robust:

   https://github.com/gucci-on-fleek/lua-widow-control/blob/7c4544/docs/manual/lwc-manual.mkxl#L167-L234

There aren't any page numbers for the subsections in that, but you
should be able to add those inside the definition of
\SubsectionTOCcommand with either #3 or \currentlistentrypagenumber.

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: TOC with sections titles and page numbers like a paragraph beneath chapter
  2023-09-04 22:43 ` Max Chernoff
@ 2023-09-04 22:50   ` jbf
  0 siblings, 0 replies; 4+ messages in thread
From: jbf @ 2023-09-04 22:50 UTC (permalink / raw)
  To: Max Chernoff, mailing list for ConTeXt users

That's kind of you Max, and I will definitely take a look at that, both 
for the current book I am working on, but also for the variations it can 
offer for other titles.

In the meantime, Wolfgang gently reminded me that I had overlooked one 
various obvious (and simple) approach using alternative=d, which I 
confess I had entirely overlooked!

Julian

On 5/9/23 08:43, Max Chernoff wrote:
> Hi Julian,
>
>> I am attempting to get a TOC that looks like the following (in other
>> words with section titles and their relative page numbers in a block
>> below the chapter):
>> Has
>> anyone put together a TOC of this kind and might be able to give me a
>> hint to follow?
> This is fairly close to what you're looking for I think (the manual, not
> the package itself):
>
>     http://mirrors.ctan.org/macros/luatex/generic/lua-widow-control/lua-widow-control.pdf
>
> The source is a little messy, but I've used it in a bunch of other
> documents and it seems fairly robust:
>
>     https://github.com/gucci-on-fleek/lua-widow-control/blob/7c4544/docs/manual/lwc-manual.mkxl#L167-L234
>
> There aren't any page numbers for the subsections in that, but you
> should be able to add those inside the definition of
> \SubsectionTOCcommand with either #3 or \currentlistentrypagenumber.
>
> Thanks,
> -- Max
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : https://contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2023-09-04 22:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-04  6:34 [NTG-context] TOC with sections titles and page numbers like a paragraph beneath chapter jbf
2023-09-04  6:48 ` [NTG-context] " Wolfgang Schuster
2023-09-04 22:43 ` Max Chernoff
2023-09-04 22:50   ` jbf

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