Hi,
I would like to have a word-index in my document, so I included dexter with:
#import "@preview/in-dexter:0.7.2": *
I now can use #index[some words] to fill the index. So far, so good. But because #index is a little bit long and it makes a difference (for dexter) if I write #index[SoMe WoRdS] or #index[some words], which gives two different entries, I thought it to be a good idea to write a little wrapper to lower-case the entries:
#let I( string ) = {
let stringLower = lower( string )
index( stringLower )
string
}
The result however is a little bit unexpected. I still can see the “indexed” words in my document (for example #I[blah] on page 11 will lead to an entry for page 11, but the word is an empty string). Result: In the index there now is just a single empty (“”) entry, showing all page numbers of all words in one line…
I am relatively new to Typst and have to admit, that this puzzles me. So, I would like not only to know how to fix it but also, why this happens. For sure I am doing something stupid…
Stefan