Actually i have seen all possibilities similar questions one by one. They have similar problem, but my problem is more complicated. So, here is my problem:
I want to remove "Chapter N" when i'm using:
\chapter{\textbf{Test Chapter}}
I'm not going to use \chapter*{...}
because this makes my section start with 0.1 Section
instead of 1.1 Section
. I have seen this link, and tried to use it using \titlesec
to remove my Chapter N
.
This is my code before i changed anything, (Btw, i wrote the important part of my code only so you can focus on it):
\documentclass[a4paper,12pt,oneside,openany]{book}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\bfseries\centering}
{\chaptertitlename \thechapter}{12pt}{}
\titlespacing*{\chapter}{0pt}{10pt}{10pt}
This is my code after i tried to remove Chapter N
:
\documentclass[a4paper,12pt,oneside,openany]{book}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\bfseries\centering}{}{0pt}{\Large}
{\chaptertitlename \thechapter}{12pt}{}
\titlespacing*{\chapter}{0pt}{10pt}{10pt}
and actually it removes the Chapter N
like i wanted before. The point is, i only adding {}{0pt}{\Large}
after {\normalfont\bfseries\centering}
. And because of this, i got 2 problems here:
First Problem:
My fontsize was changed and getting bigger, and i got error message refers to {\chaptertitlename \thechapter}{12pt}{}
You can see before and after removing Chapter N
in the following link below:
BEFORE REMOVING CHAPTER and AFTER REMOVING CHAPTER
This is my error message: link image Even though i\ve tried to place after \begin{document}
My Goal is i can remove Chapter N
using simple code, without any error messages, and not changes the fontsize that i've changed before that is 12pt.
Second Problem:
This is not actually a problem that i got after using my code as i said before, i mean it's another problem and i want to remove numbering N title chapter
on the TOC. Here is my current output. As you can see, there is a number in the front 1 BAB. 1 PENDAHULUAN
and i want to remove 1
on the front becomes BAB 1. PENDAHULUAN
like this output.
I really appreciate your answer. Please help me and Thanks in advance.
EDIT: This is my MWE
(Main tex file)
\documentclass[a4paper,12pt,oneside,openany]{book}
\usepackage{pgf, tikz}
\usepackage[a4paper, inner=4cm, outer=3cm, top=4cm, bottom=3cm]{geometry}
\usepackage[onehalfspacing]{setspace}
\usepackage{fancyhdr}
\usepackage{titlesec}
\usepackage{setspace}
\usepackage[titles]{tocloft}
\usepackage{tocbibind}
\usepackage{indentfirst}
\fancyhf{}
\cfoot{\thepage}
\linespread{1.5}
\pagestyle{plain}
\renewcommand\cftchapdotsep{\cftdotsep}
\titleformat{\chapter}[display]
{\normalfont\bfseries\centering}
{\chaptertitlename \thechapter}{12pt}{}
\titlespacing*{\chapter}{0pt}{10pt}{10pt}
\renewcommand{\contentsname}{DAFTAR ISI}
\renewcommand{\listtablename}{DAFTAR TABEL}
\renewcommand{\listfigurename}{DAFTAR GAMBAR}
\addtocontents{toc}{\protect\null\protect\hfill{Halaman}\protect\par}
\setlength\parindent{1.25cm}
\begin{document}
\clearpage
\thispagestyle{empty}
\frontmatter %
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\include{cover1}
\include{cover2}
\mainmatter %
\include{bab1}
\end{document}
(File: bab1)
\chapter{\textbf{BAB 1. PENDAHULUAN}}
%TEXT HERE
\section{Latar Belakang}
%TEXT HERE
\documentclass
and ends with\end{document}
and can reproduce your problem. By convention an example like that is called an MWE. – muzimuzhi Z Jul 31 '20 at 0:29