Consider the code
\documentclass{book}
\usepackage{amsthm,latexsym,amssymb,amsmath,verbatim}
\usepackage{gensymb}
%\usepackage{textcomp}
\begin{document}
\Huge
\noindent 45$\degree$ \\
45$^\circ$\\
%45\textdegree
\end{document}
which produces the output
Upon inspection, it would appear that 45$\degree$
and 45$^\circ$
produce exactly the same glyph.
Now, if I uncomment %\usepackage{textcomp}
and %45\textdegree
within the above code and run it, I get
Notice that 45$\degree$
seemingly now renders 45\textdegree
; while 45$^\circ$
seems to produce the same glyph as before.
QUESTION: Are there other symbols for which textcomp
"trumps" gensymb
? Can anyone explain what might be causing this; and perhaps, how I may override it so that if I call for both the gensymb
and textcomp
packages in the preamble and invoke, say, the \degree
command in the document—I get what \degree
normally produces?
Thank you.
Best Answer
If I compile
with TeX Live 2012, prior to the inclusion of
textcomp
in the kernel, I getand an error about
\textdegree
if I comment out\usepackage{textcomp}
. The output from the first two lines becomesSo the aim of
gensymb
has always been using the smaller glyph fromtextcomp
if possible.It achieves this by doing
Unfortunately the package has not been updated for keeping up with the inclusion of
textcomp
in the kernel, so it doesn't actually realize that\textdegree
is available even iftextcomp
is not loaded. If you load it, the output is as expected by the author ofgensymb
.I'm not sure why you think that
textcomp
“trumps”gensymb
: the behavior is wanted.To be honest, I'd avoid loading
gensymb
that provides nothing that isn't available in different ways. Anyway, you can get a shortenedgensymb
byIf you just need
\degree
, there's no point in wasting a math group: