Initial commit: Klammertext source distribution
Curated source subset assembled by klammertext-dev's doc/make_dist.sh: the Klammermachine (mac), the Standard Klammer Set (sks), the commands (com), editor plugins and install guides (doc), a test subset (tst), and lib/bin placeholders. Builds with 'make -C com'. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
83
sks/section/sty/toc.sty
Normal file
83
sks/section/sty/toc.sty
Normal file
@@ -0,0 +1,83 @@
|
||||
\newlength{\tocindent}
|
||||
\setlength{\tocindent}{8pt}
|
||||
|
||||
\newlength{\tocchaptermargin}
|
||||
\setlength{\tocchaptermargin}{-72pt}
|
||||
|
||||
\newlength{\tocsectionmargin}
|
||||
\setlength{\tocsectionmargin}{\tocchaptermargin + \tocindent}
|
||||
|
||||
\newlength{\tocsubsectionmargin}
|
||||
\setlength{\tocsubsectionmargin}{\tocsectionmargin + \tocindent}
|
||||
|
||||
\newlength{\tocsubsubsectionmargin}
|
||||
\setlength{\tocsubsubsectionmargin}{\tocsubsectionmargin + \tocindent}
|
||||
|
||||
\newlength{\tocparagraphmargin}
|
||||
\setlength{\tocparagraphmargin}{\tocsubsubsectionmargin + \tocindent}
|
||||
|
||||
\newlength{\tocsubparagraphmargin}
|
||||
\setlength{\tocsubparagraphmargin}{\tocparagraphmargin + \tocindent}
|
||||
|
||||
\newlength{\tocdotspacing}
|
||||
\setlength{\tocdotspacing}{6pt}
|
||||
|
||||
% Compensate for outdenting of section titles:
|
||||
% This has no effect:
|
||||
\renewcommand{\contentsname}{\sfont{1.4}\hspace*{1em}Contents}
|
||||
|
||||
\newcommand{\afternumberspace}{~~}
|
||||
|
||||
\newcommand{\numberlabel}{\parbox[b]{64pt}
|
||||
{\raggedleft\hspace*{8pt}\small\thecontentslabel}}
|
||||
|
||||
\renewcommand{\numberlabel}{\hspace*{-1\hoffset}\thecontentslabel\afternumberspace}
|
||||
|
||||
\newcommand{\pagenumber}{\parbox{\widthof{888}{\contentspage}}}
|
||||
|
||||
\newcommand{\tocpage}{~\titlerule*[\tocdotspacing]{.}
|
||||
\makebox[\widthof{\thecontentspage}][r]{\small\thecontentspage}}
|
||||
|
||||
\newcommand{\interline}{\vspace*{-6pt}}
|
||||
|
||||
\titlecontents{chapter}[\tocchaptermargin]
|
||||
{\vspace{6pt}\thispagestyle{noheader}}
|
||||
{\numberlabel}
|
||||
{\hspace*{-12pt}}
|
||||
{\tocpage}
|
||||
[\interline]
|
||||
|
||||
\titlecontents{section}[\tocsectionmargin]
|
||||
{\ifthenelse{\equal{\documentisbook}{true}}{}{\vspace{6pt}}}
|
||||
{\numberlabel}
|
||||
{\hspace*{-18pt}}
|
||||
{\tocpage}
|
||||
[\interline]
|
||||
|
||||
\titlecontents{subsection}[\tocsubsectionmargin]
|
||||
{}
|
||||
{\numberlabel}
|
||||
{\hspace*{-24pt}}
|
||||
{\tocpage}
|
||||
[\interline]
|
||||
|
||||
\titlecontents{subsubsection}[\tocsubsubsectionmargin]
|
||||
{}
|
||||
{\numberlabel}
|
||||
{\hspace*{-30pt}}
|
||||
{\tocpage}
|
||||
[\interline]
|
||||
|
||||
\titlecontents{paragraph}[\tocparagraphmargin]
|
||||
{}
|
||||
{\numberlabel}
|
||||
{\hspace*{-36pt}}
|
||||
{\tocpage}
|
||||
[\interline]
|
||||
|
||||
\titlecontents{subparagraph}[\tocsubparagraphmargin]
|
||||
{}
|
||||
{\numberlabel}
|
||||
{\hspace*{-42pt}}
|
||||
{\tocpage}
|
||||
[\interline]
|
||||
Reference in New Issue
Block a user