\sc
is a legacy font command based on \scshape
that is used in the book
class for compatibility with LaTeX2.09. You could use another name such as \Sc
but beware such shorthands make it harder to use standard section features such as the *
form for the unnumbered variant, and the optional argument for the table of contents version of the header.
Also as you are adding a lot of white space (in a standard context not in \ExplSyntaxOn
) these space tokens can affect the output, consider
\documentclass[10pt]{book}
\NewDocumentCommand{\ch}{om}{
\IfNoValueTF{#1}{
\chapter{#2}
}{
\chapter{#2}\label{ch:#1}
}
}
\NewDocumentCommand{\Sc}{om}{
\IfNoValueTF{#1}{
\section{#2}
}{
\section{#2}\label{sc:#1}
}
}
\begin{document}
\ch{AAA}
aaaaa aaaaaaaaaaaaa aaaaaaaaaaaaaaa a
aaaaa aaaaaaaaa aaaaaaaaaaaaaaa. a
\Sc{BBB}
aaaaa aaaaaaaaaaaaa aaaaaaaaaaaaaaa a
aaaaa aaaaaaaaa aaaaaaaaaaaaaaa. a {} {}
\section{BBB}
aaaaa aaaaaaaaaaaaa aaaaaaaaaaaaaaa a
aaaaa aaaaaaaaa aaaaaaaaaaaaaaa. a
\section{BBB}
\end{document}
Which produces

Where the \Sc
version is producing the heading as if the previous paragraph ended with additional space as shown in section 2 as opposed to the intended layout produced by \section
in section 3.
\sc
is already defined in thebook
class (it's the deprecated version of\scshape
). You can redefine it with\RenewDocumentCommand
\section*{title}
or\section[short]{long}
with those shortcuts?\sc[label]{title}
over\section{title}\label{sc:label}
? Maybe, but just as a far possibility, if you have over 100 sections, but you lose in generality and semantic nonetheless.\sc
you are adding lots of white space tokens in these macros.