[Tex/LaTex] fleqn.clo vs fleqn.sty

document-classes

Please have a look at this MWE:

\documentclass{JHEP}

\usepackage{fleqn}

 \author{me} 
 \abstract{a}
 \title{t}

\begin{document}
\begin{equation}
a = b+1
\end{equation}
\end{document}

however it works, i got warning

inputting fleqn.clo instead of obsolete fleqn.sty

What is the difference between .clo and .sty?
If i use fleqn as a document class option instead of the package, it gets ignored. Why?

My last question, i also got warning

You have requested document class JHEP, but the document class
provides JHEP3.

using this class. Why is that?

JHEP here

Best Answer

This is (apart from an initial banner which is irrelevant) the contents of fleqn.sty:

\@obsoletefile{fleqn.clo}{fleqn.sty}
\input{fleqn.clo}
\endinput

This is provided because some people might still have LaTeX 2.09 documents with a \documentstyle initial line, where packages were given as option to this command and needed, for this, the .sty extension.

Don't load this file if you're using a specialized class such as JHEP that is meant for submissions to a journal. Either the class provides support for the fleqn option or not, in which case the journal managers won't be happy if you use it.

Actually, the class supports the option, because it has

\DeclareOption{fleqn}{\@OImess{}}   %\input{fleqn.clo}} IGNORED ...

followed by

\newcommand\@OImess[1]{\JHEP@ignol{OPTION '\CurrentOption'#1}}

which simply will tell you that the option is ignored. Loading fleqn.clo anyway would probably result in something bad.

Finally the warning you get is because the class is named JHEP.cls, but it has

\ProvidesClass{JHEP3} [2003/01/03 v3.1.2 LaTeX document class - F.N.]

Thus it's their fault.