I need to have several seealso under one index entry. I tried several ways to get this work. First variant (see below) produces semicolons between entries but I need commas as separators. Other variants produces good output but throws the errors like ERROR: Cross-reference-target ("a, c") does not exist!. There is the solution with makeidx but I need to solve it with imakedx and xindy.
My MWE:
\documentclass{article}
\usepackage{hyperref}
\usepackage[xindy]{imakeidx}
\makeindex[options=-M texindy]
\begin{document}
foo\index{a} \index{b} \index{c} \index{d}
\index{a|seealso{c}} \index{a|seealso{d}} %1st
\index{b|seealso{a, c}} %2nd
\index{c\relax |seealso{a, b}} %3rd
\index{d\gobble |seealso{b, c}} %4th
\printindex
\end{document}
My output:


makeindex.xdy. If I have another filename and call it by\makeindex[program=truexindy,options=-M texindy -M another_filename.xdy]output result is the same but now I have some errors:ERROR: replacing location-reference-class"see"' is not allowed !andERROR: replacing location-reference-class"seealso"' is not allowed !. It is not essentially to have style file with another filename just wondering what is the reason of such routine. – andc Jan 02 '20 at 18:45makeindex.xdyis also loaded, I'm guessing the\makeindexcommand loads a file with this name by default and additionally any other files that are passed in the options. Therefore the rules forseeandseealsoare loaded first frommakeindex.xdyand then you try to load new definitions for the same commands from your custom file, which is not allowed. Defining a new command in another file is allowed, i.e.,\index{a|myseealso{c}}and(define-crossref-class "myseealso") (markup-crossref-list :class "myseealso" :open "\seealso{"etc. – Marijn Jan 02 '20 at 18:58(define-crossref-class "see")and(define-crossref-class "seealso")solves this "problem". – andc Jan 02 '20 at 19:13