[Tex/LaTex] subsection and subsubsection aren’t working in elsevier template

els-caserrorsfloatssectioning

I am working on Elsevier template with a single column format, I am facing an issue with subsections and subsubsections as they are displayed like a normal section with wrong numbering, for example

\documentclass[a4paper,fleqn]{cas-sc}
\usepackage{float}
\usepackage{graphicx} 
\begin{document}
\section{A}
dmddd
\subsection{AA}
\subsubsection{BB}
\end{document}

It displays the following

  1. A
  2. AA
  3. BB

===============================

Moreover, the figure's Specifier for positioning permission like H or h makes an error while compiling the document, for instance

\documentclass[a4paper,fleqn]{cas-sc}
\usepackage{float}
\usepackage{graphicx}                                        
\begin{document}

\begin{figure}[H]
\centering
\includegraphics[height=60mm,width=140mm]{c}
\caption{ccc}
\label{fig:3}
\end{figure}

\end{document}

It displays this error:! LaTeX3 Error: The key 'cas/fig/H' is unknown and is being ignored.

Any help?

Best Answer

Concerning the first part of your question:

I'm not sure if this is by design (which would be a very odd behaviour), but this behaviour is caused by some redefinition in the class file. To workaround this problem one could fix these redefinitions and use

\documentclass[a4paper,fleqn]{cas-sc}

\makeatletter
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
    {10pt \@plus 3\p@ \@minus 2\p@}%
    {.1\p@}%
    {%\let\@hangfrom\relax
     \ssectionfont\raggedright }}

\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
    {10pt \@plus 1\p@ \@minus .3\p@}%
    {.1\p@}%
    {%\let\@hangfrom\relax
     \sssectionfont\raggedright}}
\makeatother

\begin{document}
\section{A}
\subsection{AA}
\subsubsection{BB}
\end{document}