TeX - LaTeX Asked on October 2, 2021
i want to add "Halaman" as a caption that i blue circled above the list number on TOC as shown below:
Btw, "Halaman" means "Pages" in English. I want to put this word as a description above the list number of the TOC.
How to make this happens? Thanks.
Edit:
This is my main code :
documentclass[a4paper, 12pt, oneside, openany]{book}
usepackage[a4paper, inner=4cm, outer=3cm, top=4cm, bottom=3cm]{geometry}
usepackage[onehalfspacing]{setspace} usepackage{fancyhdr} usepackage{titlesec} usepackage{setspace} usepackage{tocloft}
fancyhf{}
cfoot{thepage}
linespread{1.5}
pagestyle{plain} renewcommandcftchapdotsep{cftdotsep}
titleformat{chapter}[display] {bfseriescentering} {chaptertitlename thechapter}{12pt}{} titlespacing*{chapter}{0pt}{10pt}{10pt} renewcommand{contentsname}{DAFTAR ISI} renewcommand{listtablename}{DAFTAR TABEL} renewcommand{listfigurename}{DAFTAR GAMBAR}
begin{document}
clearpage
thispagestyle{empty}
frontmatter %
pagestyle{fancy} renewcommand{headrulewidth}{0pt} include{cover1}
include{cover2} linespread{1} tableofcontents
listoffigures
listoftables
mainmatter %
end{document}
Btw, my cover 1, and cover 2 are not necessary since it hasn’t been completely finished.
Add addtocontents{toc}{protectnullprotecthfill{Halaman}protectpar}
before the first section
. Here is the MWE:
documentclass{article}
begin{document}
tableofcontents
addtocontents{toc}{protectnullprotecthfill{Halaman}protectpar}
section{a}
foo
section{b}
bar
section{c}
baz
end{document}
Result:
Correct answer by domperor on October 2, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP