Page Layout ⇒ Formatting heading
Formatting heading
i am writing a thesis, the document class is one side, report.
I’m using fancyhdr package. i want the header shows the chapter number on the left side and the chapter name on the right side for example chapter one (one the left) and introduction (on the right).
can you help how to do that.
best,
Ali
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
Formatting heading

Code: Select all
\documentclass{report}
\usepackage{fancyhdr}
\usepackage{lipsum}
\pagestyle{fancy}
%\fancyhead[LE,RO]{\itshape\leftmark}
%\fancyhead[LO,RE]{\itshape\rightmark}
\renewcommand{\chaptermark}[1]{%
\markboth{\MakeUppercase{#1}}%
{\MakeUppercase{\chaptername~\thechapter.}}%
}
\begin{document}
\chapter{Introduction}
\lipsum[1-10]
\chapter{Hello!}
\lipsum[11-20]
\end{document}
Formatting heading
Please want to have the following on the PDF, but do not know how to include the 1.0 to appear automatically, I rather having to enter it manually and the text is never the same size as the 1.1.
Chapter 1
\textbf{1.0 Chapter Introduction:}\\ % This line show's the 1.0
Brief Definition: Setting the stage
\section{Social Power - Brief Definition and Concepts} % This line show the 1.1 with bolded text, automatically generated for the chapter.
The body of the chapter...
Formatting heading
The issue was resolved by placing the following at the beginning of each chapter, causing the chapter numbering to start at "0".
Solution:
\setcounter{section}{-1}
\section{Chapter Introduction:}
Result:
1.0 Chapter Intro:
Statement here...
1.1 Chapter heading title here...
statement and body of the chapter...
% === End result ===