I want to change the commands of the article/ book class and want to know how sections, especially in the article class but also in the book class, are defined.
I think it is something like this?:
\newcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\large\bfseries}}
I want to alter them a little bit and add some commands using \renewcommand
in a class (.cls) I'm currently writing. Where can I find the other section definitions? Can someone provide a link or the code in an answer?
\subsection
. All of\(sub(sub))section
and\(sub)paragraph
have similar definitions (in the LaTeX standard classes, at least), which depend on\@startsection
.\chapter
and\part
, in classes which have them, are different. Here's a description of how\@startsection
works, if that's what you're looking for: tex.stackexchange.com/a/509474/134574. What exactly do you want to change in the sectioning commands?\sectioncolor
,\subsectioncolor
etc. to the last line, so that I can use another command;\setsectioncolor{blue}
before\begin{document}
, and then all section headlines will appear blue.\section{}
is defined specifically in the article class so it will not appear different when I\renew
it.titlesec
.