-
-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is indexer documented anywhere? #893
Comments
No I don't think so. And personally I haven't even used it. When I needed something along those lines I baked my own. It would probably have been smarter of be to work on the indexer package instead, but... You can see the variant I made in CaSILE's verseindex package. The use case in CaSILE is specific to Bible verse references. First the Markdown input is parsed with a BCV parser to find anything that looks like a verse reference. Those parsed references are turned into links to an online source for the verse and the generated markdown link has OSIS meta data and a pretty-formatted normalized name. When the Markdown is converted to SIL this link meta data is passed along. The verseindex package keeps track of those links as they occur and logs the page numbers similarly to how the TOC would do so for section references except that of course a single OSIS reference may appear on multiple pages. At the end of the book the resulting page OSIS/page number map is used to generate the printed index grouped by book: |
So if I understand your code, you've modified the The |
Yes, exactly. One wouldn't have to use href's for this of course, I just happened to have them anyway. You can write any function to set marks and handle them the same way. Also you probably know this, but do note that these kind of indexes currently take at least 2 rendering passes. The first pass collects the info and dumps it to a meta data file at the end of the document. That meta data will not be available until the second pass because the file doesn't exist yet. Given that the index is after the content (in this example) it could be done in memory rather than in an info file, but since the TOC takes 2+ passes anyway I wasn't concerned with optimizing that. |
Yep, very familiar with the multiple passes from TeX :-) |
The indexer package documentation was included in the SILE Manual some time ago. (If not mistaken, it was added on Jul 13, 2020 via #616, so indeed after this issue was opened.) I tracked a few possible enhancements (kind of a wish list) for indexer in #1339. So I guess this old documentation request ticket could be closed? |
I'm working on indexing on a project. I presume the
indexer
package is appropriate for this but could not find any documentation on how to use it.The text was updated successfully, but these errors were encountered: