%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% mhd DOCUMENT CLASS version 1.0 -- Released June 21, 2003   %
% based on the mhd209.sty, version 1.2, for LaTeX 2.09       %
% Copyright (C) 2000, 2003 J\=anis C\={\i}rulis              %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                            %
%     This is the file mhd.cls for typesetting papers        %
%     for "MagnetoHydroDynamics".                            %
%                                                            %
%     You should copy it into the directory where your       %
%     document or where your style files are placed. Keep    %
%     it there while preparing the document for MHD. It is   %
%     to be loaded by the command                            %
%		\documentclass[...]{mhd}                     %
%     where any options usable with article.cls are admitted.%
%     Cf. the example file                                   %                                                                     
%               mhd2e.tex                                    %                                                          
%     which you find attached, too. In fact, it is suggested %		  
%     to use the file mhd2e.tex as a root file for your      %
%     contribution.                                          %
%                                                            %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NeedsTeXFormat{LaTeX2e}[1955/12/01]
\ProvidesClass{mhd}
          [2003/06/21 MAGNETOHYDRODYNAMICS style file v.\ 1.0]     
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions
\LoadClass{article}
	% Page layout

\setlength\oddsidemargin{1.71cm}   		
\setlength\evensidemargin{1.71cm}	
\setlength\topmargin{0cm} 		
\setlength\headheight{0cm}	
\setlength\headsep{0cm} 	

\setlength\footskip{7mm}		

\setlength\textheight{220mm}
\setlength\textwidth{125mm}

	%Pagestyle

\def\@oddhead{}\def\@evenhead{}
\def\@oddfoot{\rm\hfil\thepage}
\def\@evenfoot{\rm\thepage\hfil}

        %The "Magnetohydrodynamics" header

%% usage: #1: volume number, #2: issue number, #3: number of the first page;
%% year := 1964 + #1
\providecommand{\mhdhead}[3]{\def\@Vol{#1} \def\@No{#2} 
	\def\@Firstpageno{#3} \setcounter{page}{#3}
	\newcount\@year \@year=1964 \advance\@year by #1
	\def\@Year{\number\@year} }
%% usage: dmhdhead is to be used for double-number issues
\providecommand{\dhmdhead}[3]{\mhdhead{#1}{#2}{#3}
	\newcount\@no \@no=#2 
	\def\@No{\number\@no \advance\@no by 1/\number\@no}
	\def\@Totalno{\number\@totalno\advance\@totalno by 
		1/\number\@totalno} }
\newcommand\@jName{MAGNETOHYDRODYNAMICS}
\newcommand\@requisites{Vol.\ \@Vol\ (\@Year), No.\ \@No,
	pp.\ \@Firstpageno--}
\newcommand\@mhdhead{\@jName\ \@requisites\pageref{@lastpageno}}

        %Title and abstract

%% Institute (borrowed from LNCS)
\newcounter{@inst}
\newcounter{@auth}

\providecommand\institute[1]{\gdef\@institute{#1}}
\newcommand\@institutename{\par
 \begingroup
  \parskip=\z@
  \parindent=\z@
  \setcounter{@inst}{1}
  \def\and{\par\stepcounter{@inst}
  \noindent$^{\the@inst}\,$}	
  \setbox0=\vbox{\def\thanks##1{}\@institute}
  \ifnum\c@@inst=1\relax
   \else
   \setcounter{footnote}{\c@@inst}
   \setcounter{@inst}{1}
   \noindent$^{\the@inst}\,$
  \fi	
  \ignorespaces
  \@institute\par
 \endgroup}

\def\@thanks{}

\def\inst#1{\unskip$^{#1}$}
%(Borrowed from proc.sty)
\def\and{\end{tabular}\begin{tabular}[t]{c}}

	%Dedication

\let\@dedication\relax
\providecommand{\dedication}[1]{\def\@dedication{#1}}

	%Abstract

\renewcommand\abstract{\renewcommand{\baselinestretch}
	{\@bls}\small\noindent} 
\renewcommand\endabstract{\normalfont\par}
\providecommand{\classification}[1]{\vskip 1mm 
	\par\noindent PACS number(s): #1}

\let\date\relax

	%Forming the title

\renewcommand\maketitle{\par
 \begingroup
   \def\@makefnmark{\hbox to\z@{$\m@th^{\@thefnmark}$\hss}}
   \global\@topnum\z@ \@maketitle\thispagestyle{empty}
 \endgroup 
 \setcounter{footnote}{0}%
 \let\maketitle\relax \let\@maketitle\relax 
	\let\mhdhead\relax \let\dmhdhead\mhdhead
 \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\gdef\@dedication{}
	\let\thanks\relax{}}

\renewcommand\@maketitle{\ifx\@Vol\undefined
	\gdef\@Vol{00}\gdef\@No{00}\gdef\@Year{1964}
	\gdef\@Firstpageno{1}\fi
 \centerline{\@mhdhead}
 \smallskip\hrule \vskip 1.3cm \par
 \begin{center}
  \vskip 1em {\large\bf \@title \par\vskip.3cm}
   \bgroup
   \large\itshape\lineskip .5em
    \begin{tabular}[t]{c}\@author \end{tabular}
   \egroup 
  \vskip.1cm
  {\small\itshape\@institutename}
  \par \vskip.3cm
  \if!\@dedication!\else{\small \@dedication\par}\vskip 1.5em\fi
 \end{center}}

	%Sections

%\section and \subsection commands redefined
%\subsubsection command relaxed
%\paragraph := \section, \subparagraph := \subsection
%%%%%\paragraph is now a first level numbered section

\renewcommand\section{\@startsection{section}{1}
	{\parindent}{3.25ex plus 1ex minus -.2ex}{-1em}
        {\reset@font\normalfont\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}
	{\parindent}{3.25ex plus1ex minus .2ex}{-1em}
	{\reset@font\normalfont\slshape}}
\let\paragraph\section
\let\subparagraph\subsection
\let\subsubsection\relax

%dotted section numbers
\def\the@section{\ifnum\arabic{section}=0\relax\else
	\thesection\symbol{46}\fi}
\def\thesubsection{\the@section\arabic{subsection}}

\def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
  \let\@svsec\@empty
   \else
   \refstepcounter{#1}\edef\@svsec{\csname 
	the#1\endcsname\symbol{46}\hskip .7em }\fi	%\hskip 1em}\fi
   \@tempskipa #5\relax
     \ifdim \@tempskipa>\z@
       \begingroup #6\relax
       \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}
       \endgroup
      \csname #1mark\endcsname{#7}\addcontentsline
      {toc}{#1}{\ifnum #2>\c@secnumdepth 
	\else
        \protect\numberline{\csname the#1\endcsname}\fi#7}
	 \else
         \def\@svsechd{#6\hskip #3\relax  
         \@svsec #8\csname #1mark\endcsname{#7}
         \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth 
          \else
          \protect\numberline{\csname the#1\endcsname}\symbol{46}\fi
         #7}}\fi
	\@xsect{#5}}

        %For acknowledgements

\let\Thanks\relax
\long\def\Thanks#1{\section*{Acknowledgements.}\setcounter{section}{0}
	\setcounter{subsection}{0}\reset@font\normalfont 
	\rm #1}

	%Received

\providecommand{\received}[1]{\begin{trivlist} 
	\item[] \small\hfill  Received #1 \end{trivlist}}

	%Page numbering
%fixes the number of the last page
\providecommand\lastpageno{\label{@lastpageno}}

%References (borrowed from Springer llncs)
\renewcommand\refname{REFERENCES}
\def\thebibliography#1{\section*{\refname}\small\list
  	{\arabic{enumi}.}{\settowidth\labelwidth{#1.}
	\leftmargin\labelwidth\advance\leftmargin\labelsep
	\usecounter{enumi}}
\def\newblock{\hskip .11em plus .33em minus -.07em}
	\sloppy
	\sfcode`\.=1000\relax}

	%New mathematics                             

\providecommand\Div{\mathop{\rm div}\nolimits}
\providecommand\Rot{\mathop{\rm rot}\nolimits}
\providecommand\Grad{\mathop{\rm grad}\nolimits}
\providecommand\bvec[1]{\mathchoice{\mbox{\boldmath$\displaystyle#1$}}
  {\mbox{\boldmath$\textstyle#1$}}
  {\mbox{\boldmath$\scriptstyle#1$}}
  {\mbox{\boldmath$\scriptscriptstyle#1$}}}

	%Initialization

\parindent 2em
\leftmargini 2em
\leftmargin\leftmargini
\leftmarginv .5em
\leftmarginvi .5em
\itemsep -3mm
\def\@bls{.5}

\flushbottom
%\@twosidefalse

\endinput
