I have
\usepackage{titlesec}
\titleformat{\section}[runin]
{\normalfont\Large\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}[runin]
{\normalfont\large\bfseries}{\thesubsection}{1em}{}
which moves the text up after the section (and subsection). How can I add a period after the section title so that I get:
2.3 Section title. Text of paragraph…
Best Answer
Two ways.
The last argument of
\titleformat
can contain a macro that takes the title as its argument. SoAlternatively, use the
explicit
option; in this case you have to use#1
in the last argument to\titleformat
to stand for the title.The first way is more customizable.