1

I have two unnumbered chapters in my document (report class). The Introduction which is the second chapter in the whole document and the Conclusion which is the penultimate one (just before the Bibliography).

While the same line of code works for the penultimate chapter, making its header appear properly on top the page, it has no effect on the Introduction chapter, leaving it without a header. This is my code so far:

% ----------------------------------------------------------------
\documentclass[12pt]{report}
\usepackage[english]{babel}
\usepackage{amsmath,amsthm}
\usepackage{amsfonts}
\usepackage[a4paper, total={6 in, 9in}]{geometry}
\usepackage[outdir=./]{epstopdf}
\usepackage[ruled]{algorithm2e}
% -------------------------------------------------------
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[l]{\fontsize{6} \ifnum\value{chapter}>0  \nouppercase{\rightmark} \fi}
\cfoot{ \thepage}
\begin{document}
\tableofcontents
\chapter*{Abstract}%
FOO 
\addcontentsline{toc}{chapter}{\numberline{}Abstract}%
\chapter*{Introduction}%
\addcontentsline{toc}{chapter}{Introduction} \markboth{}{Introduction}
BAR
\chapter*{Concluding Remarks}%
    \addcontentsline{toc}{chapter}{\numberline{}Conclusion}\markboth{}{Summary and Conclusion}
TEXT
\end{document}
2

1 Answer 1

1

Your main issue is that the instruction

\fontsize{6}

is syntactically invalid: \fontsize takes two arguments, not one. It should probably be

\fontsize{6}{7.5}\selectfont

Usually, the second argument of \fontsize is chosen to be 20% to 25% larger than the first.

A secondary issue is that the report document class uses the plain page style for pages that contain chapter-level headers. To override this, in view of the fact that you use the fancyhdr package, you should follow the instructions in section 7 of the package's user guide, i.e., use the \fancypagestyle macro to redefine the plain page style. That's what's done in the following example.

\documentclass[12pt]{report}
\usepackage[english]{babel}
\usepackage{amsmath,amsthm,amsfonts}
\usepackage[a4paper, total={6in,9in}]{geometry}
\usepackage[T1]{fontenc}

\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[l]{%
    \fontsize{6}{7.5}\selectfont%
    \ifnum\value{chapter}>0\nouppercase{\rightmark}\fi}
\cfoot{\thepage}

% redefine 'plain' page style to match 'fancy' style
\fancypagestyle{plain}{%
\fancyhf{}
\fancyhead[l]{%
    \fontsize{6}{7.5}\selectfont%
    \ifnum\value{chapter}>0\nouppercase{\rightmark}\fi}
\cfoot{\thepage}}

\begin{document}
\tableofcontents

\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}
\markboth{}{Abstract}
FOO 

\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction} 
\markboth{}{Introduction}
BAR

\chapter*{Concluding Remarks}
\addcontentsline{toc}{chapter}{Conclusion}\markboth{}{Summary and Conclusion}
TEXT

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .