[Tex/LaTex] Paragraph header

sectioningsections-paragraphstext-decorations

I want to include an indented, underlined, upper- and lowercase paragraph heading ending with a period in my document instead of using \subsubsection. Anyone who knows how I can define the command for this in LaTeX?

Best Answer

You can use the titlesec package; the ulem package was used for the underlining:

\documentclass{article}
\usepackage[explicit]{titlesec}
\usepackage{ulem}
\usepackage{lipsum}% just to generate text for the example

\setcounter{secnumdepth}{4}
\titleformat{\paragraph}[runin]
  {\normalfont\normalsize\bfseries}{}{15pt}{\uline{\theparagraph\hspace*{1em}#1.}}
\titleformat{name=\paragraph,numberless}[runin]
  {\normalfont\normalsize\bfseries}{}{15pt}{\uline{#1.}}

\begin{document}

\section{A Section}
\subsection{A Subsection}
\subsubsection{A Subsubection}
\paragraph{A Numbered Paragraph}
\lipsum[2]
\paragraph*{An Unnumbered Paragraph}
\lipsum[2]

\end{document}

enter image description here

Related Question