I face a problem with my table of contents: The look of my first chapter heading is


produced with the following code



\usepackage{indentfirst} % to make indent from first paragraph

      {\centering\normalfont\large\bfseries}{ \chaptertitlename\ \thechapter}{40pt}{\large}

\end {document}

But, in the table of contents "CHAPTER ONE" and "INTRODUCTION" do not appear in one line:

enter image description here

So, the question is: How can I have "CHAPTER ONE" and "INTRODUCTION" in one line?

  • Please post a full MWE.
    – Ingmar
    Dec 6, 2013 at 13:12
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. The usual way to this would be to let your command accept an optional argument for the title as it should appear in the table of contents and running heads. This is what the standard \chapter command does. (In memoir there are two optional arguments, one of each of the uses.) Dec 6, 2013 at 13:32
  • Many thanks Andrew, But i didn't get it . how can i put chapter one and introduction which CONTENTS in one line Dec 6, 2013 at 14:04
  • Why do you need the custom chapter command in the first place? It seems to me that there might be a better way to do what want to achieve with the custom command, and if so, your current problem might not arise.
    – Alan Munn
    Dec 6, 2013 at 14:14

1 Answer 1


The heading elements end up in two lines because you tell them to be in two lines (i.e. \\ is responsable for that). The problem is that your \mychapter macro lacks a certain ability that standard commands of LaTeX have:

Normally in LaTeX the sectioning commands have an optional argument that take the heading which will be written to the ToC. If it is not specified the heading given in the mandatory argument will be written to the ToC. (This is what @AndrewSwann tried to explain to you in his comment.)

Although it is not clear to me how you profit from defining the \mychapter macro, you could add the above described functionality by saying:


Note that I swapped your parameter design a little. You can now use your macro like \mychapter[CHAPTER ONE INTRODUCTION]{CHAPTER ONE\\INTRODUCTION}{1} -- just to summarize: in general the synopsis is

\mychapter[<ToC heading>]{<body heading>}{<chapter number>}

where <body heading> is equal to <ToC heading> if the optional argument is not given.

  • If i want to do the same thing also for figure , Please can you show me the code Dec 7, 2013 at 13:10
  • Please specify what do you exactly mean. The list of figures? And what is the concrete situation? You may also just ask another question on this site.
    – Ruben
    Dec 7, 2013 at 18:16

You must log in to answer this question.

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