1

I would like to add a ``THE END'' to the end of an Index.

Is there a command when creating an Index analogous to the \addtocontents command for the TOC? I am using PDFLATEX.

Consider the MWE

\documentclass[12pt]{book}
\usepackage{imakeidx}
\makeindex
\usepackage{idxlayout}

\begin{document} \thispagestyle{empty} Sentence\index{Index Entry1} \newpage Sentence\index{Index Entry2} \newpage

\idxlayout{columns=2} \printindex \end{document}

which produces the Index:

enter image description here

Again, I would like to add ``THE END'', preferably centered, somewhere after the index entries.

Thank you.

DDS
  • 8,816
  • 4
  • 9
  • 36

1 Answers1

2

You can just put the extra text after \printindex. Below I added a bit of vertical space.

\documentclass[12pt]{book}
\usepackage{imakeidx}
\makeindex
\usepackage{idxlayout}

\begin{document} \thispagestyle{empty} Sentence\index{Index Entry1} \newpage Sentence\index{Index Entry2} \newpage

\idxlayout{columns=2} \printindex

\vspace{1cm}\centering\large THE END \end{document}

enter image description here

Marijn
  • 37,699
  • Thank you. That works nicely. However, would you know if this can be done using some type of index command, which might offer the possibility of adding (positioned) comments/statements within the Index itself? something analogous to the addtocontents command that Table of Contents has? Thank you again for your useful answer. – DDS Jul 07 '21 at 19:27
  • 1
    @mlchristians what kind of comment/statement do you want to include? There is the possibility of creating categories that are printed within the index, see for example https://tex.stackexchange.com/questions/593382/categorising-and-aligning-entries-in-index. For random comments you might be able to add an index entry without page number, but that would need some tricks, e.g., https://tex.stackexchange.com/questions/52142/remove-page-number-from-index-entries. But if you want you can open a new question to make your new use case clear. – Marijn Jul 07 '21 at 19:44
  • Thank you for your helpful comment. – DDS Jul 07 '21 at 19:59