# Using fleqn option in a new LaTeX class

I am creating a new LaTeX class, necessarily the equations must be aligned to the left so I use the file fleqn.clo in the class code. The problem is that when using the equation environment the result equation is well constructed but not appears any space between it and the paragraphs, like as if the equation be a normal paragraph. This is different to what happens when using the article class with fleqn option, and basically the article class does the same thing that me when including fleqn.clo.

I think important part of the code I wrote

%Load Packages
text={17.59cm,22.94cm},top=2.5cm,inner=2.5cm,outer=1.5cm,columnsep=0.5cm]{geometry}
\RequirePackage[spanish,english]{babel}
\RequirePackage[T1]{fontenc}
\RequirePackage[latin1]{inputenc}

%Declarations
\DeclareOption{spanish}{%
\AtBeginDocument{\selectlanguage{spanish}}
}
\DeclareOption{english}{%
\AtBeginDocument{\selectlanguage{english}}
}
\DeclareOption*{\ClassWarning{RCIULApaper}{Unknown \CurrentOption', default language used is spanish}}
\ExecuteOptions{spanish}
\ProcessOptions\relax

%Align equations to left
\input{fleqn.clo}
\renewcommand \theequation {\@arabic\c@equation}

%Set the document font size
\renewcommand{\normalsize}{\@setfontsize{\normalsize}{10}{12.00pt}}%
\normalsize
\abovedisplayskip 1.5ex plus4pt minus2pt%
\belowdisplayskip \abovedisplayskip%
\abovedisplayshortskip 1.5ex plus4pt minus2pt%
\belowdisplayshortskip 1.5ex plus4pt minus2pt
\newcommand{\tiny}{\@setfontsize{\tiny}{5}{6pt}}
\newcommand{\scriptsize}{\@setfontsize{\scriptsize}{7}{8pt}}
\newcommand{\footnotesize}{\@setfontsize{\footnotesize}{8}{10pt}}
\newcommand{\small}{\@setfontsize{\small}{8.5}{10pt}}
\newcommand{\large}{\@setfontsize{\large}{12}{12pt}}
\newcommand{\Large}{\@setfontsize{\Large}{14}{14.40pt}}
\newcommand{\LARGE}{\@setfontsize{\LARGE}{18}{18pt}}
\newcommand{\huge}{\@setfontsize{\huge}{20}{20.74pt}}
\newcommand{\Huge}{\@setfontsize{\Huge}{24}{24.88pt}}

%Using Times Roman font
\renewcommand{\sfdefault}{phv}
\renewcommand{\rmdefault}{ptm}
\renewcommand{\ttdefault}{pcr}

%Tolerances
\hyphenpenalty=750
\binoppenalty=1000
\relpenalty=800


What should I add to have a good behavior?

Thanks!

-
You're setting \abovedisplaysshortskip to 0pt (plus some glue). You may notice that if your paragraph ends with a short line, this is a problem, but it the paragraph has a long ending line, then it's not a problem. Is this the case? –  Werner May 14 '12 at 20:24
Thanks @Werner but nothing changes by placing a different value for \abovedisplayshortskip. Also the article class does not use any configuration of these commands, just use \input{fleqn.clo} and \renewcommand \theequation {\@arabic\c@equation}, wherefore I failed to find the solution based on the existent class. –  OSjerick May 14 '12 at 20:44

fleqn doesn't use displaymath it is a trivlist so the vertical spacing is governed by \topsep \partopsep and the other list parameters. You presumably have these set to 0 in your class?

\documentclass[fleqn]{article}

\begin{document}

\noindent aaaaaaaa$1=2$bbbbbbbbbbb

\topsep0pt
\partopsep0pt
\parsep0pt
\parskip0pt

\noindent aaaaaaaa$1=2$bbbbbbbbbbb

\end{document}

-
Thanks @DavidCarlisle I put the complete code for you to see, \topsep is never used, however, had already tried some value for it and work, but this affects other environments like center, I just wanted to know what I can do to affect only the equation environment. –  OSjerick May 14 '12 at 21:06
The displaystyle works perfectly with the settings for \abovedisplayskip and the others. –  OSjerick May 14 '12 at 21:11
I upload an image where see the problem, and the use of  for display a equation without numbering. –  OSjerick May 14 '12 at 21:18
@osjerick The value of \topsep after loading the class is 0pt and this, as David says, explains the issue. You can cure it by loading also \RequirePackage[fleqn]{amsmath}. However you should also set sensible values for \topsep` and the other list parameters. –  egreg May 14 '12 at 21:51
Well, I accept this as the solution. Thanks! –  OSjerick May 14 '12 at 21:54