Header in first line of section, not line above

I'm trying to put the section/subsection header in the first line of a section instead of in the line above a section.

Body of section.

I want

• can you please be more specific? this is very vague. – naphaneal Jun 26 '16 at 4:43
• Hi @DIWesser: This has been asked before here. – Jeffery Shivers Jun 26 '16 at 4:43
• @naphanneal I've added a couple examples. – DIWesser Jun 26 '16 at 5:07
• @Jeffery Shivers That does look like exactly what I want. My only issue is it removes the numbers. Any idea how I would preserve them? – DIWesser Jun 26 '16 at 5:15

\documentclass{article}
\usepackage{titlesec}
\titleformat{\section}[runin]
{\normalfont\Large\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}[runin]
{\normalfont\large\bfseries}{\thesubsection}{1em}{}
\begin{document}
\section{my section}
Section context.
\section{my other section}
More section content
\end{document}

• That is exactly what I was looking for. Thank you very much. – DIWesser Jun 26 '16 at 5:46