diff --git a/latex/skripsi.cls b/latex/skripsi.cls index 045991e..23b678d 100644 --- a/latex/skripsi.cls +++ b/latex/skripsi.cls @@ -14,6 +14,7 @@ % section number depth and tocdepth \DeclareStringOption[3]{sectiondepth} \DeclareStringOption[3]{tocdepth} +\DeclareStringOption[fixed]{pnumwidth} % cover page style \DeclareStringOption[default]{cover} % default is 'custom' @@ -307,6 +308,30 @@ % \renewcommand{\thesection}{\textup{\Roman{chapter}}.\arabic{section}} % Dot leaders, spacing, indentation +\makeatletter +\ifdefstring{\skripsikvopt@pnumwidth}{auto}{% +% Thanks to https://tex.stackexchange.com/a/397295/270151 for clever solution to fix the fixed length \@pnumwidth problem to auto-like width +% \patchcmd{}{}{}{}{} +\patchcmd{\cftchapfillnum}% + {\makebox[\@pnumwidth][\cftpnumalign]}% + {}% + {}{}% +\patchcmd{\cftsecfillnum}% + {\makebox[\@pnumwidth][\cftpnumalign]}% + {}% + {}{}% +\patchcmd{\cftsubsecfillnum}% + {\makebox[\@pnumwidth][\cftpnumalign]}% + {}% + {}{}% +\patchcmd{\cftsubsubsecfillnum}% + {\makebox[\@pnumwidth][\cftpnumalign]}% + {}% + {}{}% +\makeatother +}{ + % Fixed width page numbers (default) +} \setlength{\cftbeforetoctitleskip}{0cm} \setlength{\cftbeforeloftitleskip}{0cm} \setlength{\cftbeforelottitleskip}{0cm} @@ -322,6 +347,7 @@ \renewcommand \cftchapdotsep{1} % https://tex.stackexchange.com/a/273764 \renewcommand \cftsecdotsep{1} % https://tex.stackexchange.com/a/273764 \renewcommand \cftsubsecdotsep{1} % https://tex.stackexchange.com/a/273764 +\renewcommand \cftsubsubsecdotsep{1} % https://tex.stackexchange.com/a/273764 \renewcommand \cftfigdotsep{1.5} % https://tex.stackexchange.com/a/273764 \renewcommand \cfttabdotsep{1.5} % https://tex.stackexchange.com/a/273764 \renewcommand{\cftchapleader}{\normalfont\cftdotfill{\cftsecdotsep}}