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}{}}}% \protected@write\@auxout{}{\string\newlabel{#1}{{#2}{}}}%
} }
% Starred sections are not numbered.
\newcounter{section_counter} \newcounter{section_counter}
\NewDocumentCommand{\section}{ m d<> }{ \NewDocumentCommand{\section}{ s m d<> }{
\stepcounter{section_counter} \IfBooleanF{#1}{\stepcounter{section_counter}}
\vspace{4mm} \vspace{4mm}
{\bf\Large \hfill Part \arabic{section_counter}\IfNoValueF{#1}{: #1} \hfill} \IfBooleanTF{#1}{%
\IfNoValueF{#2}{\@customlabel{#2}Part \arabic{section_counter}} \\* {\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} \vspace{2mm}
} }