2

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

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

The output is like this. All sections with no subsection numbering.

Can anyone help me on how to fix this issue?

6
  • @campa sorry, I could not understand your response. What is correct? Feb 15, 2019 at 16:01
  • @campa I just googled it (after commenting) and found it. Would you look at that, Elsevier switched to expl3 :). Well, then I think this is the expected behaviour... Feb 15, 2019 at 16:01
  • campa replied to a comment I deleted, so it looked out of context. Feb 15, 2019 at 16:02
  • Okay, what is the final situation now? Feb 15, 2019 at 16:02
  • 1
    Your example is minimal and there is nothing wrong with it, so it's not your fault. I think you'd need to contact the Elsevier support and ask it there. There are two possibilities: 1) This is a design choice and you have to live with it. 2) It's a bug and they need to fix it (looks more like it). Either way, only they know the answer, unfortunately. Feb 15, 2019 at 16:07

1 Answer 1

2

Yes, definitely a bug :)

The definition of \section, \subsection, and \subsubsection in cas-common.sty uses the same counter, section, for all three levels. (i.e.: \@startsection{section}...). If you copy that definition and use the correct counters the output looks correct:

enter image description here

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

\begin{document}

\makeatletter
\renewcommand\section{\@startsection{section}{1}{\z@}%
    {15pt \@plus 3\p@ \@minus 3\p@}%
    {4\p@}%
    {%\let\@hangfrom\relax
     \sectionfont\raggedright\hst[13pt]}}
\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

\section{A}
\subsection{AA}
\subsubsection{BB}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .