Added starred sections

This commit is contained in:
Mark 2023-07-19 09:54:11 -07:00
parent 0851a3b0de
commit 82d2f13f0f
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4

View File

@ -457,12 +457,17 @@
\protected@write\@auxout{}{\string\newlabel{#1}{{#2}{}}}%
}
% Starred sections are not numbered.
\newcounter{section_counter}
\NewDocumentCommand{\section}{ m d<> }{
\stepcounter{section_counter}
\NewDocumentCommand{\section}{ s m d<> }{
\IfBooleanF{#1}{\stepcounter{section_counter}}
\vspace{4mm}
{\bf\Large \hfill Part \arabic{section_counter}\IfNoValueF{#1}{: #1} \hfill}
\IfNoValueF{#2}{\@customlabel{#2}Part \arabic{section_counter}} \\*
\IfBooleanTF{#1}{%
{\bf\Large \hfill \IfNoValueTF{#2}{Unnamed Section}{#2} \hfill\null}%
}{%
{\bf\Large \hfill Part \arabic{section_counter}\IfNoValueF{#2}{: #2} \hfill\null}%
\IfNoValueF{#3}{\@customlabel{#3}Part \arabic{section_counter}}%
} \\*
\vspace{2mm}
}