答案1
也许你可以从类似的事情开始
\documentclass{book}
\usepackage{tocloft}
\newcommand{\bookpagenr}{}
\renewcommand{\cftchapafterpnum}{\quad\bookpagenr}
\begin{document}
\tableofcontents
\addtocontents{toc}{\protect\renewcommand{\protect\bookpagenr}{10}}
\chapter{A Chapter}
\addtocontents{toc}{\protect\renewcommand{\protect\bookpagenr}{12}}
\chapter{Another Chapter}
\end{document}
答案2
到目前为止,我已经有了上述答案,这还不错,但我还需要一些章节、部分和小节的内容,但我无法使其发挥作用。
\documentclass{book}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{etoc}
\usepackage{lipsum}
\title{"My Title"}
\newcommand{\BookP}{}
\newcommand{\modelsubsubsection}[3]{\addtocontents{toc}{\protect\renewcommand\protect\BookP{\makebox[2em]{#3}}}\subsubsection[#2]{#1}}
\begin{document}
\begingroup\parindent 0pt \parfillskip 0pt \leftskip 0cm \rightskip 0cm
\etocsettocdepth{4}
\etocsetstyle{section}{\noindent\hfill\quad\makebox[4em][l]{\rlap{\rotatebox{45}{Summary page}}\hspace{2em}\rlap{\rotatebox{45}{Book Page}}\hspace{2em}}\par}{}{}{}
\etocsetstyle{subsection}{}{}{\textbf{\etocname}\par}{}
\etocsetstyle {subsubsection}
{}
{}
{~~~~\etocname\hfill\etocpage\quad\BookP\par}
{}
\tableofcontents
\endgroup
\newpage
\chapter{Introduction}
\section{Background}
\lipsum[1-2]
\modelsubsubsection{Subsection1}{Subsection1}{10}
\lipsum[1-2]
\modelsubsubsection{Subsection2}{Subsection2}{20}
\lipsum[1-8]
\modelsubsubsection{Subsection3}{Subsection3}{30}
\end{document}