Text Formattingtitle page&fancyhdr: hide title, but keep page number

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
udiubu
Posts: 2
Joined: Fri Nov 01, 2013 1:00 pm

title page&fancyhdr: hide title, but keep page number

Post by udiubu »

Dear all,

Book world.

For my diss, I would like to have headers on chapter/title pages as well (Contents included), but I would like to hide the chapter name, and just keep the page number. This will prevent repetitions. From the second page onwards, classical heading applies (chapter/session name + page number).

I attach relevant coding:

Code: Select all

\usepackage{fancyhdr}
\setlength{\headheight}{15.2pt}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{
\markboth{\thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]{
\markright{\thesection.\ #1}}
\lhead[\thepage]{\leftmark}
\rhead[\rightmark]{\thepage}
\fancyfoot[C]{} %remove page number from footer
\makeatletter %insert header on title pages
\let\ps@plain\ps@fancy
\makeatother

\begin{document}  %__________


\pagestyle{fancy}
\begin{doublespace}
\pagenumbering{roman}
\tableofcontents
\end{doublespace}
\clearpage

  
\mainmatter
\pagenumbering{arabic}

\chapter{Lorem Ipsum}

Lorem Ipsum 

\end{document}
So far nothing good came out.

Any help would be highly appreciated.

Sincerely,

Udiubu

Recommended reading 2024:

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

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

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

title page&fancyhdr: hide title, but keep page number

Post by localghost »

Just for information to other users for awareness of possibly already existing solutions. The question has also been posted to {TeX} SX. Please read what our administrator thinks about that.
Board Rules wrote:A crossposting is always contra-productive. But there is nothing really against it as long as it is mentioned. This means that a direct link has to be added. So other users who want to help are preserved from double efforts and waste of time.
Such kind of x-posting without notification represents a direct violation of our rules and has to be prevented absolutely in future questions.
Post Reply