修改论文类文件

修改论文类文件

我的一个朋友给了我一份他今年春天提交的论文中使用的课程文件。这是他写的课程文件;不是大学提供的。

在春季和夏季之间,大学对论文的要求进行了些许修改,现在委员会的签名应该放在标题页上,而之前它们是分开的两页。我尝试编辑文件,.cls以便将两页合并为一页,但当我编译它时,我得到的是之前得到的两页。我想知道如何修复文件,.cls以便两页之间没有分页符。

这是.cls我更改之前的文件内容:

\NeedsTeXFormat{LaTeX2e}
\def\fileversion{v.1.0}\def\filedate{2011/20/04}
\ProvidesClass{uathesis}[\filedate\space\fileversion\space%
Provides the format required by the Graduate School for dissertations]

\DeclareOption{10pt}{\PassOptionsToClass{10pt}{report}}
\DeclareOption{11pt}{\PassOptionsToClass{11pt}{report}}
\DeclareOption{12pt}{\PassOptionsToClass{12pt}{report}}
\DeclareOption{draft}{\PassOptionsToClass{draft}{report}}
\DeclareOption{final}{\PassOptionsToClass{final}{report}}
\DeclareOption{fleqno}{\PassOptionsToClass{fleqno}{report}}
\DeclareOption{leqno}{\PassOptionsToClass{leqno}{report}}
\DeclareOption{openany}{\PassOptionsToClass{openany}{report}}
\DeclareOption{openbib}{\PassOptionsToClass{openbib}{report}}
\DeclareOption{openright}{\PassOptionsToClass{openright}{report}}
\DeclareOption{oneside}{\PassOptionsToClass{oneside}{report}}
\DeclareOption{twoside}{\PassOptionsToClass{twoside}{report}}

\ProcessOptions

\LoadClass[12pt,letterpaper]{report}[1996/10/31]

\RequirePackage{setspace}
\RequirePackage{ifpdf}

\if@twoside
  \def\ps@headings{%
      \let\@oddfoot\@empty\let\@evenfoot\@empty
      \def\@evenhead{\thepage\hfil\slshape\leftmark}%
      \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
      \let\@mkboth\markboth
    \def\chaptermark##1{%
      \markboth {\MakeUppercase{%
        \ifnum \c@secnumdepth >\m@ne
            \@chapapp\ \thechapter. \ %
        \fi
        ##1}}{}}%
    \def\sectionmark##1{%
      \markright {\MakeUppercase{%
        \ifnum \c@secnumdepth >\z@
          \thesection. \ %
        \fi
        ##1}}}}
\else
  \def\ps@headings{%
    \let\@oddfoot\@empty
    \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
    \let\@mkboth\markboth
    \def\chaptermark##1{%
      \markright {\MakeUppercase{%
        \ifnum \c@secnumdepth >\m@ne
            \@chapapp\ \thechapter. \ %
        \fi
        ##1}}}}
\fi

\DeclareOption{final}{%
 \ifpdf
  \AtBeginDocument{%
    \pdfpagewidth=8.5in
    \pdfpageheight=11in}
  \fi
  \doublespacing
 }

\def\@makechapterhead#1{%
%%  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
        \normalsize \centering \@chapapp\space \thechapter
        \par\nobreak
        \vskip 10\p@
    \fi
    \interlinepenalty\@M
    \normalsize \bfseries \centering \MakeUppercase{#1}\par\nobreak
    \vskip 20\p@
  }}
\def\@schapter#1{\if@twocolumn
                   \@topnewpage[\@makeschapterhead{#1}]%
                 \else
                   \@makeschapterhead{#1}%
                   \@afterheading
                 \fi}
\def\@makeschapterhead#1{%
%%  \vspace*{50\p@}%
  {\parindent \z@ \raggedright
    \normalfont
    \interlinepenalty\@M
    \normalsize \bfseries \centering \MakeUppercase{#1}\par\nobreak
    \vskip 20\p@
  }}
\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\normalfont\normalsize\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries}}

\ExecuteOptions{final}
\ProcessOptions

\renewenvironment{thebibliography}[1]
{\singlespacing
\chapter*{\bibname}
    \@mkboth{\bibname}{\bibname}%
    \addcontentsline{toc}{chapter}{\bibname}%
  \list{\@biblabel{\@arabic\c@enumiv}}%
  {\settowidth\labelwidth{\@biblabel{#1}}%
    \leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \@openbib@code
    \usecounter{enumiv}%
    \let\p@enumiv\@empty
    \renewcommand\theenumiv{\@arabic\c@enumiv}}%
  \sloppy
  \clubpenalty4000
  \@clubpenalty \clubpenalty
  \widowpenalty4000%
  \sfcode`\.\@m}
{\def\@noitemerr
  {\@latex@warning{Empty `thebibliography' environment}}%
  \endlist}

\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
  \hbox{}
  \thispagestyle{empty}
  \newpage
  \if@twocolumn\hbox{}\newpage\fi\fi\fi}

\newif\if@mainmatter \@mainmattertrue

\newcommand\frontmatter{%
    \cleardoublepage
 \@mainmatterfalse
  \pagenumbering{roman}}
\newcommand\mainmatter{%
    \cleardoublepage
 \@mainmattertrue
  \pagenumbering{arabic}}
\newcommand\backmatter{%
  \if@openright
    \cleardoublepage
  \else
    \clearpage
  \fi
  \@mainmatterfalse}

\renewcommand*{\title}[1]{\def\ua@title{#1}}
\newcommand{\department}[1]{\def\ua@dept{#1}}
\renewcommand*{\author}[1]{\def\ua@author{#1}}
\newcommand{\director}[1]{\def\ua@director{#1}}
\renewcommand*{\month}[1]{\def\ua@month{#1}}
\renewcommand*{\year}[1]{\def\ua@year{#1}}
\newcommand{\previous}[1]{\def\ua@preved{#1}}
\title{The title}
\department{Mathematics}
\author{A.U.~Thor}
\director{The director}
\month{April/July/November}
\year{2011}
\previous{}

\def\halftitlepage{%
  \addtocounter{page}{-1}
  {\singlespacing
    \thispagestyle{empty}
    \vspace*{-1in}
    \vfill
    \begin{center}
      \ua@title
    \end{center}
    \vfill\eject
  }
}

\def\titlepage{%
  {\singlespacing
    \thispagestyle{empty}
    \vspace*{1in}
    \begin{center}
      \ua@title
      \vfill
      A dissertation submitted in partial fulfillment\\
      of the requirements for the degree of\\
      Doctor of Philosophy in \ua@dept
      \vfill
      By
      \vfill
      \ua@author\\
      \ua@preved\\
      \vspace*{1in}
      \ua@month~\ua@year\\
      University of Arkansas
    \end{center}
    \vspace*{1in}\eject
  }
}

\newcommand{\committeemember}[1]{%
\par
\begin{minipage}{.6\textwidth}
\vspace*{.5in}
\hrulefill\\
#1
\end{minipage}\par
}

\def\duplicationrelease{%
  \chapter*{Dissertation Duplication Release}
  {\singlespacing
    \raggedright
    \thispagestyle{empty}
    I hereby authorize the University of Arkansas Libraries to
    duplicate this dissertation when needed for research and/or
    scholarship.

    \vspace*{.5in}
    \noindent
    Agreed\qquad
    \begin{minipage}[t]{.5\textwidth}
      \hrulefill\\
      \ua@author
    \end{minipage}
  }
}


\newenvironment{committee}
{\singlespacing
  \thispagestyle{empty}
  \parindent=0pt
  This dissertation is approved for recommendation\\
  to the Graduate Council\\[.5in]
  Dissertation Director:
  \committeemember{\ua@director}
  \vspace*{.5in}
  Dissertation Committee:  
}
{\vfill\eject}

\setlength{\textheight}{9in}
\setlength{\textwidth}{6in}
\setlength{\oddsidemargin}{0.525in}
\setlength{\evensidemargin}{0.025in}
\setlength{\topmargin}{-0.5in}

%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
\endinput
%%
%% End of file `uathesis.cls'.

我删除了该\newenvironment{committee}部分并\def{titlepage}用以下内容替换了该部分:

\def\titlepage{%
  {\singlespacing
    \thispagestyle{empty}
    \parindent=0pt
    \vspace*{1in}
    \begin{center}
      \ua@title
      \vfill
      A dissertation submitted in partial fulfillment\\
      of the requirements for the degree of\\
      Doctor of Philosophy in \ua@dept
      \vfill
      By
      \vfill
      \ua@author\\
      \ua@preved\\
      \vspace*{1in}
      \ua@month~\ua@year\\
      University of Arkansas
    \end{center}
    \vfill
    This dissertation is approved for recommendation\\
    to the Graduate Council.\\[.5in]
    Dissertation Director:
    \committeemember{\ua@director}
    \vspace*{.5in}
    Dissertation Committee:  
    \committeemember{Dr. First Member}
    \committeemember{Dr. Second Member}
    \vspace*{1in}\eject
  }
}

此前,主要.tex文件包含以下内容:

\halftitlepage
\titlepage

\include{abstract}

\begin{committee}
\committeemember{Dr. First Member}
\committeemember{Dr. Second Member}
\end{committee}

\duplicationrelease

但我注释掉了从\begin{committee}到 的4 行\end{committee}。我看不出.cls文件中的什么导致了“阿肯色大学”和“本论文已获批准...”之间的分页符。(我知道在类文件中添加委员会成员的姓名并不理想,但我不会将其提供给其他人使用,我只需要完成它以便提交。)我如何消除该分页符?

答案1

我终于搞明白了。删除\vspace*{1in}标题页定义顶部附近的 就解决了这个问题。我猜在我这样做之前,一页上没有足够的空间容纳所有内容。

相关内容