%
%  niigata.sty
%
%  last updated: 2004/08/27 (fri)
%  by Yuki Yamakawa at Nagaoka University of Technology
%  Thanks for Prof. Tetsuo Iwakuma at Tohoku University
%
\newif\ifEN@LISH \EN@LISHfalse
%
\setlength{\textheight}{261mm}
\setlength{\textwidth}{180mm}
\setlength{\headheight}{0mm}
\setlength{\headsep}{0mm}
\setlength{\topmargin}{-7.4mm}
\setlength{\oddsidemargin}{-10.4mm}
\setlength{\evensidemargin}{-10.4mm}
\setlength{\columnsep}{6mm}
\renewcommand{\baselinestretch}{1.15}
%
\pagestyle{empty}
%
\newdimen\vspace@title
\@ifundefined{reset@font}{\let\reset@font\empty}{}
\newsavebox{\lastp@gebox}\newdimen\lastp@geheight
%
% MAKETITLEPAGE
%
%    \title  {   ..... title .....    }
%    \author { 1st author list \\ 2nd author list \\ 3rd author list }
%              author list = affiliation & membership & name
% \maketitle with empty pagestyle
%
\def\maketitle{\par
 \begingroup
   \def\thefootnote{\fnsymbol{footnote}}%
   \def\@makefnmark{\hbox
       to\z@{$\m@th^{\@thefnmark}$\hss}}%
   \if@twocolumn
     \twocolumn[\@maketitle]%
     \else \newpage
     \global\@topnum\z@
     \@maketitle \fi
 \endgroup
}
\def\@maketitle{\newpage\noindent%
%                                                title
\begin{list}{}{\setlength{\leftmargin}{90pt}
 \setlength{\rightmargin}{\leftmargin}
  \topsep=0pt \partopsep=0pt \Large\bf
  \baselineskip=1.0em}
  \item \@title
 \end{list} \vskip 1em%
%                                                author
\begin{flushright}
 \renewcommand{\arraystretch}{.8}
  \begin{tabular}{lll} \@author \end{tabular}
\end{flushright}%
 \vskip 1.5em}
%
% FIGURE/TABLE CAPTIONS
%
%   positions and style change {\bf }
%
% JAPANESE document
\def\figurename{�}--}
\def\tablename{�\--}
\def\refname{�Q�l����}
\def\fnum@figure{\figurename\thefigure}
\def\fnum@table{\tablename\thetable}
%
% ENGLISH document
\def\inenglish{\EN@LISHtrue
\def\figurename{Fig.}
\def\tablename{Table}
\def\fnum@figure{\figurename~\thefigure}
\def\fnum@table{\tablename~\thetable}
\def\refname{REFERENCES}
}
%
\long\def\@makecaption#1#2{%
   \vskip 10\p@
   \setbox\@tempboxa\hbox{{\bf #1}\ \ }%
    \@tempdima\hsize\advance\@tempdima-\wd\@tempboxa
    \setbox\@tempboxa\hbox{{\bf #1}\ \ #2}
   \ifdim \wd\@tempboxa <\hsize
       \hfil {\bf#1}\ \ #2\hfil\par
     \else
       \hbox to\hsize{\hfil {\bf #1}\ \ \parbox[t]\@tempdima{#2}\hfil}%
   \fi}
%
\long\def\@caption#1[#2]#3{\par\addcontentsline{\csname
  ext@#1\endcsname}{#1}{\protect\numberline{\csname
  the#1\endcsname}{\ignorespaces #2}}\begingroup
    \@parboxrestore
    \small
    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
  \endgroup}
%
% FIGURE/TABLE REFERENCE
%
\def\figno#1{{\bf\figurename\ifEN@LISH~\fi#1}}
\def\tabno#1{{\bf\tablename\ifEN@LISH~\fi#1}}
%
% SECTION, SUBSECTION, SUBSUBSECTION
%
\def\section{\@startsection {section}{1}{\z@}{1.5ex plus
 .1ex minus.1ex}{.1ex plus.1ex}{\reset@font\large\bf}}
\def\subsection{\@startsection{subsection}{2}{\z@}{.2ex plus
 .1ex minus.1ex}{.1ex plus.1ex}{\reset@font\normalsize\bf}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{.2ex plus
 .1ex minus.1ex}{.1ex plus.1ex}{\reset@font\normalsize\bf}}
%
% BIBLIOGRAPHY
%
% SPECIAL DEFINITIONS OF BIBLIOGRAPHY STYLE #2
%          by M.Watanabe (watanabe@akiu.gw.tohoku.ac.jp) (C) 1990,10/06
% and partially T.Iwakuma(bear@hashi1.civil.tohoku.ac.jp)
%  \cite           : $^{\mbox{\scriptsize LABEL)}}$
%                    $^{\mbox{\scriptsize LABEL1) LABEL2) ...}}$
%  \thebibliography: LABEL)
%
\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  \let\@citea\@empty
  \@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{),\penalty\@m}%
     \def\@tempa##1##2\@nil{\edef\@citeb{\if##1\space##2\else##1##2\fi}}%
     \expandafter\@tempa\@citeb\@nil
     \@ifundefined{b@\@citeb}{{\reset@font\bf ?}\@warning
       {Citation `\@citeb' on page \thepage \space undefined}}%
     \hbox{\csname b@\@citeb\endcsname}}}{#1}}
%
\def\@cite#1#2{\leavevmode\hbox{$^{%              by Isozaki
  \mbox{\scriptsize{#1\if@tempswa , #2\fi})}}$}}
%
\def\@biblabel#1{#1)}
%
% \textcite
%
\def\textcite{\@tempswafalse\@textcitex[]}
%
\def\@textcitex[#1]#2{%
 \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
%   \let\@citea\@empty
  \let\@citea\,
  \@textcite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{),\penalty\@m\ }%
     \def\@tempa##1##2\@nil{\edef\@citeb{\if##1\space##2\else##1##2\fi}}%
     \expandafter\@tempa\@citeb\@nil
     \@ifundefined{b@\@citeb}{{\reset@font\bf ?}\@warning
       {Citation `\@citeb' on page \thepage \space undefined}}%
     \hbox{\csname b@\@citeb\endcsname}}}{#1}}
%
\def\@textcite#1#2{{#1\if@tempswa ), #2\fi})}
%
% REFERENCE
%
%  modification of reference-list: char-size, \baselineskip and \itemsep
%
\def\thebibliography#1{%
  \subsection*{\refname\@mkboth
  {\uppercase{\refname}}{\uppercase{\refname}}}\vskip 0.5em\list
  {\@biblabel{\arabic{enumi}}}{\settowidth\labelwidth{\@biblabel{#1}}%
    \leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \itemsep=-0.5\parsep \small \setlength{\baselineskip}{0.90\normalbaselineskip}%
    \usecounter{enumi}%
    \let\p@enumi\@empty
    \def\theenumi{\arabic{enumi}}}%
    \def\newblock{\hskip .11em plus.33em minus.07em}%
    \sloppy\clubpenalty4000\widowpenalty4000
    \sfcode`\.=1000\relax}
\def\endthebibliography{%
  \def\@noitemerr{\@warning{Empty `thebibliography' environment}}%
  \endlist}
%
