# Special format for chapter title

I want to format my chapter title for example:

"Chapter one: Introduction"

I have a new command defined as the following:

\documentclass[a4paper,12pt] {report}
\usepackage{thesis_packages}

\newcommand{\ch}[2]{
\setcounter{chapter}{#1}
\setcounter{section}{0}
\chapter*{#2}}

\begin{document}

\include{introduction}
\end{document}

% introduction.tex
\ch{1}{Chapter One: Introduction}   \label{ch:intro}


For that, I need to write \ch{1}{Chapter One:intro} in the introduction.tex file. However,I receive an error says "undefined control sequence \ch{1}{Chapter One:intro}". The new command is defined in the main text file. I use report documentclass.

• Welcome to TeX SX! What have you tried? Which document class do you use? Jul 30 '17 at 21:34
• @n.a.s: The update does not really clearify the problem. Do you use a book - like class at all, that has the \chapter command?
– user31729
Jul 30 '17 at 22:03
• I am working on thesis, and I use report class. Jul 30 '17 at 22:04
• There's a } missing after \chapter*{#2}. The content of introduction is still hidden.
– user31729
Jul 30 '17 at 22:15
• The command you introduced is suicidal. Jul 31 '17 at 5:25

\documentclass[a4paper,12pt]{report}

\makeatletter
\newcommand{\inletters}[1]{\ifcase \csname c@#1\endcsname
zero\or one\or two\or three\or four\or five\or six\or seven\or
eight\or nine\or ten %complete here if you have more than 10 chapters
\else ??\fi}

{\parindent\z@ \raggedright \normalfont\Huge\bfseries
\ifnum \c@secnumdepth>\m@ne \@chapapp~\inletters{chapter}: \fi
#1\par\nobreak\vskip 40\p@}}

\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
{\@chapapp~\inletters{chapter}: #1}% <-- modification
\else
\fi
\chaptermark{#1}%
\if@twocolumn
\else
\fi}
\makeatother

\begin{document}

\chapter{Introduction}

In this chapter, ...

\section{First section}

\end{document}


• This will print one, two etc. any occurence where \thechapter is expanded, i.e. in the ToC or in a reference
– user31729
Jul 30 '17 at 23:39
• @Christian Hupfer: Thank you for the comment. This is corrected. Jul 31 '17 at 9:50
• I can't upvote again, however ;-)
– user31729
Jul 31 '17 at 9:51
• Thanks. How can I add the same chapter format in TOC? Jul 31 '17 at 10:05
• @user94293 I tried your suggestion, it shows only number of chapter and the title. I want it to be similar to "Chapter One: Introduction" for instance. The word chapter also should be included! Jul 31 '17 at 10:44

The new command \ch seems to be unnecessary. To do what you want automatically, there are two things you need.

First, you need to print the chapter number in words instead of the usual numerals. To do this, load the fmtcount package. This will provide you with \numberstring and \Numberstring commands (for lowercase and capitalized respectively) to print the current value of a counter in words.

\usepackage{fmtcount}


Second, you need to slightly change the format of the chapter headings to put it all on one line. I expect there's a package for this purpose out there, but it's quite easy to do it by redefining \@makechapterhead yourself:

\makeatletter
\raggedright \normalfont \ifnum \c@secnumdepth >\m@ne \Huge \bfseries
\@chapapp \space \Numberstring{chapter} : \fi #1\par \nobreak \vskip 40\p@ }}
\makeatother


Then in the body of the document, you can use the \chapter command normally:

\chapter{First Chapter}

This is Chapter One.


• +1 for the use of fmtcount Jul 30 '17 at 23:32
• Thanks so much Freind. Using fmtcount package is really helpful. The problem is when I use this code in my latex project, an error appears says" an extra \else in \include{introduction}. Also I don't want section numering to appear as "one.1 section name"? Jul 31 '17 at 8:52
• A \fi is missing before #1 in the definition of \@makechapterhead. Jul 31 '17 at 10:02
• @n.a.s Sorry, I think those problems are corrected now. The first was due to the missing \fi pointed out above. The second was caused by \thechapter being used by the section commands. Aug 1 '17 at 17:36

You simply can use the tools from titlesec which make formatting of section titles easy. What you want is the block style:

\documentclass[a4paper,12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{geometry}
\usepackage[letterspace=30]{microtype}
\usepackage{fmtcount}
\usepackage{titlesec}
\titleformat{\chapter}[block]{\Huge\bfseries\lsstyle}{\chaptername~\Numberstring{chapter}:}{0.333em}{}

\begin{document}

\chapter{Introduction}

In this chapter, ...

\end{document}


To have the same (almost ;o)) in the table of contents, you can use \titletoc. As it gives access to the string \thecontentslabel, you have to convert this string to a number before you can use the fmtcount commands. This is done with one of the commands ending in num (\Numberstringnum, \numberstringnum, &c.):

\documentclass[a4paper,12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{geometry}
\usepackage[letterspace=30]{microtype}
\usepackage{fmtcount}
\usepackage{titlesec, titletoc}
\titleformat{\chapter}[block]{\Huge\bfseries\lsstyle}{\chaptername~\Numberstring{chapter}:}{0.333em}{}

{}{\hfill\contentspage}

\begin{document}

\tableofcontents
\chapter{Introduction}

In this chapter, ...

\end{document}


• Thanks Bernad. This code works perfectly, but when I paste the line[\titleformat{\chapter}[block]{\Huge\bfseries\lsstyle}{\chaptername~\Numberstring{chapter}:}{0.333em}{}] into my main text file, I get an error: "undefined control sequence \chapter{introduction}".? Jul 31 '17 at 8:49
• I used \titleformat[hang], and it works!. Thanks a lot. I will accept this as an answer. Jul 31 '17 at 9:20
• hang is the default. The difference with block can be seen only with multilined titles. Actually, you're right, it's better than blockfor flushleft titles. The latter should be used for centred or flushright titles. Jul 31 '17 at 9:49
• Spacing lowercase? Oh, no! ;-) Jul 31 '17 at 9:54
• @egreg: I think for very big sizes in boldface, this is tolerable. I don't like so much kerning in big titles, but I don't know how to deactivate it, so letter spacing is a work-around – which I use very sparingly… Jul 31 '17 at 10:01

For reference/just for fun, here is how you can accomplish this in ConTeXt.

\setuphead
[chapter]
[conversion=Word,
numbercommand=\NUMBERCOMMAND,
style=\bfd]
\define[1] \NUMBERCOMMAND
{Chapter #1:}

\starttext
\chapter{Introduction}
In this chapter, \periods
\stoptext

• @9tTn98, can you please upvote the question if you find it useful? Thanks Jul 9 '18 at 12:47