I'm trying to put the section/subsection header in the first line of a section instead of in the line above a section.
Instead of:
1 Header
Body of section.
I want
1 Header Body of section.
I'm trying to put the section/subsection header in the first line of a section instead of in the line above a section.
Instead of:
1 Header
Body of section.
I want
1 Header Body of section.
This is adapted from here:
\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}