# Is it safe to “renewcommand” \SS? (Which packages use \SS command?)

I've tried to set

\newcommand{\SS}{\mathcal{S}}


in the preamble but I've discovered that this command is already defined.

So, I tried native command on my code and I've found that it is a "simple" double S.

Now, I can fix my problem using

\renewcommand{\SS}{\mathcal{S}}


but I'm not sure it is safe (I don't know if \SS is used by LaTeX only to draw a (simple or special) double S, or for something else too).

Does someone know if it is safe (or when it isn't safe) to do a “renewcommand” of \SS?

-
\SS is used for the uppercase version of the German symbol ß, usually rendered as "SS". – Andrew Swann Jul 15 '14 at 10:57
And what about the name \cS, as calligraphic S? In standard LaTeX it is not defined. – Przemysław Scherwentke Jul 15 '14 at 11:03
thank you @AndrewSwann for the answere. – Corrado Jul 15 '14 at 11:04
thank you @PrzemysławScherwentke for suggest! You are right! :-) – Corrado Jul 15 '14 at 11:05
Not really safe: your bibliographic data might contain a ß that in turn might be capitalized: the final result would be at least puzzling. – egreg Jul 15 '14 at 11:41

If you want to see, what a command is used for, you can use the \show macro:

% arara: pdflatex

\documentclass{article}

\begin{document}
%\show\cS
\show\SS
\end{document}


This will show:

\SS=macro:
->\T1-cmd \SS \T1\SS .
l.7 \show\SS


Ok, this information is not so cool, but you can see that is has something to do with the T1 encoding and you see that it is used as a macro. Googling the same macro will easily result in the definition (the German upper-case sz-letter). The command \cS as recommended in commands results in:

\cS=undefined.
l.6 \show\cS


and thus is safe to be used.

-
You can do \expandafter\show\csname T1\string\SS\endcsname or also texdef -t latex -p[T1]fontenc T1\\SS from the command line, which would reveal that \SS ultimately does \char"DF (slot "DF=223 in the T1 encoded fonts indeed contains an “SS” glyph). – egreg Jul 15 '14 at 11:40
Thanks, you may add that to my answer if you want. Still, this is kind of easier... ;-) – LaRiFaRi Jul 15 '14 at 11:49

Concerning the safety of re-defining command \SS (which is the capital of "ß") in order to shorten the command \mathcal{S}, @egreg said:

"Not really safe: your bibliographic data might contain a ß that in turn might be capitalized: the final result would be at least puzzling."

That is definitely true, so I've decided to follow the suggestion given by @PrzemysławScherwentke:

"And what about the name \cS, as calligraphic S? In standard LaTeX it is not defined."

In fact \cS command, as is shown by @LaRiFaRi (and by \show\cS), is safe:

\cS=undefined.
l.6 \show\cS



-
\mathcal{S} surely has some specific meaning in you document? Maybe a macro name reflecting that meaning would be the best choice altogether... – clemens Jul 15 '14 at 13:51
Mainly I've used \cB (ex \BB) for a "basis of a topology" and \cS for a "sub-basis", but in some other places of my thesis i've used \mathcal{S} (or \mathcal{B}) for other "general but locally-special" sets, so I've prefered a neutral name for these commands (instead of \mathcal{N}, wich I have named \baire, according with your suggestion). – Corrado Jul 15 '14 at 14:13
I'm not "stable" in such opinion yet... in some moment I agree with you and set beautifull and meaningfull code...but a moment later I think: "I can only write \mathcal{S}...is it necessary to create a macro?!...and three macros?!" sometimes my answer is yes, someothers is no :-) – Corrado Jul 15 '14 at 15:16

No, it isn't safe.

\SS may come from a transformation of \ss (lowercase ß) to uppercase in a running headline. When you redefine it, and by bad chance a German sharp s is in your chapter or section title, the running headline may have an unexpected look. Followup errors like "missing \$ inserted" may occur too, depending on your re-definition of \SS.

-