使用 texlipse 时出现 \@ptsize.clo 问题

使用 texlipse 时出现 \@ptsize.clo 问题

我目前正在写论文。我的大学为我开设了一门写论文的课程。我在运行这门课时遇到了问题。当我编译时,我得到了“未找到包含的 Latex 文件“size1\@ptsize.clo”的信息。在解析类文件时,我还发现在以下行有一个警告(“\newcommand 后面没有参数”

\newcommand\@ptsize{}

完整代码如下

\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{kfupm_thesis}
          [2007/03/18 v2.1
KFUPM MS/Ph.D. thesis/dissertation template.]
\usepackage{setspace}                   % package required to change spacing
\usepackage{ifthen}                     % for conditional programming
%\usepackage[compatible]{nomencl}

% new variables
\def\dept#1{\def\dept{#1}}
\def\program#1{\def\program{#1}}
\def\adviser#1{\def\adviser{#1}}
\def\memberone#1{\def\memberone{#1}}
\def\membertwo#1{\def\membertwo{#1}}
\def\memberthree#1{\def\memberthree{#1}}
\def\memberfour#1{\def\memberfour{#1}}
\def\chairman#1{\def\chairman{#1}}
\def\deanGS#1{\def\deanGS{#1}}
\def\DTC#1{\def\DTC{#1}}


%
% Warning and Error messages
%
\newcommand\paperwarning{%
\typeout{Only letter-sized paper allowed: Use`letterpaper' option instead}%
\@latex@warning{Incorrect paper size option set.}}

\newcommand\columnwarning{%
\typeout{Only one column output allowed.}%
\@latex@warning{Double-column not allowed.}}

% paper size preset to lattersize
% by SH
\setlength\paperheight {11in}%
\setlength\paperwidth  {8.5in}

\newcommand\@ptsize{} %I get warning here
\newif\if@restonecol
\newif\if@titlepage
\@titlepagetrue
\newif\if@openright
\if@compatibility\else
\DeclareOption{a4paper}
    {\paperwarning}
\DeclareOption{a5paper}
   {\paperwarning}
\DeclareOption{b5paper}
   {\paperwarning}
\DeclareOption{letterpaper}
   {\setlength\paperheight {11in}%
\setlength\paperwidth  {8.5in}}
\DeclareOption{legalpaper}
   {\paperwarning}
\DeclareOption{executivepaper}
   {\paperwarning}
\DeclareOption{landscape}
   {\paperwarning}
\fi
\if@compatibility
  \renewcommand\@ptsize{0}
\else
\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
\fi
\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
\if@compatibility\else
\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
\fi
\DeclareOption{twoside}{\@twosidetrue  \@mparswitchtrue}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\if@compatibility\else
\DeclareOption{final}{\setlength\overfullrule{0pt}}
\fi
\DeclareOption{titlepage}{\@titlepagetrue}
\if@compatibility\else
\DeclareOption{notitlepage}{\@titlepagefalse}
\fi
\if@compatibility
\else
\DeclareOption{openright}{\@openrighttrue}
\DeclareOption{openany}{\@openrightfalse}
\fi
\if@compatibility\else
\DeclareOption{onecolumn}{\@twocolumnfalse}
\fi
\DeclareOption{twocolumn}{\@twocolumntrue}
\DeclareOption{leqno}{\input{leqno.clo}}
\DeclareOption{fleqn}{\input{fleqn.clo}}
\DeclareOption{openbib}{%
  \AtEndOfPackage{%
   \renewcommand\@openbib@code{%
      \advance\leftmargin\bibindent
      \itemindent -\bibindent
      \listparindent \itemindent
      \parsep \z@
      }%
   \renewcommand\newblock{\par}}%
}

\DeclareOption{ms}{%
    \program{MASTER OF SCIENCE}
    \DTC{Thesis Committee}
}
\DeclareOption{phd}{%
    \program{DOCTOR OF PHILOSOPHY}
    \DTC{Dissertation Committee}
}

\ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final,openany}
\ProcessOptions
\input{size1\@ptsize.clo} %I get error here
\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}

我在 Ubuntu 14.04 上使用 texlipse 和 texlive。我使用 latex+dvi2ps+ps2pdf 进行编译。

我试过解决方案但它对我不起作用

答案1

类文件中的代码可能会更好,但由于你必须提供一个大小选项,因此使用

\documentclass[10pt]{kfupm_thesis}

那么就没问题了。

相关内容