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
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
-
- 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 ===