0

I am writing my thesis, and have encountered a problem with fixing the margins. I am required to have the page numbers on top for the main text (arabic) and roman page numbers on the bottom for the front matter. I am also required a special style for chapter header as shown in the example below. The page number shouldn't appear in the page that has the chapter head. I achieved the above using fancyheader and changing the chapter head style, but now I can't get the margins right. I am required to have 1.25in margin in each side, but I can't get the correct measurement for the top margin. The margin seems to change for the pages with chapter head vs. the pages that only contain text. Here is the example code:

\documentclass[reqno,12pt,oneside]{report}
\usepackage{titlesec}
\usepackage{fancyhdr}
\usepackage{titletoc,setspace}
\usepackage[left = 1.25in, right = 1.25in, top = 1.25in, bottom = 1.25in]{geometry}
\renewcommand{\contentsname}{TABLE OF CONTENTS}
\renewcommand{\listfigurename}{LIST OF FIGURES}
\renewcommand{\listtablename}{LIST OF TABLES}
\renewcommand{\bibname}{REFERENCES}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Customize chapter head
\makeatletter
\renewcommand*\@makechapterhead[1]{
 {\parindent 0pt \raggedright
  \ifnum \c@secnumdepth >\m@ne
  %\centerline{\large\bf \@chapapp{} \thechapter} %\par
  \begin{singlespace}
  \huge\bf \@chapapp{} \hspace{1pt} \thechapter
  \huge\bf : \hspace{1pt} #1
  \nobreak \vskip 0.25in
  \end{singlespace}
 }}

\renewcommand*\@makeschapterhead[1]{%
   {\parindent \z@ \raggedright
     \normalfont
     \interlinepenalty\@M
     \Large \bfseries  \centerline{#1}\par\nobreak
     \vskip 40\p@
   }} 
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\titlecontents*{chapter}
  [0pt]% <left>
  {}% <above-code>
  {\bfseries\chaptername\ \thecontentslabel\quad}% 
  {}% <numberless-entry-format>
  {\bfseries\hfill\contentspage}% <filler-page-format>
%First pages pagenumbers%%%%%%%%%%%%%%%%%%%%%
\fancypagestyle{plain2}{
\fancyhf{}
\fancyfoot[C]{\thepage}
%\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
%\setlength\headheight{50pt}
\setlength{\headsep}{0.25in}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\doublespacing
\title{
    {Thesis Title}\\
    {\large Institution Name}\\}
\begin{document}
\maketitle
\thispagestyle{empty}
\pagestyle{plain2}
\pagenumbering{roman}
\newpage
\hbox{ }
 \vfill
\begin{center}
   \bf{~\textcopyright \hspace{0.05in} COPYRIGHT BY} \\
   \bf{Name} \\
   \bf{2018} \\
   \bf{All Rights Reserved}
  %\end{singlespace}
 \end{center}
 \vfill
\newpage
\begin{center}
 \large
\textbf{DEDICATION}\\
 \textit{text}
\end{center}
\clearpage
\tableofcontents
\listoffigures
\listoftables

\chapter{CHAP1}
        %%%%%%%%%%%%%%%%%%%%puts page number on top%%%%%%%%%%%%%%%%

\fancypagestyle{plain}{
 \fancyhf{}
\fancyhead[C]{\thepage}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
%\setlength\headheight{50pt}
}

\pagestyle{plain}
\thispagestyle{empty}
\pagenumbering{arabic}
some text.
\section{a}
some text.
\clearpage
some other text, some other text .
\end{document}

Thanks in advance.

3
  • Welcome to TeX SX! Why do redefine chapter heads this way, since you load titlesec?
    – Bernard
    Commented Jan 9, 2018 at 23:29
  • @Bernard I couldn't get it the way I want using titlesec
    – H_A
    Commented Jan 9, 2018 at 23:45
  • unrelated to the question but \bf (which is a legacy command rather deprecated in latex2e) doesn't take an argument so \bf{~\text...} makes the rest of the center environment bold, and teh following \bf do nothing. Commented Jan 10, 2018 at 0:17

1 Answer 1

0

This seems to do what you want, with titlesec, and titleps in the place of fancyhdr.

\documentclass[reqno,12pt,oneside]{report}
\usepackage[pagestyles]{titlesec}
\usepackage{fancyhdr}
\usepackage{titletoc,setspace}
\usepackage[left = 1.25in, right = 1.25in, top = 1.35in, bottom = 1.25in, headheight = 0.12in, showframe]{geometry}
\renewcommand{\contentsname}{TABLE OF CONTENTS}
\renewcommand{\listfigurename}{LIST OF FIGURES}
\renewcommand{\listtablename}{LIST OF TABLES}
\renewcommand{\bibname}{REFERENCES}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\titleformat{\chapter}{\thispagestyle{empty}\bfseries\huge\filright}{\chaptername\enspace\thechapter:}{1em}{}
\titlespacing{\chapter}{0pt}{-0.60in}{0.25in}
\titleformat{name = \chapter, numberless}{\bfseries\Large\filcenter}{}{0em}{}
\titlespacing{name = \chapter, numberless}{0pt}{-0.5in}{0.25in}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\titlecontents*{chapter}
  [0pt]% <left>
  {}% <above-code>
  {\bfseries\chaptername\ \thecontentslabel\quad}%
  {}% <numberless-entry-format>
  {\bfseries\hfill\contentspage}% <filler-page-format>
%%%%%%%%%%%%%%%%%%%%%%%
\newpagestyle{plaintop}{%
\sethead{}{\thepage}{}
\setfoot{}{}{}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\doublespacing
\title{
    {Thesis Title}\\
    {\large Institution Name}\\}
\begin{document}
\maketitle
\thispagestyle{empty}
\pagenumbering{roman}
\newpage
\hbox{ }
 \vfill
\begin{center}
   \bf{~\textcopyright \hspace{0.05in} COPYRIGHT BY} \\
   \bf{Name} \\
   \bf{2018} \\
   \bf{All Rights Reserved}
  %\end{singlespace}
 \end{center}
 \vfill
\newpage
\begin{center}
 \large
\textbf{DEDICATION}\\
 \textit{text}
\end{center}
\clearpage
\tableofcontents
\listoffigures
\listoftables

\chapter{CHAP1}
        %%%%%%%%%%%%%%%%%%%%puts page number on top%%%%%%%%%%%%%%%%

\pagestyle{plaintop}
\pagenumbering{arabic}
some text.
\section{a}
some text.
\clearpage
some other text, some other text .

\end{document} 

enter image description here enter image description here

You must log in to answer this question.

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