%% File `jspf-rc.sty'.
%% Style for Rapid Communications, Journal of Plasma and Fusion Research
%% The Japan Society of Plasma Science and Nuclear Fusion Research
%% http://jspf.nifs.ac.jp/
%% Author: Haruhiko Okumura <okumura@matsusaka-u.ac.jp>

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{jspf-rc}[2001/09/30 JSPF Rapid Communications]

\renewcommand\normalsize{%
%%% NOTE: text lines are separated by 4.48mm.
  \@setfontsize\normalsize\@xpt{4.48mm}
  \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
  \abovedisplayshortskip \z@ \@plus3\p@
  \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@}
\normalsize

%%% NOTE: text width (including column separation) is 160mm (= 75*2+10)
\setlength\textwidth {160mm}
%%% NOTE: column separation is 10mm.
\setlength\columnsep {10mm}
%%% NOTE: text paragraph indentation is 7mm.
\setlength\parindent {7mm}
\setlength\headheight{0pt}
\setlength\headsep   {0pt}
\setlength\footskip  {0pt}

\setlength\topmargin     {0pt}
\setlength\oddsidemargin {0pt}
\setlength\evensidemargin{0pt}

%%% NOTE: first and last text lines are separated by 219.52mm
\setlength\textheight  {219.52mm} % 4.48mm * 49
\addtolength\textheight{\topskip}
\addtolength\textheight{0.1\p@}

%%% NOTE: equations are indented by 10mm.
\setlength\mathindent{10mm}

\pagestyle{empty}

\newcommand*{\affiliation}[1]{\gdef\@affiliation{#1}}
\newcommand*{\keywords}[1]{\gdef\@keywords{#1}}
\newcommand*{\email}[1]{\gdef\authors@mail{#1}}
% \newcommand*{\email}[1]{{%
%   \def\@makefntext{\parindent1em \noindent}
%   \footnotetext[0]{\itshape author's e-mail:\ #1}}}

\renewcommand{\maketitle}{\par
  \begingroup
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
    \long\def\@makefntext##1{\parindent 1em\noindent
            \hb@xt@1.8em{%
                \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
      \twocolumn[\@maketitle]%
    \thispagestyle{empty}\@thanks
  \endgroup
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@affiliation\@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
  \ifx\authors@mail\@undefined\else{%
    \def\@makefntext{\parindent1em \noindent}
    \footnotetext[0]{\itshape author's e-mail:\ \authors@mail}%
  }\fi
  \global\let\authors@mail\@undefined}
\def\@maketitle{%
  \newpage\null
  \begin{center}
    \let\footnote\thanks
    \def\sup##1{$^{##1)}$}
    \ifx\@title\@undefined\else
      {\LARGE\sffamily\bfseries\@title\par}\fi
%%% NOTE: separation between title and author
    \vskip 12pt
    \ifx\@author\@undefined\else
      {\lineskip .5em
        \begin{tabular}[t]{c}%
          \large\@author
        \end{tabular}\par}
    \fi
    \ifx\@affiliation\@undefined\else
%%% NOTE: separation between author and affiliation
      \vskip 3pt
      {\itshape\@affiliation}\par
    \fi
    \ifx\@date\@undefined\else
%%% NOTE: separation between affiliation and date
      \vskip 3pt
      \@date
    \fi
  \end{center}\par
%%% NOTE: separation between date and abstract
  \vskip 6pt
  \centerline{\box\@abstractbox}
  \ifx\@keywords\@undefined\else
%%% NOTE: separation between abstract and keywords
    \vskip 8pt
%%% NOTE: width of keywords column is 150mm
    \centerline{\parbox{150mm}{{\sffamily\bfseries Keywords:} \@keywords}}
  \fi
%%% NOTE: separation between keywords and text
  \vskip 12pt}

\newbox\@abstractbox
\renewenvironment{abstract}{%
  \global\setbox\@abstractbox\hbox\bgroup
%%% NOTE: abstract width is 150mm, indent is 5mm
  \begin{minipage}{150mm}\parindent5mm\relax}%
  {\end{minipage}\egroup}

\renewcommand\figurename{Fig.}

\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{\small\sffamily #1 #2}%
  \ifdim \wd\@tempboxa >\hsize
    {\small\sffamily
      \list{#1}{%
        \renewcommand{\makelabel}[1]{##1\hfil}
        \itemsep    \z@
        \itemindent \z@
        \labelsep   \z@
        \labelwidth 1cm
        \listparindent\z@
        \leftmargin 1cm}\item\relax #2\endlist}
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}

\renewenvironment{thebibliography}[1]{
  \list{\@biblabel{\@arabic\c@enumiv}}%
  {\settowidth\labelwidth{\@biblabel{#1}}%
    \leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \@openbib@code
    \usecounter{enumiv}%
    \let\p@enumiv\@empty
    \renewcommand\theenumiv{\@arabic\c@enumiv}}%
  \sloppy
  \clubpenalty4000
  \@clubpenalty \clubpenalty
  \widowpenalty4000%
  \sfcode`\.\@m}
{\def\@noitemerr
  {\@latex@warning{Empty `thebibliography' environment}}%
  \endlist}

\def\@listi{\leftmargin\leftmargini
  \parsep \z@
  \topsep 0.5\baselineskip \@plus 0.2\baselineskip \@minus 0.1\baselineskip
  \itemsep \z@ \relax}
\let\@listI\@listi

\endinput
%%
%% End of file `jspf-rc.sty'.