# How to center \paragraph title?

I would like to center the title of my \paragraph command to have a display like this :

I tried to use the \paragraph{\centering paragraph's title} but it does not work. I am looking for a way to customize the \paragraphcommand without using ConTeXt.

Thank you for your help, have a good day.

• @Christian ok so what is the correct name of the \section and \paragraph objects?
– user178668
Jan 2, 2019 at 17:25
• You should take a look at the titlesec package. Jan 2, 2019 at 17:46

Here's an easy way with titlesec:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{titlesec, lipsum}

\titleformat{\paragraph}[block]{\bfseries\filcenter}{}{0pt}{}

\begin{document}
\lipsum[11]

\paragraph{Paragraph title}
\lipsum[1]

\end{document}


• I have tried this way but it does not work with my document, maybe there is a conflict with another package.
– user178668
Jan 2, 2019 at 18:05
• Could you post a minimal full example that doesn't work this way? Jan 2, 2019 at 18:10
• I found the problem, there must have been a conflict between sectsty and titlesec: removing sectstyfrom my package list has solved the problem.
– user178668
Jan 2, 2019 at 18:11
• Thank you for your help @Bernard, I will get deep look at the titlesecpackage.
– user178668
Jan 2, 2019 at 18:13
• Oh yes. They operate on the same kind of objects, and this is not recommended. Jan 2, 2019 at 18:26

Another way, you can use scrartcl class from koma-script

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

% to have paragraph not in run-in format, afterskip has to be postive
\RedeclareSectionCommand[
afterskip = .5em,
]{paragraph}

%center title

\begin{document}
\lipsum[11]

\paragraph{Paragraph title}
\lipsum[1]

\end{document}