Minor fixes

This commit is contained in:
mark 2023-10-16 15:06:02 -07:00
parent 204ee9068e
commit 790cd77e87

View File

@ -481,6 +481,7 @@
% Starred sections are not numbered.
\newcounter{section_counter}
\NewDocumentCommand{\section}{ s m d<> }{
\par
\IfBooleanF{#1}{\stepcounter{section_counter}}
\vspace{4mm}
\IfBooleanTF{#1}{%
@ -495,6 +496,7 @@
% Generic object.
% Same format as \problem, \theorem, etc, but has no counter.
\NewDocumentCommand{\generic}{ m d<> }{
\par
\vspace{3mm}
{\bf\normalsize #1} \\*
\IfNoValueF{#2}{\@customlabel{#2}{#1}}
@ -540,13 +542,13 @@
\setcounter{problempartcounter}{0}
\stepcounter{\@problemcounter}
\generic{Problem \arabic{\@problemcounter}:\IfNoValueF{#1}{ #1}}
\IfNoValueF{##2}{\@customlabel{num:#2}{\arabic{\@problemcounter}}}
\IfNoValueF{#2}{\@customlabel{num:#2}{\arabic{\@problemcounter}}}
\IfNoValueF{#2}{\@customlabel{#2}{Problem \arabic{\@problemcounter}}}
}
\NewDocumentCommand{\problempart}{ m d<> }{
\stepcounter{problempartcounter}
\generic{Part \arabic{problempartcounter}:\IfNoValueF{#1}{ #1}}
\IfNoValueF{##2}{\@customlabel{num:#2}{\arabic{problempartcounter}}}
\IfNoValueF{#2}{\@customlabel{num:#2}{\arabic{problempartcounter}}}
\IfNoValueF{#2}{\@customlabel{#2}{Problem \arabic{\@problemcounter}.\arabic{problempartcounter}}}
}