Articles, Essays, and Journal Templatescan't use \usepackage with this class

IEEE, Elsevier, ACM, ACE, Science, AGU, PNAS, PLOS, RSoC, Springer, Stylish articles and Essays
Post Reply
moebius1927
Posts: 2
Joined: Sat Aug 12, 2017 1:39 am

can't use \usepackage with this class

Post by moebius1927 »

Hi All,
when I use aiaa.cls class, i can't use \usepackage{XXXX} since the compiler says:

Code: Select all

! LaTeX Error: \RequirePackage or \LoadClass in Options Section.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.3 \begin{document}

?
Do you have any idea how to solve it?
Attachments
AIAA_HARTII.tex
(24.61 KiB) Downloaded 729 times
AIAA.cls
(25.58 KiB) Downloaded 697 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
thomasb
Posts: 134
Joined: Thu Aug 03, 2017 10:54 am

can't use \usepackage with this class

Post by thomasb »

Make a short example, with as little lines as you can... And you can post it :

Code: Select all

\documentclass{AIAA}
\usepackage{graphicx}
\usepackage{bm}
\begin{document}
\section{General Guidelines}
\subsection{Publication}
\end{document}
Does this works for you, or is there the same problem ?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

can't use \usepackage with this class

Post by Johannes_B »

The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

can't use \usepackage with this class

Post by Stefan Kottwitz »

Welcome to the forum!

It seems to be caused by the \DeclareOption commands after %%%%%%%%%%%% From APS4-1.rtx:

Code: Select all

\DeclareOption{pra}{\change@journal{pra}}%
\DeclareOption{prb}{\change@journal{prb}}%
\DeclareOption{prc}{\change@journal{prc}}%
\DeclareOption{prd}{\change@journal{prd}}%
\DeclareOption{pre}{\change@journal{pre}}%
\DeclareOption{prl}{\change@journal{prl}}%
\DeclareOption{prstab}{\change@journal{prstab}}%
\DeclareOption{prstper}{\change@journal{prstper}}%
\DeclareOption{rmp}{\change@journal{rmp}}%
I removed those lines from AIAA.cls and then your document works. Class files should never be modified, but in this case it's broken anyway... And those options don't seem to be used anyway.

Stefan
LaTeX.org admin
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

can't use \usepackage with this class

Post by Johannes_B »

I think it would be much more productive to ping the journal editors and ask them to fix the template. A proper copyright notice should also be added.

That way, improvements will be seen by all users of the template.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
moebius1927
Posts: 2
Joined: Sat Aug 12, 2017 1:39 am

can't use \usepackage with this class

Post by moebius1927 »

thank you, I'll try to send email to the editor!
Post Reply