0

In my project, I want to change the fontsize of subsection title in chapter 1 and chapter 2, where the subsection in Chapter 1 should be Large size, ans the subsection in Chapter 2 should be large size. How can I do this ? Thanks

\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}

PermQi
  • 187

0 Answers0