I create the fourth-level section title following this link.
With the below code snippet, the fourth level is created but I want to reduce the spacing between the section number and the section title, e.g., 1.1.1.1 D1.
\documentclass{article}
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{-2.5ex\@plus -1ex \@minus -.25ex}%
{1.25ex \@plus .25ex}%
{\normalfont\normalsize\bfseries}}
\makeatother
\setcounter{secnumdepth}{4} % how many sectioning levels to assign numbers to
\setcounter{tocdepth}{4} % how many sectioning levels to show in ToC
\begin{document}
\tableofcontents
\section{A}
\subsection{B}
\subsubsection{C1}
\paragraph{D1}
\paragraph{D2}
\end{document}
Here is the figure to illustrate my confusion:
I just want to reduce the space which is represented as the red rectangle.
Any help is appreciated!

