我的索引有一页半的内容。我觉得它看起来很丑,所以我想将右页的内容与左页的内容对齐。
我想将右页的项目移到下方,使其看起来像这样:
以下是 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}
如果这有用的话,下面是我编译它的方法:
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
答案1
本地更改页面尺寸并将移除设置\textheight
为负面作品。文档中包含\beforechapsep
一个猜测因素,可能需要进行调整。5pt
\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}