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))sectionand\(sub)paragraphhave similar definitions (in the LaTeX standard classes, at least), which depend on\@startsection.\chapterand\part, in classes which have them, are different. Here's a description of how\@startsectionworks, if that's what you're looking for: https://tex.stackexchange.com/a/509474/134574. What exactly do you want to change in the sectioning commands? – Phelype Oleinik Nov 18 '19 at 17:44\sectioncolor,\subsectioncoloretc. to the last line, so that I can use another command;\setsectioncolor{blue}before\begin{document}, and then all section headlines will appear blue. – Vebjorn Nov 18 '19 at 17:55\section{}is defined specifically in the article class so it will not appear different when I\renewit. – Vebjorn Nov 18 '19 at 18:58titlesec. – Bernard Nov 18 '19 at 18:59C:\Program Files\MiKTeX 2.9\tex\latex\basefolder). – John Kormylo Nov 18 '19 at 19:11