1

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

  • \subsubsection:

    enter image description here

  • \paragraph:

    enter image description here

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: enter image description here enter image description here

With the commented \titleformat:

enter image description here

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

Does anyone know how to format titlesec command accordingly?

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

1 Answer 1

2

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} 

enter image description here

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .