[Tex/LaTex] symbol for degree celsius in memoir

degreesmacrossymbols

I am using memoir for writing thesis.

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

%
\usepackage{lipsum}
\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

\usepackage{graphicx}
\usepackage[OT1]{fontenc}
\usepackage[english]{babel}
\usepackage{url}



\usepackage{ulem} 
\usepackage{amsmath}
\usepackage{amsthm}
%\usepackage[a4paper]{geometry}
%\RequirePackage[l2tabu, orthodox]{nag}
\usepackage{siunitx}
\usepackage[capitalise]{cleveref}
\usepackage{booktabs}



%FOR CHEMISTRY
\usepackage[version=3]{mhchem}
%%chemistry formulas
\usepackage{bpchem}
\usepackage{chemstyle}
\usepackage{chemformula}
\usepackage{marvosym}
\usepackage{bpchem}
\usepackage{chemmacros}



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

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?

Best Answer

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:

\documentclass{article}
\usepackage{siunitx}

\usepackage[active,tightpage]{preview}
    \setlength\PreviewBorder{1em}

    \begin{document}
\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}% <---------------------------------
    \end{document}

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.