summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/sect.sty
blob: ad56a5cbd71fa53b8d0cd288f03e497bd3ec79a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
% sect.sty (Fragment)
\def\section{\secdef\@section\@ssection}
\def\@section[#1]#2{
     \ifnum \c@secnumdepth >\m@ne
       \refstepcounter{section}%
       \addcontentsline{toc}{section}{%
         \protect\numberline{\thesection}#1}
     \else
       \addcontentsline{toc}{section}{#1}
     \fi
     \sectionmark{#1}%
     \@makesectionhead{#2}\@afterheading
     }
\def\@ssection#1{\@makessectionhead{#1} \@afterheading}