Inserting a \bigskip between section and subsection using a macro?

I'm trying to conform to the IoP guidelines, which from the IoP latex files they provide do not seem to follow the IoP guidelines. Several colleagues of mine have altered the files so they do fit the guidelines, with the caveat of needing to place \bigskip{} between section and subsection where one immediately follows the other.

Is it possible to automate this with a macro, so I don't need to go through my document and manually insert/remember to insert one?

I'm already using a macro as such:

\makeatletter
\makeatother


Do I follow that formatting? How is it done?

-
It's quite difficult to answer without knowing the context: what's the class used? –  egreg Jan 12 '12 at 16:42
iopart.cls ? I'm assuming that's the class file. –  Pureferret Jan 12 '12 at 16:50
The {spacing} tag is appropriate. –  lockstep Jan 13 '12 at 19:56
It's fairly easy to add\bigskip after eyery \section. It's not that easy to add \bigskip only if a \subsection follows. –  lockstep Jan 13 '12 at 20:24
No. One might add code to \section to see whether a \subsection follows directly. But from what I see in the result of the typesetting this seems not to be necessary. –  egreg Jan 13 '12 at 20:48

You can try with the following code

\makeatletter

\let\iop@section\section
\def\section{\@ifstar\mod@ssection\mod@section}
\def\mod@ssection#1{\iop@section*{#1}\check@subsection}
\def\mod@section{\@dblarg{\mod@s@ction}}
\def\mod@s@ction[#1]#2{%
\iop@section[#1]{#2}\ignore@par}
\def\ignore@par{\@ifnextchar\par{\afterassignment\ignore@par\let\next}\check@subsection}
\def\check@subsection{\@ifnextchar\subsection\bigskip{}}

\makeatother


But, of course, you can't put \label commands after \section: for this you have to say

\section{A section\label{a-label}}


Anyway I believe that the safest method is to check your manuscript for \subsection commands directly following a \section. Moreover it's not good style, in my opinion, to start directly a subsection after a section title.

-
Thanks, that's more complicated than I expected. I think you're right about manually checking through. –  Pureferret Jan 13 '12 at 21:22