Ian Jauslin
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/libs/ian.cls')
-rw-r--r--doc/libs/ian.cls53
1 files changed, 53 insertions, 0 deletions
diff --git a/doc/libs/ian.cls b/doc/libs/ian.cls
index f29e6bd..762f679 100644
--- a/doc/libs/ian.cls
+++ b/doc/libs/ian.cls
@@ -219,6 +219,7 @@
% counters
\stepcounter{subsectioncount}
\setcounter{subsubsectioncount}{0}
+ \setcounter{subsubsubsectioncount}{0}
\ifsubsectionsineq
\setcounter{seqcount}0
\fi
@@ -268,6 +269,7 @@
\def\subsubsection#1{
% counters
\stepcounter{subsubsectioncount}
+ \setcounter{subsubsubsectioncount}{0}
% space before subsubsection (if not first)
\ifnum\thesubsubsectioncount>1
@@ -302,6 +304,49 @@
\medskip\penalty10000
}
+%% subsubsubsection
+% counter
+\newcounter{subsubsubsectioncount}
+% space before subsubsubsection
+\newlength\subsubsubsecskip
+\setlength\subsubsubsecskip{20pt}
+\def\subsubsubsection#1{
+ % counters
+ \stepcounter{subsubsubsectioncount}
+
+ % space before subsubsubsection (if not first)
+ \ifnum\thesubsubsubsectioncount>1
+ \vskip\subsubsubsecskip
+ \penalty-500
+ \fi
+
+ % hyperref anchor
+ \hrefanchor
+ % define tag (for \label)
+ \xdef\tag{\sectionprefix\thesectioncount.\thesubsectioncount.\thesubsubsectioncount.\thesubsubsubsectioncount}
+
+ % get widths
+ \def\@secnum{{\bf\hskip1.5cm\sectionprefix\thesectioncount.\thesubsectioncount.\thesubsubsectioncount.\thesubsubsubsectioncount.\hskip5pt}}
+ \settowidth\secnumwidth{\@secnum}
+ \setlength\sectitlewidth\textwidth
+ \addtolength\sectitlewidth{-\secnumwidth}
+ % print name
+ \parbox{\textwidth}{
+ \@secnum
+ \parbox[t]{\sectitlewidth}{\bf #1}}
+
+ % write to table of contents
+ \iftoc
+ % save lncount in aux variable which is written to toc
+ \immediate\write\tocoutput{\noexpand\expandafter\noexpand\edef\noexpand\csname toc@subsubsubsec.\thesectioncount.\thesubsectioncount.\thesubsubsectioncount.\thesubsubsubsectioncount\endcsname{\thelncount}}
+ \write\tocoutput{\noexpand\tocsubsubsubsection{#1}{\thepage}}
+ \fi
+
+ % space
+ \par\penalty10000
+ \medskip\penalty10000
+}
+
%% itemize
\newlength\itemizeskip
% left margin for items
@@ -638,6 +683,7 @@
\stepcounter{tocsectioncount}
\setcounter{tocsubsectioncount}{0}
\setcounter{tocsubsubsectioncount}{0}
+ \setcounter{tocsubsubsubsectioncount}{0}
% write
\smallskip\hyperlink{ln.\csname toc@sec.\thetocsectioncount\endcsname}{{\bf \tocsectionprefix\thetocsectioncount}.\hskip5pt {\color{blue}#1}\leaderfill#2}\par
}
@@ -645,6 +691,7 @@
\def\tocsubsection #1#2{
\stepcounter{tocsubsectioncount}
\setcounter{tocsubsubsectioncount}{0}
+ \setcounter{tocsubsubsubsectioncount}{0}
% write
{\hskip10pt\hyperlink{ln.\csname toc@subsec.\thetocsectioncount.\thetocsubsectioncount\endcsname}{{\bf \thetocsectioncount.\thetocsubsectioncount}.\hskip5pt {\color{blue}\small #1}\leaderfill#2}}\par
}
@@ -654,6 +701,12 @@
% write
{\hskip20pt\hyperlink{ln.\csname toc@subsubsec.\thetocsectioncount.\thetocsubsectioncount.\thetocsubsubsectioncount\endcsname}{{\bf \thetocsectioncount.\thetocsubsectioncount.\thetocsubsubsectioncount}.\hskip5pt {\color{blue}\small #1}\leaderfill#2}}\par
}
+\newcounter{tocsubsubsubsectioncount}
+\def\tocsubsubsubsection #1#2{
+ \stepcounter{tocsubsubsubsectioncount}
+ % write
+ {\hskip30pt\hyperlink{ln.\csname toc@subsubsubsec.\thetocsectioncount.\thetocsubsectioncount.\thetocsubsubsectioncount.\thetocsubsubsubsectioncount\endcsname}{{\bf \thetocsectioncount.\thetocsubsectioncount.\thetocsubsubsectioncount.\thetocsubsubsubsectioncount}.\hskip5pt {\color{blue}\small #1}\leaderfill#2}}\par
+}
\def\tocappendices{
\medskip
\setcounter{tocsectioncount}0