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
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – CarLaTeX Oct 2 '17 at 8:19
0

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.

  • @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 '17 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 '17 at 17:31

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.