Page LayoutHow to delete "Chapter [number]"

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
ffarr
Posts: 28
Joined: Sat Apr 23, 2011 6:00 pm

How to delete "Chapter [number]"

Post by ffarr »

Hello,
I'd like to create chapters without showing the initial sentence "Chapter 1" ecc both in the page and in the header.
How can I do it?

Many thanks
Last edited by ffarr on Sun Apr 24, 2011 1:07 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to delete "Chapter [number]"

Post by localghost »

There's also \chapter* as sectioning command. Note that there will be no entry in the Table of Contents (ToC).


Best regards and welcome to the board
Thorsten
ffarr
Posts: 28
Joined: Sat Apr 23, 2011 6:00 pm

How to delete "Chapter [number]"

Post by ffarr »

localghost wrote:There's also \chapter* as sectioning command. Note that there will be no entry in the Table of Contents (ToC).


Best regards and welcome to the board
Thorsten
I see. It works, but the title of the chapter doesn't appear in the header, wich I'd like to..
To make my issu clear:

\chapter{The beginning}

prints out:

Chapter 1
The beginning

in the page and: CHAPTER 1. THE BEGINNING, in the header..

Is there any way to maintain "The beginning" in the header, deleating "Chapter 1"?

By the way: is it possible to avoid capital letters in the header?

Oh, thank you for the greetings :)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to delete "Chapter [number]"

Post by localghost »

ffarr wrote:[…] It works, but the title of the chapter doesn't appear in the header, wich I'd like to. […]
Oh, a little misunderstanding. Now I see. Also no chapter number? That would be quite confusing and I think you at least keep this.

A quick solution would be to migrate the document to a class of the KOMA Script bundle and use its \addchap command. Perhaps memoir has similar features
ffarr wrote:[…] By the way: is it possible to avoid capital letters in the header? […]
For customized headers you can take a look at fancyhdr or titlesec. The latter one would also allow a full customization of chapter styles. But for more we first should clarify my above question.
ffarr
Posts: 28
Joined: Sat Apr 23, 2011 6:00 pm

Re: How to delete "Chapter [number]"

Post by ffarr »

Ok I'll have a look. My opera is not a regular book. It's divided in 3 huge chapters, so I don't need chapter numbers, but I do need chapter titles in the header, so you always know where you are.

So, it has to be like this:

Chapter title [in the page]

and

Chapter title [in the header]

Just plain, like this, without "Chapter" and chapter numbers.
Thanks for the help, I'll read through the links you advice me.

(by the way: I'm quite new at LaTex, so if you can try to make things as clear as possible :P)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: How to delete "Chapter [number]"

Post by localghost »

One last question I forgot. What about the ToC entries? Are the chapters going to appear with or without chapter number in the Table of Contents? And is the document single- or double-sided? (OK, I admit these are two questions).
ffarr
Posts: 28
Joined: Sat Apr 23, 2011 6:00 pm

How to delete "Chapter [number]"

Post by ffarr »

localghost wrote:One last question I forgot. What about the ToC entries? Are the chapters going to appear with or without chapter number in the Table of Contents? And is the document single- or double-sided? (OK, I admit these are two questions).
I don't mind the number of the chapters in the table of contents.
I'm using the default {book} class right now. I will change the layout (dimension of the page, padding etc) later. So yes, it's 2 sided, I'm not going to change that, because it has to be like that.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to delete "Chapter [number]"

Post by localghost »

ffarr wrote:I don't mind the number of the chapters in the table of contents. […]
That makes things a little bit easier.
ffarr wrote:[…] I'm using the default {book} class right now. I will change the layout (dimension of the page, padding etc) later. So yes, it's 2 sided, I'm not going to change that, because it has to be like that.
Ok, that is enough information for an appropriate document setup.

Code: Select all

\documentclass[11pt,a4paper,twoside,english]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[%
  headheight=14pt,
  includehead,
  nofoot
]{geometry}
\usepackage{babel}
\usepackage[raggedright,pagestyles]{titlesec}
\usepackage{blindtext}

\newpagestyle{main}{%
  \sethead[\thepage][][\chaptertitle]{\chaptertitle}{}{\thepage}
  \headrule
}
\pagestyle{main}

\titleformat{\chapter}{\normalfont\huge\bfseries}{}{0pt}{\Huge}

\begin{document}
  \tableofcontents
	
  \blinddocument
\end{document}
Neglect the formatting of the sections since you are only interested in the chapters. Note that the blindtext package is only for creating the dummy document thus not part of solution.
ffarr
Posts: 28
Joined: Sat Apr 23, 2011 6:00 pm

Re: How to delete "Chapter [number]"

Post by ffarr »

This is simply perfect. Thank you SO much!
;)
Post Reply