How can I prevent a paragraph break before a section heading? To prevent it after, I know that I can use runin
like
\titleformat{\section}[runin]{\Large\bf}{\thesection\quad}{0pt}{}
However, how can I prevent before? I want something like:
1. First section heading Text... (no line break here) 2. Second Section Heading Text...
EDIT. I am trying in the following way for \subsection
. I created a new command like:
\newcommand{\subsectionnlb}[1]{
\stepcounter{subsection}
{\normalfont\bf\thesubsection \hspace{0.3em} #1\hspace{0.3em}}
}
How can I call the formatting of \subsection
and apply to the custom command \subsectionnlb
?
titlesec
package can't do it, because the very\section
command internals (namely, as far as I know,\@startsection
) definition starts with a\par
...\subsection
without break?