索引のページ番号の後に「;」を入れます

索引のページ番号の後に「;」を入れます

私は辞書のような索引を作成しようとしています。ここでは、テキスト内のさまざまなバリエーションを持ついくつかの用語が定義されています。これは を使用すると簡単になるようですindexing。1つの索引項目のサブ項目を同じ行に配置して、;

MWE は次のとおりです。

            \documentclass{article}
            \usepackage{makeidx}
            \makeindex
            \def\igobble#1 {}
            \makeatletter
            % we don't want a page break before a subitem
            \renewcommand\subitem{\@idxitem\nobreak\hspace*{20\p@}}
            \makeatother
            \makeatletter
            % we don't want a page break before the first subitem
            \newif\iffirst@subitem
            \def\@idxitem{%
                \par\hangindent40\p@ % original
                \first@subitemtrue   % added
            }
            \def\subitem{%
            %   \par\hangindent40\p@
                \iffirst@subitem
                \nobreak
                \first@subitemfalse
                \fi
                %\hspace*{20\p@}
                }
            \makeatother


            \begin{document}

            some text\index{k} with some index entries\index{b}
            and some\index{c} \emph{see also} entries as well.
            \index{Term to define!zzzzz@\igobble |seealso {b, c}}
            \index{Term to define!\emph{Derived term} here is its definition and here is where we see it \textbf{bcd 12}}
            \index{Term to define!\emph{Anoter derived term} here is its definition and here is where we see it \textbf{bcccc 17}}
            \index{c!zzzzz@\igobble |seealso {a, b}}

            \printindex
            \end{document}

subitemマクロはここから取得されます索引の最初のサブエントリの前で列の区切りを防ぐにはどうすればよいですか?

;これが出力です。赤字はページ番号の前とページ番号の後にp.を入れたい部分です。

ここに画像の説明を入力してください

関連情報