# Fixing Class Error: "LaTeX Error: \RequirePackage or \LoadClass in Options Section"

I am attempting to install a new class file that my professional organization has provided for preparing journal article manuscripts. However, after installing it (by moving it into my local MiKTeX texmf tree and running "Refresh FNDP"), I cannot get the included .cls to work properly - even on the sample TEX document provided with it. The ZIP file which includes both the new class and tex files can be found here.

The error I get is "! LaTeX Error: \RequirePackage or \LoadClass in Options Section." It is the only error I get when running the tex file included with the class file.

I've looked through a few similar questions here, and learned enough to suspect that the problem is in the CLS file. However, I don't now enough about the structure of class files to fix it.

Could anyone offer any help?

Thank you very much!

Update: here is the code of the class file, as requested. I'm limiting it to the first 180 or so lines, because I've exceeded my character limit and that seems like a reasonable place to stop. The full class file can be downloaded from the AIAA at the link above.

%% Copyright notice.
%%
%% \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         \~}%
%%%  @LaTeX-file{
%%%     version         = "x",
%%%     date            = "0000/00/00",
%%%     author          = "",
%%%     revised by      = ""
%%%     FAX             = "",
%%%     email           = "",
%%%     abstract        = "LaTeX Template for AAS journal submissions",
%%%  }
\NeedsTeXFormat{LaTeX2e}[1996/12/01]%
\ProvidesClass{AIAA}%
\def\class@name{revtex4-1}%
%\DeclareOption*{\PassOptionsToClass{\CurrentOption}{revtex4}}%
\ExecuteOptions{letterpaper,oneside,onecolumn,final}%
\ProcessOptionsd
\RequirePackage{latexsym}%
\RequirePackage{graphicx}%
\RequirePackage{verbatim}%
\usepackage[T1]{fontenc}

\def\normalsize{%
\@setfontsize\normalsize\@xpt{12}%
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip  \abovedisplayskip
\belowdisplayshortskip \abovedisplayskip
\let\@listi\@listI
}%
\def\small{%
\@setfontsize\small\@ixpt{10.5}%
\abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ \@plus2\p@
\belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
\def\@listi{%
\leftmargin\leftmargini
\topsep 4\p@ \@plus2\p@ \@minus2\p@
\parsep 2\p@ \@plus\p@ \@minus\p@
\itemsep \parsep
}%
}%
\def\footnotesize{%
\@setfontsize\footnotesize\@viiipt{9.5pt}%
\abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ \@plus\p@
\belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
\def\@listi{%
\leftmargin\leftmargini
\topsep 3\p@ \@plus\p@ \@minus\p@
\parsep 2\p@ \@plus\p@ \@minus\p@
\itemsep \parsep
}%
}%
\def\scriptsize{%
\@setfontsize\scriptsize\@viipt\@viiipt
}%
\def\tiny{%
\@setfontsize\tiny\@vpt\@vipt
}%
\def\large{%
\@setfontsize\large\@xiipt{14pt}%
}%
\def\Large{%
\@setfontsize\Large\@xivpt{18pt}%
}%
\def\LARGE{%
\@setfontsize\LARGE\@xviipt{22pt}%
}%
\def\huge{%
\@setfontsize\huge\@xxpt{25pt}%
}%
\def\Huge{%
\@setfontsize\Huge\@xxvpt{30pt}%
}%
\@ifxundefined\twoside@sw{\@booleanfalse\twoside@sw}{}%
\twoside@sw{%
\oddsidemargin  -20pt
\evensidemargin -20pt
\marginparwidth 107pt
}{%
\oddsidemargin  .15in
\evensidemargin .15in
\marginparwidth 30pt
}%
\marginparsep 6pt
\topmargin -61pt
\topskip 10pt
\footskip 30pt
\textheight = 56pc
\textwidth36pc
\columnsep 1.5pc
\columnseprule 0pt
\footnotesep 1pt
\skip\footins 39pt plus 4pt minus 2pt
\def\footnoterule{\kern-19pt\hrule width.5in\kern18.6pt\relax}%
\floatsep 12pt plus 2pt minus 2pt
\textfloatsep 20pt plus 2pt minus 4pt
\intextsep 12pt plus 2pt minus 2pt
\dblfloatsep 12pt plus 2pt minus 2pt
\dbltextfloatsep 20pt plus 2pt minus 4pt
\@fptop 0pt plus 1fil
\@fpsep 8pt plus 2fil
\@fpbot 0pt plus 1fil
\@dblfptop 0pt plus 1fil
\@dblfpsep 8pt plus 2fil
\@dblfpbot 0pt plus 1fil
\marginparpush 5pt
\parskip 0pt plus 1pt
\parindent 1.5pc
\emergencystretch8\p@
\partopsep 2pt plus 1pt minus 1pt
\leftmargini 25pt
\leftmarginii 22pt
\leftmarginiii 18.7pt
\leftmarginiv 17pt
\leftmarginv 10pt
\leftmarginvi 10pt
\def\@listI{%
\leftmargin\leftmargini
\parsep 4\p@ plus2\p@ minus\p@
\topsep 8\p@ plus2\p@ minus4\p@
\itemsep 4\p@ plus2\p@ minus\p@
}%
\labelsep 4pt
\def\@listii{%
\leftmargin\leftmarginii
\labelwidth\leftmarginii
\topsep 4\p@ plus2\p@ minus\p@
\parsep 2\p@ plus\p@ minus\p@
\itemsep \parsep
}%
\def\@listiii{%
\leftmargin\leftmarginiii
\labelwidth\leftmarginiii
\topsep 2\p@ plus\p@ minus\p@
\parsep \z@
\partopsep \p@ plus\z@ minus\p@
\itemsep \topsep
}%
\def\@listiv{%
\leftmargin\leftmarginiv
\labelwidth\leftmarginiv
}%
\def\@listv{%
\leftmargin\leftmarginv
\labelwidth\leftmarginv
}%
\def\@listvi{%
\leftmargin\leftmarginvi
\labelwidth\leftmarginvi
}%
%%%%%%%%%%%%%%%% from class file

• Welcome to TeX.SX! That error seems to say that the class is badly written. It's not possible to say much more without seeing it. Aug 9 '16 at 22:17
• Thank you! I posted a link to download the original, but here is a copy-paste of the file: Edit: hit enter too early, and in any case, the code is obviously too long. I'll update the original post. Aug 9 '16 at 22:23
• @amizener: The .cls file you provide is different to the one in the .zip file. There's also a \ProcessOptionsd error -- the command is called \ProcessOptions! Using the sample file from the zip archive and your version of the .cls (and removing the d in the mentioned command) the compilation is successful and does not give the error message
– user31729
Aug 9 '16 at 22:34
• I get the error if I compile with pdflatex. When compiling with xelatex, it compiles fine. Aug 9 '16 at 22:38
• In the class definition file I moved all nine \DeclareOption... commands starting line 424 before \ExecuteOptions... in line 35 and now it works with pdflatex. Aug 9 '16 at 23:38

1. Remove the stray 'd' that somehow made it to the end of \ProcessOptions in line 36.
2. Move the nine \DeclareOption commands (lines 424-432) in front of \ExecuteOptions` (line 35).
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8461796045303345, "perplexity": 12498.802553961907}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-05/segments/1642320305242.48/warc/CC-MAIN-20220127072916-20220127102916-00322.warc.gz"}