1

I have index that has content for one and half page. It looks ugly in my opinion so I want to align the content of right page to the content of left page.

This is how it looks now: Current view

And I want to move the items on right page lower so it look like this:

enter image description here

Here is the MWE:

\documentclass{memoir}
\usepackage[utf8]{inputenc}
\usepackage{imakeidx}
\indexsetup{othercode=\huge}

\makeindex[name=main,program=makeindex,columns=2,columnsep=15pt]

\renewcommand\clearforchapter{\cleartoevenpage[\thispagestyle{empty}]}

\begin{document}

test 

\index{Item 01}
\index{Item 02}
\index{Item 03}
\index{Item 04}
\index{Item 05}
\index{Item 06}
\index{Item 07}
\index{Item 08}
\index{Item 09}
\index{Item 10}
\index{Item 11}
\index{Item 12}
\index{Item 13}
\index{Item 14}
\index{Item 15}
\index{Item 16}
\index{Item 17}
\index{Item 18}
\index{Item 19}
\index{Item 20}
\index{Item 21}
\index{Item 22}
\index{Item 23}
\index{Item 24}
\index{Item 25}
\index{Item 26}
\index{Item 27}
\index{Item 28}
\index{Item 29}
\index{Item 30}
\index{Item 31}
\index{Item 32}
\index{Item 33}
\index{Item 34}
\index{Item 35}
\index{Item 36}
\index{Item 37}
\index{Item 38}
\index{Item 39}
\index{Item 40}
\index{Item 41}
\index{Item 42}
\index{Item 43}
\index{Item 44}
\index{Item 45}
\index{Item 46}
\index{Item 47}
\index{Item 48}
\index{Item 49}
\index{Item 50}
\index{Item 51}
\index{Item 52}
\index{Item 53}
\index{Item 54}
\index{Item 55}
\index{Item 56}
\index{Item 57}
\index{Item 58}
\index{Item 59}
\index{Item 60}

\printindex[main]

\end{document}

If that is useful, here is how I compile it:

pdflatex -halt-on-error --synctex=-1 main.tex
makeindex main
pdflatex -halt-on-error --synctex=-1 main.tex
pdflatex -halt-on-error --synctex=-1 main.tex
3
  • if you're using imakeidx why are you running makeindex by hand? One of the main features of imakeindex is that is runs makeindex by it self. I tried using the afterpage package, but it does not seem to work in this setup.
    – daleif
    Commented Apr 11, 2018 at 10:59
  • Actually, I don't remember why... But I think it was not working properly without makeindex command on my side. But let's leave it aside for now. I can compile it different way it that can solve the issue with aligning.
    – nosbor
    Commented Apr 11, 2018 at 11:02
  • Welcome to TeX.SX!
    – Skillmon
    Commented Apr 11, 2018 at 11:10

1 Answer 1

1

Changing the page dimensions locally and setting the removed \textheight as a negative \beforechapsep works. There is a guessed factor of 5pt included which might need adaption in your document.

\documentclass{memoir}
\usepackage[utf8]{inputenc}
\usepackage{imakeidx}
\indexsetup{othercode=\huge}


\makeindex[program=makeindex,columns=2,columnsep=15pt]

\renewcommand\clearforchapter{\cleartoevenpage[\thispagestyle{empty}]}

\begin{document}
\chapter*{Foo}
test 

\index{Item 01}
\index{Item 02}
\index{Item 03}
\index{Item 04}
\index{Item 05}
\index{Item 06}
\index{Item 07}
\index{Item 08}
\index{Item 09}
\index{Item 10}
\index{Item 11}
\index{Item 12}
\index{Item 13}
\index{Item 14}
\index{Item 15}
\index{Item 16}
\index{Item 17}
\index{Item 18}
\index{Item 19}
\index{Item 20}
\index{Item 21}
\index{Item 22}
\index{Item 23}
\index{Item 24}
\index{Item 25}
\index{Item 26}
\index{Item 27}
\index{Item 28}
\index{Item 29}
\index{Item 30}
\index{Item 31}
\index{Item 32}
\index{Item 33}
\index{Item 34}
\index{Item 35}
\index{Item 36}
\index{Item 37}
\index{Item 38}
\index{Item 39}
\index{Item 40}
\index{Item 41}
\index{Item 42}
\index{Item 43}
\index{Item 44}
\index{Item 45}
\index{Item 46}
\index{Item 47}
\index{Item 48}
\index{Item 49}
\index{Item 50}
\index{Item 51}
\index{Item 52}
\index{Item 53}
\index{Item 54}
\index{Item 55}
\index{Item 56}
\index{Item 57}
\index{Item 58}
\index{Item 59}
\index{Item 60}

\bgroup
\clearpage
\setbox0\vbox{\chapnamefont Index}%
\dimen0=%
  \dimexpr\beforechapskip+\afterchapskip+\midchapskip+\ht0%
  +5pt\relax% 5pt are guessed and seem to work
\advance\headsep\dimen0
\advance\textheight-\dimen0
\beforechapskip=-\dimexpr\afterchapskip+\midchapskip+5pt+\ht0\relax
\printindex
\clearpage
\egroup

\end{document}

enter image description here

0

You must log in to answer this question.

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