0

For example, using \chapter{INTRODUCTION} will be printed as

1 INTRODUCTION...............x

I want to remove the number 1 behind the chapter, so the output on the ToC would be:

INTRODUCTION................x

Note: x is a page number.

My MWE is :

\documentclass{a4paper, 12pt, oneside, openany}{book}
\usepackage[a4paper, inner=4cm, outer=3cm, top=4cm, bottom=3cm]{geometry}
\usepackage{blindtext}

\begin{document}

\tableofcontents

\chapter{Chapter 1. INTRODUCTION}
\section{Section Name}
\blindtext
\section{Section Name}
\blindtext
\chapter{Chapter 2. BACKGROUND}
\section{Section Name}
\blindtext
\section{Section Name}
\blindtext

\end{document}
11
  • 2
    Is the introduction still expected to have a number in the text? Or should it be gone in both cases? BTW: you're missing a } after book – daleif Jul 31 '20 at 9:40
  • @daleif Thanks for the correction. In the text, it should be shown as Chapter 1. INTRODUCTION as well. (No number behind the title). – user516076 Jul 31 '20 at 9:43
  • 2
    Your document confuses me a lot. Why are you writing Chapter 1, Chapter 2 by hand? That makes no sense. – daleif Jul 31 '20 at 10:08
  • @daleif yea. I won't use \chapter*{...} because it makes the first section start with 0.1, 0.2 .... instead of 1.1, 1.2, 1.3. And an easy way to get 1.1, 1.2, 1.3 is using \chapter{...} and writing chapter by hand. – user516076 Jul 31 '20 at 10:16
  • And actually i about to use \section*{...} to avoid the zero starts. But that's a bad idea cuz it's not automatic and another reason. I just want to remove that number behind the title of chapter, that's all. Please help me. – user516076 Jul 31 '20 at 10:22
1

You can influence the appearance of the titles in the table of contents with the titletoc package. This allows you to remove the number.

The command for this is \titlecontents. See the comments in the code below for a description of the arguments of this command. See also the package documentation.

MWE (note that I removed the manual 'Chapter n.' parts of the \chapter commands):

\documentclass[a4paper, 12pt, oneside, openany]{book}
\usepackage[a4paper, inner=4cm, outer=3cm, top=4cm, bottom=3cm]{geometry}
\usepackage{blindtext}
\usepackage{titletoc}
\titlecontents{chapter}% redefine chapter toc appearance
[1.5em]% left margin
{}% code before starting the title, here empty
{\hspace*{-2.3em}\bfseries}% format: shift a bit left and boldface, no number
{\hspace*{-2.3em}\bfseries}% format for \chapter*, not really needed for the MWE but added for completeness
{\titlerule*[1pc]{.}\contentspage}% dotted line and page number

\begin{document}

\tableofcontents

\chapter{INTRODUCTION}
\section{Section Name}
\blindtext
\section{Section Name}
\blindtext
\chapter{BACKGROUND}
\section{Section Name}
\blindtext
\section{Section Name}
\blindtext

\end{document}

Result in TOC:

enter image description here

In the document:

enter image description here

If you also want to change the appearance in the document then you can use the titlesec package which is closely related to titletoc with very similar syntax. The command for changing the title in the document is \titleformat. See the comments in the code below for a description of the arguments of this command.

\documentclass[a4paper, 12pt, oneside, openany]{book}
\usepackage[a4paper, inner=4cm, outer=3cm, top=4cm, bottom=3cm]{geometry}
\usepackage{blindtext}
\usepackage{titlesec}
\usepackage{titletoc}
\titlecontents{chapter}% redefine chapter toc appearance
[1.5em]% left margin
{}% code before starting the title, here empty
{\hspace*{-2.3em}\bfseries}% format: shift a bit left and boldface, no number
{\hspace*{-2.3em}\bfseries}% format for \chapter*, not really needed for the MWE but added for completeness
{\titlerule*[1pc]{.}\contentspage}% dotted line and page number

\titleformat{\chapter}% change format of chapter in the document
{\huge\bfseries}% huge font and bold
{Chapter \thechapter}% the word Chapter followed by the chapter number
{1em}%horizontal space between 'Chapter n' and the chapter title
{}% code after the title, here empty

\begin{document}

\tableofcontents

\chapter{INTRODUCTION}
\section{Section Name}
\blindtext
\section{Section Name}
\blindtext
\chapter{BACKGROUND}
\section{Section Name}
\blindtext
\section{Section Name}
\blindtext

\end{document}

The TOC is the same, but in the document a chapter is now as follows:

enter image description here

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.