1

I want to customize some settings in my daftar isi (table of contents). Here is the current sample .pdf output file, containing the full list of my table of contents.

What I want to customize is:

  1. Omitting . . . . . . . . . . . ONLY in ABSTRAK, ABSTRACT, DAFTAR ISI, DAFTAR TABEL, DAFTAR GAMBAR, DAFTAR ALGORITME, DAFTAR LAMPIRAN, BAB 1 PENDAHULUAN, BAB 2 LANDASAN TEORI, BAB 3 METODOLOGI PENELITIAN, BAB 4 IMPLEMENTASI DAN PENGUJIAN, BAB 5 KESIMPULAN DAN SARAN.

  2. For these section, which is actually not a BAB, but LAMPIRAN (bab = chapter, lampiran = appendix in English): enter image description here
    I want to change the text BAB to LAMPIRAN.

I think I have to change something in .sty file and my index file. But unfortunately, I am not able to find what to change yet. Below is the code for:

  1. if_ithb.sty, which is a Style file used by my uni to generate thesis reports.
% Mengatur bahasa latex
\usepackage[indonesian]{babel}
\usepackage[utf8]{inputenc}

% Untuk pengaturan spacing
\usepackage{setspace}
\onehalfspacing

% Untuk mengatur level section 
\setcounter{secnumdepth}{6}

% Digunakan untuk memasukan gambar ke laporan. 
\usepackage{graphicx}

% Untuk mengatur spacing antara paragraf
\usepackage{parskip}

% Membuat indent
\usepackage{indentfirst}
\setlength\parindent{1.5cm}

% Untuk mengkustomisasi margin
\usepackage{scrextend}

% Untuk mengatur header dan footer
\usepackage{fancyhdr}

% Membuat seluruh tulisan menjadi Times New Roman. 
\usepackage{pslatex}

% Merubah numbering chapter dan section untuk judul setiap bab menggunakan romawi dan judul anak bab menggunakan arabic
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}\hspace{0,3cm}}
\renewcommand{\thesubsection}{\arabic{chapter}.\arabic{section}.\arabic{subsection}}
\renewcommand{\thesubsubsection}{\arabic{chapter}.\arabic{section}.\arabic{subsection}.\arabic{subsubsection}\hspace{-0,35cm}}

% Merubah huruf kapital pada judul daftar isi, daftar gambar, dan daftar table
\usepackage{tocloft}
\renewcommand{\cfttoctitlefont}{\hfil\large\bfseries\MakeUppercase}
\renewcommand{\cftloftitlefont}{\hfil\large\bfseries\MakeUppercase}
\renewcommand{\cftlottitlefont}{\hfil\large\bfseries\MakeUppercase}

\renewcommand\cftchappresnum{BAB }
\renewcommand\cftchapaftersnum{}
\newlength\mylen
\settowidth\mylen{\bfseries BAB 1 :\ } % if more than 9 chapters, use "Chapter 10"
\cftsetindents{chap}{0pt}{\mylen}

% Mengatur font section
\usepackage{sectsty}
\sectionfont{\fontsize{12}{14}\selectfont}
\subsectionfont{\fontsize{12}{14}\selectfont}
\subsubsectionfont{\fontsize{12}{14}\selectfont}

% Untuk merupakan format penulisan BAB
\usepackage{titlesec}   
\titleformat{\chapter}
    {\doublespacing\fontsize{14pt}{16pt}\bfseries}
    {\MakeUppercase{\chaptertitlename\ \thechapter}\filcenter}      {0.15cm}{\centering\uppercase}
\titlespacing*{\chapter}{0pt}{-1cm}{20pt}

% Mengatur spacing section
\titlespacing*{\section}
{0pt}{0pt}{-0.05cm}
\titlespacing*{\subsection}
{0pt}{0pt}{-0.05cm}
\titlespacing*{\subsubsection}
{0pt}{0pt}{-0.05cm}
    
% Digunakan untuk mengatur caption dalam dokumen.
\usepackage[font=footnotesize,format=plain,labelfont=bf,up,textfont=up]{caption}

% Untuk menghapus titik dua (colon)
\captionsetup[figure]{labelsep=space}
\captionsetup[table]{labelsep=space}

% Mengatur nomor caption gambar
\renewcommand{\thefigure}{\arabic{chapter}.\arabic{figure}}

% Mengatur nomor caption table
\renewcommand{\thetable}{\arabic{chapter}.\arabic{table}}

% Mengatur Hyphenation pada latex
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000

% Untuk mengatur setting indent
\setlength\parindent{1.30cm}

% Untuk memasukkan table
\usepackage{tabularx}

% Untuk mengatur width
\usepackage{changepage}

% Menggatur setting halaman 
\usepackage{geometry}
\geometry{
  left=4cm,            % <-- you want to adjust this
  top=3cm,
  right=3cm,
  bottom=3cm,
}

% Teks testing
\usepackage{blindtext}
\usepackage{lipsum}

% Untuk mengatur subscript supscript
\usepackage{fixltx2e}

% Untuk mengatur wrap picture
\usepackage{wrapfig}

% Untuk notasi matematika
\usepackage{amsmath}
\usepackage{stmaryrd}
\usepackage{mathtools}

% untuk mengatur label nomor pada rumus
\renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}

% Untuk mengatur spacing daftar gambar
\newcommand*{\noaddvspace}{\renewcommand*{\addvspace}[1]{}}
\addtocontents{lof}{\protect\noaddvspace}

%untuk mengatur package include table in excel
% \usepackage{pgfplotstable}

% untuk mengatur landscape page
\usepackage{rotating}
  1. index.tex, which is the main page for my document.
% Tipe dokumen adalah report dengan satu kolom. 
% Mengatur setting halaman 
\documentclass[12pt, a4paper, onecolumn, oneside, final]{report}
\makeatother

\usepackage{array}
\setlength\extrarowheight{4pt}

\usepackage{tabto}
\newenvironment{tabs}[1]
{\TabPositions{#1}}

\usepackage{longtable}  
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}

% Hyperlink untuk section, link, citation 
\usepackage{hyperref}
\urlstyle{same}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    citecolor=green,
    filecolor=magenta,      
    urlcolor=blue
}

% Load konfigurasi LaTeX untuk tipe laporan thesis ITHB
\usepackage{if_ithb}

% Konfigurasi package lainnya
\usepackage[chapter,Algoritme,ruled]{algorithm}
\usepackage{algpseudocode}
\usepackage[most]{tcolorbox}
\usepackage{adjustbox}
\usepackage{algcompatible}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{bigstrut}
\usepackage{caption}
\usepackage{colortbl}
\usepackage{enumitem}
\usepackage{etoolbox}
\usepackage{float}
\usepackage[T1]{fontenc}
\usepackage{gensymb}
\usepackage{graphicx}
\usepackage{inconsolata}
\usepackage{listings}
\usepackage{makecell}
\usepackage{mathtools}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{musicography}
\usepackage{pdflscape}
\usepackage{pifont}
\usepackage{ragged2e}
\usepackage{rotating}
\usepackage{subcaption}
\usepackage{seqsplit}
\usepackage{tabu}
\usepackage{textcomp}
\usepackage{tikz}
\usepackage{tocloft}
\usepackage{xcolor}

% Untuk break algorithm biar ga offside
\makeatletter
\newenvironment{breakablealgorithm}
{% \begin{breakablealgorithm}
    \begin{center}
        \refstepcounter{algorithm}% New algorithm
        \hrule height.8pt depth0pt \kern2pt% \@fs@pre for \@fs@ruled
        \renewcommand{\caption}[2][\relax]{% Make a new \caption
            {\raggedright\textbf{\fname@algorithm~\thealgorithm} ##2\par}%
            \ifx\relax##1\relax % #1 is \relax
            \addcontentsline{loa}{algorithm}{\protect\numberline{\thealgorithm}##2}%
            \else % #1 is not \relax
            \addcontentsline{loa}{algorithm}{\protect\numberline{\thealgorithm}##1}%
            \fi
            \kern2pt\hrule\kern2pt
        }
    }{% \end{breakablealgorithm}
        \kern2pt\hrule\relax% \@fs@post for \@fs@ruled
    \end{center}
}
\makeatother

% Daftar Lampiran
\newcommand\listappendixname{DAFTAR LAMPIRAN}
\newcommand\appcaption[1]{%
   \addcontentsline{app}{chapter}{#1}}
\makeatletter
\newcommand\listofappendices{%
   \chapter*{\listappendixname}\@starttoc{app}}
\makeatother

% Daftar Pseudocode - Algoritme
\makeatletter
\def
\BState{\State\hskip-\ALG@thistlm}
\renewcommand{\ALG@name}{ALGORITME} 
\renewcommand{\listalgorithmname}{DAFTAR \uppercase{\ALG@name}}
\makeatother
\renewcommand{\thealgorithm}{\arabic{chapter}.\arabic{algorithm}} 
\renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
\captionsetup[algorithm]{singlelinecheck=off}

\tcbset{colback=white!10!white,colframe=black!50!black, highlight math style= {enhanced,colframe=black,colback=black!10!white,boxsep=0pt}}

% Daftar pemenggalan suku kata dan istilah dalam LaTeX
\include{hype.indonesia}

% Variabel baru untuk menyimpan nomor halaman
\newcounter{originalpagenumber}%
\renewcommand\cftchapdotsep{\cftdotsep}%

% Daftar isi, supaya subsubsection terindeks juga
\setcounter{tocdepth}{4}

% Set custom font family
\lstset{
    basicstyle=\fontfamily{zi4}\selectfont,
}
\renewcommand*{\ttdefault}{cmtt}

\setcellgapes{5pt}

% Awal bagian penulisan laporan
\begin{document}

    % Sampul Laporan
    \include{sampul_luar}
    
    % Sampul Laporan - dalam
    \include{sampul_dalam}
    
    % Daftar isi, gambar, dan tabel
    % Gunakan penomeran Romawi (i, ii, iii, ...) setelah bagian ini.
%    \captionsetup{justification=centering}
%    \newcolumntype{P}[1]{>{\RaggedRight\arraybackslash}p{#1}}
%    \makeatletter

    \newcounter{savepage}
    \pagenumbering{roman}
    
    % Halaman Penyataan Orisinalitas
%   \include{halaman_pernyataan_orisinalitas}
    
    % Halaman Pengesahan
    % \include{halaman_pengesahan}
    
    % Halaman Publikasi
    %\include{halaman_publikasi}
 
    % Lembar Abstrak
    \phantomsection \addcontentsline{toc}{chapter}{ABSTRAK}
    \include{abstrak}

    % Lembar Abstract
    \phantomsection \addcontentsline{toc}{chapter}{ABSTRACT}
    \include{abstract}

    % Kata Pengantar
%   \phantomsection \addcontentsline{toc}{chapter}{KATA PENGANTAR}
    %\include{kata_pengantar}
    
    \vspace*{-2.5cm}
    \phantomsection \addcontentsline{toc}{chapter}{DAFTAR ISI}
    \tableofcontents
    \clearpage
    
    \vspace*{-2.5cm}
    \phantomsection \addcontentsline{toc}{chapter}{DAFTAR TABEL}
    \listoftables
    \clearpage
    
    \vspace*{-2.5cm}
    \phantomsection \addcontentsline{toc}{chapter}{DAFTAR GAMBAR}
    \listoffigures
    
    \clearpage
    {
        \let
        \oldnumberline
        \numberline
        \renewcommand{\numberline}{Pseudocode~\oldnumberline}
    }
    
    \addcontentsline{toc}{chapter}{DAFTAR ALGORITME}
    \renewcommand{\listalgorithmname}{DAFTAR ALGORITME}
    \lhead{\emph{DAFTAR ALGORITME}}
    {
        \let
        \oldnumberline
        \numberline
        \renewcommand{\numberline}{Algoritme~\oldnumberline}
        \listofalgorithms
    }
    
%   \clearpage
    
    \vspace*{-2.5cm}
    \phantomsection \addcontentsline{toc}{chapter}{DAFTAR LAMPIRAN}
    \listofappendices
    \clearpage
    
    \setcounter{savepage}{\arabic{page}}
    \makeatletter
    \def\MyPagenumbering#1{%
        \global\c@page \@ne \gdef\thepage{\arabic{chapter}-\csname @#1\endcsname
            \c@page}}
    \makeatother
    \pagestyle{fancy}
    \renewcommand{\chaptermark}[1]{%
        \markboth{BAB \thechapter \ #1}{}}
    
    \fancyhf{}
    % Gunakan penomeran Arab (1, 2, 3, ...) setelah bagian ini.
    \MyPagenumbering{arabic}
    
    % Untuk mengatur posisi pagenumber
    %\pagestyle{plain}
    \setlength\LTleft{0pt}            % default: \fill
    \setlength\LTright{0pt}           % default: \fill
    \lhead{\leftmark}
    \renewcommand{\headrulewidth}{1pt}
    
    \fancypagestyle{plain}{%
        \renewcommand{\headrulewidth}{0pt}%
        \fancyhf{}%
        \fancyfoot[R]{\arabic{chapter}-1}%
    }
    
    \onehalfspacing
    \rfoot{\arabic{chapter}-\arabic{page}}
    
    \setcounter{page}{1}
    \include{bab1}

    \setcounter{page}{1}
    \include{bab2}

    \setcounter{page}{1}
    \include{bab3}

    \setcounter{page}{1}
    \include{bab4}

    \setcounter{page}{1}
    \include{bab5}

    \pagenumbering{roman}
    \setcounter{page}{\thesavepage}
    \fancypagestyle{plain}{%
        \renewcommand{\headrulewidth}{0pt}%
        \fancyhf{}%
        \fancyfoot[c]{\thepage}%
    }
    \rfoot{\thepage}

    % Daftar Pustaka
    \renewcommand{\bibname}{DAFTAR REFERENSI}
    \setcounter{page}{1}
    \phantomsection \addcontentsline{toc}{chapter}{DAFTAR REFERENSI}
    \include{pustaka}
    \cftsetindents{chap}{0pt}{\mylen}
    
    % Lampiran 
    \pagestyle{fancy}
    \renewcommand{\chaptermark}[1]{
        \markboth{LAMPIRAN \thechapter \ #1}{}}
        
    \pagenumbering{arabic} 
    \setcounter{page}{1}
    \setcounter{table}{0}
    \renewcommand{\thepage}{A-\arabic{page}}
    \renewcommand{\thetable}{\Alph{chapter}-\arabic{table}}
    \renewcommand{\thepage}{\Alph{chapter}-\arabic{page}}
    
    \renewcommand\cftchappresnum{LAMPIRAN }
    
    \begin{appendix}
        \include{lampiran}
        \rfoot{\Alph{chapter}-\arabic{page}}
    \end{appendix}
    
\end{document}

What should I modify to achieve what I want?

1
  1. To remove dots from the contents page, add the following command to your preamble:

    \renewcommand{\cftdot}{}

UPDATE:

To remove dots from particular entry in ToC, you can try the trick:

\addtocontents{toc}{\def\protect\cftdotsep{10000}}

This will write \def\@dotsep{10000} into the ToC file and from that point on the dots are gone.

To have the dots again at a later point issue

\addtocontents{toc}{\def\protect\cftdotsep{4.5}} 
  1. To change the text BAB to LAMPIRAN add the following to your preamble:
   \setlength{\cftchapnumwidth}{7em}
    
    \let\oldappendix\appendix
    \renewcommand{\appendix}{%
      \oldappendix
      \addtocontents{toc} 
        {\protect\renewcommand{\protect\cftchappresnum}{LAMPIRAN }}
    }

The updated index.tex with the above corrections is as follows:

% Tipe dokumen adalah report dengan satu kolom. 
% Mengatur setting halaman 
\documentclass[12pt, a4paper, onecolumn, oneside, final]{report}
\makeatother

\usepackage{array}
\setlength\extrarowheight{4pt}

\usepackage{tabto}
\newenvironment{tabs}[1]
{\TabPositions{#1}}

\usepackage{longtable}  
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}

% Hyperlink untuk section, link, citation 
\usepackage{hyperref}
\urlstyle{same}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    citecolor=green,
    filecolor=magenta,      
    urlcolor=blue
}

% Load konfigurasi LaTeX untuk tipe laporan thesis ITHB
\usepackage{if_ithb}


%---- code for appendix---------

\setlength{\cftchapnumwidth}{7em}% Just for this example

\let\oldappendix\appendix
\renewcommand{\appendix}{%
  \oldappendix
  \addtocontents{toc} 
    {\protect\renewcommand{\protect\cftchappresnum}{LAMPIRAN }}
}

%------------

% Untuk break algorithm biar ga offside
\makeatletter
\newenvironment{breakablealgorithm}
{% \begin{breakablealgorithm}
    \begin{center}
        \refstepcounter{algorithm}% New algorithm
        \hrule height.8pt depth0pt \kern2pt% \@fs@pre for \@fs@ruled
        \renewcommand{\caption}[2][\relax]{% Make a new \caption
            {\raggedright\textbf{\fname@algorithm~\thealgorithm} ##2\par}%
            \ifx\relax##1\relax % #1 is \relax
            \addcontentsline{loa}{algorithm}{\protect\numberline{\thealgorithm}##2}%
            \else % #1 is not \relax
            \addcontentsline{loa}{algorithm}{\protect\numberline{\thealgorithm}##1}%
            \fi
            \kern2pt\hrule\kern2pt
        }
    }{% \end{breakablealgorithm}
        \kern2pt\hrule\relax% \@fs@post for \@fs@ruled
    \end{center}
}
\makeatother

% Daftar Lampiran
\newcommand\listappendixname{DAFTAR LAMPIRAN}
\newcommand\appcaption[1]{%
   \addcontentsline{app}{chapter}{#1}}
\makeatletter
\newcommand\listofappendices{%
   \chapter*{\listappendixname}\@starttoc{app}}
\makeatother

% Daftar Pseudocode - Algoritme
\makeatletter
\def
\BState{\State\hskip-\ALG@thistlm}
\renewcommand{\ALG@name}{ALGORITME} 
\renewcommand{\listalgorithmname}{DAFTAR \uppercase{\ALG@name}}
\makeatother
\renewcommand{\thealgorithm}{\arabic{chapter}.\arabic{algorithm}} 
\renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
\captionsetup[algorithm]{singlelinecheck=off}

\tcbset{colback=white!10!white,colframe=black!50!black, highlight math style= {enhanced,colframe=black,colback=black!10!white,boxsep=0pt}}

% Daftar pemenggalan suku kata dan istilah dalam LaTeX
\include{hype.indonesia}

% Variabel baru untuk menyimpan nomor halaman
\newcounter{originalpagenumber}%
\renewcommand\cftchapdotsep{\cftdotsep}%

% Daftar isi, supaya subsubsection terindeks juga
\setcounter{tocdepth}{4}

% Set custom font family
\lstset{
    basicstyle=\fontfamily{zi4}\selectfont,
}
\renewcommand*{\ttdefault}{cmtt}

\setcellgapes{5pt}

% Awal bagian penulisan laporan
\begin{document}

    % Sampul Laporan
    \include{sampul_luar}
    
    % Sampul Laporan - dalam
    \include{sampul_dalam}
    
    % Daftar isi, gambar, dan tabel
    % Gunakan penomeran Romawi (i, ii, iii, ...) setelah bagian ini.
%    \captionsetup{justification=centering}
%    \newcolumntype{P}[1]{>{\RaggedRight\arraybackslash}p{#1}}
%    \makeatletter

    \newcounter{savepage}
    \pagenumbering{roman}
    
    % Halaman Penyataan Orisinalitas
%   \include{halaman_pernyataan_orisinalitas}
    
    % Halaman Pengesahan
    % \include{halaman_pengesahan}
    
    % Halaman Publikasi
    %\include{halaman_publikasi}
    %
    \addtocontents{toc}{\def\protect\cftdotsep{10000}}
    %
    % Lembar Abstrak
    \phantomsection \addcontentsline{toc}{chapter}{ABSTRAK}
    \include{abstrak}

    % Lembar Abstract
    \phantomsection \addcontentsline{toc}{chapter}{ABSTRACT}
    \include{abstract}

    % Kata Pengantar
%   \phantomsection \addcontentsline{toc}{chapter}{KATA PENGANTAR}
    %\include{kata_pengantar}
    
    \vspace*{-2.5cm}
    \phantomsection \addcontentsline{toc}{chapter}{DAFTAR ISI}
    \tableofcontents
    \clearpage
    
    \vspace*{-2.5cm}
    \phantomsection \addcontentsline{toc}{chapter}{DAFTAR TABEL}
    \listoftables
    \clearpage
    
    \vspace*{-2.5cm}
    \phantomsection \addcontentsline{toc}{chapter}{DAFTAR GAMBAR}
    \listoffigures
    
    \clearpage
    {
        \let
        \oldnumberline
        \numberline
        \renewcommand{\numberline}{Pseudocode~\oldnumberline}
    }
    
    \addcontentsline{toc}{chapter}{DAFTAR ALGORITME}
    \renewcommand{\listalgorithmname}{DAFTAR ALGORITME}
    \lhead{\emph{DAFTAR ALGORITME}}
    {
        \let
        \oldnumberline
        \numberline
        \renewcommand{\numberline}{Algoritme~\oldnumberline}
        \listofalgorithms
    }
   
    \vspace*{-2.5cm}
    \phantomsection \addcontentsline{toc}{chapter}{DAFTAR LAMPIRAN}
    \listofappendices
%--------------- 
    \addtocontents{toc}{\def\protect\cftdotsep{4.5}} 
%--------------------------
    \clearpage
        
    \setcounter{savepage}{\arabic{page}}
    \makeatletter
    \def\MyPagenumbering#1{%
        \global\c@page \@ne \gdef\thepage{\arabic{chapter}-\csname @#1\endcsname
            \c@page}}
    \makeatother
    \pagestyle{fancy}
    \renewcommand{\chaptermark}[1]{%
        \markboth{BAB \thechapter \ #1}{}}
    
    \fancyhf{}
    % Gunakan penomeran Arab (1, 2, 3, ...) setelah bagian ini.
    \MyPagenumbering{arabic}
    
    % Untuk mengatur posisi pagenumber
    %\pagestyle{plain}
    \setlength\LTleft{0pt}            % default: \fill
    \setlength\LTright{0pt}           % default: \fill
    \lhead{\leftmark}
    \renewcommand{\headrulewidth}{1pt}
    
    \fancypagestyle{plain}{%
        \renewcommand{\headrulewidth}{0pt}%
        \fancyhf{}%
        \fancyfoot[R]{\arabic{chapter}-1}%
    }
    
    \onehalfspacing
    \rfoot{\arabic{chapter}-\arabic{page}}
    
    \setcounter{page}{1}
    \include{bab1}

    \setcounter{page}{1}
    \include{bab2}

    \setcounter{page}{1}
    \include{bab3}

    \setcounter{page}{1}
    \include{bab4}

    \setcounter{page}{1}
    \include{bab5}

    \pagenumbering{roman}
    \setcounter{page}{\thesavepage}
    \fancypagestyle{plain}{%
        \renewcommand{\headrulewidth}{0pt}%
        \fancyhf{}%
        \fancyfoot[c]{\thepage}%
    }
    \rfoot{\thepage}

    % Daftar Pustaka
    \renewcommand{\bibname}{DAFTAR REFERENSI}
    \setcounter{page}{1}
    \phantomsection \addcontentsline{toc}{chapter}{DAFTAR REFERENSI}
    \include{pustaka}
    \cftsetindents{chap}{0pt}{\mylen}
    
%     \clearpage

    % Lampiran 
    \pagestyle{fancy}
    \renewcommand{\chaptermark}[1]{
        \markboth{LAMPIRAN \thechapter \ #1}{}}
        
    \pagenumbering{arabic} 
    \setcounter{page}{1}
    \setcounter{table}{0}
    \renewcommand{\thepage}{A-\arabic{page}}
    \renewcommand{\thetable}{\Alph{chapter}-\arabic{table}}
    \renewcommand{\thepage}{\Alph{chapter}-\arabic{page}}
    
    \renewcommand\cftchappresnum{LAMPIRAN }
  
    \begin{appendix}
%     \renewcommand{\chaptername}{LAMPIRAN}
    %----------- 
    \include{lampiran}
    %---------------------------
    \rfoot{\Alph{chapter}-\arabic{page}}
    \end{appendix}
  
\end{document}

The contents of a sample appendix file lampiran.tex is given below:

\appendix

\chapter{Nomor Not MIDI, Nama Not}

\chapter{Hasil Pengukian Arsitektur}

enter image description here

5
  • \renewcommand{\cftdot}{} works, but it omits all the dots in ToC. I do not want to omit them in BAB 1, BAB 2, BAB 3, BAB 4, BAB 5, DAFTAR REFERENSI, LAMPIRAN (please refer to my attached sample output file here). Is there any other way to do it? Apr 13 at 4:14
  • Also, the BAB is still not changed to LAMPIRAN at my ToC. By using \renewcommand{\cftchappresnum}{Chapter }, it all changed to Chapter, including the BAB. If this does not bother you, may you please update the answer? Thank you. Apr 13 at 4:16
  • @DionisiusPratama I have added few corrections and updated the answer.
    – Tanvir
    Apr 16 at 8:51
  • \addtocontents{toc}{\def\protect\cftdotsep{10000} worked nicely, thank you! Also, the LAMPIRAN is now successfully changed. One last thing, how to reduce extra tab in BAB 1 PENDAHULUAN, BAB 2 LANDASAN TEORI, BAB 3 METODOLOGI PENELITIAN, ? I think the tab is too far @Tanvir Apr 16 at 10:13
  • I've got it. I can just comment the \setlength{\cftchapnumwidth}{7em} line. Apr 16 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.