I am looking for a command like:
\alwaysFloatBarrier
Such that whenever I write a normal section or subsection or subsubsection:
\section{Example 1}
\subsection{Example 2}
\subsubsection{Example 3}
They get automatically converted to:
\FloatBarrier
\section{Example 1}
\FloatBarrier
\FloatBarrier
\subsection{Example 2}
\FloatBarrier
\FloatBarrier
\subsubsection{Example 3}
\FloatBarrier
Best Answer
You could achieve your objective by loading the
placeins
package (for the\FloatBarrier
macro) along with theetoolbox
package (for the\pretocmd
macro) and issuing the instructionsin the preamble. If you need this in macro form, you could write
and then issue the instruction
\alwaysFloatBarrier
.