@@ -180,10 +180,29 @@ ◊dialogue{ ◊say["Tavi"]{You also write fiction, or you used to. Do you still?} ◊say["Lorde"]{The thing is, when I write now, it comes out as songs.} } }| + +@defproc[(index [heading string?] [elements xexpr?] ...) txexpr?] + +Creates an entry in the keyword index under @racket[_heading] that points back to this spot in the +document. If @racket[_elements] is not empty, the web edition of the document will use it as the +contents of an understated hyperlink to back to @racket[_heading] in the keyword index. + +The example below will create two index entries, one under the heading “compassion” and one under +the heading “cats”: + +@codeblock|{ + #lang pollen + + “I have a theory which I suspect is rather immoral,” Smiley + went on, more lightly. “Each of us has only a quantum of + ◊index["compassion"]{compassion}. That if we lavish our concern + on every stray ◊index["cats"] cat we never get to the centre of + things. What do you think of it?” +}| @defproc[(note [#:date date-str non-empty-string?] [#:author author string? ""] [#:author-url author-url string? ""] [#:disposition disp-str string? ""]) txexpr?]