我希望我的前言只出现在奇数页上。这应该包括目录。我之前见过一个解决方案(目录仅在右侧页面上)但如果您的内容页面包含超过 2 页,则此方法无效。下面是失败的一个例子……
\documentclass[11pt]{book}
\usepackage[a4paper,twoside,top=2cm, bottom=2cm, outer=2cm, inner=4cm]{geometry}
\usepackage[UKenglish]{babel}
\usepackage{afterpage}
\AtBeginDocument{%
\addtocontents{toc}{\protect\afterpage\protect\cleardoublepage}%
}
\begin{document}
\tableofcontents
\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}\section{1}
\end{document}
有什么方法可以修复这个问题,并使目录按照我希望的方式运行?
答案1
您可以使用 paracol 在两页上各放置一列。如果没有保存框,目录直到第 6 页才会显示。
\documentclass[11pt]{book}
\usepackage[a4paper,twoside,top=2cm, bottom=2cm, outer=2cm, inner=4cm]{geometry}
\usepackage[UKenglish]{babel}
\usepackage{paracol}
\newsavebox{\tempbox}
\begin{document}
\setbox\tempbox=\vbox{\let\cleardoublepage=\relax
\tableofcontents}%
\begin{paracol}[1]*{2}
\section{1}
You need at least one line of text.
\section{1}
You need at least one line of text.
\section{1}
You need at least one line of text.
\section{1}
You need at least one line of text.
\section{1}
You need at least one line of text.
\section{1}
You need at least one line of text.
\section{1}
You need at least one line of text.
\section{1}
You need at least one line of text.
\switchcolumn
\unvbox\tempbox
\end{paracol}
\end{document}