如何在列出该章内容的每一章前面创建一个 table 内容?

How do i create a table of contents per infront of every chapter that lists the contents of that chapter?

我正在处理一个包含多个作品的文档,并且需要能够为每个作品创建一个新的目录。我该如何实现?要清楚,不同的作品是部分,所以我需要一个目录来包含当前部分的所有子部分和子部分等。

这是一个例子

\documentclass[paper=170mm:240mm,BCOR=5mm,DIV=calc,10pt,headsepline]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[hyphens]{url}
\usepackage{blindtext}
\usepackage[onehalfspacing]{setspace} 
\usepackage{pdfpages}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{backgrounds,calc}
\setquotestyle[guillemets]{german}
\usepackage[symbol,hang]{footmisc}
%package für Abkürzungsverzeichnis 
\usepackage[]{acronym}

\usepackage{scrlayer-scrpage}
\pagestyle{scrheadings}
\clearpairofpagestyles
\ohead{\headmark}
\automark[subsection]{section}
\ofoot[\pagemark]{\pagemark}


\usepackage[fleqn]{amsmath}
\usepackage{xcolor}
\usepackage{imakeidx} 
\makeindex[program=makeindex,options=-s MyIndex,columns=2,title=Sachregister,intoc]

% Use package for title formatting
\usepackage{titlesec}
\usepackage{float}
% Make title page


%Hier Set und Def von Sachen-----------------------------------------

% Strich bei Seitenzahlen:------------------
\rofoot*{% 
   \makebox[0pt][l]{%
     \hspace{\marginparsep}%  
     \raisebox{0pt}[\ht\strutbox][\dp\strutbox]{% 
       \rule[-\dp\strutbox]{1pt}{2\baselineskip}% 
     }% 
     \enskip 
     \pagemark 
   }% 
}
\lefoot*{% 
   \makebox[0pt][r]{% 
     \pagemark 
     \enskip
     \raisebox{0pt}[\ht\strutbox][\dp\strutbox]{% 
       \rule[-\dp\strutbox]{1pt}{2\baselineskip}% 
     }% 
     \hspace{\marginparsep}%
   }% 
}
\addtokomafont{pagehead}{\upshape}
%---------------------------------------------

\title{a}
\author{b }
\date{April 2021}


%Dokument----------------------------------------------------------- 
\begin{document}
\frontmatter
\tableofcontents


\mainmatter
\Blinddocument

\end{document}


这是我正在使用的格式

使用 etoc 包的一种可能性:

\documentclass[paper=170mm:240mm,BCOR=5mm,DIV=calc,10pt,headsepline]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[hyphens]{url}
\usepackage{blindtext}
\usepackage[onehalfspacing]{setspace} 
\usepackage{pdfpages}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{backgrounds,calc}
\setquotestyle[guillemets]{german}
\usepackage[symbol,hang]{footmisc}
%package für Abkürzungsverzeichnis 
\usepackage[]{acronym}

\usepackage{scrlayer-scrpage}
\pagestyle{scrheadings}
\clearpairofpagestyles
\ohead{\headmark}
\automark[subsection]{section}
\ofoot[\pagemark]{\pagemark}


\usepackage[fleqn]{amsmath}
\usepackage{xcolor}
\usepackage{imakeidx} 
\makeindex[program=makeindex,options=-s MyIndex,columns=2,title=Sachregister,intoc]

% Use package for title formatting
%\usepackage{titlesec}
\usepackage{float}
% Make title page


%Hier Set und Def von Sachen-----------------------------------------

% Strich bei Seitenzahlen:------------------
\rofoot*{% 
   \makebox[0pt][l]{%
     \hspace{\marginparsep}%  
     \raisebox{0pt}[\ht\strutbox][\dp\strutbox]{% 
       \rule[-\dp\strutbox]{1pt}{2\baselineskip}% 
     }% 
     \enskip 
     \pagemark 
   }% 
}
\lefoot*{% 
   \makebox[0pt][r]{% 
     \pagemark 
     \enskip
     \raisebox{0pt}[\ht\strutbox][\dp\strutbox]{% 
       \rule[-\dp\strutbox]{1pt}{2\baselineskip}% 
     }% 
     \hspace{\marginparsep}%
   }% 
}
\addtokomafont{pagehead}{\upshape}
%---------------------------------------------

\title{a}
\author{b }
\date{April 2021}

\usepackage{etoc}
\etocsettocstyle{}{}%

%Dokument----------------------------------------------------------- 
\begin{document}
\frontmatter
\tableofcontents


\mainmatter
\chapter{First Chapter}
\localtableofcontents

\section{title}

\section{title}


\blindtext

\end{document}