You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
self:registerCommand("indexentry", function (options, content)
37
90
ifnotoptions.labelthen
@@ -64,7 +117,7 @@ function package:registerCommands ()
64
117
SU.collatedSort(sortedIndex)
65
118
SILE.call("bigskip")
66
119
for_, kinipairs(sortedIndex) do
67
-
localpageno=table.concat(index[k], ", ")
120
+
localpageno=self:formatPages(index[k])
68
121
SILE.call("index:item", { pageno=pageno }, { k })
69
122
end
70
123
end)
@@ -85,6 +138,15 @@ end
85
138
package.documentation=[[
86
139
\begin{document}
87
140
An index is essentially the same thing as a table of contents, but sorted.
141
+
142
+
The package accepts several configuration options:
143
+
\begin{itemize}
144
+
\item{\autodoc:parameter{page-range-format}: The format used to display page ranges.
145
+
Possible values are \autodoc:parameter{expanded} (default), \autodoc:parameter{none}.}
146
+
\item{\autodoc:parameter{page-range-delimiter}: The delimiter between the start and end of a page range.}
147
+
\item{\autodoc:parameter{page-delimiter}: The delimiter between pages.}
148
+
\end{itemize}
149
+
88
150
This package provides the \autodoc:command{\indexentry} command, which can be called as either \autodoc:command{\indexentry[label=<text>]} or \autodoc:command{\indexentry{<text>}} (so that it can be called from a macro).
89
151
Index entries are collated at the end of each page, and the command \autodoc:command{\printindex} will deposit them in a list.
90
152
The entry can be styled using the \autodoc:command{\index:item} command.
0 commit comments