[Tex/LaTex] Starting text right after section or subsection title

sectioning

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.

Best Answer

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

\documentclass{article}
\usepackage{titlesec}

\titleformat{\section}[runin]
  {\normalfont\Large\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}[runin]
  {\normalfont\large\bfseries}{\thesubsection}{1em}{}

\begin{document}

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

\end{document}

enter image description here

Related Question