2

My task is to summarize a book and in that summarized version I need to keep both references to page number in the summary and also add manually the page number from the book something like this: enter image description here

I've tried with redefining some of the tocloft commands but it is not working...

Thanks!

3
  • Maybe there's a way to do this with a 2-column table?
    – Nate
    Commented Oct 2, 2023 at 0:48
  • Welcome, show a Minimal Working Example which contains the code you have tried so far. Otherwise, its hard to help.
    – lukeflo
    Commented Oct 2, 2023 at 8:47
  • 1
    Have a look at tex.stackexchange.com/questions/689604/… Commented Oct 2, 2023 at 9:08

2 Answers 2

0

Maybe you can start from something like

\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}

0

Having the above answers until now I have this, which is not bad but I need also somthing for the chapter,section and subsection but I cannot make it work.

\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}

Which generates something like this: enter image description here

You must log in to answer this question.

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