fix(latex): fix \contentsname to keep the title centered by adding dummy second \hfill in the \cftaftertoctitle when using \fancypagestyle or other fancyhdr effects

This commit is contained in:
nuluh
2025-05-11 10:45:42 +07:00
parent 2db5170366
commit 740680d1c7

View File

@@ -84,8 +84,9 @@
\renewcommand{\cftchappagefont}{\normalfont} \renewcommand{\cftchappagefont}{\normalfont}
% Title styling % Title styling
\renewcommand{\contentsname}{\hfill\bfseries\normalsize DAFTAR ISI\hfill} \renewcommand{\contentsname}{DAFTAR ISI}
\renewcommand{\cfttoctitlefont}{\bfseries\MakeUppercase} \renewcommand{\cfttoctitlefont}{\bfseries\MakeUppercase}
\renewcommand{\cftaftertoctitle}{\hfill\hfill} % https://tex.stackexchange.com/a/255699/394075
% \renewcommand{\cftaftertoctitle}{\vskip 2em} % \renewcommand{\cftaftertoctitle}{\vskip 2em}
\renewcommand{\tableofcontents}{ \renewcommand{\tableofcontents}{