Let's say we have a document broken into chapters and we want at the beginning of each chapter to add between two horizontal lines a "Section Break-Down" that shows all the sections and subsections of the Chapter with our preferred text before all or some of the sections.
For example... For the next document/MWE
\documentclass{book}
\usepackage{amsmath}
\usepackage{capt-of}
\usepackage{pgffor}
\usepackage{hyperref}
\makeatletter
\hypersetup{colorlinks=true, linkcolor=black, citecolor=black, filecolor=black, urlcolor=black,pdftitle = {\@title}}
\makeatother
\newcounter{mychapter}
\renewcommand\thepart{\Alph{part}}
\renewcommand\thechapter{\thepart.\arabic{mychapter}}
\renewcommand\thesection{\thechapter.\arabic{section}}
\renewcommand\thesubsection{\thesection.\arabic{subsection}}
\usepackage{tocloft}
\renewcommand\cftchapfont{\large\bfseries}
\setlength{\cftchapindent}{2.3em}
\setlength{\cftchapnumwidth}{2.6em}
\renewcommand\cftsecfont{\normalsize}
\setlength{\cftsecindent}{4.9em}
\setlength{\cftsecnumwidth}{2.9em}
\setlength{\cftsubsecnumwidth}{4em}
\setlength{\cftsubsecindent}{7em}
\let\oldpart\part
\def\part#1{\oldpart{#1}\setcounter{mychapter}{0}}
\let\oldchapter\chapter
\def\chapter#1{\stepcounter{mychapter}\oldchapter{#1}}
\title{Some Math Staff}
\author{Leledakis, K.}
\begin{document}
\maketitle
\tableofcontents
\listoffigures
\part{First Part}
\chapter{Some Mathematical Functions}
\section{The function $\mathbf{f(x)=c}$}\label{Sec:UFxC}
\subsection{Understanding the function}
This function is independent from the variable $x$ and thus\ldots
\subsection{Plotting the function}
By understanding the content of Subsection~\ref{Sec:UFxC}\ldots
\noindent\begin{minipage}[inner sep=0,outer sep=0]{\textwidth}
\centering
\captionof{figure}{Plot of $f(x)=c$}
\end{minipage}
\subsection{Examples}
\ldots
\section{The function $\protect\mathbf{f(x)=c\cdot x}$}\label{Sec:UFxCx}
\subsection{Understanding the function}
This function depends on the variable $x$ and thus\ldots
\subsection{Plotting the function}
By understanding the content of Subsection~\ref{Sec:UFxCx}\ldots
\noindent\begin{minipage}[inner sep=0,outer sep=0]{\textwidth}
\centering
\captionof{figure}{Plot of $f(x)=c\cdot x$}
\end{minipage}
\subsection{Examples}
\ldots
\section{The function $\protect\mathbf{f(x)=c\cdot x+d}$}\label{Sec:UFxCxD}
\subsection{Understanding the function}
This function depends on the variable $x$ and thus\ldots
\subsection{Plotting the function}
By understanding the content of Subsection~\ref{Sec:UFxCxD}\ldots
\noindent\begin{minipage}[inner sep=0,outer sep=0]{\textwidth}
\centering
\captionof{figure}{Plot of $f(x)=c\cdot x+d$}
\end{minipage}
\subsection{Examples}
\ldots
\chapter{More Functions}
\section{The function $\protect\mathbf{f(x)=x^2}$}\label{Sec:UFxS}
\subsection{Understanding the function}
This function depends on the variable $x$ and thus\ldots
\subsection{Plotting the function}
By understanding the content of Subsection~\ref{Sec:UFxS}\ldots
\noindent\begin{minipage}[inner sep=0,outer sep=0]{\textwidth}
\centering
\captionof{figure}{Plot of $f(x)=x^2$}
\end{minipage}
\subsection{Examples}
\ldots
\section{The function $\protect\mathbf{f(x)=c\cdot x^2}$}\label{Sec:UFCxS}
\subsection{Understanding the function}
This function depends on the variable $x$ and thus\ldots
\subsection{Plotting the function}
By understanding the content of Subsection~\ref{Sec:UFCxS}\ldots
\noindent\begin{minipage}[inner sep=0,outer sep=0]{\textwidth}
\centering
\captionof{figure}{Plot of $f(x)=c\cdot x^2$}
\end{minipage}
\subsection{Examples}
\ldots
\section{The function $\protect\mathbf{f(x)=c\cdot x^2+d}$}\label{Sec:UFCxSD}
\subsection{Understanding the function}
This function is depends on the variable $x$ and thus\ldots
\subsection{Plotting the function}
By understanding the content of Subsection~\ref{Sec:UFCxSD}\ldots
\noindent\begin{minipage}[inner sep=0,outer sep=0]{\textwidth}
\centering
\captionof{figure}{Plot of $f(x)=c\cdot x^2+d$}
\end{minipage}
\subsection{Examples}
\ldots
\end{document}
That has a TOC like this:
I want Something like this:
on the Chapter A.1
But also something like this:
on the Chapter A.2


