I have a weird problem with siunitx and redefining section. Here is a screenshot of the problem:
As you can see, an asterisk appears in the ToC, aswell as the \section* command not working properly. The heading will be a star, and the actual heading goes into the text. It seems like the \section* command interprets the asterisk as the heading, and ignores the rest. So the asterisk in the ToC is more of a symptom...
Here is a MWE (rather MNWE):
main.tex
\documentclass{styles/diplclass1}
\begin{document}
\tableofcontents
\section*{Starheading}
asdf
\section{Normal heading}
\end{document}
styles/diplclass1.cls
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{styles/diplclass1}
\LoadClass[a4paper,11pt,titlepage,oneside]{scrbook}
\usepackage{siunitx}
\renewcommand{\section}{%
\@startsection{section}%
{1}
{0mm}
{2ex plus 1ex minus 1ex}
{0.5ex plus 0.5ex minus 0.5ex}
{\Large\bfseries}
}
Please note: I need to redefine sections, because I apply some styles there. Also, I need to use siunitx. I have not found anything when searching for this problem, except some issues with bibliography which seem to be related, as well as the fact, that redefining \section is okay for \section*, because \@startsection takes care of the asterisk version.
As soon as I remove the siunitx import, or the section redefinition, it works as expected. How can I redefine the section style, and use siunitx aswell? Does anyone have an idea why this problem occurs?


\RequirePackageinstead of\usepackage? (Cf. What's the difference between \RequirePackage and \usepackage?) – ebosi Apr 11 '16 at 07:40\letequal to each other so it is not going to make any difference there. – David Carlisle Apr 11 '16 at 15:08:-s. – ebosi Apr 11 '16 at 15:26