Page LayoutHeader with Chapter*

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
GenisToii
Posts: 19
Joined: Sat Nov 05, 2011 8:51 pm

Header with Chapter*

Post by GenisToii »

Hi!

I'll wanna ask some things about pagestyle{fancy}, precisly about the headings.

I'll would like to know how to make a heading with the title of each chapter and chapter* whitout "Chapter 1. NAME OF THE CHAPTER" only with "NAME OF THE CHAPTER". I think it can does changing the command \leftmark, but I don't know how.

Also I would like that teh pages that begins with the command \chapter also have the heading because in these ones the heading usually desappears.
Last edited by GenisToii on Tue Jan 10, 2012 11:44 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.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Header with Chapter*

Post by Stefan Kottwitz »

Hi,
GenisToii wrote:I'll wanna ask some things about pagestyle{fancy}, precisly about the headings.
precise is very good! Perhaps show a small compilable code example, with document class and packages and settings you use, so we can precisely solve it.
GenisToii wrote:I'll would like to know how to make a heading with the title of each chapter and chapter* whitout "Chapter 1. NAME OF THE CHAPTER" only with "NAME OF THE CHAPTER". I think it can does changing the command \leftmark, but I don't know how.
It could mean redefing \chaptermark, or something else, depending on your code.
GenisToii wrote:Also I would like that teh pages that begins with the command \chapter also have the heading because in these ones the heading usually desappears.
That's a common style. The first page of a chapter commonly doesn't have such a heading. Perhaps because the heading would contain the same title as the chapter heading already shows - why repeat it? Just have a look at chapter pages in good books.

Otherwise, you could redefine the plain page style.

Stefan
LaTeX.org admin
GenisToii
Posts: 19
Joined: Sat Nov 05, 2011 8:51 pm

Header with Chapter*

Post by GenisToii »

Stefan_K wrote: precise is very good! Perhaps show a small compilable code example, with document class and packages and settings you use, so we can precisely solve it.
I can't put all my .tex but I will present my preamble:

Code: Select all

\documentclass[11pt]{report}

\usepackage[catalan]{babel}
\usepackage[utf8]{inputenx}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{mathrsfs}
\usepackage{amsmath}
\usepackage{enumerate}    %Enumeraciones
\usepackage{makeidx}      %Crean indices personalizables
\usepackage{spverbatim}   %Verbatim que respecta las lineas (no poner junto a verbatim en un documento)
\usepackage{multicol}     %Espacios unidos en una tabla
\usepackage{titlesec}
\usepackage[pdftex]{graphicx}

%Formato de la hoja (Nadia)
%---------------------------------------------------------------------------------------------------
\evensidemargin -0.3cm \oddsidemargin -0.2cm \topmargin -2cm \textwidth 16.5truecm \textheight 24truecm
%---------------------------------------------------------------------------------------------------

\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{0pt}{\Huge}
\titlespacing*{\chapter}{0pt}{-10pt}{10pt}

\usepackage{fancyhdr} % activamos el paquete
%\usepackage{titlesec}
\pagestyle{fancy} % seleccionamos un estilo
\lhead{Integrals} % texto izquierda de la cabecera
%\chead{TEXTO} % texto centro de la cabecera
\rhead{\leftmark} % número de página a la derecha
%\lfoot{TEXTO} % texto izquierda del pie
\cfoot{\thepage} % imagen centro del pie
%\rfoot{TEXTO} % texto derecha del pie
Stefan_K wrote: It could mean redefing \chaptermark, or something else, depending on your code.
Thanks for the suggestion but my problem is that I don't know how! Also the most important to me is the fact that the headings accept as chapter as chapter*!
Stefan_K wrote: That's a common style. The first page of a chapter commonly doesn't have such a heading. Perhaps because the heading would contain the same title as the chapter heading already shows - why repeat it? Just have a look at chapter pages in good books.
Otherwise, you could redefine the plain page style.
Yes, i know it's really freak, but it's for a school project and my teachers ask me in that mode. If it's to difficult to do, don't worry I'll be fine.

My most terrible problem it's to redefine all these commands because I don't know how. I'm sorry to ask so useless things but if there's some how to do it, it would be wonderful!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: Header with Chapter*

Post by Stefan Kottwitz »

For the chapter pages you can use \fancypagestyle{plain}{}, explained in the fancyhdr documentation. Regarding this and those unnumbered headings, I guess I can have a look at it tomorrow, now it's just too late here,

Stefan
LaTeX.org admin
Post Reply