From 12669ed24ce40bc61fb1d4319ca15cd3b912bca4 Mon Sep 17 00:00:00 2001 From: nuluh Date: Fri, 23 May 2025 14:33:42 +0700 Subject: [PATCH] Squashed commit of the following: commit 6fb3c103c723a02eb860f3943c29ed79ede7ab94 Author: nuluh Date: Fri May 23 14:29:16 2025 +0700 fix: adjust subsection number width in table of contents commit c29aab89e1f69869cd29af787c0b46f83194c0d7 Author: nuluh Date: Fri May 23 14:24:47 2025 +0700 fix: adjust subsection indentation and dot separation in table of contents commit 9d89e950cef3676a4e41df807f0b9a82717c2cdf Author: nuluh Date: Fri May 23 14:22:47 2025 +0700 fix: adjust spacing for table of contents and list titles commit f19b18ec8da187ef020224b5e37a9809eab8744a Author: nuluh Date: Fri May 23 14:20:56 2025 +0700 feat: adjust chapter title spacing and increase section numbering depth - Modify chapter title top spacing from 0pt to 0cm for consistency - Set section numbering depth to 3 levels (1.1.1 format) commit 4be018fe57d6c475ee9fc46c21e71088f0358787 Author: nuluh Date: Fri May 23 14:17:02 2025 +0700 feat: Update watermark text and settings for draft mode commit 8e6b2fbb13e71cbfd248bae11470cde3c9eca685 Author: nuluh Date: Fri May 23 14:15:19 2025 +0700 feat: Update language settings and bibliography strings for Indonesian and English Closes #81 commit 3af5a5dbb17a125b5f9b66980a25baacc44bd80d Author: nuluh Date: Fri May 23 14:12:30 2025 +0700 feat: Add documentclass scope to commit message template commit c8f5662977338bd50a5b66c1079836037d1c42d4 Author: nuluh Date: Fri May 23 14:10:40 2025 +0700 feat(documentclass): Add packages for SVG support, indentation, and float placement --- .gitmessage | 1 + latex/thesis.cls | 39 ++++++++++++++++++++++++++++++--------- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/.gitmessage b/.gitmessage index 4afc0c8..d8d282a 100644 --- a/.gitmessage +++ b/.gitmessage @@ -21,6 +21,7 @@ # # Scope: # latex (changes to thesis LaTeX) +# documentclass (LaTeX in-house document class changes) # src (changes to Python source code) # nb (changes to notebooks) # ml (ML model specific changes) diff --git a/latex/thesis.cls b/latex/thesis.cls index cdb5606..7aeb853 100644 --- a/latex/thesis.cls +++ b/latex/thesis.cls @@ -21,17 +21,25 @@ \RequirePackage{tocloft} \RequirePackage{tocbibind} \RequirePackage{amsmath,amsfonts,amssymb} +\RequirePackage{svg} % Allows including SVG images directly +\RequirePackage{indentfirst} % Makes first paragraph after headings indented +\RequirePackage{float} % Provides [H] option to force figure/table placement % Polyglossia set language -\setmainlanguage{bahasai} -% \setotherlanguage{english} ++ \setdefaultlanguage[variant=indonesian]{malay} % Proper Indonesian language setup ++ \setotherlanguage{english} % Enables English as secondary language + ++ \DefineBibliographyStrings{english}{% % Customizes bibliography text ++ andothers={dkk\adddot}, % Changes "et al." to "dkk." ++ pages={hlm\adddot}, % Changes "pp." to "hlm." ++ } % Conditionally load the watermark package and settings \if@draftmark \RequirePackage{draftwatermark} - \SetWatermarkText{Draft: \today [wip]} - \SetWatermarkColor[gray]{0.7} - \SetWatermarkFontSize{2cm} + \SetWatermarkText{nuluh/thesis (wip) draft: \today} + \SetWatermarkColor[gray]{0.8} % Opacity: 0.8 = 20% transparent + \SetWatermarkFontSize{1.5cm} \SetWatermarkAngle{90} \SetWatermarkHorCenter{1.5cm} \fi @@ -79,7 +87,10 @@ } % Chapter formatting -\titlespacing{\chapter}{0pt}{0pt}{*1.5} +\titlespacing{\chapter}{0pt}{0cm}{*1.5} % 0pt→0cm: same value, different unit + % 0pt = no space above chapter title + % *1.5 = 1.5× line spacing after title + \titleformat{\chapter}[display] {\normalsize\bfseries\centering} {BAB~\Roman{chapter}} % << display format @@ -91,6 +102,10 @@ \titleformat{\subsection} {\normalsize\bfseries}{\thesubsection}{1em}{} +% Section numbering depth +\setcounter{secnumdepth}{3} % Enables numbering for: + % 1 = chapters, 2 = sections, 3 = subsections + % Ensure chapter reference in TOC matches \renewcommand{\cftchappresnum}{BAB~} \renewcommand{\cftchapaftersnum}{\quad} @@ -108,16 +123,22 @@ % Dot leaders, spacing, indentation +\setlength{\cftbeforetoctitleskip}{0cm} % Space above "DAFTAR ISI" title +\setlength{\cftbeforeloftitleskip}{0cm} % Space above "DAFTAR GAMBAR" title +\setlength{\cftbeforelottitleskip}{0cm} % Space above "DAFTAR TABEL" title + \setlength{\cftbeforechapskip}{0em} \setlength{\cftchapindent}{0pt} \setlength{\cftsecindent}{0em} -\setlength{\cftsubsecindent}{2.5em} +\setlength{\cftsubsecindent}{2em} \setlength{\cftchapnumwidth}{3.5em} -\setlength{\cftsecnumwidth}{3.5em} +\setlength{\cftsecnumwidth}{2em} \setlength{\cftsubsecnumwidth}{2.5em} \setlength{\cftfignumwidth}{5em} \setlength{\cfttabnumwidth}{4em} -\renewcommand \cftchapdotsep{4.5} % https://tex.stackexchange.com/a/273764 +\renewcommand \cftchapdotsep{1} % Denser dots (closer together) https://tex.stackexchange.com/a/273764 +\renewcommand \cftsecdotsep{1} % Apply to sections too +\renewcommand \cftsubsecdotsep{1} % Apply to subsections too \renewcommand{\cftchapleader}{\normalfont\cftdotfill{\cftsecdotsep}} \renewcommand{\cftchappagefont}{\normalfont} \renewcommand{\cftfigpresnum}{\figurename~}