I've been reading almost two hours through various posts that seem to have the same problem but none of the solutions worked for me.
I want to define new units (in my case it's \thermal and \electrical).
Is it possible that scrartcl has something to do with it?
Or does a package interfere with it?
Here is my preamble:
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[german]{babel}
\usepackage{graphicx}
\usepackage{floatrow}
\usepackage{subfigure}
%\pagestyle{empty}
\linespread{1.5}
\usepackage[margin=3.5cm]{geometry}
\usepackage{color}
\usepackage{siunitx}
\sisetup{inter-unit-product =$\cdot$}
\usepackage{cancel}
\usepackage{float}
\usepackage{enumitem}
\usepackage{caption}
\usepackage{booktabs}
\usepackage{cleveref}
\usepackage{colortbl}
\usepackage{csquotes}
\usepackage{helvet}
\usepackage{mathpazo}
\usepackage{listings}
\usepackage{pgfplots}
\usepackage{xcolor}
\usepackage{hyperref}
\usepackage{multirow}
\renewcommand{\labelitemii}{$\circ$}
\renewcommand{\labelitemiii}{$\diamond$}
\renewcommand{\labelitemiv}{$\ast$}
\allowdisplaybreaks
\numberwithin{equation}{subsection} %Gleichungen bekommen die SubKapitelnummer
\DeclareSIUnit{\thermal}{t}
\DeclareSIUnit{\electrical}{e}
I get the following error:
! Missing } inserted.
<inserted text>
}
l.72 ...-1000 betrug \SI{3200}{\mega\watt\thermal}
?
I already tried the following:
\DeclareSIUnit{\thermal}{t}
\DeclareSIUnit\thermal{t}
and so on; spaces, no spaces, braces,... \newunit\thermal{t} isn't even recognized.
If you need additional information I'll post it. Thanks for reading this.
EDIT: Full minimal example
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{siunitx}
\sisetup{inter-unit-product =$\cdot$}
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{cancel}
\usepackage{caption}
\usepackage{cleveref}
\usepackage{colortbl}
\usepackage{csquotes}
\usepackage{helvet}
\usepackage{mathpazo}
\usepackage{multirow}
\usepackage{listings}
\usepackage{pgfplots}
\usepackage{xcolor}
\DeclareSIUnit{\thermal}{t}
\DeclareSIUnit{\electrical}{e}
\begin{document}
\SI{3200}{\mega\watt} \\
\SI{3200}{\mega\watt\thermal}
\end{document}
Error message:
! Missing } inserted.
<inserted text>
}
l.23 \SI{3200}{\mega\watt\thermal}
?
Update: I get an error if I include
\sisetup{inter-unit-product =$\cdot$}
I also deleted it from my original preamble and it works now.
Thank you all for helping, here is the line that I'm using now (for those who might encounter the same problem as me):
\sisetup{inter-unit-product=\ensuremath{{}\cdot{}}}

MWandtwhen using\mega\watt\thermalis placed there by design, since it is a multiplication of units. – sodd Feb 09 '16 at 21:29\sisetup{inter-unit-product=$\cdot$}with\sisetup{inter-unit-product=\ensuremath{{}\cdot{}}}. See section 5.12 of thesiunitxmanual. – sodd Feb 09 '16 at 21:33\sisetup{inter-unit-product=$\cdot$}does not work, is that the units are typeset in math mode, leading to the first$in$\cdot$to leave math mode, where\cdotis not defined, leading to the error. – sodd Feb 09 '16 at 21:44Found the link
– Cancara Feb 09 '16 at 21:48