0

According to the subject matter of my report, there is two table of contents pages. The problem is the spacing of the first page seems ok from the header. But for the next page, it starts from the header itself.the image is from the overleaf editor

This is the code for the table of contents:

\thispagestyle{plain}
    \newgeometry{left=2.54cm,top=0cm,right=2.54cm}
    \large
    \tableofcontents
    \addtocontents{toc}{~\hfill\textbf{Page}\par}
    \clearpage

This is the code for the main:

\documentclass[12pt,a4wide]{report} \usepackage{amsthm,amssymb,mathrsfs,setspace,pstricks,booktabs,mathtools,amsmath,geometry} \usepackage{latexsym,footmisc,xcolor,tikz} \usepackage{play} \usepackage{epsfig} \usepackage{titlesec} \usepackage{fancyhdr} \usepackage{indentfirst} \usepackage{etoolbox} \usepackage{sectsty} \chapterfont{\centering} \usepackage{setspace} \usepackage{xurl} \usepackage[hidelinks]{hyperref} \usepackage[nottoc]{tocbibind} \renewcommand{\chaptermark}[1]{\markboth{#1}{}} \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} \theoremstyle{plain} \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{proposition}[theorem]{Proposition}

    \theoremstyle{definition}
    \newtheorem{definition}[theorem]{Definition}
    \newtheorem{example}[theorem]{Example}
    \newtheorem{notation}[theorem]{Notation}

    \theoremstyle{remark}
    \newtheorem{remark}[theorem]{Remark}

    \renewcommand{\baselinestretch}{1.5}
    \usepackage{fancyhdr}
    \pagestyle{fancy}
    \fancyhf{}
    \fancyfoot[R]{\thepage}
    \fancypagestyle{plain}{%
        \renewcommand{\headrulewidth}{0pt}%
        \fancyhf{}%
        \fancyfoot[R]{\thepage}%
    }
    \makeatletter
        \renewcommand*\@makechapterhead[1]{%
           \vspace*{-60\p@}%
            {%
                \parindent\z@\centering\normalfont
               \ifnum\c@secnumdepth>\m@ne
                   \huge\bfseries\@chapapp\space\thechapter\par
                   \nobreak\vskip -25\p@
               \fi
              \interlinepenalty\@M
                \Huge\bfseries
                #1\par
                \nobreak\vskip 10\p@
            }
        }
    \makeatother

    \begin{document}
    \input{Chapters/Title}
    \pagenumbering{roman}
    \setcounter{page}{0}
    \input{Chapters/toc}
    \input{Chapters/lof_lot}
    \newpage
    \renewcommand{\headrulewidth}{0pt}%
    \input{abstract}
    \pagenumbering{arabic}
    \setcounter{page}{1}
    \pagestyle{fancy}
    \input{Chapters/Chapter1}
    \input{Chapters/Chapter2}
    \input{Chapters/Chapter3}
    \input{Chapters/Chapter4}
    \input{Chapters/Chapter5}
    \input{Chapters/Chapter6}
    \nocite{*}
    \printbibliography[References]

    \end{document}

  • 2
    Welcome to TeX.SE. What are you trying to achieve by setting top=0cm in the argument of \newgeometry? What happens if you replace left=2.54cm,top=0cm,right=2.54cm with margin=2.54cm (which sets a margin of 2.54cm on all four sides of the textblock)? – Mico May 25 '22 at 06:36
  • @Mico There is an unwanted spacing from the header till the start of the list of figures. – arindom bora May 25 '22 at 07:03
  • I added the duplicate flag as this is what you actually want, I think. If you need space adjustment between different kinds of tocs, you might add a \vskip xxpt\relax in between them. Just add it and see how it behaves. – MaestroGlanz May 25 '22 at 07:27
  • @MaestroGlanz No, it is not what I meant. What i mean is the spacings in the first page of my contents page is OK, but in the next page of the contents page, the list of contents is starting from the header itself. I have already tried out all the options in the link that you have commented. – arindom bora May 25 '22 at 07:40
  • Because you edit the margin, but you should get rid of unwanted space not by editing the margins. That's a bad idea. Try vskips. I. E. \vskip -20pt plus 0pt minus 3pt\relax. If they don't work, add an \mbox{} before and after the \vskip. – MaestroGlanz May 25 '22 at 07:46
  • @MaestroGlanz Ok, Thanks – arindom bora May 25 '22 at 07:49

0 Answers0