# Title formatting with titlesec

I am trying to format titles using titlesec. Here is what I want to do:

• \subsubsection:

• \paragraph:

And this is my code:

\setcounter{secnumdepth}{4}

\renewcommand{\thesubsubsection}{\arabic{subsubsection}}
\titleformat{\subsubsection}[block] {\fontsize{14}{12} \selectfont}{\fontsize{10}{12} \selectfont \textsc{Section}\ \thesubsubsection}{1em}{}[\vspace{1mm}\titlerule]

\renewcommand{\theparagraph}{\Roman{paragraph}}
\titleformat{\paragraph}[block] {\textbf \fontsize{14}{12} \selectfont}{\fontsize{14}{12}
%\titleformat{\paragraph}[block] {\fontsize{14}{12} \selectfont}{\fontsize{14}{12} \selectfont \theparagraph\ \textsc{.}}{1em}{}


For this result:

With the commented \titleformat:

As you can see, I have some issue having a bold text.

Does anyone know how to format titlesec command accordingly?

• \textbf requires an argument. If the whole title has to be in boldface, replace it with \bfseries. – Bernard Apr 6 at 11:14
• Great thank you ! – Guliup Apr 6 at 11:50

Here is a simplified code, which reproduces the initial image (probably not with the same font):

\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{lipsum}

\usepackage{titlesec}

\setcounter{secnumdepth}{4}

\renewcommand{\thesubsubsection}{\arabic{subsubsection}}
\titleformat{\subsubsection}[block] {\sffamily}{SECTION\ \thesubsubsection}{0.3em}{\bfseries\fontsize{14}{12} \selectfont}[\vskip 0.5ex \titlerule]

\titlespacing*{\subsubsection}{0pt}{*4}{*4}

\renewcommand{\theparagraph}{\Roman{paragraph}}
\titleformat{\paragraph}[block] {\bfseries\LARGE}{\theparagraph.}{1em}{}

\begin{document}

\lipsum[11]
\subsubsection{Prohibition}
\lipsum[11]

\paragraph{Restriction de concurrence}

\end{document}


• Thank you very much, it works perfectly ! – Guliup Apr 6 at 13:40