Is it possible to start your text right after the section or subsection title (without starting a new line)? Thank you. I hope the question is clear enough and does not need a MWE.

  • It is always best to provide a MWE as it maximises the chance that (a) you supply enough information and that (b) the person answering tests their answer. In this case the answer probably depends on which class you are using, but you haven't said. – David Carlisle Feb 21 '13 at 0:36

David has already provided the package-free solution; here's another option, using the titlesec package (simply selecting the runin predefined format):




\section{Test Section} 
\subsection{Test Subsection} 


enter image description here

| improve this answer | |

In the default classes the run-in style is used for \paragraph and \subparagraph to change \section to use the same find it's defintion, in article it is

\newcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%

and you need to invert the sign of the 3/4th arguments as that is used as a switch to specify run-in style so

\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {3.5ex \@plus 1ex \@minus .2ex}%

Also changed the 4th arg to specify 1em space after (rather than below) the heading, as for \paragraph

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.