如何修复论文中混乱的页码

如何修复论文中混乱的页码

在撰写我的硕士论文时,我必须添加考试证书和学生声明页,我尝试使用来添加它们\chapter*。但问题是页码现在乱了。在下面的代码中,CoE、声明和致谢分别获得编号 2、3 和 4。然后编号从引言 1 开始,论文第一页为 2。

我想从第一章开始编号。我不想在 CoE、致谢或简介等部分进行编号。我该怎么做?

    \documentclass[twoside, <further options>]{report}
    \usepackage[inner=1.25in, outer=1in, vmargin=1in]{geometry}
    \usepackage{sectsty}
    \usepackage{setspace} 
    \usepackage{amssymb}
    \usepackage{amsmath}
    \usepackage{centernot}
    \setlength\parskip{\baselineskip}
    \setlength{\headheight}{15pt}
    \parindent=0pt

    \doublespacing
    \begin{document}
    \title {BACBAC}
    \author{Bhaskar Vashishth}




    \date{\today}
    \maketitle

    \clearpage
    \allsectionsfont{\centering}



    \chapter*{Certificate of Examination}This is to certify that the dissertation titled “xyz”
    submitted by Mr. gghj (Reg. No. 1234) for the partial fulfilment
    of MS degree programme of the Institute, has been examined
    by the thesis committee duly appointed by the Institute. The committee
    finds the work done by the candidate satisfactory and recommends that the
    report be accepted.
    \chapter*{Declaration}The work presented in this dissertation has been carried out by me under
    the guidance of Prof. abc at the ISRM
    This work has not been submitted in part or in full for a degree, a diploma,
    or a fellowship to any other university or institute. Whenever contributions
    of others are involved, every effort is made to indicate this clearly, with due
    acknowledgement of collaborative research and discussions. This thesis is a
    bonafide record of original work done by me and all sources listed within
    have been detailed in the bibliography.

    \chapter*{Acknowlegment} Thanks
    \abstract{lipsum.  
    \thispagestyle{empty}
    \tableofcontents
    \thispagestyle{empty}
    \cleardoublepage
    \thispagestyle{empty}

    \chapter*{Introduction} Something
    \pagenumbering{arabic}
    \setcounter{page}{1}
    \chapter{XYZXY}
    \end{document}

答案1

由于使用(硬编码),一堆\thispagestyle{empty}after\chapter是没有用的。我通过使用补丁并引用隐藏在宏名称中的页面样式来更改此设置,稍后可以重新定义该宏名称。\chapter\thispagestyle{plain}

还将\pagenumbering{arabic}页面计数器设置为1已,无需\setcounter{page}{1}再次使用。

\documentclass[twoside]{report}
\usepackage[inner=1.25in, outer=1in, vmargin=1in]{geometry}
\usepackage{sectsty}
\usepackage{setspace} 
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{centernot}

\usepackage{xpatch}

  \xpatchcmd{\chapter}{%
    \thispagestyle{plain}%
  }{%
    \thispagestyle{\chapterfirstpagestyle}
  }{\typeout{Success}}{\typeout{Failed!}}

\newcommand{\chapterfirstpagestyle}{empty}



\setlength\parskip{\baselineskip}
\setlength{\headheight}{15pt}
\parindent=0pt

\doublespacing
\begin{document}
\title {BACBAC}
\author{Bhaskar Vashishth}




\date{\today}
\maketitle

\clearpage
\allsectionsfont{\centering}
\pagestyle{empty}


\chapter*{Certificate of Examination}This is to certify that the dissertation titled “xyz”
submitted by Mr. gghj (Reg. No. 1234) for the partial fulfilment
of MS degree programme of the Institute, has been examined
by the thesis committee duly appointed by the Institute. The committee
finds the work done by the candidate satisfactory and recommends that the
report be accepted.
\chapter*{Declaration}The work presented in this dissertation has been carried out by me under
the guidance of Prof. abc at the ISRM
This work has not been submitted in part or in full for a degree, a diploma,
or a fellowship to any other university or institute. Whenever contributions
of others are involved, every effort is made to indicate this clearly, with due
acknowledgement of collaborative research and discussions. This thesis is a
bonafide record of original work done by me and all sources listed within
have been detailed in the bibliography.

\chapter*{Acknowlegment} Thanks
\abstract{lipsum.  
\tableofcontents
\cleardoublepage

\chapter*{Introduction} Something
\clearpage
\pagenumbering{arabic}

\renewcommand{\chapterfirstpagestyle}{plain}

\chapter{XYZXY}
\end{document}

相关内容