I need to do this because the unicode alpha and beta characters I'm using aren't in the font used to generate the index. I understand how to use \index[ } to apply an arbitrary command to the page number; I need a similar facility for the index term. Is this possible, or do I have to keep patching the ".ind" file by hand?
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
My description of the problem was poor. What I meant to say was that when \printindex typesets the information in the ".ind" file, the font used (the normal font) doesn't contain the two desired characters. This forces me to "patch" the ".ind" file and specify the correct font with my command \TBFN{ }. The patched ".ind" works perfectly, it's just a bit inelegant to have to do the patching. It's something I could forget before sending the PDF to the printer, which would be embarrassing.
it is not at all clear how you generate the index. However, the usual way of adding formatting to index entry is the \index{sort@entry}. So for a bold word: \index{word@\textbf{word}}. This could be automated by defining semantic macros which create the index entry “on the fly”.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p