0
多表我所尋找的內容結構如下表:乳膠:內容
目錄
1 Vorwort
2喂
3 UND所以weiter
帶有這些章節的文檔,但在每章的開始處其具體目錄:
1 Vorwort
-----這裏subtoc -----
1.1 subtoc
1.2測試
----部分測試在這裏開始--- -
1.2測試
問題不過是,在這些不同的章節所有subtocs相結合,如我的例子:
\documentclass{scrbook}
\usepackage[latin1]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{blindtext}% generiert Beispieltext
\usepackage{tocstyle}[2008/10/20]% experimentelles KOMA-Script-Paket
\usetocstyle{standard}
\newcounter{normaltocdepth}
\newcommand*{\startstory}[1]{%
\newpage\chapter{#1}\addtocontents{toc}{\protect\startstory}%
}
\newcommand*{\afterstory}{%
\addtocontents{toc}{\protect\afterstory}
}
\newcommand*{\maintoc}{%
\begingroup
\setcounter{normaltocdepth}{\value{tocdepth}}%
\renewcommand*{\startstory}{%
\setcounter{tocdepth}{1}%
}%
\renewcommand*{\afterstory}{%
\setcounter{tocdepth}{\value{normaltocdepth}}%
}%
\tableofcontents
\endgroup
}
\newcommand*{\storytoc}{%
\begingroup
\setcounter{normaltocdepth}{\value{tocdepth}}%
\setcounter{tocdepth}{-2}%
\renewcommand*{\startstory}{%
\setcounter{tocdepth}{\value{normaltocdepth}}%
}%
\renewcommand*{\afterstory}{%
\setcounter{tocdepth}{-2}%
}%
\showtoc{toc}
\setcounter{tocdepth}{\value{normaltocdepth}}% Hinzugefügt!
\endgroup
}
\newcommand{\neuestory}[3]{
\startstory{#3}
\vspace{10mm}
\section*{Abstract}
\small
\noindent #1
\section*{Personen}
\noindent #2
\normalsize
\vspace{10mm}
\section*{Inhalt}
\storytoc
%\cleardoublepage
}
\begin{document}
\maintoc
\newpage
\chapter{Vorwort}
blabla
\neuestory{ABC}{eine Frau}{Hallo}
\section{Test}
abc
\afterstory
\neuestory{DEF}{eine Mann}{Und so weiter}
\section{weiterheiter}
def
\afterstory
\end{document}