The actual command, including its formal definition posted by @JoshLee is contained in the LaTeX 2e source, section 61.2 Sectioning (p 283). It forms part of ltsect.dtx, the bundle containing all sectioning commands for LaTeX. It even includes a pseudo-code interpretation of the actual macro. Here is an extract:
The
\@startsection{<name>}{<level>}{<indent>}{<beforeskip>}{<afterskip>}{<style>}*[<altheading>]{<heading>}
command is the mother of all the user level sectioning commands. The
part after the *, including the * is optional.
- name: e.g.,
subsection
- level: a number, denoting depth of section - e.g.,
chapter = 0, section = 1, etc.
- indent: Indentation of heading from left margin
- beforeskip: Absolute value = skip to leave above the heading. If negative, then paragraph indent of text following heading is
suppressed.
- afterskip: If positive, then skip to leave below heading, else negative of skip to leave to right of run-in heading.
- style: Commands to set style. Since June 1996 release the last command in this argument may be a command such as
\MakeUppercase or
\fbox that takes an argument. The section heading will be supplied
as the argument to this command. So setting #6 to, say,
\bfseries\MakeUppercase would produce bold, uppercase headings.
If * is missing, then increment the counter. If it is present, then
there should be no [<altheading>] argument. The command uses the
counter secnumdepth. It contains a pointer to the highest section
level that is to be numbered.
\@plusand\@minusin this context\@startsection{subexperiment}{2}{\z@} {1ex \@plus 2ex \@minus 0.5ex}{1.3ex \@plus.2ex}{\raggedsection\normalfont\sectfont\nobreak\normalsize\nobreak} {#1}– George Feb 26 '16 at 04:17\@plusand\@minusare similar to\plusand\minusand refer to glue. See What is glue stretching? – Werner Feb 26 '16 at 04:47\addcontentsline{toc}as in\@chapterfor example. So, how the section goes to contents? – Sigur Feb 21 '19 at 01:53\addcontentsline{toc}in\@chapterinbook.cls(if you're using\chapters). Also, there is\addcontentsline{toc}in\@sectinlatex.ltx(if you're using\sections and below).\@sectis the macro called by\@startsectionif you're setting a numbered section. If you're setting an unnumbered section, it calls\@ssectand no ToC entry is set. – Werner Feb 21 '19 at 06:44\@sectis what I have to look for. Thanks. – Sigur Feb 21 '19 at 12:28