如何在点和页码之前制作带有部分标题和章节标题的目录?

如何在点和页码之前制作带有部分标题和章节标题的目录?

我使用这个设置:

\renewcommand\cftchappresnum{\chaptername~}
\renewcommand\cftpartpresnum{\partname~}
\renewcommand\cftchapaftersnum{.}
\renewcommand\cftpartaftersnum{.}
\newlength\mylength
\settowidth\mylength{\cftchappresnum\cftchapaftersnum 10pt}
\settowidth\mylength{\cftpartpresnum\cftpartaftersnum 10pt}
\addtolength\cftchapnumwidth{\mylength}
\addtolength\cftpartnumwidth{\mylength}

但它只添加了第 1 章。第 1 章的名称。.......... 5

但我想要:

Part 1. Name of the Part 1. .......... 5
Chapter 1. Name of the chapter 1. .......... 5
...

更新:

\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\cftpartleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\cftaftertoctitle}{\chaptertitle\hfill}
\renewcommand{\cfttoctitlefont}{\hfill\large}
\renewcommand\cftchappresnum{\chaptername~}
\renewcommand\cftchapaftersnum{.}
\renewcommand\cftpartpresnum{\partname~}
\renewcommand\cftpartaftersnum{.}
\newlength\mylength
\settowidth\mylength{\cftchappresnum\cftchapaftersnum\quad}
\settowidth\mylength{\cftpartpresnum\cftpartaftersnum\quad}
\addtolength\cftchapnumwidth{\mylength}
\addtolength\cftpartnumwidth{\mylength}
\renewcommand{\contentsname}{\hspace*{\fill}\bfseries\large}

我试过了。现在部分和章节都有点,但部分和章节都没有部分标题和章节标题。

更新2:

\documentclass[russian,11pt,a5paper,openany]{book}
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[russian]{babel}
\usepackage{etoolbox}
\usepackage{blindtext, color}
\usepackage{indentfirst}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{lipsum}
 \usepackage[a5paper,tmargin=1.5cm,inner=1.5cm,outer=2cm,bmargin=1.5cm]{geometry}
\usepackage[format=plain,labelfont=bf,up,textfont=it,up]{caption}
\usepackage{tocloft}
\usepackage{tocvsec2}
\usepackage{footmisc}
\usepackage{wrapfig}
\usepackage[proportional,scaled=1.064]{erewhon}
\usepackage[erewhon,vvarbb,bigdelims]{newtxmath}
\usepackage{changepage}
\usepackage[pagestyles,newlinetospace,newparttoc]{titlesec}
\renewcommand*\oldstylenums[1]{\textosf{#1}}
\graphicspath{{./images}}
\titleformat{\chapter}[display]{\normalfont\bfseries\centering}  {\MakeUppercase{\chaptertitlename}\ \thechapter}{0pt}{\normalfont\large \MakeUppercase}
\captionsetup[figure]{labelsep=period,font=small,labelfont=it}
\captionsetup[table]{labelsep=period,font=small,labelfont=it}
\renewcommand{\thefootnote}{\arabic{footnote}}
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\cftpartleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\cftaftertoctitle}{\chaptertitle\hfill}
\renewcommand{\cfttoctitlefont}{\hfill\large}
\renewcommand*{\cftchappresnum}{\chaptername\space}
\renewcommand\cftchapaftersnum{.}
\setlength{\cftchapnumwidth}{1.5cm}
\renewcommand{\contentsname}{\hspace*{\fill}\bfseries\large}

\begin{document}
\setlength\parskip{0pt}
\chapter*{Введение}
\addcontentsline{toc}{chapter}{Introduction}
\chaptermark{Intro}
\part{Part one}
\chapter{Chapter one}
\newpage
\chapter{Chapter two}
\newpage
\part{Part two}
\chapter{Chapter three}
\newpage
\backmatter
\end{document}

现在我有类似的东西:

Introduction ....................................................... 5
I Name of part one ......................................... 6
Chapter 1. Name of chapter one ............... 7

相关内容