異なる章のサブセクションタイトルのフォントサイズを変更する方法

異なる章のサブセクションタイトルのフォントサイズを変更する方法

私のプロジェクトでは、第 1 章と第 2 章のサブセクション タイトルのフォント サイズを変更したいのですが、第 1 章のサブセクションは大きいサイズにし、第 2 章のサブセクションは大きいサイズにする必要があります。どうすればいいでしょうか。よろしくお願いします。

\documentclass[13pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[left=3cm,right=3cm,top=3cm,bottom=3cm]{geometry}
\usepackage{amsfonts}
\usepackage[titles]{tocloft}
\usepackage{sectsty}
\usepackage{titlesec}


% for the chapter
\renewcommand{\thechapter}{\arabic{chapter}.}
\newlength\mylength
\renewcommand\cftchappresnum{\large{\hspace{0.04cm}}}
\settowidth\mylength{\bfseries\cftchappresnum\cftchapaftersnum}
\addtolength\cftchapnumwidth{\mylength}

% for the section
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}}
\renewcommand{\cftsecnumwidth}{2em}
\titleformat*{\section}{\LARGE\bfseries}

% for the subsection
\renewcommand{\thesubsection}{\arabic{chapter}.\arabic{section}.\arabic{subsection}.\hspace{-.55cm} }
\titleformat*{\subsection}{\Large\bfseries}

% for the subsubsection
\renewcommand{\thesubsubsection}{\arabic{chapter}.\arabic{section}.\arabic{subsection}.\arabic{subsubsection}.\hspace{-.45cm} }
\titleformat*{\subsubsection}{\large\bfseries}
\setcounter{secnumdepth}{5}

\begin{document}
{\large
\chapter{Knowledge}
\section{Algebra}
\subsection{Matrix.}
\subsubsection{Definition.}
\subsubsection{Proposition.}
\subsection{Vector space.}
\subsubsection{Definition.}

\vspace{.5cm}
\section{Analysis}
\subsection{Metric space.}
\subsubsection{Definition.}
\subsection{Continuous map.}
\subsubsection{Definition.}
\vspace{.5cm}
\section{Topology}
\subsection{Manifold.}
\subsubsection{Definition.}
\subsubsection{Lemma.}

\chapter{Spacetime}
\section{Space and time}
\subsection{Definition.}
\subsection{Proposition.}
\vspace{.5cm}
\section{Inertial frames}
\subsection{Definition.}
\subsection{Theorem.}

}
\end{document}

関連情報