I have a number of Roman names. I'd like to sort them by middle name (gens) which is much more useful than by first or last. Is this possible?
\documentclass[a4paper]{article}
\usepackage{imakeidx}
\makeindex[title=Index of Romans]
\begin{document}
Here I reference Marcus Tullius Cicero\index{Marcus Tullius Cicero} and Gaius Julius Caesar.\index{Gaius Julius Caesar} I'd like the index entry to appear sorted by the middle part of the name (Gaius \textit{Pompeius} Magnus); it is not a viable solution to list it as Pompeius, Gaius Magnus\index{Pompeius, Gaius Magnus} as this lists names in the order 2, 1, 3, which is odd.
That is, it should be sorted as \textit{Pompeius Magnus, Gaius} but appear as \textit{Gaius Pompeius Magnus}.
%Thus these should sort in order of the middle name:
\index{Derek Al Cicero}
\index{Charlie Ben Cicero}
\index{Ben Charlie Cicero}
\index{Al Derek Cicero}
\printindex
\end{document}