[texhax] The Optional usage of the Packages

zoran.nikolic at ubs.com zoran.nikolic at ubs.com
Thu Aug 16 12:27:10 CEST 2007


Hello Folks,

I really apologize to contact you directly
but I realy went over everything I found on the web about my issue...

The aim:
Depending on the options passed to my class, I'd like
a various packages to be used or not used - checkout what I tried...

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{sciencearticle}[2007/08/15 The Science Article Class]

\DeclareOption{chem}
  {
    \typeout{Providing packages for the Chemistry}
    \RequirePackage[version=3]{mhchem}
  }
\DeclareOption{chemext}
  {
    \typeout{Providing packages for the Chemistry - Extended}
    \RequirePackage[version=3]{mhchem}
    \RequirePackage{epic}
    \RequirePackage{chemstr}
    \RequirePackage{carom}
    \RequirePackage{hetarom}
    \RequirePackage{hetaromh}
    \RequirePackage{lowcycle}
    \RequirePackage{ccycle}
    \RequirePackage{hcycle}
    \RequirePackage{aliphat}
    \RequirePackage{locant}
    \RequirePackage{polymers}
    \RequirePackage{methylen}
    \RequirePackage{fusering}
    \RequirePackage{sizeredc}
  }

\ProcessOptions\relax
\LoadClass[a4paper, twoside, 11pt]{article}

This is not working and the message is:
! LaTeX Error: \RequirePackage or \LoadClass in Options Section.

Could somebody please help me on how to bind the packages
optionally.

Many thanks in advance

Zoran Nikolic

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/texhax/attachments/20070816/59d3acc8/attachment.html 


More information about the texhax mailing list