答案1
以下方法有点儿不方便,目前确实存在局限性。我正在尝试在将来修复这些问题。下图中可以看到一些局限性。但我认为 ToC 非常接近您的方法。
\documentclass[numbers=enddot]{scrreprt}
\newif\ifadditionalssec
%\setcounter{secnumdepth}{1} % not necessary anymore
\AtEndDocument{\addtocontents{toc}{\par}}
\newdimen\ssectocindent\ssectocindent=1.5cm
\makeatletter
\RedeclareSectionCommand[%
toclinefill=\section@dotfill,%
toconstartlowerlevel={\afterssecs},%
tocpagenumberbox=\hbox]
{section}
\RedeclareSectionCommand[%
toclinefill=\chapter@dotfill,%
toconstartlowerlevel={\afterssecs},%
tocpagenumberbox=\hbox]
{chapter}
\newcommand*{\chapter@dotfill}{%
\def\@dotsep{0.072}\TOCLineLeaderFill[\textbf{.}]}
\newcommand*{\section@dotfill}{%
\def\@dotsep{0.072}\TOCLineLeaderFill}
\def\afterssecs{%
\def\numberline##1{\scr@numberline{##1}}\par\additionalssecfalse}
\def\l@subsection#1#2{%
\def\numberline##1{}%
\ifadditionalssec%
$\cdot$ % this is the delimiting dot, change it to your liking
\else%
\par%
\hangindent\ssectocindent%
\parindent\ssectocindent%
\rightskip\ssectocindent%
\global\additionalssectrue%
\fi#1}
\makeatother
\begin{document}
\tableofcontents
\chapter{Foo}
\section{Bar}
\subsection{Baz}
\subsection{Baz}
\subsection{Baz2}
\subsection{Baz3}
\subsection{Baz}
\subsection{Baz2}
\subsection{Baz3}
\subsection{Baz}
\subsection{Baz2}
\subsection{Baz3}
\subsection{Baz}
\subsection{Baz2}
\subsection{Baz3}
\section{Bar}
\subsection{Baz}
\subsection{Baz2}
\subsection{Baz3}
\chapter{Foo}
\section{Bar}
\subsection{Baz}
\subsection{Baz2}
\subsection{Baz3}
\section{Bar}
\subsection{Baz}
\subsection{Baz2}
\subsection{Baz3}
\subsection{Baz}
\subsection{Baz2}
\subsection{Baz3}
\subsection{Baz}
\subsection{Baz2}
\subsection{Baz3}
\subsection{Baz}
\subsection{Baz2}
\subsection{Baz3}
\subsection{Baz}
\subsection{Baz2}
\subsection{Baz3}
\end{document}