%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% sarticle.cls  Ver. 2.4  last updated : <2003/11/30>  %%%
%%%                               by Nakano Shin'ya      %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%                                                        %%
%%   $B$3$N(Bclassfile$B$O!"(Ba4paper, $B2#AH$_(B $B$rA0Ds$H$7$F$$$k!%(B  %%
%%                                                        %%

\NeedsTeXFormat{pLaTeX2e}
\ProvidesClass{sarticle}[2003/11/30  Ver. 2.4 by Nakano S.]
                                 % $B%?%$%H%k%Z!<%8$N%l%$%"%&%H$rJQ99!%(B
                                 % twocolumn, landscape $B$r%5%]!<%H!%(B
\DeclareOption{10pt}{\def\@lettersz{10pt}}
\DeclareOption{11pt}{\def\@lettersz{11pt}}
\DeclareOption{12pt}{\def\@lettersz{12pt}}

\DeclareOption{notitlepage}{\def\@whereistitle{notitlepage}}
\DeclareOption{titlepage}{\def\@whereistitle{titlepage}}

\newif\if@twosideedit
\DeclareOption{oneside}{%
	\def\@oneortwoside{oneside}%
	\@twosideeditfalse}
\DeclareOption{twoside}{%
	\def\@oneortwoside{twoside}%
	\@twosideedittrue}

\newif\if@twocolumnedit
\DeclareOption{onecolumn}{%
	\def\@oneortwocolumn{onecolumn}%
	\@twocolumneditfalse}
\DeclareOption{twocolumn}{%
	\def\@oneortwocolumn{twocolumn}%
	\@twocolumnedittrue}

\def\@landscapeornot{}%
\DeclareOption{landscape}{%
	\def\@landscapeornot{,landscape}}%

\newif\if@resume
\DeclareOption{resume}{\@resumetrue}

\ExecuteOptions{10pt,notitlepage,oneside,onecolumn}
\ProcessOptions

\LoadClass[a4paper,\@lettersz,\@whereistitle,\@oneortwoside,\@oneortwocolumn\@landscapeornot]{jarticle}

\if@resume
	%	\RequirePackage{resume}
	% $B?t<0HV9f=PNO$N@_Dj(B
	\@addtoreset{equation}{section}
	\renewcommand{\theequation}{\thesection .\arabic{equation}}
	% $B$=$NB>(Bcounter$B$N@_Dj(B
	\@addtoreset{table}{section}
	\renewcommand{\thetable}{\thesection .\arabic{table}}
	\@addtoreset{figure}{section}
	\renewcommand{\thefigure}{\thesection .\arabic{figure}}
\fi

%%%  margin$BD4@0(B  %%%
%% $B=DJ}8~(B %%
\setlength{\textheight}{.75\paperheight} %$B;CDjA<CV(B
%\setlength{\textheight}{225mm}
\if@landscape
	\setlength{\topmargin}{-15mm}
	\setlength{\headheight}{10mm}
	\setlength{\headsep}{10mm}
	\setlength{\footskip}{14mm} %$B;CDjA<CV(B
\else
	\setlength{\topmargin}{-10mm}
	\setlength{\headheight}{10mm}
	\setlength{\headsep}{15mm}
%	\setlength{\headsep}{18mm}
	\setlength{\footskip}{16mm} %$B;CDjA<CV(B
%	\setlength{\footskip}{18mm}
\fi
%% $B2#J}8~(B %%
\if@twocolumn
	\setlength{\textwidth}{.82\paperwidth}
\else
	\setlength{\textwidth}{.7\paperwidth}
\fi
\setlength{\@tempdima}{\paperwidth}
\addtolength{\@tempdima}{-\textwidth}
\if@twoside
	\setlength{\oddsidemargin}{.6\@tempdima}
	\setlength{\evensidemargin}{.4\@tempdima}
\else
	\setlength{\oddsidemargin}{.5\@tempdima}
	\setlength{\evensidemargin}{.5\@tempdima}
\fi
\setlength{\marginparwidth}{\evensidemargin}
\addtolength{\oddsidemargin}{-1in}
\addtolength{\evensidemargin}{-1in}
\addtolength{\marginparwidth}{-0.4in}
\setlength{\columnsep}{12mm}
\setlength{\columnseprule}{.2pt}
%
%% titlepage$B$J$I$K(Bheader$B$,$"$k$+$J$$$+(B
%% $B!c;CDjA<CV!d(B
\newif\if@titheaderexist
\ifx\ps@jpl@in\ps@plain
	\@titheaderexistfalse
\else
	\ifx\ps@jpl@in\ps@empty
		\@titheaderexistfalse
	\else
		\ifx\ps@jpl@in\ps@footnombre
			\@titheaderexistfalse
		\else
			\@titheaderexisttrue
		\fi
	\fi
\fi
%
%%%  pagestyle empty $B$N$H$-$K@8$8$kLdBj$KBP$9$k=$@5(B  %%%
\def\ps@empty{\let\ps@jpl@in\ps@empty%
  \let\@mkboth\@gobbletwo\let\@oddhead\@empty\let\@oddfoot\@empty
	\let\@evenhead\@empty\let\@evenfoot\@empty}
%
\if@twoside
  \def\ps@headings{\let\ps@jpl@in\ps@headnombre
    \let\@oddfoot\@empty\let\@evenfoot\@empty
    \def\@evenhead{\hspace{-5mm}\underline{\hspace{5mm}%
	 	  \hbox to \textwidth{\thepage\hfil\leftmark}\hspace{5mm}}}%
    \def\@oddhead{\hspace{-5mm}\underline{\hspace{5mm}%
			\hbox to \textwidth{{\rightmark}\hfil\thepage}\hspace{5mm}}}%
    \let\@mkboth\markboth
  \def\chaptermark##1{\markboth{%
     \ifnum \c@secnumdepth >\m@ne
         \@chapapp\thechapter\@chappos\hskip1zw
     \fi
     ##1}{}}%
  \def\sectionmark##1{\markright{%
     \ifnum \c@secnumdepth >\z@ \thesection.\hskip1zw\fi
     ##1}}%
  }
\else % if not twoside
  \def\ps@headings{\let\ps@jpl@in\ps@headnombre
    \let\@oddfoot\@empty
    \def\@oddhead{\hspace{-5mm}\underline{\hspace{5mm}%
			\hbox to \textwidth{{\rightmark}\hfil\thepage}\hspace{5mm}}}%
    \let\@mkboth\markboth
\def\chaptermark##1{\markboth{%
   \ifnum \c@secnumdepth >\m@ne
       \@chapapp\thechapter\@chappos\hskip1zw
   \fi
   ##1}{}}%
\def\sectionmark##1{\markright{%
   \ifnum \c@secnumdepth >\z@ \thesection.\hskip1zw\fi
   ##1}}%
  }
\fi
%

%%%  $B$=$NB>$N@_Dj$J$I(B  %%%
% itemize label
\renewcommand{\labelitemi}{\raisebox{1pt}{$\bigcirc$}}
\renewcommand{\labelitemii}{\textbullet}
\renewcommand{\labelitemiii}{\textperiodcentered}
\renewcommand{\labelitemiv}{\textendash}
%\renewcommand{\labelitemi}{$\diamondsuit$}

% enumerate label
%\renewcommand{\labelenumi}{\makebox[0.6em][c]{\theenumi}.}
\renewcommand{\labelenumii}{(\makebox[0.6em][c]{\theenumii})\,}
%\renewcommand{\labelenumi}{(\makebox[0.8em][c]{\theenumi})\,}
%\renewcommand{\labelenumii}{\makebox[0.6em][c]{\theenumii}.}
\renewcommand{\labelenumiii}{{\itshape\theenumiii }.}
%\renewcommand{\labelenumiv}{\makebox[0.7em][c]{\theenumiv}.}

%% footnote$B$N@_Dj(B (sreport$B$h$j(Bcopy) %%%
\@addtoreset{footnote}{page}
\renewcommand{\footnoterule}{%
	\vspace{7mm}
%	\vspace{5mm}
  \kern-3\p@
  \hrule width .7\columnwidth
%  \hrule width .4\columnwidth
  \kern 2.6\p@}
\renewcommand{\thefootnote}{\arabic{footnote})}

%% $BH>1Q8l2=(B %%
%%% $BF|IUI=<((B ( \today command ) $B$N@_Dj(B %%%
\def\today{\ifcase\month\or
  Jan.\or Feb.\or Mar.\or Apr.\or May.\or Jun.\or
  Jul.\or Aug.\or Sep.\or Oct.\or Nov.\or Dec.\fi
  \space\number\day, \number\year}

\renewcommand{\contentsname}{Contents}
\renewcommand{\refname}{References}
\renewcommand{\indexname}{Index}
\renewcommand{\figurename}{Figure}
\renewcommand{\tablename}{Table}
\renewcommand{\appendixname}{Appendix}
\renewcommand{\abstractname}{Abstract}
%\newcommand{\prepartname}{$BBh(B}
%\newcommand{\postpartname}{$BIt(B}
%\newcommand{\contentsname}{$BL\(B $B<!(B}
%\newcommand{\listfigurename}{$B?^(B $BL\(B $B<!(B}
%\newcommand{\listtablename}{$BI=(B $BL\(B $B<!(B}
%\newcommand{\refname}{$B;29MJ88%(B}
%\newcommand{\indexname}{$B:w(B $B0z(B}
%\newcommand{\figurename}{$B?^(B}
%\newcommand{\tablename}{$BI=(B}
%\newcommand{\appendixname}{$BIU(B $BO?(B}
%\newcommand{\abstractname}{$B35(B $BMW(B}

%%% Title$B$NBN:[$NJQ99(B (sreport$B$h$j(Bcopy) %%%
\if@titlepage
  \renewcommand{\maketitle}{\begin{titlepage}%
  \let\footnotesize\small
  \let\footnoterule\relax
  \let\footnote\thanks
  \null\vfill
%  \null\vfil
%  \vskip 60\p@
  \begin{center}%
%    {\bfseries\sffamily\Huge \@title \par}%
    {\LARGE \@title \par}%
    \vskip 5em%
    {\Large
     \lineskip .75em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
%      \vskip 1.5em%
			\vfill\vfill\vfill
    {\large \@date \par}%       % Set date in \large size.
%		\vfil
%	 \vbox to10cm{ }
  \end{center}\par
  \@thanks\vfill\vfill\null
%  \@thanks\vfil\null
  \end{titlepage}%
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\p@thanks\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
  }%
\else
  \renewcommand{\maketitle}{\par
  \begingroup
    \renewcommand{\thefootnote}{\fnsymbol{footnote}}%
    \def\@makefnmark{\hbox{\ifydir $\m@th^{\@thefnmark}$
      \else\hbox{\yoko$\m@th^{\@thefnmark}$}\fi}}%
     \long\def\@makefntext##1{\parindent 1em\noindent
       \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}%
    \if@twocolumn
      \ifnum \col@number=\@ne \@maketitle
      \else \twocolumn[\@maketitle]%
      \fi
    \else
      \newpage
      \global\@topnum\z@   % Prevents figures from going at top of page.
      \@maketitle
    \fi
		\thispagestyle{jpl@in}\@thanks
  \endgroup
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\p@thanks\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
  }
  \def\@maketitle{%
  \newpage\null
%% header$B$,$"$k$+$J$$$+(B(header$B$,$J$1$l$P(Btitle$B$N0LCV$r>e$2$k(B)
	\if@titheaderexist
			\vspace{-6mm}
%	 		\vspace{-2em}
	\else
			\vspace{-21mm}
%			\vspace{-7em}
	\fi
%
 	\begin{center}%
 	\let\footnote\thanks
   	{\LARGE \@title \par}%
   	\vskip 1.5em%
  	{\large
    	 \lineskip .5em%
     	\begin{tabular}[t]{c}%
       	\@author
     	\end{tabular}\par}%
			\vskip 0.6em%
    	{\@date}%
 	\end{center}%
  \par\vskip 1.5em}
\fi


%%% Float$B$N@_Dj(B %%%
\setcounter{topnumber}{4}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{5}

\endinput
