sile-typesetter / sile

The SILE Typesetter — Simon’s Improved Layout Engine
https://sile-typesetter.org
MIT License
1.63k stars 96 forks source link

Support for two-page entries in table of contents #2092

Open jodros opened 1 month ago

jodros commented 1 month ago

For example, these books have, for each chapter/section, a page number where the content itself is, and besides it is the page with its corresponding commentaries.

Omikhleia commented 1 month ago

Interesting examples. It's kind of a "niche" use case, and I can think of several ways for doing it, though it requires specific segmenting commands that go beyond a regular "book" class.

alerque commented 2 weeks ago

I've done something like this already. It isn't hard to stuff extra information in the TOC data entries that get saved in an info file, and then use them when typesetting the TOC.

For example I used it in a commentary on Galatians that kept track of the chapter/verse ranges covered in each chapter, then added that info to the TOC.

Given the plethora of different content could be handled this way I'm not sure what a robust higher level API would look like. SILE already provides the lower level building blocks for the to be possible to implement.

Thoughts?