I am using memoir for writing thesis.

I have some issues in using symbol degree. The packages I am using are as below.

\usepackage[utf8]{inputenc} % interpret input as unicode
\usepackage[T1]{fontenc}    % choose main font encoding (Cork)
\usepackage{textcomp}       % additional symbols using companion encoding TS1
\usepackage{gensymb}        % provides macro \degree which works in text and math


%\RequirePackage[l2tabu, orthodox]{nag}

%%chemistry formulas

\usepackage{mwe}    % loads »blindtext« and »graphicx«

When I used command like 40{\degree}, I get an error message saying Command \degree already defined. \newcommand\degree{}

Why is \degree is not working?

Can I get some help?

  • 1
    That doesn't make sense. The only way you can get that error is if you define it and it already exists, or you load a package that tries to define it when it already exists. Can you provide a more clear minimal working example (MWE) that replicates your problem? It's not clear from your current code snippet.
    – Werner
    Sep 21 '15 at 6:05
  • 3
    You have siunitx in preamble. Why you do not use its facility for Celsius degree? For example \celsius or longer \degreeCelsius. This packages also define macro \degree, which probably make your troubles. Try to remove package gensymb (if it is inserted only for degree symbol).
    – Zarko
    Sep 21 '15 at 6:32
  • Dear Zarko, I commented 'gensymb' and tried with commands like \celsius and \degreeCelsius separately. In every attempt I get message like "Undefined control sequence ..."
    – Vijay
    Sep 21 '15 at 8:13
  • 1
    @Vijay if you want that people are notified you need to preced there names with an @. Did you use it like \SI{4}{\celsius} or \si{\celsius}? Unrelated: why do load both usepackage[T1]{fontenc} and usepackage[OT1]{fontenc}? Delete the one with OT1. Also loading both mhchem and chemformula seems redundant (they're alternatives for the same task). Choose one of them. Also you're loading bpchem twice.
    – cgnieder
    Sep 21 '15 at 10:43

This is not really answer, however in comment I can not show the code result. As already mentioned in Werner comments, you have defined macro degree twice. I suspect, that ones is in package gensymb and ones in siunitx. So I suggest to comment the first one and usesiunitx` syntax. It doesn't allowe to use in it defined macros directly in text (I anticipated, that you try their in that way), but together in numbers as show the following MWE:



\begin{preview}% <---------------------------------
Today expected maximal temperature is between \SI{24}{\celsius} and \SI{28}{\degree}C. Late afternoon will become colder with only \SI{11}{\degreeCelsius}. Just use \verb+\degree+ in text doesn't work.
\end{preview}% <---------------------------------

which gives:

enter image description here

Siunitx syntax care about for nice looking of values with units and also has other benefits. For more particular help, you need to extend your code snippet to workable example, that we can copy and test it.

  • This works fine: \documentclass{article} \usepackage{gensymb,siunitx} \begin{document} \SI{14}{\celsius} \end{document}
    – cgnieder
    Sep 21 '15 at 10:46
  • @clemments, I don't know gensymb package, so I express only suspect. Also I haven't installed it, so I can not test this.
    – Zarko
    Sep 21 '15 at 11:15
  • Dear @clemments, thanks for indicating my mistakes and showed the ritght way to fix this problem. Now it is working properly.
    – Vijay
    Sep 22 '15 at 3:36
  • @Vijay I only get notified when you spell my name correctly :)
    – cgnieder
    Sep 22 '15 at 7:17
  • @clemens . . sorry. Misspelled ur name.
    – Vijay
    Sep 22 '15 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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