1

I am trying to make my subsection headings in the svjour3 document class look exactly like my section headings. Here is the code I have used:

\makeatletter
\renewcommand{\subsection}{\def\subsection{\@startsection{subsection}{2}{\z@}%
    {-21dd plus-8pt minus-4pt}{10.5dd}
    {\normalsize\bfseries}}}
\makeatother

I only have two subsections. Namely in Section 2 of my article, there are Subsections 2.1 and 2.2. The document compiles when I use the above code in my preamble and Subsection 2.2 becomes bolded in the way that I want, but it is labelled as 2.1. On the other hand, the text of the title of Subsection 2.1 becomes the first text of the first paragraph in that subsection and there is no subsection break anymore.

When I added \subsection{} to the end of the last paragraph before where Subsection 2.1 should start, I got the desired result of bolding both subsection titles and having them with the correct numbering. However, I don't want to submit my article with a wayward \subsection{} flopping around. Is there a better way to address the problem, or can I better the above fix in some way?

1 Answer 1

2

Your (re)definition of \subsection contains a definition of \subsection itself. So, your definition is actually delayed and only used when called the second time. You need the following (re)definition instead:

\makeatletter
\renewcommand{\subsection}{%
  \@startsection{subsection}
    {2}
    {\z@}
    {-21dd plus-8pt minus-4pt}
    {10.5dd}
    {\normalsize\bfseries\boldmath}%
}
\makeatother

The font definitions mimic that of \section which uses \normalsize\bfseries\boldmath.

Here's the view of the template example:

enter image description here

3
  • Just a small point: the original definition of \section in svjour3.cls also has \boldmath in it.
    – Marijn
    May 8, 2020 at 19:47
  • @Marijn: Great - just confirmed; I'll update...
    – Werner
    May 8, 2020 at 19:48
  • @Werner - thank you!
    – JWP_HTX
    May 8, 2020 at 20:22

You must log in to answer this question.

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