TransWikia.com

LaTeX report class - Removing the word 'Chapter' but keeping the numbering

TeX - LaTeX Asked by Baran Karakus on November 26, 2020

I’m writing a LaTeX document using the report document class.

By default, when a new chapter is initiated, say with the title ‘Introduction’, it is presented on a new page in the following manner:

Chapter 1

Introduction

In the Table of Contents, this appears as ‘1. Introduction’.

I would like the chapters to instead be presented as

  1. Introduction

But, I would also like to keep the form in the ToC, i.e. ‘1. Introduction’.

I have tried applying renewcommand{chaptername}{}, which has removed the ‘Chapter’ heading. However, the Chapters are then presented with just their title, i.e. ‘Introduction’. If I manually change these titles to ‘1. Introduction’ etc, they appear as ‘1. 1. Introduction’ in the ToC.

Could anybody please advise me on how to do this? 🙂

Thanks!

One Answer

You may use the titlesec package and documentation. The following command should allow you to achieve such formating:

titleformat{〈command〉}[〈shape〉]{〈format〉}{〈label〉}{〈sep〉}{〈before-code〉}[〈after-code〉]

  • 〈command〉 is the sectioning command to be redefined, i. e., part, chapter, section, subsection, subsubsection, paragraph or subparagraph.
  • The paragraph shape is set by 〈shape〉.
  • 〈format〉 is the format to be applied to the whole title—label and text.
  • The label is defined in 〈label〉. You may leave it empty if there is no section label at that level, but this is not recommended because by doing so the number is not suppressed in the table of contents and running heads.
  • 〈sep〉 is the horizontal separation between label and title body and must be a length (itmust not be empty).
  • 〈before-code〉 is code preceding the title body.
  • 〈after-code〉 is code following the title body.

This is my suggestion:

titleformat{chapter}[display]{normalfontLARGEbfseries}{}{1em}{thechapter.~}

Answered by m.dec on November 26, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP