I am currently writing my final master thesis in tex. I am stuck up in the following place. Firstly I have a chapter called Introduction which is not numbered. In the table of contents page, the introduction page starts with a different page number than 1. Ex:

Next problem is in the introduction chapter. The heading is different from what it supposed to be. In my template, the first page of the chapter only has a header line with page number and the subsequent pages have the chapter name as header. In this case it is throwing up something else. Ex.

and this is the next page

How to resolve this ?

The third problem is in the table of contents as shown in the figure, "Acknowledgements" and "Abstract" have been assigned some roman numbers. But actually there are no page numbers in the respective tex files. How to set page numbering for these two pages and also incorporate the same in the table of contents. I am also attaching my code in the main file thesis.tex so that it is helpful:

\documentclass[oneside,a4paper,12pt]{book}
% Start Global Settings
%\usepackage{epigraph}
\usepackage{attrib}
\usepackage{amssymb}
\usepackage{amsmath}
%\usepackage{abstract}
\usepackage{amsthm}
\usepackage{mathrsfs}
\usepackage{float}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amsfonts}
\usepackage{geometry}
\usepackage{braket}
\usepackage{array,booktabs}
\usepackage[dvipsnames]{xcolor}
%\usepackage[svgnames]{xcolor}
\usepackage{sectsty}
\usepackage[titletoc]{appendix}
%\usepackage{nath}
%\usepackage{w}
%\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
%use color for the document
\usepackage{color}
%for allowing word-wrap around images.
\usepackage{floatflt}
\usepackage{graphicx}
\usepackage{fontspec}
%\usepackage{xunicode}
%\usepackage{xltxtra}
\usepackage{polyglossia}
\setmainlanguage[variant=british]{english}
\setotherlanguage{sanskrit}
%\font\serif="FreeSerif:script=beng"
\newfontfamily\devanagarifont[Script=Devanagari]{Lohit Devanagari}
\usepackage{subfigure}
%Indent the first line of the first paragraph after each section heading.
\usepackage{indentfirst}
\usepackage[plainpages=false]{hyperref}
\usepackage{url}
\usepackage{amsmath}
\setcounter{secnumdepth}{4} %By doing this, we allow subsubsubsections to be numbered :)
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}

\fancypagestyle{mystyle}{
\fancyhf{} % delete current setting for header and footer
\renewcommand{\footrulewidth}{1pt}
\fancyfoot[L]{\bfseries \it{\bfseries{}}}       %footer here
}

%   %LOOKS LIKE THE FANCY HEADER USES PLAIN FANCYPAGESTYLE FOR THE FIRST PAGE OF EACH CHAPTER.
\fancypagestyle{plain}{
\renewcommand{\footrulewidth}{1pt}
\fancyfoot[C]{\bfseries \thepage}
}

\fancypagestyle{empty}
{
\fancyhf{}
\renewcommand{\footrulewidth}{0pt}
}
%End Global Settings

%\setlength{\topmargin}{-0.3in}
%\setlength{\topskip}{0.3in}    % between header and text
\setlength{\textheight}{8.4in} % height of main text
%\setlength{\textwidth}{5.8in}    % width of text
%\setlength{\oddsidemargin}{0.75in} % odd page left margin
%\setlength{\evensidemargin}{0.75in} % even page left margin

\begin{document}
\nocite{*}
\pagestyle{empty}

\input{Title.tex}
% !TeX program = xelatex
\input{dedication2.tex}
\input{Tribute.tex}
\input{dedicate.tex}
\input{SSSUCertificate.tex}
\input{Declaration.tex}
\frontmatter
\pagestyle{plain}
\tableofcontents
\pagenumbering{roman}
\listoffigures
\input{Ack.tex}
\input{Abstract.tex}
%\listoftables
\mainmatter
\pagestyle{mystyle}
%\chapterfont{\color{Aquamarine}}
%\sectionfont{\color{MidnightBlue}}
%\subsectionfont{\color{RedViolet}}
%input your tex files using the input command
\input{intro.tex}
\input{chapter1.tex}
\input{chapter2.tex}
\input{chapter3.tex}
\input{chapter4.tex}

\bibliographystyle{plain}
%create a bibiliograpgy file using jabref and input the file name below. In this case it is refs.bib
\bibliography{refs}
\end{document}


thanks for the help and suggestions.

The first issue should be solvable by using the following after starting your mainmatter:

\setcounter{page}{1}


This resets the page number.

For the second issue, I would use the titlesec package to set the pagestyle of the chapter page:

\assignpagestyle{\chapter}{plain}


This is necessary as the \chapter sets the plain pagestyle by default.

• If \mainmatter would be used, the problem wouldn't occure. This is probably due to using \pagenumbering . The pagestyle matter is dealt with in the example code but probably overridden later. Nobody knows. – Johannes_B Mar 19 '16 at 14:10
• As far as I can see, \mainmatter is used in the code posted? – Vidar Mar 19 '16 at 14:24
• Oh yes, i am sorry. The manual toc entry is added at the wrong place. – Johannes_B Mar 19 '16 at 14:27
• Also, while I see that the chapter style is attempted dealt with in the code, the titlesec package might have more robust implementation? At least it has worked well for me for this issue in the past. – Vidar Mar 19 '16 at 14:27
• For the third issue: Open up a new question. Generally we have one question, one issue. – Johannes_B Mar 21 '16 at 6:28