1

I am seeking a "\indexepilogue"-like command or method equivalent to \indexprologue of imakeidx but after the index and before any page break is made.

1 Answer 1

0

etoolbox package can add code to the end of theindex environment, but what code to add depends on the specifics of your case. Please add a small working example showing what you intend and what you have tried so far, which class, which packages.

Here is a 'plain' version:

plain

MWE

\documentclass[12pt]{article}
\usepackage{makeidx}
\usepackage{etoolbox}
\newcommand\epcode{This is some text after the index.}
\makeindex
\AtEndEnvironment{theindex}{\epcode}

\begin{document}
Test A\index{A}
\newpage
Test B\index{B}
\newpage
\printindex
\end{document}

With imakeidx with two-column mode, with text in column two:

two column index plus text

MWE

\documentclass[12pt]{article}
\usepackage{imakeidx}
\usepackage{etoolbox}
\newcommand\epcode{This is some text after the index.}
\makeindex
\AtEndEnvironment{theindex}{\epcode}

\begin{document}
Test A\index{A}
\newpage
Test B\index{B}
\newpage
\printindex
\end{document}

A variation, showing the difference between AtEnd... and AfterEnd...:

two column one column

MWE

\documentclass[12pt]{article}
\usepackage{imakeidx}
\usepackage{etoolbox}
\newcommand\epcode{This is some text after the index, but before the end of its environemnt (two balanced columns).}
\newcommand\epcodeb{And this is some text after the end of the index environment.}
\makeindex
\AtEndEnvironment{theindex}{\epcode}\AfterEndEnvironment{theindex}{\epcodeb}

\begin{document}
Test A\index{A}
\newpage
Test B\index{B}
\newpage
\printindex
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .