0

I would like to modify title chapter from vertical shape to horizontal with : based on titlesec package within book class, for example:

                         CHAPTER 1:   INTRODUCTION

and make it appear in the Table of Contents with bold number as:

   CHAPTER1: INTRODUCTION                                      1

Moreover, I have problem with adding : in List of Figures as:

Figure 1.1:

The following code for vertical space between chapter number and chapter title:

\usepackage{titlesec}
% chapters
\titleformat{\chapter}[display]
{\filcenter\bfseries}
{\fontsize{20pt}{15pt}\selectfont\MakeTextUppercase{\chaptername{}\space
 \if@chapnumwords\formatchapnum{chapter}
 \else\thechapter\fi}}
{-1em}
{\begingroup\singlespacing\bfseries\fontsize{20pt}{15pt}\selectfont\MakeTextUppercase}
[\endgroup]

%\titlespacing*{\chapter}{0pt}{*-4.5}{*6}
\titlespacing*{\chapter}{0pt}{-50pt}{\baselineskip}

we implicitly get:

                              CHAPTER 1   
                            INTRODUCTION
1
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
    – CarLaTeX
    Oct 2, 2017 at 8:19

1 Answer 1

1

Use the block style. This code should do what you want for chapter headings:

\titleformat{\chapter}[block]
{\filcenter\bfseries\fontsize{20pt}{15pt}\selectfont}
{\MakeTextUppercase{\chaptername{}\space
 \if@chapnumwords\formatchapnum{chapter}
 \else\thechapter\fi}}
{1em}
{\begingroup\singlespacing\MakeTextUppercase}
[\endgroup]

As to the table of contents, you can do what you want with the titletoc package.

2
  • @Work: I didn't test the code, as you didn't post a full compilable example. The begingroup .. \endgroup construction is to limit the singlepacing directive scope?
    – Bernard
    Oct 3, 2017 at 17:25
  • +1 , Many thanks. but give error with {\begingroup\singlespacing\MakeTextUppercase} [\endgroup], so its replace by {\begin{singlespace}\MakeUppercase} [\end{singlespace}]. Also, give me error. do you have idea to fix it without replace with {}. thanks again.
    – workwolf
    Oct 3, 2017 at 17:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .