我是 LaTeX 新手,这是我第一次使用它来制作这种规模的文档。我目前正在撰写我的论文并使用这个模板:https://www.overleaf.com/2943161npnxys#/8024281/
此外,我还添加了一些额外的包以更好地满足格式要求。以下是 MWE,除了输入命令外,每行都指向不同的章节。
我有\frontmatter
命令用于对第 1 章之前的页面进行底部居中罗马数字编号。我需要所有章节在页面的右上角进行连续编号,最好在距离页面顶部和右侧边缘 0.5 英寸处。
因此,如果第 1 章在第 6 页结束,则第 2 章的标题页应该是第 7 页。我尝试在每个章节\setcounter{page}{7}
后使用该\chapter
命令,但没有效果。
我怎样才能达到期望的结果?
谢谢!
平均能量损失
\documentclass[12pt,oneside]{Thesis}
\graphicspath{{Pictures/}}
\usepackage[letterpaper,bindingoffset=0.5in, top=1.0in, left=1.0in, right=1.0in,bottom=1.0in,headheight=0in,headsep=0.5in,marginparsep=0.5in]{geometry}
\setlength{\marginparwidth}{0.5in}
\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\pagestyle{plain}
\usepackage[square, numbers, comma, sort&compress]{natbib}
\usepackage{indentfirst}
\usepackage{hanging}
\usepackage{afterpage}
\usepackage{multirow}
\usepackage[normalem]{ulem}
\usepackage[table,xcdraw]{xcolor}
\usepackage{dcolumn}
\usepackage{graphics}
\usepackage{adjustbox}
\usepackage{pdflscape}
\usepackage{xpatch}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usepackage{titlesec}
\titleformat{\subsection}[block]
{\normalfont\scshape\centering}{\thesubsection}{-1ex}{}
\usepackage{chngcntr}
\counterwithout{table}{chapter}
\hypersetup{urlcolor=blue, colorlinks=true}
\title{\ttitle}
\begin{document}
\setstretch{1.6}
%\lhead{} % Clears the left side page header
%\pagestyle{fancy} % Finally, use the "fancy" page style to implement the FancyHdr headers
%\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} % New command to make the lines in the title page
% PDF meta-data
\hypersetup{pdftitle={\ttitle}}
\hypersetup{pdfsubject=\subjectname}
\hypersetup{pdfauthor=\authornames}
\hypersetup{pdfkeywords=\keywordnames}
%----------------------------------------------------------------------------------------
% TITLE PAGE
%----------------------------------------------------------------------------------------
\begin{titlepage}
\newgeometry{top=2.0in,bindingoffset=0.5in, left=1.0in, right=1.0in,bottom=1.0in,headheight=0in,headsep=0.5in}
\fancyhead{} % Clears all page headers and footers
\begin{center}
\setstretch{1.0}
{ \textsc{\ttitle}}\\[4.5cm] % Thesis title
\begin{center}
\normalsize{by}\\
\smallskip
{\authornames}\\[1.0cm] % Author name - remove the \href bracket to remove the link
\setstretch{1.2}
{\supname}\\
{\normalsize{Author 2, Author 3 etc.}}\\[3cm] % Supervisor name - remove the \href bracket to remove the link
%\end{minipage}
\end{center}
%\begin{minipage}{0.4\textwidth}
{\vfill}
\setstretch{1.2}
\normalsize{\textsc{A Dissertation}}\\
\normalsize{Submitted to the graduate faculty of The University,\\ in partial fulfillment of the requirements for the degree of\\ \degreename}\\[0.3cm] % University requirement text
\normalsize{\textsc{City, State}}\\
\normalsize{2015}
\restoregeometry
\end{center}
\end{titlepage}
\frontmatter
\pagenumbering{roman}
\setcounter{page}{2}
\cfoot{\thepage}
\lhead{}
\thispagestyle{empty}
%----------------------------------------------------------------------------------------
% DECLARATION PAGE
% Your institution may give you a different text to place here
%----------------------------------------------------------------------------------------
\thispagestyle{plain}
\newgeometry{top=2.0in,bindingoffset=0.5in, left=1.0in, right=1.0in,bottom=1.0in,headheight=0pt,headsep=0.5in,marginparsep=0.5in}
\frontmatter
\pagenumbering{roman}
\setcounter{page}{2}
\cfoot{\thepage}
\setstretch{1.6}
\textmd{\Declaration}
\restoregeometry
\clearpage
%----------------------------------------------------------------------------------------
% ABSTRACT PAGE
%----------------------------------------------------------------------------------------
\newgeometry{top=1.0in,bindingoffset=0.5in, left=1.0in, right=1.0in,bottom=1.0in,headheight=0pt,headsep=0.5in,centering}
\addtotoc{ABSTRACT} % Add the "Abstract" page entry to the Contents
\abstract{
%\newgeometry{top=1.0in,bindingoffset=0.5in, left=1.0in, right=1.0in,bottom=1.0in,headheight=0pt,headsep=0pt}
\addtocontents{toc}{}}% Add a gap in the Contents, for aesthetics
%\begin{flushleft}
\setstretch{1.6}
\setlength{\parindent}{0.5in}
\hspace{0.5in}Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna. Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci. Aenean nec lorem. In porttitor. Donec laoreet nonummy augue.\par
Suspendisse dui purus, scelerisque at, vulputate vitae, pretium mattis, nunc. Mauris eget neque at sem venenatis eleifend. Ut nonummy. Fusce aliquet pede non pede. Suspendisse dapibus lorem pellentesque magna. Integer nulla. Donec blandit feugiat ligula. Donec hendrerit, felis et imperdiet euismod, purus ipsum pretium metus, in lacinia nulla nisl eget sapien. Donec ut est in lectus consequat consequat. Etiam eget dui. Aliquam erat volutpat. Sed at lorem in nunc porta tristique.\par
Proin nec augue. Quisque aliquam tempor magna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc ac magna. Maecenas odio dolor, vulputate vel, auctor ac, accumsan id, felis. Pellentesque cursus sagittis felis. Pellentesque porttitor, velit lacinia egestas auctor, diam eros tempus arcu, nec vulputate augue magna vel risus. Cras non magna vel ante adipiscing rhoncus. Vivamus a mi. Morbi neque. Aliquam erat volutpat. Integer ultrices lobortis eros.\par
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin semper, ante vitae sollicitudin posuere, metus quam iaculis nibh, vitae scelerisque nunc massa eget pede. Sed velit urna, interdum vel, ultricies vel, faucibus at, quam. Donec elit est, consectetuer eget, consequat quis, tempus quis, wisi. In in nunc. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Donec ullamcorper fringilla eros. Fusce in sapien eu purus dapibus commodo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras faucibus condimentum odio. Sed ac ligula. Aliquam at eros.\par
%\end{flushleft}
\vfill
\hspace{-0.5in}\textbf{Keywords:} Keywords, keywords, keywords
\clearpage % Start a new page
%----------------------------------------------------------------------------------------
% DEDICATION
%----------------------------------------------------------------------------------------
\newgeometry{top=2.0in,bindingoffset=0.5in, left=1.0in, right=1.0in,bottom=1.0in,headheight=0pt,headsep=0.5in,marginparsep=0.5in}
\setstretch{1.6}
\dedication{
\addtocontents{toc}{} % Add a gap in the Contents, for aesthetics
\indent Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna. Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci. Aenean nec lorem. In porttitor. Donec laoreet nonummy augue.
}
\restoregeometry
%----------------------------------------------------------------------------------------
% ACKNOWLEDGEMENTS
%----------------------------------------------------------------------------------------
\newgeometry{top=2.0in,bindingoffset=0.5in, left=1.0in, right=1.0in,bottom=1.0in,headheight=0pt,headsep=0pt,}
\setlength{\parindent}{0.5in}
\setstretch{1.6}
\begin{center}
ACKNOWLEDGEMENT
\end{center}
\addtotoc{ACKNOWLEDGEMENT}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna. Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci. Aenean nec lorem. In porttitor. Donec laoreet nonummy augue.\par
Suspendisse dui purus, scelerisque at, vulputate vitae, pretium mattis, nunc. Mauris eget neque at sem venenatis eleifend. Ut nonummy. Fusce aliquet pede non pede. Suspendisse dapibus lorem pellentesque magna. Integer nulla. Donec blandit feugiat ligula. Donec hendrerit, felis et imperdiet euismod, purus ipsum pretium metus, in lacinia nulla nisl eget sapien. Donec ut est in lectus consequat consequat. Etiam eget dui. Aliquam erat volutpat. Sed at lorem in nunc porta tristique.\par
Proin nec augue. Quisque aliquam tempor magna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc ac magna. Maecenas odio dolor, vulputate vel, auctor ac, accumsan id, felis. Pellentesque cursus sagittis felis. Pellentesque porttitor, velit lacinia egestas auctor, diam eros tempus arcu, nec vulputate augue magna vel risus. Cras non magna vel ante adipiscing rhoncus. Vivamus a mi. Morbi neque. Aliquam erat volutpat. Integer ultrices lobortis eros\par
\vfill
\clearpage % Start a new page
%----------------------------------------------------------------------------------------
% LIST OF CONTENTS/FIGURES/TABLES PAGES
%----------------------------------------------------------------------------------------
%\pagestyle{plain} % The page style headers have been "empty" all this time, now use the "fancy" headers as defined before to bring them back
%\lhead{\emph{Contents}} % Set the left side page header to "Contents"
%\makeatletter
%\xapptocmd{\@chapter}{\addcontentsline{lot}{chapter}{\protect\centering\numberline{\thechapter}#1}}{}{}
%\makeatother
%\makeatletter
%\renewcommand\tableofcontents{%
% \addtotoc{TABLE OF CONTENTS}
% \section*{\normalsize\centering\contentsname
% \@mkboth{%
% \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}
% \@starttoc{toc}%
% }
%\makeatother
\tableofcontents % Write out the Table of Contents
%\lhead{\emph{List of Figures}} % Set the left side page header to "List of Figures"
%\listoffigures % Write out the List of Figures
%\lhead{\emph{List of Tables}} % Set the left side page header to "List of Tables"
\listoftables % Write out the List of Tables
,
%----------------------------------------------------------------------------------------
% THESIS CONTENT - CHAPTERS
%----------------------------------------------------------------------------------------
%\pagestyle{fancy}
%\renewcommand{\marginparsep}{36pt}
%\renewcommand{\voffset}{-36pt}
\fancyheadoffset[R]{\marginparsep=0.25in}
%\fancyhead[LE,RO]{\thepage}
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt} % and the line
%\setlength{\headsep}{-0.5in}
%\setlength{\marginparsep}{-0.5in}
%\setlength{\marginparwidth}{-0.5in}
%\setlength{\hoffset}{.5in}
}
%\fancyhead[R]{\thepage\voffset0.5in\marginparwidth0.5in}
%\fancyhfoffset[R]{0.5in}
%\titleformat{\chapter}{\normalsize\textsc}{\thechapter.}{20pt}{\huge\it}\rhead{\thepage}
%\mainmatter % Begin numeric (1,2,3...) page numbering
%\mainmatte
%\pagestyle{plain}
%\pagestyle{myheadings}
%\input{Chapters/Chapter1}
%\input{Chapters/Chapter2}
%\input{Chapters/Chapter3}
%\input{Chapters/Chapter4}
%\input{Chapters/Chapter5}
%\input{Chapters/Chapter6}
%\input{Chapters/Chapter7}
%----------------------------------------------------------------------------------------
% THESIS CONTENT - APPENDICES
%----------------------------------------------------------------------------------------
\addtocontents{toc}{} % Add a gap in the Contents, for aesthetics
\appendix % Cue to tell LaTeX that the following 'chapters' are Appendices
% Include the appendices of the thesis as separate files from the Appendices folder
% Uncomment the lines as you write the Appendices
%\input{Appendices/AppendixA}
%\input{Appendices/AppendixB}
%\input{Appendices/AppendixC}
\addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics
%\backmatter
\end{document}
编辑:这是正在使用的类文件。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Thesis LaTeX Template - THESIS CLASS FILE
%
% This template has been downloaded from:
% http://www.latextemplates.com
%
% This class file defines the structure and design of the template.
%
% There is one part of this file that needs to be filled out - the variables
% dictating the document particulars such as the author name, university
% name, etc. You will find these in the commented "DOCUMENT VARIABLES"
% section below.
%
% The other two easily-editable sections are the margin sizes and abstract.
% These have both been commented for easy editing. Advanced LaTeX
% users will have no trouble editing the rest of the document to their liking.
%
% Original header:
%% This is file `Thesis.cls', based on 'ECSthesis.cls', by Steve R. Gunn
%% generated with the docstrip utility.
%%
%% Created by Steve R. Gunn, modified by Sunil Patel: www.sunilpatel.co.uk
%% Further modified by www.latextemplates.com
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\ProvidesClass{Thesis}
[2007/22/02 v1.0
LaTeX document class]
\def\baseclass{book}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseclass}}
\def\@checkoptions#1#2{
\edef\@curroptions{\@ptionlist{\@currname.\@currext}}
\@tempswafalse
\@tfor\@this:=#2\do{
\@expandtwoargs\in@{,\@this,}{,\@curroptions,}
\ifin@ \@tempswatrue \@break@tfor \fi}
\let\@this\@empty
\if@tempswa \else \PassOptionsToClass{#1}{\baseclass}\fi
}
\@checkoptions{11pt}{{10pt}{11pt}{12pt}}
\PassOptionsToClass{letterpaper}{\baseclass}
\ProcessOptions\relax
\LoadClass{\baseclass}
\newcommand\bhrule{\typeout{------------------------------------------------------------------------------}}
\newcommand\Declaration[1]{
\btypeout{Declaration of Authorship}
\begin{center}
\null\vfill
{\normalsize{Copyright by\\Saurabh Rahurkar\\2015}}\end{center}
}
\newcommand\btypeout[1]{\bhrule\typeout{\space #1}\bhrule}
\def\today{\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
\space \number\year}
\usepackage{setspace}
\onehalfspacing
\setlength{\parindent}{0.5in}
\setlength{\parskip}{2.0ex plus0.5ex minus0.2ex}
%\usepackage{vmargin}
%\RequirePackage[utf8]{inputenc} % Allows the use of international characters (e.g. Umlauts)
%\raggedbottom
\setlength{\topskip}{1\topskip \@plus 5\p@}
\doublehyphendemerits=10000 % No consecutive line hyphens.
\brokenpenalty=10000 % No broken words across columns/pages.
\widowpenalty=9999 % Almost no widows at bottom of page.
\clubpenalty=9999 % Almost no orphans at top of page.
\interfootnotelinepenalty=9999 % Almost never break footnotes.
\usepackage{fancyhdr}
\pagestyle{fancy}
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\usepackage{amsmath,amsfonts,amssymb,amscd,amsthm,xspace}
\theoremstyle{plain}
\newtheorem{example}{Example}[chapter]
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{axiom}[theorem]{Axiom}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\usepackage[justification=raggedright,singlelinecheck=false]{caption}
\setlength{\belowcaptionskip}{0pt}
\newcommand{\fref}[1]{Figure~\ref{#1}}
\newcommand{\tref}[1]{Table~\ref{#1}}
\newcommand{\eref}[1]{Equation~\ref{#1}}
\newcommand{\cref}[1]{Chapter~\ref{#1}}
\newcommand{\sref}[1]{Section~\ref{#1}}
\newcommand{\aref}[1]{Appendix~\ref{#1}}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{.85}
\renewcommand{\textfraction}{0.1}
\renewcommand{\dbltopfraction}{.85}
\renewcommand{\floatpagefraction}{0.75}
\renewcommand{\dblfloatpagefraction}{.75}
\setcounter{topnumber}{9}
\setcounter{bottomnumber}{9}
\setcounter{totalnumber}{20}
\setcounter{dbltopnumber}{9}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage{listings}
\usepackage{lstpatch}
\lstset{captionpos=b,
frame=tb,
basicstyle=\scriptsize\ttfamily,
showstringspaces=false,
keepspaces=true}
\lstdefinestyle{matlab} {
language=Matlab,
keywordstyle=\color{blue},
commentstyle=\color[rgb]{0.13,0.55,0.13}\em,
stringstyle=\color[rgb]{0.7,0,0} }
\usepackage[pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true,
bookmarksopenlevel=0,bookmarksnumbered=true,hypertexnames=false,
colorlinks,linkcolor={blue},citecolor={blue},urlcolor={red},
pdfstartview={FitV},unicode,breaklinks=true]{hyperref}
\pdfstringdefDisableCommands{
\let\\\space
}
\newcommand*{\supervisor}[1]{\def\supname{#1}}
\newcommand*{\thesistitle}[1]{\def\ttitle{#1}}
\newcommand*{\examiner}[1]{\def\examname{#1}}
\newcommand*{\degree}[1]{\def\degreename{#1}}
\newcommand*{\authors}[1]{\def\authornames{#1}}
\newcommand*{\addresses}[1]{\def\addressnames{#1}}
\newcommand*{\university}[1]{\def\univname{#1}}
\newcommand*{\UNIVERSITY}[1]{\def\UNIVNAME{#1}}
\newcommand*{\department}[1]{\def\deptname{#1}}
\newcommand*{\DEPARTMENT}[1]{\def\DEPTNAME{#1}}
\newcommand*{\group}[1]{\def\groupname{#1}}
\newcommand*{\GROUP}[1]{\def\GROUPNAME{#1}}
\newcommand*{\faculty}[1]{\def\facname{#1}}
\newcommand*{\FACULTY}[1]{\def\FACNAME{#1}}
\newcommand*{\subject}[1]{\def\subjectname{#1}}
\newcommand*{\keywords}[1]{\def\keywordnames{#1}}
%----------------------------------------------------------------------------------------
% DOCUMENT VARIABLES
% Fill in the lines below to update the thesis template
% If you wish to cite each of the variables defined below, look at the
% section above for the citation command e.g. \examiner{} below is
% defined as \examname above so you cite it as \examname
%----------------------------------------------------------------------------------------
\thesistitle{DISSERTATION TITLE} % Your thesis title - this is used in the title and abstract
%-------------------------------------------------
\supervisor{\normalsize{\textsc{}}} % You supervisor's name - this is used in the title page
%-------------------------------------------------
\degree{degree name} % Your degree name - this is currently used in the title page and abstract
%-------------------------------------------------
\authors{\normalsize{\textsc{}}} % Your name - this is used in the title page and abstract
%-------------------------------------------------
\subject{} % Your subject area - this is not currently used anywhere in the template, cite it with \subjectname if you want it
%-------------------------------------------------
\keywords{} % Keywords for your thesis - this is not currently used anywhere in the template, cite it with \keywordnames if you want it
%-------------------------------------------------
\university{\texorpdfstring{\href{http://www.university.com} % Your university's URL
{University Name}} % Your university's name - this is currently used in the title page
{University Name}}
%-------------------------------------------------
\UNIVERSITY{\texorpdfstring{\href{University Web Site URL Here (include http://)} % Your university's URL
{UNIVERSITY NAME (IN BLOCK CAPITALS)}} % Your university's name in capitals - this is currently used in the abstract page
{UNIVERSITY NAME (IN BLOCK CAPITALS)}}
%-------------------------------------------------
\DEPARTMENT{\texorpdfstring{\href{Department or School Web Site URL Here (include http://)} % Your department's URL
{DEPARTMENT OR SCHOOL NAME (IN BLOCK CAPITALS)}} % Your department's name in capitals - this is not currently used anywhere in the template, cite it with \DEPTNAME if you want it
{DEPARTMENT OR SCHOOL NAME (IN BLOCK CAPITALS)}}
%-------------------------------------------------
\group{\texorpdfstring{\href{Research Group Web Site URL Here (include http://)} % Your research group's URL
{Research Group Name}} % Your research group's name - this is currently used in the title page
{Research Group Name}}
%-------------------------------------------------
\GROUP{\texorpdfstring{\href{Research Group Web Site URL Here (include http://)} % Your research group's URL
{RESEARCH GROUP NAME (IN BLOCK CAPITALS)}} % Your research group's name in capitals - this is not currently used anywhere in the template, cite it with \GROUPNAME if you want it
{RESEARCH GROUP NAME (IN BLOCK CAPITALS)}}
%-------------------------------------------------
\faculty{\texorpdfstring{\href{Faculty Web Site URL Here (include http://)} % Your faculty's URL
{Faculty Name}} % Your faculty's name - this is currently used in the abstract page
{Faculty Name}}
%-------------------------------------------------
\FACULTY{\texorpdfstring{\href{Faculty Web Site URL Here (include http://)} % Your faculty's URL
{FACULTY NAME (IN BLOCK CAPITALS)}} % Your faculty's name in capitals - this is not currently used anywhere in the template, cite it with \FACNAME if you want it
{FACULTY NAME (IN BLOCK CAPITALS)}}
%----------------------------------------------------------------------------------------
% ABSTRACT PAGE DESIGN
%----------------------------------------------------------------------------------------
\newenvironment{abstract}
{
\btypeout{ABSTRACT}
%\thispagestyle{fancy}
%\newgeometry{top=1.0in,left=1.5in, right=1.0in,bottom=1.0in,headheight=0pt,headsep=0pt}
\newpage
\begin{center}
\setstretch{1.0}
{\normalsize \@title \par}
\setstretch{1.6}
{\normalsize {\authornames}\par}
{\normalsize{\subjectname}\par}
{\normalsize{ABSTRACT}\\[-1.5cm]}
\setlength{\parindent}{0.5in}
\end{center}
%\restoregeometry
}
%----------------------------------------------------------------------------------------
{
%\vfil\vfil\vfil\null
% \clearpage
}
%\addtocounter{secnumdepth}{1}
\setcounter{secnumdepth}{-1}
\setcounter{tocdepth}{2}
\newcounter{dummy}
\newcommand\addtotoc[1]{
\refstepcounter{dummy}
\addcontentsline{toc}{chapter}{#1}}
\renewcommand{\contentsname}{\centering TABLE OF CONTENTS}
\renewcommand\tableofcontents{
\btypeout{Table of Contents}
\addtotoc{TABLE OF CONTENTS}
%\begin{spacing}{1}{
\setlength{\parskip}{1pt}
\newgeometry{top=2.0in,bindingoffset=0.5in, left=1.0in, right=1.0in,bottom=1.0in,headheight=0pt,headsep=0pt}
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\section*{\normalsize\textsc\centering\contentsname
\@mkboth{
\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}
\@starttoc{toc}
\if@restonecol\twocolumn\fi
\newgeometry{top=1.0in,bindingoffset=0.5in, left=1.0in, right=1.0in,bottom=1.0in,headheight=0pt,headsep=0pt}
%\cleardoublepage
%}\end{spacing}
}
\renewcommand{\listtablename}{\centering LIST OF TABLES}
\renewcommand\listoftables{
\btypeout{LIST OF TABLES}
\addtotoc{LIST OF TABLES}
\begin{spacing}{1}{
\setlength{\parskip}{1pt}
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\section*{\normalsize\textsc\centering\listtablename
\@mkboth{
\MakeUppercase\listtablename}{\MakeUppercase\listtablename}}
\@starttoc{lot}
\if@restonecol\twocolumn\fi
}\end{spacing}
}
\newcommand\listsymbolname{Abbreviations}
\usepackage{longtable}
\newcommand\listofsymbols[2]{
\btypeout{\listsymbolname}
\addtotoc{\listsymbolname}
\chapter*{\listsymbolname
\@mkboth{
\MakeUppercase\listsymbolname}{\MakeUppercase\listsymbolname}}
\begin{longtable}[c]{#1}#2\end{longtable}\par
\cleardoublepage
}
\newcommand\listconstants{Physical Constants}
\usepackage{longtable}
\newcommand\listofconstants[2]{
\btypeout{\listconstants}
\addtotoc{\listconstants}
\chapter*{\listconstants
\@mkboth{
\MakeUppercase\listconstants}{\MakeUppercase\listconstants}}
\begin{longtable}[c]{#1}#2\end{longtable}\par
\cleardoublepage
}
\newcommand\listnomenclature{Symbols}
\usepackage{longtable}
\newcommand\listofnomenclature[2]{
\btypeout{\listnomenclature}
\addtotoc{\listnomenclature}
\chapter*{\listnomenclature
\@mkboth{
\MakeUppercase\listnomenclature}{\MakeUppercase\listnomenclature}}
\begin{longtable}[c]{#1}#2\end{longtable}\par
\cleardoublepage
}
\newcommand{\dedication}[1]{
\btypeout{Dedication}
\addtotoc{DEDICATION}
\thispagestyle{plain}
\begin{center}{\normalsize {DEDICATION} \par}\end{center}
{\normalsize #1}
\vfil\vfil\null
}
\newcommand\acknowledgements[1]{
\btypeout{Acknowledgements}
\addtotoc{ACKNOWLEDGEMENTS}
\thispagestyle{plain}
\begin{center}{\normalsize{ACKNOWLEDGEMENTS} \par}\end{center}
{\normalsize #1}
\vfil\vfil\null
}
\renewcommand{\thechapter}{}
\makeatletter
\renewcommand{\@makechapterhead}[1]{%
}
\makeatother
%\newcommand\dedicatory[1]{
%\btypeout{Dedicatory}
%\thispagestyle{plain}
%\null\vfil
%\vskip 60\p@
%\begin{center}{\Large \sl #1}\end{center}
%\vfil\null
%\cleardoublepage
%}
%\renewcommand\backmatter{
%\if@openright
% \cleardoublepage
%\else
% \clearpage
%\fi
%\addtotoc{\bibname}
%\btypeout{\bibname}
%\@mainmatterfalse}
\endinput
答案1
我做了这些改变(按照你的链接),它起作用了注意:你可以重新定义\thepage
全局
%----------------------------------------------------------------------------------------
% THESIS CONTENT - CHAPTERS
%----------------------------------------------------------------------------------------
%\pagestyle{fancy}
%\renewcommand{\marginparsep}{36pt}
%\renewcommand{\voffset}{-36pt}
\fancyheadoffset[R]{0.25in}
%\fancyhead[LE,RO]{\thepage}
\fancypagestyle{plain}{%
\fancyhead[R]{\def\thepage{\arabic{page}}\thepage} % get rid of headers
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt} % and the line
%\setlength{\headsep}{-0.5in}
%\setlength{\marginparsep}{-0.5in}
%\setlength{\marginparwidth}{-0.5in}
%\setlength{\hoffset}{.5in}
}
答案2
当我再次反复检查代码时,我发现了我的错误。
由于我对 LaTeX 不熟悉,我将每章的标题页附在了其中,begin{\titlepage}
并end{\titlepage}
重新设置了每章的编号。
我真诚地感谢那些花时间阅读我的帖子并专心解决我的问题的人!