Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
\SS is used for the uppercase version of the German symbol ß, usually rendered as "SS". –  Andrew Swann Jul 15 at 10:57
1  
And what about the name \cS, as calligraphic S? In standard LaTeX it is not defined. –  Przemysław Scherwentke Jul 15 at 11:03
    
thank you @AndrewSwann for the answere. –  Corrado Jul 15 at 11:04
    
thank you @PrzemysławScherwentke for suggest! You are right! :-) –  Corrado Jul 15 at 11:05
2  
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 at 11:41

3 Answers 3

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.

share|improve this answer
3  
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 at 11:40
    
Thanks, you may add that to my answer if you want. Still, this is kind of easier... ;-) –  LaRiFaRi Jul 15 at 11:49
up vote 2 down vote accepted

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

Thank you all: I change my code from \renewcommand{\SS}{\mathcal{S}} to \newcommand{\cS}{\mathcal{S}}.

Corrado.

share|improve this answer
1  
\mathcal{S} surely has some specific meaning in you document? Maybe a macro name reflecting that meaning would be the best choice altogether... –  cgnieder Jul 15 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 at 14:13
    
Personally I'd prefer \newcommand*\basis[1]{\mathcal{#1}} and \newcommand*\subbasis[1]{\mathcal{#1}} and then maybe \newcommand*\sbS{\subbasis{S}} or using \subbasis{S} directly, similar for other meanings... :) I like it if my source reflects what I mean not what it looks like when typeset. –  cgnieder Jul 15 at 14:22
    
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 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.