HI,
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
Page Layout ⇒ Formatting heading
-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
Formatting heading
I adapted this from the examples in fancyhdr's documentation, though there is one glitch in there in terms of the ordering of left and right...but this should do what you are asking:
The default is slanted text; if you want italicized text instead, uncomment the two lines above that are commented out.
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
This reply was helpful to me too.
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...
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
Great and thanks to the support team for their invaluable rapid response on Overleaf.
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 ===
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 ===