Alphabetised table of contents?

2022-09-20 Thread Brent Annable
Hi all, I'm just wondering if it's possible in Lilypond to create a table of contents that is alphabetical by item, rather than by page number order? I'm trying to create an alphabetical index by hymn tune or first line that will go in the back of a book. Many thanks for any help, Brent.

Re: Alphabetised table of contents?

2022-09-20 Thread Werner LEMBERG
> I'm just wondering if it's possible in Lilypond to create a table of > contents that is alphabetical by item, rather than by page number > order? IMHO this is not a table of context but rather an index that is positioned near the beginning. > I'm trying to create an alphabetical index by hymn

Re: Alphabetised table of contents?

2022-09-20 Thread Jean Abou Samra
Le 21/09/2022 à 07:09, Werner LEMBERG a écrit : [*] Except Jean has time and interest to produce a solution like pulling a rabbit out of a hat :-) I do have a rabbit to pull out, because I actually already posted a snippet like this on the lilypond-user-fr list. See https://lists.gnu.org

Re: Alphabetised table of contents?

2022-09-21 Thread Thomas Morley
Am Mi., 21. Sept. 2022 um 07:41 Uhr schrieb Jean Abou Samra : > > Le 21/09/2022 à 07:09, Werner LEMBERG a écrit : > > [*] Except Jean has time and interest to produce a solution like pulling > > a rabbit out of a hat :-) > > > I do have a rabbit to pull out, because I actually already posted a

Re: Alphabetised table of contents?

2022-09-21 Thread Jean Abou Samra
Le 21/09/2022 à 10:10, Thomas Morley a écrit : There's also: https://lsr.di.unimi.it/LSR/Item?id=763 Thanks for the link! I didn't know that snippet. Just a note: at some point there is (set! index-item-list ;; We insert index items sorted from the beginning on and do ;

Re: Alphabetised table of contents?

2022-09-21 Thread Valentin Petzel
Hello Jean, at least for me this code fails to change the order of the toc. The reason for this is that toc-markup does not in fact contain the markup, but the symbol under which the formatting markup is saved in layout. So I suppose you rather want to use the text property: (sorted-toc-alist

Re: Alphabetised table of contents?

2022-09-21 Thread Jean Abou Samra
Le 21/09/2022 à 20:39, Valentin Petzel a écrit : Hello Jean, at least for me this code fails to change the order of the toc. The reason for this is that toc-markup does not in fact contain the markup, but the symbol under which the formatting markup is saved in layout. So I suppose you rather w

Re: Alphabetised table of contents?

2022-09-22 Thread Brent Annable
Thanks for all the tips everyone! I will look into these snippets. I do actually need to create multiple indices (alphabetical by first line and by tune name0, so maybe my dream won't be possible for the time being, but it's good to know this functionality exists. Brent. On Thu, 22 Sept 2022 at

Re: Alphabetised table of contents?

2022-09-23 Thread Valentin Petzel
Hej Brent! Creating multiple indices is not a big thing. The problem is that the code for the toc has to be executed at initialisation (see toc-init.ly), so we cannot simply add more kinds of toc. But we can easily extend this toc code to allow for filtering to specific entries. The appended f