<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.lilypond.community/index.php?action=history&amp;feed=atom&amp;title=Alphabetically_sorted_index</id>
	<title>Alphabetically sorted index - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.lilypond.community/index.php?action=history&amp;feed=atom&amp;title=Alphabetically_sorted_index"/>
	<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Alphabetically_sorted_index&amp;action=history"/>
	<updated>2026-05-03T05:08:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Alphabetically_sorted_index&amp;diff=4144&amp;oldid=prev</id>
		<title>Lemzwerg: New category</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Alphabetically_sorted_index&amp;diff=4144&amp;oldid=prev"/>
		<updated>2025-11-21T23:15:28Z</updated>

		<summary type="html">&lt;p&gt;New category&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:15, 21 November 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l167&quot;&gt;Line 167:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 167:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Titles]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Titles]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Paper and layout]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Paper and layout]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Editorial annotations]][[Category:Snippet]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Editorial annotations]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Snippet]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Alphabetically_sorted_index&amp;diff=3159&amp;oldid=prev</id>
		<title>Lemzwerg at 22:46, 21 November 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Alphabetically_sorted_index&amp;diff=3159&amp;oldid=prev"/>
		<updated>2025-11-21T22:46:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:46, 21 November 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l167&quot;&gt;Line 167:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 167:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Titles]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Titles]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Paper and layout]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Paper and layout]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Editorial annotations]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Editorial annotations&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]][[Category:Snippet&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Alphabetically_sorted_index&amp;diff=2289&amp;oldid=prev</id>
		<title>Jean Abou Samra: Replace version=&quot;2.24.0&quot; with version=&quot;2.24&quot; now that the LilyWiki extension supports auto-selecting the latest release in a stable series</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Alphabetically_sorted_index&amp;diff=2289&amp;oldid=prev"/>
		<updated>2025-11-16T18:48:09Z</updated>

		<summary type="html">&lt;p&gt;Replace version=&amp;quot;2.24.0&amp;quot; with version=&amp;quot;2.24&amp;quot; now that the LilyWiki extension supports auto-selecting the latest release in a stable series&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:48, 16 November 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l25&quot;&gt;Line 25:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 25:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It is not yet possible to create multiple indices, for example, an alphabetically sorted &amp;#039;&amp;#039;and&amp;#039;&amp;#039; a topic-based one. To achieve that a few additions to the snippet would be necessary, which I had not yet time to implement.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It is not yet possible to create multiple indices, for example, an alphabetically sorted &amp;#039;&amp;#039;and&amp;#039;&amp;#039; a topic-based one. To achieve that a few additions to the snippet would be necessary, which I had not yet time to implement.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;lilypond version=&quot;2.24&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.0&lt;/del&gt;&quot; full&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;lilypond version=&quot;2.24&quot; full&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%% http://lsr.di.unimi.it/LSR/Item?id=763&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%% http://lsr.di.unimi.it/LSR/Item?id=763&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jean Abou Samra</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Alphabetically_sorted_index&amp;diff=716&amp;oldid=prev</id>
		<title>Jean Abou Samra: Import snippet from LSR</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Alphabetically_sorted_index&amp;diff=716&amp;oldid=prev"/>
		<updated>2025-10-26T22:46:47Z</updated>

		<summary type="html">&lt;p&gt;Import snippet from LSR&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Sometimes you may want to get a sorted index of the pieces contained in a book. Often the &amp;lt;code&amp;gt;\table-of-content&amp;lt;/code&amp;gt; command does this job quite well. However, the problem with it is that it always sorts by page numbers. For books containing many songs it is common to have an index sorted by letters or topics.&lt;br /&gt;
&lt;br /&gt;
Both is possible with this snippet. It takes the code of LilyPond&amp;#039;s &amp;lt;code&amp;gt;ly/toc-init.ly&amp;lt;/code&amp;gt; file and defines three new commands &amp;lt;code&amp;gt;\indexItem&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;\indexSection&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;\index&amp;lt;/code&amp;gt;. The first two are used to define index items, the last one will create the output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;\indexItem&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\indexSection&amp;lt;/code&amp;gt; both take two arguments (string, markup). The first is used to calculate the order of the items in the output, the second one contains the markup that is actually printed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  \markuplist \index&lt;br /&gt;
&lt;br /&gt;
  \indexItem #&amp;amp;quot;Berta&amp;amp;quot; \markup &amp;amp;quot;Berta&amp;amp;quot;&lt;br /&gt;
  \indexItem #&amp;amp;quot;Clown&amp;amp;quot; \markup &amp;amp;quot;Clown&amp;amp;quot;&lt;br /&gt;
  \indexItem #&amp;amp;quot;Adam&amp;amp;quot; \markup &amp;amp;quot;Adam&amp;amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
By setting the first argument of &amp;lt;code&amp;gt;\indexItem&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\indexSection&amp;lt;/code&amp;gt; to a different value than the second it is possible to create heavily customized sorted indices. For example, a topic-based index can be achieved by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  \markuplist \index&lt;br /&gt;
&lt;br /&gt;
  \indexSection #&amp;amp;quot;spring&amp;amp;quot; \markup \smallCaps &amp;amp;quot;Songs of Spring&amp;amp;quot;&lt;br /&gt;
  \indexItem #&amp;amp;quot;spring - I Like the Flowers&amp;amp;quot; \markup &amp;amp;quot;I Like the Flowers&amp;amp;quot;&lt;br /&gt;
  \indexItem #&amp;amp;quot;spring - Der Winter ist vergangen&amp;amp;quot; \markup &amp;amp;quot;Der Winter ist vergangen&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
  \indexSection #&amp;amp;quot;rock&amp;amp;quot; \markup \smallCaps &amp;amp;quot;Rock Songs&amp;amp;quot;&lt;br /&gt;
  \indexItem #&amp;amp;quot;rock - Stairway to Heaven&amp;amp;quot; \markup &amp;amp;quot;Stairway to heaven&amp;amp;quot;&lt;br /&gt;
  \indexItem #&amp;amp;quot;rock - Nothing Else Matters&amp;amp;quot; \markup &amp;amp;quot;Nothing Else Matters&amp;amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Limitations:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
It is not yet possible to create multiple indices, for example, an alphabetically sorted &amp;#039;&amp;#039;and&amp;#039;&amp;#039; a topic-based one. To achieve that a few additions to the snippet would be necessary, which I had not yet time to implement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24.0&amp;quot; full&amp;gt;&lt;br /&gt;
%% http://lsr.di.unimi.it/LSR/Item?id=763&lt;br /&gt;
&lt;br /&gt;
% Usage:&lt;br /&gt;
% - define and index item with \indexItem $sortstring $markup&lt;br /&gt;
% - use \indexSection $sortstring $markup to divide the index into several sections&lt;br /&gt;
% - display the alphabetical index with \markuplist \index&lt;br /&gt;
&lt;br /&gt;
% code ist mostly taken from ./ly/toc-init.ly and just renamed and slightly modfied&lt;br /&gt;
&lt;br /&gt;
%here starts the snippet:&lt;br /&gt;
&lt;br /&gt;
%% defined later, in a closure&lt;br /&gt;
#(define-public (add-index-item! markup-symbol text sorttext) #f)&lt;br /&gt;
#(define-public (index-items) #f)&lt;br /&gt;
&lt;br /&gt;
#(let ((index-item-list (list)))&lt;br /&gt;
   (set! add-index-item!&lt;br /&gt;
   (lambda (markup-symbol text sorttext)&lt;br /&gt;
     (let ((label (gensym &amp;quot;index&amp;quot;)))&lt;br /&gt;
       (set! index-item-list&lt;br /&gt;
       ;; We insert index items sorted from the beginning on and do&lt;br /&gt;
       ;; not sort them later - this saves pretty much computing time&lt;br /&gt;
       (insert-alphabetical-sorted! (list label markup-symbol text sorttext)&lt;br /&gt;
       index-item-list))&lt;br /&gt;
       (make-music &amp;#039;EventChord&lt;br /&gt;
         &amp;#039;page-marker #t&lt;br /&gt;
         &amp;#039;page-label label&lt;br /&gt;
         &amp;#039;elements (list (make-music &amp;#039;LabelEvent&lt;br /&gt;
         &amp;#039;page-label label))))))&lt;br /&gt;
   (set! index-items (lambda ()&lt;br /&gt;
         index-item-list)))&lt;br /&gt;
&lt;br /&gt;
#(define (insert-alphabetical-sorted! iitem ilist)&lt;br /&gt;
  (if&lt;br /&gt;
    (null? ilist) (list iitem)&lt;br /&gt;
    (if&lt;br /&gt;
      (string-ci&amp;lt;? (cadddr iitem) (cadddr (car ilist))) (cons iitem ilist)&lt;br /&gt;
      (cons (car ilist) (insert-alphabetical-sorted! iitem (cdr ilist)))&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
\header { tagline = ##f }&lt;br /&gt;
&lt;br /&gt;
\paper {&lt;br /&gt;
  indexTitleMarkup = \markup \column {&lt;br /&gt;
    \fontsize #5 \sans \bold \fill-line { \null &amp;quot;Alphabetical Index&amp;quot; \null }&lt;br /&gt;
    \hspace #1&lt;br /&gt;
  }&lt;br /&gt;
  indexItemMarkup = \markup \large \fill-line {&lt;br /&gt;
    \fromproperty #&amp;#039;index:text&lt;br /&gt;
    \fromproperty #&amp;#039;index:page&lt;br /&gt;
  }&lt;br /&gt;
  indexSectionMarkup = \markup \column {&lt;br /&gt;
    \hspace #1&lt;br /&gt;
    \fill-line { \sans \bold \fontsize #3 \fromproperty #&amp;#039;index:text }&lt;br /&gt;
    \hspace #1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#(define-markup-list-command (index layout props) ()&lt;br /&gt;
  ( _i &amp;quot;Outputs an alphabetical sorted index, using the paper&lt;br /&gt;
  variable @code{indexTitleMarkup} for its title, then the list of&lt;br /&gt;
  lines built using the @code{indexItem} music function&lt;br /&gt;
  Usage: @code{\\markuplist \\index}&amp;quot; )&lt;br /&gt;
  (cons (interpret-markup layout props&lt;br /&gt;
        (ly:output-def-lookup layout &amp;#039;indexTitleMarkup))&lt;br /&gt;
  (space-lines (chain-assoc-get &amp;#039;baseline-skip props)&lt;br /&gt;
        (map (lambda (index-item)&lt;br /&gt;
         (let ((label (car index-item))&lt;br /&gt;
         (index-markup (cadr index-item))&lt;br /&gt;
         (text (caddr index-item)))&lt;br /&gt;
           (interpret-markup&lt;br /&gt;
             layout&lt;br /&gt;
             (cons (list (cons &amp;#039;index:page&lt;br /&gt;
              (markup #:page-ref label &amp;quot;XXX&amp;quot; &amp;quot;?&amp;quot;))&lt;br /&gt;
             (cons &amp;#039;index:text text))&lt;br /&gt;
             props)&lt;br /&gt;
             (ly:output-def-lookup layout index-markup))))&lt;br /&gt;
       (index-items)))))&lt;br /&gt;
&lt;br /&gt;
indexItem =&lt;br /&gt;
#(define-music-function (sorttext text) (string? markup?)&lt;br /&gt;
   &amp;quot;Add a line to the alphabetical index, using the @code{indexItemMarkup} paper&lt;br /&gt;
variable markup.&amp;quot;&lt;br /&gt;
   (add-index-item! &amp;#039;indexItemMarkup text sorttext))&lt;br /&gt;
&lt;br /&gt;
indexSection =&lt;br /&gt;
#(define-music-function (sorttext text) (string? markup?)&lt;br /&gt;
   &amp;quot;Add a section line to the alphabetical index, using @code{indexSectionMarkup}&lt;br /&gt;
paper variable markup. This can be used to divide the alphabetical index into&lt;br /&gt;
different sections, for example one section for each first letter.&amp;quot;&lt;br /&gt;
   (add-index-item! &amp;#039;indexSectionMarkup text sorttext))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
% ---------------------------------------------------------------&lt;br /&gt;
% Example&lt;br /&gt;
&lt;br /&gt;
\markuplist \index&lt;br /&gt;
&lt;br /&gt;
\indexSection #&amp;quot;B&amp;quot; \markup { &amp;quot;B&amp;quot; }&lt;br /&gt;
\indexSection #&amp;quot;K&amp;quot; \markup { &amp;quot;K&amp;quot; }&lt;br /&gt;
\indexSection #&amp;quot;Z&amp;quot; \markup { &amp;quot;Z&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  \score {&lt;br /&gt;
    \relative c&amp;#039; {&lt;br /&gt;
      \repeat unfold 10 { c d e f }&lt;br /&gt;
      \indexItem #&amp;quot;Karola&amp;quot; \markup{ &amp;quot;Karola&amp;quot; }&lt;br /&gt;
      \repeat unfold 10 { c d e f }&lt;br /&gt;
      \bar &amp;quot;|.&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    \header {&lt;br /&gt;
      piece = &amp;quot;first piece&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  \score {&lt;br /&gt;
    &amp;lt;&amp;lt;&lt;br /&gt;
      \new Staff \new Voice = &amp;quot;voc&amp;quot; {&lt;br /&gt;
        \relative c&amp;#039; {&lt;br /&gt;
          \indexItem #&amp;quot;Zora&amp;quot; \markup { \italic &amp;quot;Zora&amp;quot; }&lt;br /&gt;
          \repeat unfold 10 { c d e f }&lt;br /&gt;
          \indexItem #&amp;quot;Bettina&amp;quot; \markup { \larger &amp;quot;Bettina&amp;quot; }&lt;br /&gt;
          \indexItem #&amp;quot;Barbara&amp;quot; \markup { \smallCaps &amp;quot;Barbara&amp;quot; }&lt;br /&gt;
          \repeat unfold 10 { c d e f }&lt;br /&gt;
          \bar &amp;quot;|.&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
      \new Lyrics \lyricsto &amp;quot;voc&amp;quot; {&lt;br /&gt;
        \repeat unfold 10 { la la la la }&lt;br /&gt;
        \repeat unfold 10 { mi mi mi mi }&lt;br /&gt;
    } &amp;gt;&amp;gt;&lt;br /&gt;
    \header {&lt;br /&gt;
      piece = &amp;quot;second piece&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Titles]]&lt;br /&gt;
[[Category:Paper and layout]]&lt;br /&gt;
[[Category:Editorial annotations]]&lt;/div&gt;</summary>
		<author><name>Jean Abou Samra</name></author>
	</entry>
</feed>