How does one go about setting an arbitrary sorting order in an index? For example, I would like to create an index of citations to Roman and canon law, which should not be sorted alphabetically. (All the citations in the text are already written by macros, so it seems like getting them into an index is trivial enough.)
A long example of what I mean, which I hope shows the complexity of how things need to be sorted:
Index of Roman law citations: [= heading division]
Institutiones: [= heading subdivision]
Inst. 1.2 pr. [pr. = prologue]
Inst. 1.2.2
Inst. 3.17 pr.
Digestum: [= heading subdivision]
Dig. 1.1.1.3
Dig. 1.10.1.2
Dig. 27.1.2
Dig. 50.16.289
Codex: [= heading subdivision]
Cod. 1.1.1
Cod. 4.2
Canon law is different again:
Decretum Gratiani: [= heading division]
Prima pars: [= heading subdivision]
D. 1 c. 1
D. 6 c. 3
D. 6 d.p.c. 3 [p. = post = after c. 3]
D. 8 d.a.c 1 [a. = ante = before c. 1]
D. 8 c. 1
Secunda pars: [= heading subdivision]
C. 1 q. 1 c. 10
C. 1 q. 3 c. 7
C. 1 q. 3 c. 15
C. 23 q. 4 c. 5
C. 33 q. 3 (De penitentia) [= subsection in Causa 33, quaestio 3]
D. 5 c. 8
D. 6 c. 1
Tertia pars (De consecratione): [= heading subdivision]
D. 2 c. 2
D. 4 c. 1