Setting print key
Brought to you by:
jschrod
Currently, when using merge-rules to merge different spellings of a key, the print key (i.e., the spelling used in the index) is always derived from the first index entry in the document. But this is not always the desired one, for instance if you use a bibliography processor that automatically generates \index entries from author names. I'm currently working around this by adding manual \index entries before the respective \cite commands, but this is of course tedious and annoying.
I suggest a method to override this decision by setting the print key of a given merge key.
This is a valid issue.
It's not quite clear to me what would be the best way to achieve that, from a user's viewpoint.
Would you want to specify the print key in the document, or is a specification in an auxilliary file (e.g., in an xindy style file) better? I need to know more about real use cases, before I can design an extension.
Thanks for caring about this. For me, it would make most sense to specify it in the style file or module. It is related to the merge rule, so it should be set in the same place. Something like:
;; map Bakthin to Bachtin
(merge-rule "Bakhtin, Mikhail" "Bachtin, Michail")
;; set print key of Bakthin to Bachtin
(print-rule "Bakhtin, Mikhail" "Bachtin, Michail")
In my use case, it would even suffice to derive the print key from the merge rule (e.g. always take the "replacement" in the merge-rule, i.e. the second parameter), but I suppose it would be cleaner to separate this.
On a second thought, I guess the specification should be rather:
;; set print key of Bakthin to Bachtin
(print-rule "Bachtin, Mikhail" "Bachtin, Michail")
i.e., (print-rule merge-key print-key)