![可以控制小节中彩色字体的深度吗?](https://linux22.com/image/449359/%E5%8F%AF%E4%BB%A5%E6%8E%A7%E5%88%B6%E5%B0%8F%E8%8A%82%E4%B8%AD%E5%BD%A9%E8%89%B2%E5%AD%97%E4%BD%93%E7%9A%84%E6%B7%B1%E5%BA%A6%E5%90%97%EF%BC%9F.png)
我正在使用这个建议如何在 \subsubsection 下添加带有标题的额外层级使用更多级别的部分,并且我也想控制字体颜色。
我到目前为止尝试过
\documentclass{article}
\usepackage[utf8]{inputenc}
%\usepackage[utf8]{inputnc}
\usepackage{xcolor}
\usepackage{sectsty}
\usepackage{titlesec}
\usepackage{hyperref}
\titleclass{\subsubsubsection}{straight}[\subsection]
\newcounter{subsubsubsection}[subsubsection]
\renewcommand\thesubsubsubsection{\thesubsubsection.\arabic{subsubsubsection}}
\renewcommand\theparagraph{\thesubsubsubsection.\arabic{paragraph}} % optional; useful if paragraphs are to be numbered
\titleformat{\subsubsubsection}
{\normalfont\normalsize\bfseries}{\thesubsubsubsection}{1em}{}
\titlespacing*{\subsubsubsection}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{5}{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{6}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\def\toclevel@subsubsubsection{4}
\def\toclevel@paragraph{5}
\def\toclevel@paragraph{6}
\def\l@subsubsubsection{\@dottedtocline{4}{7em}{4em}}
\def\l@paragraph{\@dottedtocline{5}{10em}{5em}}
\def\l@subparagraph{\@dottedtocline{6}{14em}{6em}}
\makeatother
\sectionfont{\color{blue}}
\subsectionfont{\color{orange!90!black}}
\subsubsectionfont{\color{orange!70!white}}
\subsubsubsectionfont{\color{orange!50!white}}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\title{test}
\begin{document}
\maketitle
\tableofcontents
\section{Introduction}
\subsection{Introduction}
\subsubsection{Introduction}
\subsubsubsection{Introduction}
\end{document}