summaryrefslogtreecommitdiff
path: root/macros/latex209/contrib/misc/nosecnumbers.sty
blob: c630100b9aa5c43df499a9989aaf3835c8f0b0df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
%%% ====================================================================
%%%  @LaTeX-style-file{
%%%     author          = "Mario Wolczko",
%%%     version         = "2",
%%%     date            = "21 May 1992",
%%%     time            = "20:59:56 BST",
%%%     filename        = "nosecnumbers.sty",
%%%     address         = "Dept of Computer Science
%%%                        The University of Manchester
%%%                        Oxford Road
%%%                        Manchester M13 9PL
%%%                        UK",
%%%     telephone       = "+44-61-275-6146",
%%%     FAX             = "+44-61-275-6236",
%%%     checksum        = "09542 42 160 1796",
%%%     email           = "mario@cs.man.ac.uk (Internet)",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "LaTeX, section numbers",
%%%     supported       = "yes",
%%%     docstring       = "Suppresses section numbers in \sections,
%%%     \subsections, etc (but still writes entries for a table of
%%%     contents).",
%%%  }
%%% ====================================================================
% nosecnumbers  ... equivalent to a global replace of \section,
% \subsection, etc, with \section* (except that you still get entries in
% the table of contents).

\def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
     \def\@svsec{}\else
     \refstepcounter{#1}\edef\@svsec{}\fi
     \@tempskipa #5\relax
      \ifdim \@tempskipa>\z@
        \begingroup #6\relax
          \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}
        \endgroup
       \csname #1mark\endcsname{#7}\addcontentsline
         {toc}{#1}{#7}\else
        \def\@svsechd{#6\hskip #3\@svsec #8\csname #1mark\endcsname
                      {#7}\addcontentsline
                           {toc}{#1}{#7}}\fi
     \@xsect{#5}}