fixlatex): fix chapter formatting and spacing in thesis class to be aligned at before chapter number and restyle \chapter to be centered and use hardcoded prefix "BAB" following with roman numbering

This commit is contained in:
nuluh
2025-05-10 18:50:41 +07:00
parent ca668ffc5f
commit c57a916a1a

View File

@@ -53,25 +53,36 @@
\fancyfoot[C]{\thepage}
% Chapter formatting
\titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter.}{1em}{}
\titlespacing*{\chapter}{0pt}{-10pt}{20pt}
\titleformat{\chapter}[display]
{\bfseries\Large\centering}
{BAB~\Roman{chapter}} % << display format
{1ex}
{\MakeUppercase}
% Ensure chapter reference in TOC matches
\renewcommand{\cftchappresnum}{BAB~}
\renewcommand{\cftchapaftersnum}{\quad}
% \titlespacing*{\chapter}{0pt}{-10pt}{20pt}
% Redefine \maketitle
\renewcommand{\maketitle}{\input{frontmatter/maketitle}}
% Chapter & Section format
\renewcommand{\cftchapfont}{\bfseries\MakeUppercase}
\renewcommand{\cftsecfont}{}
\renewcommand{\cftsubsecfont}{\itshape}
% \renewcommand{\cftsecfont}{}
% \renewcommand{\cftsubsecfont}{\itshape}
% \renewcommand{\thesection}{\textup{\Roman{chapter}}.\arabic{section}}
% Dot leaders, spacing, indentation
\setlength{\cftbeforechapskip}{1em}
\setlength{\cftbeforechapskip}{0em}
\setlength{\cftchapindent}{0pt}
\setlength{\cftsecindent}{1.5em}
\setlength{\cftsecindent}{0em}
\setlength{\cftsubsecindent}{3em}
\setlength{\cftchapnumwidth}{3em}
\setlength{\cftsecnumwidth}{3.5em}
\setlength{\cftsubsecnumwidth}{4.5em}
\setlength{\cftchapnumwidth}{4em}
\setlength{\cftsecnumwidth}{1.5em}
\setlength{\cftsubsecnumwidth}{2.5em}
% Title styling
\renewcommand{\contentsname}{\hfill\bfseries\normalsize DAFTAR ISI\hfill}